Hello fellow GAM-ers,

I am extremely new to GAMS, spent the last 3 months learning

optimization, modelling and using GAMS.

I am trying to model a schedule problem now, and have came to a series

of problems.

However, I have narrowed down my issues to this two crucial points:

- I need to write a code to that does summation over a domain of 2

sets interseting.

i.e. Sum over domain r, such that r belongs to the intersection of Set

A and Set B.

I know it should go something like this… sum(r$( …??.. ),

X(i,k,r) ) I have tried one way, but i’m geting an error 8, where ‘)’

is expected. Can someone help me with this? I am not giving the

specific problem, because I would like to learn the general way to

write intersection of sets, then i’ll apply it in my model.

- At the end of my old draft, the result summary says there are 10

integer infeasibility where they are unbounded. Anyone can explain to

me what the statement means?

Many Regards!

P.S. Please help me… The help will be greatly appreciated.

\

Hi Bryan,

Try putting the $ condition for the entire equation.

Nikit

On Mon, Dec 26, 2011 at 6:37 AM, Bryan Toh wrote:

Hello fellow GAM-ers,

I am extremely new to GAMS, spent the last 3 months learning

optimization, modelling and using GAMS.

I am trying to model a schedule problem now, and have came to a series

of problems.

However, I have narrowed down my issues to this two crucial points:

- I need to write a code to that does summation over a domain of 2

sets interseting.

i.e. Sum over domain r, such that r belongs to the intersection of Set

A and Set B.

I know it should go something like this… sum(r$( …??.. ),

X(i,k,r) ) I have tried one way, but i’m geting an error 8, where ‘)’

is expected. Can someone help me with this? I am not giving the

specific problem, because I would like to learn the general way to

write intersection of sets, then i’ll apply it in my model.

- At the end of my old draft, the result summary says there are 10

integer infeasibility where they are unbounded. Anyone can explain to

me what the statement means?

Many Regards!

P.S. Please help me… The help will be greatly appreciated.

To post to this group, send email to gamsworld@googlegroups.com.

To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Bryan,

If you are learning, a good way to verify you have gotten the right

solution to computing A intersect B is to actually create the set.

That way you can display the sets or dump them to GDX and browse them

in the IDE, and verify you got it right or debug your errors. For

example,

sets A / blah blah /, B / blah blah /, AB(*);*

alias(u,);

AB(u) = A(u) and B(u);

This can be optimized for speed but that’s not an issue if you don’t

have a large universe of set labels.

-Steve

On Mon, Dec 26, 2011 at 9:37 AM, Bryan Toh wrote:

Hello fellow GAM-ers,

I am extremely new to GAMS, spent the last 3 months learning

optimization, modelling and using GAMS.

I am trying to model a schedule problem now, and have came to a series

of problems.

However, I have narrowed down my issues to this two crucial points:

- I need to write a code to that does summation over a domain of 2

sets interseting.

i.e. Sum over domain r, such that r belongs to the intersection of Set

A and Set B.

I know it should go something like this… sum(r$( …??.. ),

X(i,k,r) ) I have tried one way, but i’m geting an error 8, where ‘)’

is expected. Can someone help me with this? I am not giving the

specific problem, because I would like to learn the general way to

write intersection of sets, then i’ll apply it in my model.

- At the end of my old draft, the result summary says there are 10

integer infeasibility where they are unbounded. Anyone can explain to

me what the statement means?

Many Regards!

P.S. Please help me… The help will be greatly appreciated.

–

To post to this group, send email to gamsworld@googlegroups.com.

To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

– Steven Dirkse, Ph.D. GAMS Development Corp., Washington DC Voice: (202)342-0180 Fax: (202)342-0181 sdirkse@gams.com http://www.gams.com