Hello All,

Please forgive the potentially horribly naive question, but I don’t

use GAMS too much. I’ve been struggling with this for a little while

now… Imagine as a simple use case that a user (namely me) wants to

have upper or lower bounds imposed on only a subset of the variables

in his problem.

Ideally, I would like to simply declare one set (the set of variables

for which bounds are to be imposed) to be a subset of another set,

and have the elements in the subset be taken directly from the

parameter statement.

Is this possible? If not, then why not – it seems very natural to

me.

Here is a small example:

set

A “Set A”

ix(A) " subset of A"

;

parameters

c(A) " something indexed over A"

u(ix) " indexed over a subset of A"

;

set A /

Steve,

Dirkse,

Is,

Cool /

;

parameter c(A)

/ Steve 42.0

Dirkse 666.0

Is 42.0

Cool 666.0 /

;

parameter u(ix)

/ Steve -1.0

Cool 0.0 /

;

display c;

display u;

This doesn’t work, as it tells me that the values for the domain of ix

are unknown.

25 parameter u(ix)

26 / Steve -1.0 /

**** $361

GAMS Rev 147 x86/

Linux

05/07/07 15:46:11 Page 2

G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m

Error Messages

361 Values for domain 1 are unknown - no checking possible

This is part of a larger model, and I would rather not have to

explicity write out *all* of the data necessary to define *all* of the

subsets for *all* of the constraints that I want to hold given the

input data.

Thanks for any help you can provide.

Cheers,

-Jeff

–~–~---------~–~----~------------~-------~–~----~

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

-~----------~----~----~----~------~----~------~–~—