|
Multi dimensional sets |
Top Previous Next |
|
Sets do not need to be one dimensional and rather can be composed as sets of other sets where the basic notation to identify the presence of an element is
set multidimset(set1name,set2name) /set1elementname.set2elementname /
with the period separating the two set elements. Examples: (sets.gms) Sets Origins Originating Places /"New York", Boston/ Destinations Demand points /"Portland",London, Houston/ Linkedbyroad(origins,destinations) Places linked by roadways /"NEW York" .Portland, "New York" .Houston, boston.Portland, boston.Houston/; Notes:
Set xx(origins,destinations) /boston.(houston,london)/; is the same as the statement Set xx(origins,destinations) /boston.houston,boston.london/; |