When I use yalmip and mpt, there is a warning "Solver not applicable (mpt,pop)" What should I do????

254 views
Skip to first unread message

le lle

unread,
Oct 22, 2016, 6:01:59 AM10/22/16
to YALMIP
When I use yalmip and mpt, there is a warning "Solver not applicable (mpt,pop)" 
What should I do????

Johan Löfberg

unread,
Oct 22, 2016, 6:29:09 AM10/22/16
to YALMIP
Sonds like you simply formulated a problem which cannot be solved multiparametrically using mpt or pop (i.e., not a multi-parametric convex LP/QP with parameters in right-hand side of constraints and linear terms in objective)
Message has been deleted

le lle

unread,
Oct 25, 2016, 8:23:47 AM10/25/16
to YALMIP
Hello Johan,

Thank you for your time.
I have already solve the MPT problem, just some definition problem. But recently, After I try to build the explicit Hybrid MPC controller based on the MPT, when I try to save the "optimizer", I got a warning "YALMIP objects cannot be save in binary format". What Should I do to save the optimizer? The calculation of this MPT procedure takes hours. The reason I try to save this file is that I hope to use this controller in the simulink. In my thoughts, I hope just to load the optimizer and then I can do the simulation in the simulink.
So, could you tell me is there any way to save and reload the optimizer? And If I can not save optmizer file, is there any way I can extract the control law from the optimizer? The control law from the explicit Hybrid MPC is supposed to be just linear relationship bewteen the state and control input? right?

Thank you very much for you kind help.
Best regards
Shuwei Zhang

Johan Löfberg

unread,
Oct 25, 2016, 8:32:28 AM10/25/16
to YALMIP
You save the data returned from MPT, i.e first output from solvemp

le lle

unread,
Oct 25, 2016, 8:36:41 AM10/25/16
to YALMIP
Thank you very much for your reply.
You mean the [sol,diagn,Z,Valuefcn,Optimizer]=solvemp(constraints,objective,[],x{1},u{1}); I need to save "sol"? Then how can I use this "sol". Is there any example I could refer in the Yalmip website?

Thank you very much
Shuwei Zhang

le lle

unread,
Oct 25, 2016, 8:42:35 AM10/25/16
to YALMIP
Hi Johan,

I think I found the example of this 'sol'. I will learn and use this 'sol' instead.
I have an another question, since the my state is bigger than 2, is there any chance I could still draw the plot(Valuefcn) and plot(Optimizer)?

You reply really saves me!

Johan Löfberg

unread,
Oct 25, 2016, 8:44:05 AM10/25/16
to YALMIP
Not using yalmip commands

le lle

unread,
Oct 25, 2016, 8:49:53 AM10/25/16
to YALMIP
so you mean I need to use the 'sol' to find a way to draw the map?

Johan Löfberg

unread,
Oct 25, 2016, 8:51:12 AM10/25/16
to YALMIP
yes

le lle

unread,
Oct 25, 2016, 9:04:43 AM10/25/16
to YALMIP
Thanks a lot!

le lle

unread,
Oct 26, 2016, 12:03:42 AM10/26/16
to YALMIP
Another question, If I do want to use the command "figure;  plot(Valuefunction); figure;  plot(Optimizer);" , but the dimension of state is the bigger than 2. Is there any way I could predefine some of the state value, so I could only draw the figure of partial state to the control input? 
For example, I have 6 state and 1 control input, Could I predefine the value of the state 1,2,3,4, and only draw the relationship figure bewteen state 5,6 and input control value?

Johan Löfberg

unread,
Oct 26, 2016, 6:44:48 AM10/26/16
to YALMIP
No, you would have to use mpt (slice etc)

le lle

unread,
Nov 9, 2016, 9:20:12 PM11/9/16
to YALMIP
Hello dear Johan,

I have already figure out these problems. I recently met another problem. I have already use the solvemp to get the "sol", and use this "sol" as the explicit hybrid MPC controller. Recently I hope to use this controller on a small vehicle model, but I don't think this model would support Matlab. So I hope to know how to extract the control law from the "sol" object? So I can get the direct relationship description between the state and control input?

Thanks A Lot
Best Regards
Shuwei Zhang

Johan Löfberg

unread,
Nov 10, 2016, 1:37:30 AM11/10/16
to YALMIP
You will have to learn how to use those by reading mpt documentation
Reply all
Reply to author
Forward
0 new messages