Originally posted by: Mehdi.M
Dear all cplex experts,
I have a question on column major model.
In my model, I defined the constraints, added to the model, and then add the columns.
I added one specific column two times to the same constraint. But the coefficient is not doubled ?
The coefficient would be replaced or added to the previous one?
The following code is not exactly the same but it simulate what I did:
IloObjective obj(env);
IloRangeArray r(env);
for (int i = 1; i <= 10; ++i)
r[i-1].add ( 100 - x[i-1] <= 0)
IloModel model(env);
model.add(obj);
model.add(r);
IloNumColumn ycol(env);
ycol += r[0](1);
ycol += r[0](1);
IloNumVar y(ycol, 0, 1, IloNumVar::Float, "y");
But finally the coefficient of y in the constraint r[0] is 1 not 2? why?
Thanks
Mehdi
#CPLEXOptimizers#DecisionOptimization