How to speed up the YALMIP for large problems

802 views
Skip to first unread message

Mohamed Mostafa

unread,
Dec 30, 2015, 6:22:48 AM12/30/15
to YALMIP

Dear Dr. Johan

I am trying to develop the UC example to simulate large power system consisting of hundreds of generation unit. However, as the number of units increases, the solution time of course increases. Can you suggest me a way to minimize the computational time (for example do you think some of the solver limits can be relaxed?)

Best regards

Mohamed

Johan Löfberg

unread,
Dec 30, 2015, 6:27:53 AM12/30/15
to YALMIP
You cannot speed up YALMIP, as YALMIP doesn't solve the problem.

Try playing around with the solver options for the solver you are using, and try to improve the model (efficient UC-modelling is a research field on its own, o the question is a bit optimistic...)

Mohamed Mostafa

unread,
Dec 30, 2015, 6:33:17 AM12/30/15
to YALMIP
Dear Dr. Johan
Thank you very much for the quick reply
I am using CPLEX solver with its default settings. How to modify its settings in YALMIP?
Best regards

Johan Löfberg

unread,
Dec 30, 2015, 6:37:13 AM12/30/15
to YALMIP

Mohamed Mostafa

unread,
Dec 30, 2015, 7:07:22 AM12/30/15
to YALMIP
Thank you sir

Mohamed Mostafa

unread,
Dec 30, 2015, 9:23:21 AM12/30/15
to YALMIP
Dear Dr. Johan
As i use cplex solver i tried the following piece of code to limit the maximum number of iterations:
 

ops = sdpsettings('solver','cplex');

ops = sdpsettings('solver','cplex','cplex.maxIteration',1000);

 

The Matlab response is:

Error using sdpsettings (line 281)
Unrecognized property name 'cplex.maxIteration'.

 

What do you suggest to solve this?

Best regards

Mohamed

Johan Löfberg

unread,
Dec 30, 2015, 11:47:45 AM12/30/15
to YALMIP
Why do ou think there is such an option? My cplex version does not have any such option

>> ops = sdpsettings;
>> ops.cplex

ans = 

           advance: 1
           barrier: [1x1 struct]
         clocktype: 2
          conflict: [1x1 struct]
      dettimelimit: 1.0000e+75
           distmip: [1x1 struct]
          emphasis: [1x1 struct]
           feasopt: [1x1 struct]
          lpmethod: 0
               mip: [1x1 struct]
           network: [1x1 struct]
            output: [1x1 struct]
          parallel: 0
     preprocessing: [1x1 struct]
          qpmethod: 0
        randomseed: 201409043
              read: [1x1 struct]
           sifting: [1x1 struct]
           simplex: [1x1 struct]
    solutiontarget: 0
           threads: 0
         timelimit: 1.0000e+75
              tune: [1x1 struct]
           workdir: '.'
           workmem: 2048
           display: 'off'
       exportmodel: ''



Mohamed Mostafa

unread,
Dec 30, 2015, 4:10:06 PM12/30/15
to YALMIP
Dear Dr. Johan
As you can see in the attached picture, when i use the 'cplexoptimset' command in MATLAB, it tells me the maximum number of iterations and nodes. so i thought if i can limit these values then i can handle large numbers in less time while still keeping considerable accuracy.
Do you think this can help me to escape from this problem?
 
Untitled.png

Johan Löfberg

unread,
Dec 31, 2015, 3:07:59 AM12/31/15
to YALMIP
OK, cplex has some weird way to define a limited set of options. The ones available in sdpsettings are those generated by cplexoptimset('cplex')
Reply all
Reply to author
Forward
0 new messages