Description
Trac #1914: An empty data statement under $onMulti removes previous data Found with one of Goldsteins models Contributor: Alex Meeraus
Small Model of Type : GAMS
Category : GAMS Test library
Main file : onmulti7.gms
$title 'Test merge with $onMulti and empty data statement' (ONMULTI7,SEQ=491)
$onText
Trac #1914: An empty data statement under $onMulti removes previous data
Found with one of Goldsteins models
Contributor: Alex Meeraus
$offText
$onMulti
$phantom empty
parameter a / empty 0 /;
parameter a / one 1 /;
parameter a / one 1.5 /;
parameter a / empty 0 /;
if(a('one') <> 1.5, display a; execerror=execerror+1 );
variable x(*) / empty.l 0 /
variable x(*) / four.l 4 /
variable x(*) / six.l 6 /
variable x(*) / empty.l 0 /
if(x.l('four') <> 4, display x.l; execerror=execerror+1 );
$onEmpty
parameter b(*) / /;
parameter b / two 2 /;
parameter b / two 2.5 /;
parameter b / /;
if(b('two') <> 2.5, display b; execerror=execerror+1 );
variable y(*) / /
variable y(*) / three.l 3 /
variable y(*) / five.l 5 /
variable y(*) / five.l 5.5 /
variable y(*) / /
if(y.l('five') <> 5.5, display y.l; execerror=execerror+1 );