[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] conditional constraint Matlab
From: |
Michael Hennebry |
Subject: |
Re: [Help-glpk] conditional constraint Matlab |
Date: |
Tue, 29 Apr 2014 14:12:18 -0500 (CDT) |
User-agent: |
Alpine 1.00 (DEB 882 2007-12-20) |
On Tue, 29 Apr 2014, address@hidden 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 address@hidden
"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