Hi
try this, maybe it helps:
x < M y
x> y
if x is positive, second is not considered, and from first, for example x =10, 10 < M y ,and in result, y must be 1 to meet constraint.
if x = 0, then first constrain is not considered, but second constrain, 0 > y, as y is binary, it takes value 0.
I am not sure about it.
you can check H.P Williams book, Model Building for more details.
On Mon, Oct 29, 2012 at 8:46 PM, JapanGo
<markus...@googlemail.com> wrote:
Hello GAMS community,
I am trying to find a constraint solution for the case:
if x>0 then y=1
where x is a positive integer variable and y is a binary variable.
Thus in cases where x=0 also y=0
I tried several combination (including big M, -y, (1-y) formulations etc.) but do not get to the wanted result. Maybe it is not possible with a single constraint, but needs two?
Would be great to get your opinions on it. Thanks!
--
You received this message because you are subscribed to the Google Groups "gamsworld" group.
To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/TmhGHHfdrsYJ.
To post to this group, send email to gams...@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.
--
Babak Saleck Pay
M.Sc
Socio-Economic System Engineering
Group of Industrial Engineering
University of Tehran
Tehran,Iran