Notes on indefinite sets in parameter statements

Top  Previous  Next

Parameter statements do not always have to have definitive set assignments.  If one enters an * in an index position, then anything at all can be placed in that position.  In above example, I use this allowing the inclusion of both existing sets and other items in these positions.  For example, in the first position of the incoming parameter I am using both the set destination and the element text "total".

 

incoming(destinaton,"shipments","in cases","from",source)

incoming("total","shipments","in cases","from",source)

 

Note one should not use an * in declarations in place of set names when inputting table or parameter data.  Only use it for output data and then infrequently.
This is discussed more fully in the Sets chapter.

Use of named sets in the specifications allows GAMS to check to make sure you're not misspelling anything.