using variables in conditionals

Hi every body


I have problem in writing this constraint

if((x(i,k,m,l))=g=x(j,kp,m,l)),q(i,j,k,kp,m,l)=e=0;else q(i,j,k,kp,m,l)=e=1

where x is variable how i can code this in gams as i know that conditionals cant be used for variables, if thre is a way for writing this constraint

if any one could help me it would be aprriciated

thank you


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

Hi Razie,
You should use a bigM and binary variable. Please refer to disjunctive model.
Omid,

On Tuesday, December 22, 2015 at 3:35:04 PM UTC-6, razie wrote:

Hi every body


I have problem in writing this constraint

if((x(i,k,m,l))=g=x(j,kp,m,l)),q(i,j,k,kp,m,l)=e=0;else q(i,j,k,kp,m,l)=e=1

where x is variable how i can code this in gams as i know that conditionals cant be used for variables, if thre is a way for writing this constraint

if any one could help me it would be aprriciated

thank you


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

Hi Omid
. thank you for your answering , but I didnt understand well what you mean, pleas explain more if you can

thanks

در دوشنبه 28 دسامبر 2015، ساعت 18:30:11 (UTC+3:30)، omid ziaee نوشته:

Hi Razie,
You should use a bigM and binary variable. Please refer to disjunctive model.
Omid,

On Tuesday, December 22, 2015 at 3:35:04 PM UTC-6, razie wrote:

Hi every body


I have problem in writing this constraint

if((x(i,k,m,l))=g=x(j,kp,m,l)),q(i,j,k,kp,m,l)=e=0;else q(i,j,k,kp,m,l)=e=1

where x is variable how i can code this in gams as i know that conditionals cant be used for variables, if thre is a way for writing this constraint

if any one could help me it would be aprriciated

thank you


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.