dependent set

Problems with modeling
Alchimist
User
User
Posts: 1
Joined: 2 months ago

dependent set

Postby Alchimist » 2 months ago

Hello,

i want to define the set q {a+1,...,a+b(c)} with the set a /1*10/ and the parameter b(c) in GAMS.

How can I correctly formulate the set q in GAMS?

regards
Alchimist

cladelpino
User
User
Posts: 48
Joined: 8 months ago

Re: dependent set

Postby cladelpino » 2 months ago

Simplest approach:

Code: Select all

set a /a1*a10/,q(a);

parameter howMany /4/;

q(a)=YES$(ord(a)<=howMany);

parameter someParameter;

someParameter(q)=1;

display a,q,someParameter;


If for some reason this doesn't fit your scheme, there are other things to do.


Return to “Modeling”

Who is online

Users browsing this forum: No registered users and 1 guest