Sensitivity of constraints to syntax

11 views
Skip to first unread message

Kevin Too

unread,
Mar 21, 2019, 11:15:18 PM3/21/19
to YALMIP
Hi Johan,


I've come across an issue concerning the syntax of constraints. The attached code works fine, but there are two issues:

Firstly, if you go to line 27 and remove the space between the negative sign and Q2(i), the problem remains feasible but the optimal solution changes drastically. 
The same thing happens on line 28, if you remove the space between the negative sign and Q3(i).

Secondly, if you go to line 28 and remove the space between the negative sign and Q(i), the problem is no longer feasible.

Is this a bug? Or did I declare the constraints incorrectly?


Thanks in advance,

Kevin
yalmip_test.m

Johan Löfberg

unread,
Mar 22, 2019, 9:48:09 AM3/22/19
to YALMIP
Are you talking about MATLAB syntax

Run this
>> [1 - 1]



>> [1 -1]


Kevin Too

unread,
Mar 22, 2019, 5:35:39 PM3/22/19
to YALMIP
Oh, you are absolutely right. 

That was a MATLAB syntax issue, not a YALMIP issue. 

Thanks.
Reply all
Reply to author
Forward
0 new messages