Originally posted by: MarkusS.
Hello,
I am trying to add a starting solution in the following way:
cerr<<
"added start: ";
for(
int i=0;i<n_nodes;i++)
{ vars.add(y[i]);
if(mySolutionPool->mySolutions[epsilon].y[i]>0.9 )
{ vals.add(1); cerr<<i<<
" ";
}
else
{ vals.add(0);
}
}
for(
int i=0;i<n_arcs;i++)
{ vars.add(x[i]);
if(mySolutionPool->mySolutions[epsilon].x[i]>0.9 )
{ vals.add(1);
}
else
{ vals.add(0);
}
} cplex->addMIPStart(vars,vals,IloCplex::MIPStartAuto);
where mySolution contains a feasible solution. However, it does not seem to work, since I get the following output, the line after the warning are the solutions I get when solving, displayed by a incumbent callback.
added start: 38 135 288 312 Warning: Control callbacks may disable some MIP features. 19.5557 38 135 155 198 288 312 15.5557 38 135 288 312
Note that I am adding an additional constraint to the model after adding the MIPStart, could this be the reason it doesn't work?
Thank you,
Markus
#CPLEXOptimizers#DecisionOptimization