nlcode7.gms : Test for NL code bug from Dist 24.0.1

Description

This example turfs up a bug in the NL code generation when eps is used.
The 24.0.1 system and previous had problems, 24.0.2 should be fixed.

Contributor: Steve Dirkse, Jan 2013


Small Model of Type : GAMS


Category : GAMS Test library


Main file : nlcode7.gms

$title Test for NL code bug from Dist 24.0.1 (NLCODE7,SEQ=586)

$onText
This example turfs up a bug in the NL code generation when eps is used.
The 24.0.1 system and previous had problems, 24.0.2 should be fixed.

Contributor: Steve Dirkse, Jan 2013
$offText

variables z, t;
equations defobj;

* defobj.. t + 0 * power(t,2) =e= z;
defobj.. t + eps * power(t,2) =e= z;

model m /defobj/;

t.lo = 1;

option sys3 = 2;

solve m using nlp min z;
abort$[m.modelstat > 2] 'bad modelstat', m.modelstat;
abort$[abs(z.l-1) > 1e-3] 'bad z level', z.l;
abort$[abs(t.m-1) > 1e-3] 'bad t marginal', t.m;