On Tue, 29 Apr 2014, [email protected] wrote:

P(i) represents power for time step i. This is the variable to be optimized. If 
P is positive, it represents dicharging of battery, if P is negative then it is 
charging. Since charging and discharging conditions for battery are different, 
I need to use conditional constraints. I have read about using binary variables 
for conditional constraints but I cannot figure out how to apply it here.

X <= U0 + b*(U1-U0)
if b==0, X <= U0
if b==1, Y <= U1

Usually, one selects U0 or U1 as desired and selects the other
large enough that it would not cut off any feasible soltuions.

--
Michael   [email protected]
"SCSI is NOT magic. There are *fundamental technical
reasons* why it is necessary to sacrifice a young
goat to your SCSI chain now and then."   --   John Woods

_______________________________________________
Help-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to