Page 1 of 1

Please help me! Conditional Equations With Variables

Posted: Wed Feb 07, 2024 9:50 pm
by Merve Kılınç Yılmaz
Hello, actually mentioned the previous parts as well. I have to define a binary variable and write new equations. I know it in theory, but I can't put it into practice.

The equation I want to formulate is as follows: if d(i) - e(i) = 0, then x(i) >= 0 e(i) and x(i) are positive variable...

How do I define the condition d(i) - e(i) = 0 for a binary variable? How should my entire description be? Please can you help me?

Re: Please help me! Conditional Equations With Variables

Posted: Fri Mar 01, 2024 7:36 am
by Rodrigue
You should create parameters let's say d0(I) and e0(I) first.

Parameter d0(I), e0(I) ;

You provide initial values to these parameters.

In the equation section:

Equation
Eqx(I) ;

Eqx(I).. X(I) $(d0(I) eq e0(I)) =g= 0;

Best,

Rodrigue