a constraint

Dear Sir/Madam,

I have a constraint that I am not able to model it in GAMS.
I attached it.

Waiting for your constructive comments.
Thanks,



Attachments-396/constraint.docx
Attachments-396/constraint.jpg

Hi ? (is this nowadays typical that people don’t sign their E-Mails anymore)



You could search this mailing list and find the answer there, but here is the code anyway:



Set I /1*3/;



Alias(i,j);



Parameter b /4/;



Variable X(i);



Equation sumeq(i);



Sumeq(i)… sum(j$(ord(j) lt (ord(i)+1)), x(i)) =L=B;



Cheers



Renger





From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com]
Sent: Freitag, 13. November 2015 15:32
To: Gamsworld
Subject: a constraint



Dear Sir/Madam,



I have a constraint that I am not able to model it in GAMS.

I attached it.



Waiting for your constructive comments.

Thanks,


\

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.

Hi
An important point to note is that the last restriction, makes all previous restrictions are unnecessary! so you can write

Set I /1*3/;



Alias(i,j);



Parameter b /4/;



Variable X(i);



Equation sumeq;



Sumeq… sum(j, x(i)) =L=B;

✔ Get a Signature like this: Click Here!

On Fri, Nov 13, 2015 at 6:01 PM, ‘Mahdi Rouholamini’ via gamsworld wrote:

Dear Sir/Madam,

I have a constraint that I am not able to model it in GAMS.
I attached it.

Waiting for your constructive comments.
Thanks,


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.