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