Description
AB01198:convert::derivatives (Distribution 22.2-22.4) Input of min(max(x1,x2),x3) produced bad output in gams.gms: min(x1,x2,x3) Contributor: Alex Meeraus
Small Model of Type : GAMS
Category : GAMS Test library
Main file : convert5.gms
$title 'CONVERT test suite - min(max(x1,x2),x3)' (CONVERT5,SEQ=333)
$onText
AB01198:convert::derivatives (Distribution 22.2-22.4)
Input of
min(max(x1,x2),x3)
produced bad output in gams.gms:
min(x1,x2,x3)
Contributor: Alex Meeraus
$offText
Variables x1,x2,x3,objvar;
Equations e1;
e1.. min(max(2*x1,3*x2),4*x3) =e= objvar;
Model m / all /;
x1.fx=0;x2.fx=2;x3.fx=2;objvar.fx=6;
Solve m us dnlp max objvar;
option dnlp=convert;
solve m us dnlp max objvar;
$onEcho > t1.gms
$include gams.gms
abort$(m.modelstat <> %modelStat.optimal%) 'should be optimal'
$offEcho
execute 'gams t1 lo=%gams.lo% dnlp=conopt';
abort$errorlevel 'did not work';