amiruw
unread,Nov 17, 2010, 1:37:21 PM11/17/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to AMPL Modeling Language
Hello,
I want a continuous variable (P) in my model to be zero or between a
predefined lower and upper bounds (Pmin & Pmax). One straightforward
approach is to define a binary variable (b) by adding the following
constraints:
subject to C1:
P - Pmin*b >= 0;
subject to C2:
P - Pmax*b <= 0;
This approach works great for relatively small-size problems; however,
for large-size problems, e.g., when P has several indices, the
computational time drastically increases.
For example, with P{i in I, t in T}, Pmin{i in I, t in T} and Pmax{i
in I, t in T}, we need to have the following constraints:
subject to C1{i in I, t in T}:
P[i,t] - Pmin[i,t]*b[i,t] >= 0;
subject to C2{i in I, t in T}:
P[i,t] - Pmax[i,t]*b[i,t] <= 0;
With 10-elements I and 120-elements T, we should have 1200 new binary
variables by adding 2400 constraints to implement that feature. I am
wondering if there are some approximate methods or if we can implement
this in a more efficient way for large-size problems. I already heard
about semi-continuous variables but I don't know exactly if that fits
my problem or even how to implement this in AMPL. Any suggestions will
be highly appreciated.
Regards,
Amiruw