Your PC model starts to differ after the 3780th inequality.
The 3781st inequality is added in this code
con = [con, p_imp(d,:) + p_PV_use(d,:) + p_WT_use(d,:) + p_FC(d,:) == ...
p_EC(d,:) + p_EH(d,:) + p_Elz(d,:) + p_PSS(d,:) + p_exp(d,:) +...
p_ld_elc_std(d,:) + p_CP(d,:) - un_elc_ld(d,:)];
But that's an equality! Nope
K>> [p_imp(d,:) + p_PV_use(d,:) + p_WT_use(d,:) + p_FC(d,:) == ...
p_EC(d,:) + p_EH(d,:) + p_Elz(d,:) + p_PSS(d,:) + p_exp(d,:) +...
p_ld_elc_std(d,:) + p_CP(d,:) - un_elc_ld(d,:)]
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
| ID| Constraint| Coefficient range|
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
| #1| Equality constraint 1x24| 1 to 1|
| #2| Element-wise inequality 24x1| 1 to 1344|
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
It is basically this which actually gives a warning now, as it is a very common mistake (not sure why it doesn't warn on the more complex expression)
[sdpvar(1,24) == ...
sdpvar(1,24) +...
sdpvar(1,24)]
Most likely you meant to write a + b, but you wrote a +b
This can easily lead to bugs, as [a +b] is a vector with two elements
If you really want to use unitary plus, you will have to edit sdpvar/uplus
and delete this message
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
| ID| Constraint| Coefficient range|
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
| #1| Equality constraint 1x24| 1 to 1|
| #2| Element-wise inequality 24x1| 1 to 1|
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
You are essentially doing this
K>> [1 == ...
1 +...
1]
ans =
1 1
which is equivalent to [1 == 1, +1]
However, that should happen on all machines, the thing is it appears to behave differently on your PC? Hence, put a break on line 656 and display con, and it should look something like
| #294| Element-wise inequality 144x1| 1 to 1|
| #295| Element-wise inequality 144x1| 1 to 12600|
| #296| Equality constraint 1x24| 1 to 1|
| #297| Element-wise inequality 24x1| 1 to 1344|
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
with 296 and 297 being the split up intended equality, and my only guess at the moment is that your PC returns something different, i.e. the parser in MATLAB on that machine is doing something different