dear dr

i have a question that i count find its answer for a long time.

please answer me if you know;

im working on MRCPCP(multi mode resource constrained project scheduling problem) and i want to code my problem with GAMS.

but i dont know how can i specify upper and lowe bound for summation over time. because this summation must be overt " t "and for every activity this " t " must be from “EF(j)” to “LF(j)”. i have problem to code it in GAMS. please help me if you know. thank you

AZAD AMIRI

best regards

Date: Sun, 14 Apr 2013 06:10:01 -0700

From: ati_h2005@yahoo.com

Subject: Re: scanning a set of values loop statement

To: gamsworld@googlegroups.com

hi,

note that, loop is working with ‘t’ not ‘i’

loop(t,

j = x(t);

display j;

);

From: “byungdo.chung@gmail.com”

To: gamsworld@googlegroups.com

Cc: Hajinezhad

Sent: Saturday, April 13, 2013 7:52 AM

Subject: Re: scanning a set of values loop statement

Hi, Thank you for your help.

I tried what you mentioned but there is an error atr “j = x(i);”

“149 Uncontrolled set entered as constant”

The following is what I tested.

sets i /1 * 3/

t(i) ;

parameter x(i), j;

x(‘1’) = 1;

x(‘2’) = 3;

x(‘3’) = 7;

t(i) = yes;

loop(t,

j = x(i);

display j;

);

Could you let me know the code you tested?

Thank you again.

On Saturday, April 13, 2013 3:05:33 AM UTC+9, Hajinezhad wrote:

Hi,

I run the example model without the line " solve z → (z is a function of j);"; there was no error. I think the problem is that you use the set “i” to define some equations, and also for loop. In this case, you can define a subset of “i”

set

t(i);

.

.

.

t(i) = yes;

loop(t,

j = x(i);

.

.

);

From: “byungd...@gmail.com”

To: gams...@googlegroups.com

Sent: Friday, April 12, 2013 7:41 PM

Subject: scanning a set of values loop statement

I’d like to assign values of a set of parameters, then use the value one by one using loop statement.

For example…

## sets i /1 * 3/ ;

parameter x(i), j;

x(‘1’) = 1;

x(‘1’) = 3;

x(‘1’) = 7;

loop(i,

j = x(i);

solve z → (z is a function of j);

);

In GAMS, " j = x(i);" causes an error. Is there any way to solve the problem?

Thank you for your help in advance.

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?hl=en.

For more options, visit https://groups.google.com/groups/opt_out.

\