But that is non-linear!

On Thu, Nov 15, 2012 at 1:42 PM, HJW Vermue wrote:

Regardless of what I wrote before, I obviously meant y>=min(x,1), as that does fulfill the requirements stated.

On Tuesday, October 30, 2012 10:59:33 AM UTC+1, JapanGo wrote:

Hello Destin,

hello Babak,

thanks to both of you. The adaption of Destin made it work.

As a feedback to the community: One can also model the constraint with big M:

yM >= x

y = EPSILON*x

y = EPSILON and y = 0 and y wrote:

Hi

try this, maybe it helps:

x y

if x is positive, second is not considered, and from first, for example x =10, 10 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 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!

Babak Saleck Pay

M.Sc

Socio-Economic System Engineering

Group of Industrial Engineering

University of Tehran

Tehran,Iran

www.babaksp.com

To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/5QkqUvVb-ZkJ.

To post to this group, send email to gamsworld@googlegroups.com.

To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.