[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] More conditional variables fun
From: |
Andrew Makhorin |
Subject: |
Re: [Help-glpk] More conditional variables fun |
Date: |
Tue, 13 Oct 2009 23:46:02 +0400 |
> Now I #39;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 #39;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
"Conditional" equality constraint:
t = if z then a else b
where z is binary, t, a, b are continuous, can be modeled as
follows:
z = 1: 0 <= t - a <= 0
-M1 <= t - b <= +M2
z = 0: -M3 <= t - a <= +M4
0 <= t - b <= 0
Thus:
-M3 * (1 - z) <= t - a <= +M4 * (1 - z)
-M1 * z <= t - b <= +M2 * z
where M1, M2, M3, M4 are appropriate "big M's".
RE: [Help-glpk] More conditional variables fun, D'Agostino, Larry - TX, 2009/10/12
Re: [Help-glpk] More conditional variables fun,
Andrew Makhorin <=
Re: [Help-glpk] More conditional variables fun, Andrew Makhorin, 2009/10/13
- Re: [Help-glpk] More conditional variables fun, Michael Hennebry, 2009/10/12
- Re: [Help-glpk] More conditional variables fun, Michael Hennebry, 2009/10/12
- Re: [Help-glpk] More conditional variables fun, Michael Hennebry, 2009/10/13
- Re: [Help-glpk] More conditional variables fun, Michael Hennebry, 2009/10/14
- Re: [Help-glpk] More conditional variables fun, Alexander Schnell, 2009/10/14
- Re: [Help-glpk] More conditional variables fun, Michael Hennebry, 2009/10/14