and the solution :
please help me with these errors!141,143 and when i wrote the statements in the loop in the equation part i get the message 149?why?what should i do for tha?please help me
This question is marked "community wiki".

In GAMS, you cannot define constraints within a loop. You should first declare their names using Equations instructions and then define them separately (similar to what you have already written for the objective function). Your code should look something like below.
You should also make sure to put the model definition line (i.e., model SADAF/all/;) after the equations instructions. answered 09 Jul '14, 09:31 Ehsan ♦ thank you very much for your help ehsan,i live in tehran too,and i am studying industrial engineering at amirkabir university...
(09 Jul '14, 12:10)
sadaf
You're welcome. Good luck with your studies.
(09 Jul '14, 13:01)
Ehsan ♦

My original model is: The data:
the variables:
I dont know how should I define "xt1t2s" in my program and how can I write its conditional statement? and also i should use some d(t1,s) and d(t2,s) in my equations because in fact the last two equations should be in this form (with paying attention to the definition of variable
how should i define x? and how can i write the equations in this form? please help me.
link
This answer is marked "community wiki".
