Originally posted by: EdKlotz
>
> Hi,
>
> I have a MIP problem A. And I solve it. i obtain a lower bound.
>
> After, I solve a problem B that is the same of A but with one new constraint. I would like to re-optimize using the information of A!. It seems that cplex starts of 0 when solve B but i think that it isn't normal.
>
> What cplex instructions C++ I have to use in order to get it?
>
> Thanks a lot!
You shouldn't need to do anything. If you add a constraint that doesn't cut off the final solution CPLEX found for problem A, CPLEX will use the MIP start from the previous
optimization. Here's some sample output:
Nodes Cuts/
Node Left Objective IInf Best Integer Best Bound ItCnt Gap
0 0 560.0000 528 6450.0000 560.0000 528 91.32%
...
146174 44625 1146.0000 60 1150.0000 560.0000 1821294 51.30%
147610 45849 infeasible 1150.0000 560.0000 1847143 51.30%
Implied bound cuts applied: 489
Flow cuts applied: 921
Mixed integer rounding cuts applied: 676
Gomory fractional cuts applied: 59
Root node processing (before b&c):
Real time = 1.07
Parallel b&c, 4 threads:
Real time = 98.78
Sync time (average) = 4.66
Wait time (average) = 0.01
Total (root+branch&cut) = 99.84 sec.
Solution pool: 190 solutions saved.
MIP - Time limit exceeded, integer feasible: Objective = 1.1500000000e+03
Current MIP best bound = 5.6000000000e+02 (gap = 590, 51.30%)
...
CPLEX> d pr con obj
Minimize
obj: Y_STAR + 0 Z13 + 0 Z29
CPLEX> add
Enter new constraints and bounds :
Y_STAR <= 7000
end
Problem addition successful.
CPLEX> mip
1 of 190 MIP starts provided solutions. MIP start 'm1' defined initial solution with objective 1150.0000.
Nodes Cuts/
Node Left Objective IInf Best Integer Best Bound ItCnt Gap
0 0 560.0000 527 1150.0000 560.0000 528 51.30%
0 0 560.0000 256 1150.0000 Cuts: 151 711 51.30%
...
Typically, however, the constraint you add cuts off the solution from the previous optimization, e.g.
CPLEX> d pr con obj
Minimize
obj: Y_STAR + 0 Z13 + 0 Z29
CPLEX> add
Enter new constraints and bounds :
Y_STAR <= 1130
end
Problem addition successful.
CPLEX> mip
Warning: No solution found from 190 MIP starts. As we can see here, CPLEX tried to construct a feasible solution from the MIP starts it
had available to it, but it did not succeed. Still, in both cases, CPLEX made use of
the MIP starts it had. Unfortunately, in the second case, those MIP starts didn't help.
I hope this helps. Check your CPLEX node logs at the start of the optimization of B;
you should see a message about whether CPLEX found a solution from the previous set of
MIP starts in either case. If this doesn't help, include some relevant node log output
in your next post.
#CPLEXOptimizers#DecisionOptimization