Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only

how to express the constraint?

  • 1.  how to express the constraint?

    Posted 06/12/09 07:34 AM

    Originally posted by: SystemAdmin


    [zxlcsit said:]

    The following program is wrong,who knows how to write the constraint if  data.nvar>3?  
    for (int i = 0; i < data.ncons; i++)<br />    {
          for (int j = 0; j < data.nvar; j++)<br />          {
                rng[0][i] = cplex.AddLe(cplex.Sum(cplex.Prod(x[j], data.constcoeff[i][j]), cplex.Prod(x[j+1],    data.constcoeff[i][j + 1])), data.constrhs[i], data.constname[i]);
              }

    #DecisionOptimization
    #MathematicalProgramming-General