Optimizer - with non-optimized output variables

32 views
Skip to first unread message

Shahar Kovalsky

unread,
Aug 8, 2013, 6:01:32 AM8/8/13
to yal...@googlegroups.com
Hi,

The optimizer object seems to fail (with a reshape error) if one of its output variables (u's) is not used in the optimization.
For example,

sdpvar x y a
op = optimizer(a*x>=0, x, sdpsettings('solver','+sedumi'), a, {x y});
res = op{1}

(in my real problem, the objective and constraints may change and therefore not contain some of the variables)

Is there a way to circumvent this?
(and just have op{1} return NaN for the not-optimized variables)

Thanks,
Shahar.

Johan Löfberg

unread,
Aug 8, 2013, 6:17:14 AM8/8/13
to yal...@googlegroups.com
Thank you for the bug report. I don't see any way to code around this at the moment beyond adding dummy constraints which won't be eliminated.

Shahar Kovalsky

unread,
Aug 8, 2013, 6:57:52 AM8/8/13
to yal...@googlegroups.com
Okay. Thanks.

Alternatively, is there a way (e.g., simple modification to optimizer) to update the assigned double values of all sdpvar objects that were optimized?

Johan Löfberg

unread,
Aug 8, 2013, 7:07:55 AM8/8/13
to yal...@googlegroups.com
I will fix this (sending you some quick fixes per mail)

Shahar Kovalsky

unread,
Aug 8, 2013, 7:42:27 AM8/8/13
to yal...@googlegroups.com
Thanks!
Reply all
Reply to author
Forward
0 new messages