Very slow computational speed

330 views
Skip to first unread message

Muhammad Nadeem

unread,
Jun 17, 2021, 12:48:07 AM6/17/21
to mosek
Hey everyone,

I am solving an optimization problem using Mosek solver and it is taking too much time. I waited for almost an hour but still solver was not able to solve the problem. Please see the screenshot below of mosek progress. It just completed these three iterations in around 1hour.  My questions are:

1) Is it normal for mosek to take that much time? Or is the solver stuck somewhere?. or am i doing something stupid?
2) Also from the mosek iteration progress shown in the above figure, is the solver moving toward any solution or no?
3) Is there anything i can do so that Mosek can converge to solution quickly? should I use any other solver?

The LMI I am trying to solve can be found in below attached file. My summarized problem is as follows:

I need to satisfy the following LMI,  My objective function is to minimize norm of matrix "Q" " obj = norm(Q); The variables  are Matrices "R" , "Y" and "Q". Then when i get values of these matrices I need to calculate another matric, L from these matrices. This L matrix is what I need.  Please see the attached LMI file and results file attached. My code is as follow: 

obj = norm(Q); % minimize Q

%YALMIP settings
ops = sdpsettings('verbose',1,'solver','mosek','showprogress',1);

%Solve the optimization problem
disp('Solving LMIs...');
tt = tic;
sol = optimize([F1, F2],obj, ops); %F1 is the equation 26, as shown in attached LMI file. % and F2 is F2 = X>= exp(10^-5)*eye(sys.nx);
elapsedTime = toc(tt);
disp('Done!');
fprintf(1, 'Computation time: %f seconds', elapsedTime);
fprintf(1, '\nYALMIP status: %s', sol.info);
fprintf('\n');
P = X*E + E'*Y;
L = (Q/P)';

Many thanks,
Nadeem


LMI.png
cmd windown.png

Michal Adamaszek

unread,
Jun 17, 2021, 12:59:24 AM6/17/21
to mosek
1. You are using YALMIP, which is extremely good when it comes to exploiting Mosek, so I would not expect anything "stupid" going on here. Just from the sizes appearing in the log output it looks fair enough for a problem of this size. You have a huge LMI and many  linear constraints interacting with the semidefinite variables. If you want to know if you can improve the YALMIP model then ask on the YALMIP google group.
2. From those 3 iterations it looks like it goes well, PFEAS,DFEAS,GFEAS are decreasing nicely. How is it now a few hours later?
3. Hard  to say but probably not.

Michal

Muhammad Nadeem

unread,
Jun 17, 2021, 2:34:18 PM6/17/21
to mosek
Hey Michal,

Thanks. After waiting a few hours Mosek solved the LMI and I got the results but they wasn't good, the matrix it computed wasn't working for me. But now I have tweaked the system a bit and it is giving me this error (MSK_RES_ERR_SPACE (Out of space.) . I don't know what is going on, my number of variables are the same as was it before. How the mosek solved the LMI before but now it saying out of memory?  Please find below the full log of the solver. any help or directions will be much appreciated. 

Many thanks,
Nadeem

log1.png
log2.png
log3.png

Michal Adamaszek

unread,
Jun 17, 2021, 2:37:41 PM6/17/21
to mosek
If you "tweaked the system a bit" then the solution process and in particular memory consumption can also get tweaked a bit. It is not just a function of the number of variables. Maybe you were borderline on memory all the time and something tipped it.

You can write to support and provide the dumped problem file https://docs.mosek.com/9.2/faq/faq.html#how-do-i-dump-the-problem-to-a-file-to-attach-with-my-support-question and then we can check the details of your specific example and be more concrete.

Michal

Muhammad Nadeem

unread,
Jun 17, 2021, 5:48:24 PM6/17/21
to mosek
Hey Michal,

Thanks a lot. I really appreciate all your efforts. I have create a dumped file and send and sent email to support. 

Thanks,
Nadeem

Reply all
Reply to author
Forward
0 new messages