Page 1 of 1

CPLEX multimipstart question/issue

Posted: Mon Jun 28, 2021 7:41 pm
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?

Re: CPLEX multimipstart question/issue

Posted: Tue Jun 29, 2021 10:22 am
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!

Re: CPLEX multimipstart question/issue

Posted: Tue Jun 29, 2021 10:46 am
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).

Re: CPLEX multimipstart question/issue

Posted: Tue Jun 29, 2021 12:05 pm
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!

Re: CPLEX multimipstart question/issue

Posted: Wed Jun 30, 2021 2:49 pm
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.