|
The statements declaring sets, scalars, parameters, tables, files, acronyms, variables, equations and models all can contain explanatory text. These explanatory text entries must follow a set of rules. Namely they
| • | Can be up to 255 characters long |
| • | May be quoted or unquoted |
| • | Must all be entered on one line along with the item name |
| — | Can only contain the special character _ (underscore). |
| — | Cannot contain GAMS reserved words (variable, parameter, etc.). |
| — | Any special characters are allowed (including international ones if charset=1 option used) |
| — | Must have matching quotes at the beginning and end of each element name. |
| — | May use either " or ' but the usage of these must match up. |
| — | May contain GAMS reserved words are allowed in quotes. |
| — | Can nest quiotes with oly the outer quotes being of concern to GAMS i.e. they could contain "A nested 'quote' like this" |
Note the explanatory text for set elements is only accessible through the .te put file command
Examples:
Below the explanatory text for item names in green and the explanatory text for set element names in blue. Note for ease of understanding, each example has a separate line for each element (namerules.gms)
/tennis here i can tell you what this is
dress 'special characters if needed /*+-'/
| Set | kshoes with underscore_; |
| Set | kshoes3 "with special characters * / ? , "; |
| Set | kshoes4 "with 'quotes' like in can't and won't " |
| Parameter | data3 THIS IS explanatory text /1/; |
| Variable | A6item "***** look at this one"; |
| Equation | Wh(shoes) Model equation; |
|