Condtional statement and large positive value

Problems with syntax of GAMS
Post Reply
adeniyi4adisa
User
User
Posts: 6
Joined: 3 years ago

Condtional statement and large positive value

Post by adeniyi4adisa »

Good day, please I need help to write this equation in GAMS. They are constraints of scheduling for unrelated parallel machine problems.
C_j-AM(1-X_ijk )≥S_hj+∑_o▒〖X_ijo P_ij 〗+C_h+V_j ∀ h,j,i,k>1,h≠j
And
A_j≥C_h+V_j+AM(2-X_ijk-X_(ih(k-1)) ) ∀ h, j, k, i>1 ,h≠j

The first constraint can be written in GAMS as
C(j) – AM(1-X(i,j,k)) =g= S(h,j) + Sum(o, X(i,j,o)*P(i,j)) + C(h) + V(j)
My challenge is to insert the condition for all h,j,i,k>1 ,h≠j and AM which is a very large positive number into the equation.
I have tried many options but the GAMS compiler always return error.
h, j, i, k, o are sets of the constraints.
C(j), V(j), X(i,j,k), C(h), are variables. S(h,j), P(i,j) are parameters.
Please, I need your help. Thanks.
Manassaldi
User
User
Posts: 118
Joined: 7 years ago
Location: Rosario - Argentina

Re: Condtional statement and large positive value

Post by Manassaldi »

hy, try this options.

eq(h, j, i, k)$(ord(h) gt 1 and ord(j) gt 1 and ord(i) gt 1 and ord(k) gt 1 and not sameas(h,j)).. C(j) – AM(1-X(i,j,k)) =g= S(h,j) + Sum(o, X(i,j,o)*P(i,j)) + C(h) + V(j);

or

eq(h, j, i, k)$(ord(h) gt 1 and ord(j) gt 1 and ord(i) gt 1 and ord(k) gt 1 and ord(h) ne ord(j)).. C(j) – AM(1-X(i,j,k)) =g= S(h,j) + Sum(o, X(i,j,o)*P(i,j)) + C(h) + V(j);

Bye!
adeniyi4adisa
User
User
Posts: 6
Joined: 3 years ago

Re: Condtional statement and large positive value

Post by adeniyi4adisa »

Thanks very much for your support. I really do appreciate it. The large postive value AM had not been taken care of. Please can you help me do that.
Thanks.
Post Reply