CPLEX options through yalmip do not seem to work

800 views
Skip to first unread message

Alexandre Tannen

unread,
Jan 18, 2014, 5:52:58 AM1/18/14
to yal...@googlegroups.com
Hi all,

I am having a problem sending options to CPLEX solver. 
Apparently, none seems to become active.
For instance I use for my MILPs, 

options.cplex.mip.tolerances.relobjdifference=0.002;
result = solvesdp(Constraints,Cost,options);

and I expect the simulations to stop at such optimality gap. With other solvers I tried (bnb) I have no problem making options active.
Is there a known problem with CPLEX? Has anyone succeed in defining options under CPLEX?

Thank you in advance!


Johan Löfberg

unread,
Jan 18, 2014, 9:03:39 AM1/18/14
to
I think the MATLAB interface from IBM is broken when it comes to settings (they have been struggling with this part, it has been a pain)

Take their example cplexmilpex

   f    
= [-1 -2 -3 -1]';
   Aineq = [-1  1  1 10; 1 -3  1  0];
   bineq = [20 30]'
;
   
   
Aeq   = [0  1  0  -3.5];
   beq  
=  0;
   
   lb    
= [0;    0;   0; 2];
   ub    
= [40; inf; inf; 3];
   ctype
= 'CCCI';
   
   options
= cplexoptimset('cplex');
   options
.Diagnostics = 'on';
   
   
[x, fval, exitflag, output] = cplexmilp (f, Aineq, bineq, Aeq, beq,...
     
[ ], [ ], [ ], lb, ub, ctype, [ ], options);

Tried aggregator 2 times.
Aggregator did 1 substitutions.
Reduced MIP has 2 rows, 3 columns, and 6 nonzeros.
Reduced MIP has 0 binaries, 1 generals, 0 SOSs, and 0 indicators.
Presolve time = 0.00 sec. (0.01 ticks)
Found incumbent of value -34.000000 after 0.00 sec. (0.01 ticks)
Probing time = 0.00 sec. (0.00 ticks)
Tried aggregator 1 time.
Presolve time = 0.00 sec. (0.00 ticks)
Probing time = 0.00 sec. (0.00 ticks)
MIP emphasis
: balance optimality and feasibility.

Now try to change mip emphasis (displayed last above)

   f    
= [-1 -2 -3 -1]';
   Aineq = [-1  1  1 10; 1 -3  1  0];
   bineq = [20 30]'
;
   
   
Aeq   = [0  1  0  -3.5];
   beq  
=  0;
   
   lb    
= [0;    0;   0; 2];
   ub    
= [40; inf; inf; 3];
   ctype
= 'CCCI';
   
   options
= cplexoptimset('cplex');
   options
.Diagnostics = 'on';
   options
.emphasis.mip = 2;
   
   
[x, fval, exitflag, output] = cplexmilp (f, Aineq, bineq, Aeq, beq,...
     
[ ], [ ], [ ], lb, ub, ctype, [ ], options);
...
MIP emphasis
: balance optimality and feasibility.



Alexandre Tannen

unread,
Jan 18, 2014, 1:51:35 PM1/18/14
to yal...@googlegroups.com
Dear Dr.Löfberg

Thank you for the quick response. So if I understand it correctly, there is not yet a way to bypass this issue under yalmip, and set options for Cplex.
Do such problems appear also in Gurobi or Scip?

Kind regards,
Alexandre

Johan Löfberg

unread,
Jan 18, 2014, 2:52:32 PM1/18/14
to
As you can see, it is entirely unrelated to YALMIP. The issue remains when we try to setup the model manually. I don't know if I did something wrong in the example, but it looks hard to do anything wrong

This is completely unrelatated to scip and gurobi. Note though that the current version does not support options in scip (added in develop)

Mark L. Stone

unread,
Jul 15, 2014, 8:07:46 PM7/15/14
to yal...@googlegroups.com
This has now (supposedly) been fixed in FIxpack1 to CPLEX 12.6, which was just released.

Per https://delivery04.dhe.ibm.com/sar/CMA/WSA/04nlf/0/12.6.0-WS-COS-readme-fp001.html ,

Issues addressed in the fix pack version 12.6.0.1

...

RS01546  Version 12.6 of the MATLAB optimization toolbox ignores CPLEX parameter settings that lack a corresponding toolbox parameter.


See also https://www.ibm.com/developerworks/community/forums/html/topic?id=7dce2826-4858-4136-bbd4-a31fb7fadd90&ps=25 , which describes the workaround using CPLEX parameter numbers instead of names, which was needed prior to Fixpack1.

Reply all
Reply to author
Forward
0 new messages