I would like to branch to two different module base on scalar 's'. The following is my GAMS code, however it is not working correctly.
Please help me what is problem for this model. If know, let me know what is best solution.
Code: Select all
scalars s / 100 / ; if (s > 0, $Setglobal optcase "Case1" else $Setglobal optcase "Case2" ); display "%optcase%"; $If %optcase% == "Case2" $goto Subroutine2 $label Subroutine1 ... ... $goto SolverRun $label Subroutine2 ... ... $label SolverRun model myModel / all /; solve myModel using MINLP minimizing myTarget;