lp08.gms : Test the proper return of free equations

Description


Small Model of Type : LP


Category : GAMS Test library


Main file : lp08.gms

$title Test the proper return of free equations (LP08,SEQ=73)

variables x; equations f,g;

f.. x =n= 100;
g.. x =g=  50;

model m /f,g/;

solve m us lp min x;

* if {(m.modelstat = %modelStat.optimal% or m.modelstat = %modelStat.optimal%) and (m.solvestat = %solveStat.normalCompletion%),
if {(m.modelstat = %modelStat.optimal%) and (m.solvestat = %solveStat.normalCompletion%),
   abort$(abs(f.l+50) > 1e-6) 'wrong level value should be -50',f.l;
else
   abort$(not((m.modelstat = %modelStat.noSolutionReturned%) and (m.solvestat = %solveStat.capabilityProblems%))) 'wrong return codes'
   m.solvestat,m.modelstat
};