Hello, I am trying to model a system with following constraints using linear programming in MATLAB:
I modified it in following form: (e.g. for i=1)
Is this formulation correct? My doubt is that at b=0, I get P(1)<=0 and the second condition, which is perfect. But when b=1, I get P(1)<=U, and first condition. But then the program can also return P(1) less than zero for b=1. Is there something wrong here or I did not understand correctly? Thank you so much for any help :) PS: I know it is not linear right now. But I want to confirm if what I did so far is right or not. cheers, 
is logically equivalent to
and disjunctions (orrelations) can be expressed using [a] (binary) indicator variable[s] Hence, "we" get
for the 'ifbranch', and
for the 'elsebranch' (with L_P, U_P as lower/upper bounds on P, and L_SKP, U_SKP, L_SCP, U_SCP as bounds for the respective sum expressions). answered 30 Apr '14, 15:50 fbahr ♦ 1
This is perfect. And here I also don't need further manipulations to linearize (unlike my previous solution). One tiny correction. in else branch, I think it should be
(02 May '14, 04:14)
aastha
Well spotted!
(02 May '14, 04:49)
fbahr ♦
One more comment, although your answer is perfect for what I asked, in my case, I might still have to use following system (for time i):
because whether I use constant K(1) or C(1) depends on sign of P(1) and not on the time interval. I think I should have been more detailed in my question. So this is what I am using right now. Do you know a more elegant way to do this? (I am sorry for spamming your inbox)
(02 May '14, 05:09)
aastha
If you want
(04 May '14, 13:45)
fbahr ♦
...
(04 May '14, 14:26)
fbahr ♦
