User Tools

Site Tools


gams:conditional_file_include

Differences

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

Link to this comparison view

gams:conditional_file_include [2007/05/04 12:58] (current)
Line 1: Line 1:
 +====== Conditional file include ======
  
 +Q:  //I'm trying to optionally include some code into my model. ​ I was thinking this line would work, but it doesn'​t evaluate correctly. ​ Could you please advise? //
 +<​code>​
 +setglobal isUncertainty 1
 +...
 +$if %isUncertainty% == "​1"​ $include ../​uncertainty/​input/​coll10.gms
 +</​code>​
 +
 +Try: 
 +<​code>​
 +$SetGlobal isUncertainty
 +$if SetGlobal isUncertainty $Include sub.inc ​
 +</​code>​
IMPRESSUM / LEGAL NOTICEPRIVACY POLICY gams/conditional_file_include.txt ยท Last modified: 2007/05/04 12:58 (external edit)