Re: Model is infeasible or unbounded

48 views
Skip to first unread message
Message has been deleted

Johan Löfberg

unread,
Aug 29, 2018, 3:13:52 AM8/29/18
to YALMIP
Error using xlsread (line 139)
XLSREAD unable to open file 'D:\chen\Data of Economic Dispatch\Flow
Limit.xlsx'.
File 'D:\chen\Data of Economic Dispatch\Flow Limit.xlsx' not found.
 

And you should start here 
Message has been deleted

Johan Löfberg

unread,
Aug 29, 2018, 4:09:36 AM8/29/18
to YALMIP
your code has to be improved a lot

First, separate data generation and modelling. As it is now, the code is hard to follow as you mix these things

Then there are several weirdness, for instance you define x_1 on line 213, and then you redefine it on line 217 etc

You're also missing that MATLAB/YALMIP should be vecotrized for readability and efficiency. For instance

constraint1 = [];
for i = 1:54
    constraint1 = constraint1 + [x(i,1) - x(i+108,1) >= Pl(i,1)];
end

is simply

constraint1 = [x(1:54,1) - x((1:54)+108,1) >= Pl(1:54,1)];

etc

This
x1 = sdpvar(186,1);%Öмä¾ö²ß±äÁ¿
for j = 1:186    
    for i = 1:54
    x1(j,1) = piGen(j,i)*x(i,1)+x1(j,1);
    end
    for i = 1:9
    x1(j,1) = x1(j,1)+piVP(j,i)*x1(i+162,1);
    end
    for i = 1:91
    x1(j,1) = x1(j,1)-piLoad(j,i)*P_q(i,1);
    end
end

looks weird. The resulting expression of x1 going to be an extremely messy expression in high powers of piGen and pVP, and z. Intended?


To speed up definition of norm operators, you can use the low-level cone operator instead

for i = 1:788
    constraint17 = constraint17 + [norm(s5(1:2,i)) <= s5(3,i)];
end

is
constraint17 =cone(s5(1:2,:),s5(3,:));


Kris

unread,
Aug 29, 2018, 4:39:31 AM8/29/18
to YALMIP
Thanks,I am checking my model with the tips。
Reply all
Reply to author
Forward
Message has been deleted
0 new messages