CPLEX multimipstart question/issue Topic is solved

Solver related questions
Post Reply
nadelgren
User
User
Posts: 3
Joined: 2 years ago

CPLEX multimipstart question/issue

Post by nadelgren »

I'm having trouble using the CPLEX "multimipstart" option. It seems that it does not work correctly in some situations. Please see the following small working example:

Code: Select all

set testSet / 1 * 7 /;

integer variables
testVar(testSet)    a test variable
testVar2(testSet)   another test variable
;

free variables
ObjVal  The objective function value
;

equations
testEq              a test equation
Objective           Objective function
;

Objective..
        ObjVal =e= sum(testSet, testVar(testSet)) + sum(testSet, testVar2(testSet));
        
testEq(testSet)..
        testVar(testSet) + testVar2(testSet) =l= 14.3;
        

model testModel
/
Objective
testEq
/;

testVar.l(testSet) = 1;
testVar2.l(testSet) = 0;
execute_unload "test.gdx", testVar.l,
                           testVar2.l;


$onecho > cplex.opt
mipstart=1
multimipstart=test.gdx
$offecho
testModel.optfile = 1;

solve testModel using mip maximizing ObjVal;
Running gives the following output:

Code: Select all

Processing 2 MIP starts.
MIP start 'm1' defined solution with objective 7.0000.
MIP start 'm2' defined no solution.
1 of 2 MIP starts provided solutions.
MIP start 'm1' defined initial solution with objective 7.0000.
To me, it seems that this should not happen as the "test.gdx" file contains the exact same information that is provided using testVar.l and testVar2.l

Changing "testVar2.l(testSet) = 0;" to "testVar2.l(testSet) = 1;" and rerunning gives:

Code: Select all

Processing 2 MIP starts.
MIP start 'm1' defined solution with objective 14.0000.
MIP start 'm2' defined solution with objective 14.0000.
2 of 2 MIP starts provided solutions.
MIP start 'm1' defined initial solution with objective 14.0000.
Can anyone provide any insight into this?
renke.kuhlmann
User
User
Posts: 5
Joined: 2 years ago

Re: CPLEX multimipstart question/issue

Post by renke.kuhlmann »

This turns out to be a bug (and I can't think of a workaround). It will be fixed with the next GAMS release. Thanks very much for reporting!
renke.kuhlmann
User
User
Posts: 5
Joined: 2 years ago

Re: CPLEX multimipstart question/issue

Post by renke.kuhlmann »

There actually is a workaround: Instead of using 0 as value try something very small and ideally smaller than CPLEX's tolerance epint, e.g. 1e-8. Note that you also have to set tryint to that value (or something bigger).
nadelgren
User
User
Posts: 3
Joined: 2 years ago

Re: CPLEX multimipstart question/issue

Post by nadelgren »

Thank you for the feedback. I had wondered if this workaround would do the trick, but hadn’t had a chance to test it yet.

Again, I appreciate the response!
nadelgren
User
User
Posts: 3
Joined: 2 years ago

Re: CPLEX multimipstart question/issue

Post by nadelgren »

Just to add one other thing to this thread for anyone else who may find it useful ...

Actually, if you set the "mipstart" option to 4 or 5, CPLEX successfully "fixes" the solution in the GDX file to find a feasible starting solution.
Post Reply