User Tools

Site Tools


gams:set_elements_are_strings_not_numbers

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

gams:set_elements_are_strings_not_numbers [2007/04/04 12:46]
127.0.0.1 external edit
gams:set_elements_are_strings_not_numbers [2020/05/27 16:23] (current)
Lutz Westermann format and link to documentation
Line 1: Line 1:
 ====== Set elements are strings, not numbers ====== ====== Set elements are strings, not numbers ======
  
-Q: // If I have defined ​a set ''​t "time slots" /​1*10''​;//+Q: // If I have defined ​ ''​Set t "time slots" /1*10/;''//​
  
 //Now I want to to  change this to something like // //Now I want to to  change this to something like //
  
-   set t "time slots" /1* "some multiplier of 10"/;+   Set t "time slots" /1* "some multiplier of 10"/;
  
 //How can I do this?// //How can I do this?//
Line 13: Line 13:
 <​code>​ <​code>​
 $if not set maxt $set maxt 10 $if not set maxt $set maxt 10
-set t "time slots" /1* %maxt%/;+Set t "time slots" /1* %maxt%/;
 display t display t
 </​code>​ </​code>​
  
-To change the value of ''​maxt''​ from 10 to another number (i.e. 50), please add ''​--maxt050''​.+To change the value of ''​maxt''​ from 10 to another number (i.e. 50), please add ''​--maxt=50'' ​to the command line (see [[https://​www.gams.com/​latest/​docs/​UG_GamsCall.html#​UG_GamsCall_DoubleDashParametersEtc|double dash parameters]]).
  
 Please also keep in mind that set elements are not numbers -- even if you choose labels that look like numbers. In fact, my recommendation is to avoid using set elements that look like numbers since it can cause confusion in different circumstances. If you write Please also keep in mind that set elements are not numbers -- even if you choose labels that look like numbers. In fact, my recommendation is to avoid using set elements that look like numbers since it can cause confusion in different circumstances. If you write
IMPRESSUM / LEGAL NOTICEPRIVACY POLICY gams/set_elements_are_strings_not_numbers.1175683562.txt.gz ยท Last modified: 2007/04/04 12:46 by 127.0.0.1