How can i print out all the decision variables and optimal results using yalmip in matlab?

74 views
Skip to first unread message

Michael@PolyU

unread,
Feb 2, 2020, 4:56:43 AM2/2/20
to YALMIP
Hi Yalmip communities,

I am new to yalmip as a modeling environment and it has made my work easy. Please, in a case that I have multiple decision variables in my optimization models (both integer and continuous), how can i print out all the decision variables results after carrying out optimization?

Thanks,

Michael

Johan Löfberg

unread,
Feb 2, 2020, 6:29:31 AM2/2/20
to YALMIP
what do you mean with print?

value(x) gives you the value decided by solver

value(recover(depends(C))) gives you the values of all variables in a constraint called C

Michael@PolyU

unread,
Feb 2, 2020, 6:53:55 AM2/2/20
to YALMIP
Thank you very i can see the command: value(recover(depends(C))).

Please another challenge is that, how can i specify the lower bounds and upper bounds of each decision variable, the example I saw online is: bounds(x, lower, upper) but it was specified that it is applicable to big M.

Thanks

Johan Löfberg

unread,
Feb 2, 2020, 7:32:56 AM2/2/20
to YALMIP
you just add them like any other constraint
Reply all
Reply to author
Forward
0 new messages