Yes, but since b,d,e,a are all variables I can't just multiply.

Regards
Kretch


On Mon, Oct 12, 2009 at 1:53 PM, D'Agostino, Larry - TX <
Larry.D'[email protected] <larry.d%[email protected]>> wrote:

>  Sorry for double posting.
>
>
>
> Actually you might want to try something to the affect of
>
>
>
> c <=  d*b + e*a
>
>
>  ------------------------------
>
> *From:* help-glpk-bounces+larry.d'[email protected] [mailto:
> help-glpk-bounces+larry.d'agostino<help-glpk-bounces%2Blarry.d%27agostino>
> [email protected]] *On Behalf Of *D'Agostino, Larry - TX
> *Sent:* Monday, October 12, 2009 3:42 PM
> *To:* Yaron Kretchmer; help-glpk
> *Subject:* RE: [Help-glpk] More conditional variables fun
>
>
>
> Try thinking in terms of a Big M or large variable method.  For instance…
>
>
>
> continuous variable expression  *<*  (some large number) (binary variable)
>
>
>
> so you may do
>
>
>
> expression <= M * (a + b)
>
>
>
> where M is a very large number
>
>
>  ------------------------------
>
> *From:* help-glpk-bounces+larry.d'[email protected] [mailto:
> help-glpk-bounces+larry.d'agostino<help-glpk-bounces%2Blarry.d%27agostino>
> [email protected]] *On Behalf Of *Yaron Kretchmer
> *Sent:* Monday, October 12, 2009 3:24 PM
> *To:* help-glpk
> *Subject:* [Help-glpk] More conditional variables fun
>
>
>
> Hi There.
> Using feedback I got from the mailing list, I was able to formulate binary
> conditional variables.
>
> Now I'd like to be able to model conditional non-binary variables. Does
> anybody know how to formulate this in mathprog?
>
> ----------Begin Description -------------------
> *) a,b are binary
> *) c,d,e is continuous.
> *) I'd like c to be
>     - 0 if a=b=0
>     - d if a=0,b=1
>     - e if a=1,b=0
>     - 0 if a=b=1
> ----------End Description
>
>
> Thanks much
> Kretch
>
_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to