Linprog - How define lb and ub as interval containing zero

2 views (last 30 days)
I'm using the function linprog of the optimization toolbox. I have defined an interval by use of lb and ub: 0 <= x <= 90.
But actually I would like 'x' getting values between 15 <= x <= 90 AND containing zero. I don't want 'x' getting values between 0 and 15.
The reason is that there's a power station and it's not useful when the power station charges with power less than 15 MW. But it should be possible that the power station has power 0 MW when it's off (not charging).
The background is that I want to charge a power station while the electricity costs are cheap.
Is there any solution?

Accepted Answer

Matt J
Matt J on 18 Oct 2014
Edited: Matt J on 19 Oct 2014
I think you can rewrite this as a mixed integer linear programming (and solve with intlinprog). Make the following substitution everywhere for x(i),
x(i)=15*b(i)+y(i)
where b(i) is a binary variable and y(i) is continuous-valued variable obeying the additional linear constraints
0<=y(i)<=75
y(i)<=75*b(i)
When b(i)=0, the constraints on y(i) reduce to y(i)=0 and hence x(i) can equal 0. Conversley, when b(i)=1, the constraints on y(i) reduce to 0<=y(i)<=75 and hence x(i) will then span the range 15 to 90.
  9 Comments
Duc Le
Duc Le on 6 Nov 2017
Hi, I have the same problem but I want only define lb = 0 and range intervall for the first and fifth variable x(1) x(5) and the other variables have got different lb and ub. How could I define it? Could you help me?
Matt J
Matt J on 6 Nov 2017
Hi Duc,
I'm not sure what to add to the above. I think the same technique should apply. Just do it only for i=1 and i=5.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!