Problem turns infeasible out of nowhere

50 views
Skip to first unread message

Jasper Meyer

unread,
Nov 1, 2014, 4:45:42 PM11/1/14
to yal...@googlegroups.com
Hi,

after the basic obstacle of my problem had been solved (https://groups.google.com/forum/#!topic/yalmip/b7IFBqMau9s) I proceeded in implementing more details I thought it would work now. But unfortunately after changing the problem slightly it becomes infeasible. I attach all the files needed as the code became quite long (as I couldn't figure out, where the problem is, I wasn't able to simplify it any further, sorry).

I am still modeling a storage with a given demand over time. When this demand was created randomly, everything worked out fine no matter how different the demand was. I attached one randomly created demand, that worked (file: Demand_rand). But now I changed the demand (file Demand_real) and my problem became infeasible and I can't figure out why. It seems like the installed discharging power is the problem.

s(1).mod(2).cap = 100; %discharging power capacity [MW] 

After hours of testing, I found out, that the problem works for values between 0 and 8.5574. As soon as it is raised above that level, the problem becomes infeasible.

I would be so grateful if you can give me a hint why this is happening.

Thank you in advance and best regards
Jasper




Demand_real.m
Demand_rand.m
single_storage_calc_problem.m

Johan Löfberg

unread,
Nov 3, 2014, 3:25:23 AM11/3/14
to yal...@googlegroups.com
You will have to sort that out by removing constraints, adding slacks etc.

For instance, if I add a slack on the last constraint

slack = sdpvar(T,1)

...
constraints
= [constraints, CE_ex_out(t,1) == min(E_dem_out(t,1), E_out_cap(t,1))+slack(t)];


and minimize the 1-norm of that slack, it reveals some significant non-zero slacks required at some time instants

 solvesdp(constraints,norm(slack,1))

         
0
   
0.0000
   
0.0000
   
0.0000
   
0.0000
   
0.0000
   
0.0000
   
0.0000
   
0.0000
   
0.0000
   
0.0000
   
-0.0000
   
-0.0000
   
-0.0000
   
-0.0000
   
-0.0000
   
-0.0000
   
0.0000
   
-0.0000
   
-0.0000
   
-0.0000
   
-0.0000
   
-0.0000
   
0.0000
   
0.0000
   
-2.5193
   
-1.2597
   
-0.6298
   
-0.3149
   
-0.1575
   
-0.0787
   
-0.0394
   
-0.0197
   
0.0000
   
-0.0000
   
-0.0000
   
-0.0000
   
-0.0000
   
0.0000
   
-0.0000
   
-0.0000
   
0.0000
   
0.0000
   
0.0000
   
0.0000
   
0.0000
   
0.0000
   
0.0000
   
0.0000
   
0.0000




BTW, I hope you realize that a model with blabla=min(decisionvariables) leads to MILP reformulations. If possible, you should avoid the equality. Perhaps it is possible to reformulate something as blabla <= min(decisionvariales), which is a convex set, based on argument that the optimal solution will satisfy equality


Jasper Meyer

unread,
Nov 4, 2014, 5:15:03 AM11/4/14
to yal...@googlegroups.com
Thank you very much. I will try to work it out following your hints.
Reply all
Reply to author
Forward
0 new messages