Has Cplex 12.7 been supported by yalmip now?

82 views
Skip to first unread message

Xinwei Shen

unread,
Jul 6, 2017, 5:20:47 AM7/6/17
to YALMIP
There are some new functions  in Cplex 12.7. and also, some new parameters needs to be defined.
However, when I typed
ops=sdpsettings;

>>ops.cplex

ans = 

             advance: 1
             barrier: [1x1 struct]
           clocktype: 2
            conflict: [1x1 struct]
             cpumask: 'auto'
        dettimelimit: 1.0000e+75
             distmip: [1x1 struct]
            emphasis: [1x1 struct]
             feasopt: [1x1 struct]
            lpmethod: 0
                 mip: [1x1 struct]
             network: [1x1 struct]
    optimalitytarget: 0
              output: [1x1 struct]
            parallel: 0
       preprocessing: [1x1 struct]
            qpmethod: 0
          randomseed: 201509044
                read: [1x1 struct]
             sifting: [1x1 struct]
             simplex: [1x1 struct]
        solutiontype: 0
      solutiontarget: 0
             threads: 0
           timelimit: 1.0000e+75
                tune: [1x1 struct]
             workdir: '.'
             workmem: 2048
             display: 'off'
         exportmodel: ''
it seems that above parameters are in old version of cplex.

But I can't  find it.

Johan Löfberg

unread,
Jul 6, 2017, 5:33:06 AM7/6/17
to YALMIP
That is not the old format, it is the reduced format.

CPLEX still haven't fixed their massive crashing bugs, so YALMIP uses the reduced options set which is less likely to crash matlab when created (still crashes randomly though). Using the full set cplexoptimset('cplex') often crashes matlab when it is called. If you want to use that, you can edit sdpsettings and replace cplexoptimset with cplexoptimset('cplex'), but very likely you will see a lot of crashes (or simply create your options and then simply replace the cplex options, ops.cplex = cplexoptimset('cplex')

Xinwei Shen

unread,
Jul 6, 2017, 7:50:58 AM7/6/17
to YALMIP
Thanks. Problem sovled.

I found another problem: it seems that MODEL export for Cplex has a wrong output (needs to be Transposed) : MODEL.ctype 

If you type as below to solve a MILP problem
ops=sdpsettings('solver','cplex');
[MODEL,RECOVERYMODEL,DIAGNOSTIC,INTERNAL] = export(Constraints,Obj,ops);
[x,fval,exitflag,output]=cplexmilp(MODEL.f,MODEL.Aineq,MODEL.bineq,MODEL.Aeq,MODEL.beq,[],[],[],MODEL.lb,MODEL.ub,MODEL.ctype,MODEL.x0,MODEL.options);
Matlab said "ctype is in wrong size". However, 
[x,fval,exitflag,output]=cplexmilp(MODEL.f,MODEL.Aineq,MODEL.bineq,MODEL.Aeq,MODEL.beq,[],[],[],MODEL.lb,MODEL.ub,MODEL.ctype',MODEL.x0,MODEL.options);
works.



Reply all
Reply to author
Forward
0 new messages