Dear Alireza

You are right. I really appreciate your help.I had this problem for about 2 months and no one could help me.

Date: Thu, 20 Aug 2015 13:26:50 +0430

Subject: Re: if 2*X(i)+3*X(i+1)=3 then SC(i)=1 otherwise SC(i)=0

From: alr.bahari@gmail.com

To: gamsworld@googlegroups.com

Hi

Why you say that?!! in this case you have:

SC(I)=l=1-0=1.

SC(I)=l=0.

2*(0-1)+3*(0)-0)= -2 =l=3*SC(i).

so you have SC(I)=0 from constraint 2 .

On Wed, Aug 19, 2015 at 3:56 PM, Bahman Alipour Shandiz wrote:

Dear Alireza

Thank you in advance for your help,

but there is a problem in your suggested set of constraints, if we assume x(i)=0, x(i+1)=0 then there is the chance for sc(i) to be 1. which is not right.

Date: Mon, 17 Aug 2015 18:59:41 +0430

Subject: Re: if 2*X(i)+3*X(i+1)=3 then SC(i)=1 otherwise SC(i)=0

From: alr.bahari@gmail.com

To: gamsworld@googlegroups.com

Hi

according to 2*X(i)+3*X(i+1)=3 and because of the binary variable X(I) we have

SC(I)=1 if and only if X(I)=0 and X(I+1)=1;

So try this

SC(I)=l=1-X(I).

SC(I)=l=X(I+1).

2*(X(i)-1)+3*(X(i+1)-X(I))=l=3*SC(i).

best regards

Alireza

On Sun, Aug 16, 2015 at 12:20 AM, Bahman Alipour wrote:

Dear all,

I am trying to formulate this conditional constraint,

if 2*X(i)+3*X(i+1)=3 then SC(i)=1 otherwise SC(i)=0

in other words : if 2*A+3*B=3 then C=1 otherwise C=0 A,B,C: Binary variables

Can anybody help me?

All variables are binary variables.

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 http://groups.google.com/group/gamsworld.

For more options, visit https://groups.google.com/d/optout.

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 http://groups.google.com/group/gamsworld.

For more options, visit https://groups.google.com/d/optout.

–

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 http://groups.google.com/group/gamsworld.

For more options, visit https://groups.google.com/d/optout.