Precedence constraint

Problems with syntax of GAMS
Post Reply
ikeato
User
User
Posts: 9
Joined: 6 months ago

Precedence constraint

Post by ikeato » 1 month ago

Hi,

Please find below the gams equation with comments.
I have run the gams model but the phase precedence constraint is not working. For example phase 1 has to filled up before phase 2 and so on.

Equation:
LowPreceCons1(t).. sum(jp3,Ym(jp3,t)) -
sum(jp3,Qpm(jp3)*W(jp3+1,t))=G=0;

"this is the equation for precedence constraints, phase j1 has to be filled up before phase j2, then phase j3 will follow then phase j4 (its phase 1,2,3,4).
Qpm is the quantity of material in phase j.
W(j,t) is a binary variable (which is 1 = 1; if phase j is filled up in year t and 0;otherwise) whilst
Ym is total material moved from phase j during year t.

How do I let the equation above work since its more like a sequencing type of equation.

Kindly assist
Ike
Research Personnel
Last edited by ikeato on Sun Sep 02, 2018 6:26 am, edited 1 time in total.

User avatar
Renger
Posts: 186
Joined: 2 years ago

Re: Precedence constraint

Post by Renger » 1 month ago

Hi Ike
It is hard to say what the problem is as the syntax of this specific constraint looks fine.
Could you attach the model?
Cheers
Renger

ikeato
User
User
Posts: 9
Joined: 6 months ago

Re: Precedence constraint

Post by ikeato » 1 month ago

Hi Renger,

Please find attached model.

Thanks,
Ike
Last edited by ikeato on Sat Sep 08, 2018 12:12 am, edited 1 time in total.

User avatar
Renger
Posts: 186
Joined: 2 years ago

Re: Precedence constraint

Post by Renger » 1 month ago

Sorry Ike, no idea to rewrite the equation.
Renger

ikeato
User
User
Posts: 9
Joined: 6 months ago

Re: Precedence constraint

Post by ikeato » 1 month ago

Hi Renger,

Thanks for the effort.

Please how do you write a normal gams equation to show that 1 should come before 2 then 3 then 4 in a given set j, whereby 1 with a quantity has to be filled up before 2 then 3 and 4?

Regards,
Ike.

Post Reply