optimizer reshape error when saving and loading a combined variable

31 views
Skip to first unread message

Reinhold B

unread,
Feb 17, 2014, 11:16:15 AM2/17/14
to yal...@googlegroups.com
Hello,

I run into this errormessage when trying to load an optimizer object and get results from combined variables. Which is no problem without saving and loading.

Error using reshape
To RESHAPE the number of elements must not change.

Error in optimizer/subsref (line 129)
                u = [u reshape(output.Primal(1+self.map),self.dimout)];

Error in test_optimizer_load (line 39)
[sol,errorcode] = controller{xk};


I attached a file which reproduce the error. When I don't try to get the expression Y, or don't save and load, it works fine.

Would be nice to still get the expression after saving/loading.

Best regards
test_optimizer_load.m

Johan Löfberg

unread,
Feb 17, 2014, 12:33:30 PM2/17/14
to yal...@googlegroups.com
Thank you for the report. I doubt I will be able to fix this easily, as the output of an expression currently requires sdpvar objects, which won't survive the save.
Reply all
Reply to author
Forward
0 new messages