$batInclude to check the results of a solve statement and abort when not as required.
$batInclude
solve
model name
required model status, a number as listed in the table at https://www.gams.com/latest/docs/UG_GamsCall.html#UG_GamsCall_CompileTimeConstants Use %modelStat.<label>% to get the required status number in a way that makes your code readable.
%modelStat.<label>%
The gamsVersion check prevents GAMS versions < 25.0 from tripping over the put_utility line, but GAMS version 24.2 is too old: it cannot handle the compile-time conditional either.
Comments
$batIncludeto check the results of asolvestatement and abort when not as required.model name
required model status, a number as listed in the table at https://www.gams.com/latest/docs/UG_GamsCall.html#UG_GamsCall_CompileTimeConstants Use
%modelStat.<label>%to get the required status number in a way that makes your code readable.The gamsVersion check prevents GAMS versions < 25.0 from tripping over the put_utility line, but GAMS version 24.2 is too old: it cannot handle the compile-time conditional either.