Description
Bug: "CMEX accepts duplicates if they come in none-sorted uel order" For a long time there was a bug, ignoring duplicate entries in data statements if the data was unsorted. This was fixed with GAMS 25.2. Contributor: Lutz Westermann, December 2018
Small Model of Type : GAMS
Category : GAMS Test library
Main file : duplic01.gms
$title Detecting duplicate entries in unsorted data (duplic01,SEQ=793)
$onText
Bug: "CMEX accepts duplicates if they come in none-sorted uel order"
For a long time there was a bug, ignoring duplicate entries in data statements
if the data was unsorted. This was fixed with GAMS 25.2.
Contributor: Lutz Westermann, December 2018
$offText
$onEchoV > mkinc.gms
file fx / inc.gms /; put fx;
scalar i;
for (i=%maxi% downto 1, put i:0:0 /);
putclose '%maxi%';
$offEcho
$set maxi 100
$call gams mkinc --maxi=%maxi% lo=%gams.lo%
$ifE errorLevel<>0 $abort Problems with mkinc. Check mkinc.lst.
$onEchoV > test1.gms
set ii / 1*21 /;
set i(*) /
$include inc.gms
/;
$offEcho
$call gams test1 lo=%gams.lo%
$ifE errorlevel=0 $abort Problems with test1 (expecting error). Check test1.lst.
$set maxi 50000
$call gams mkinc --maxi=%maxi% lo=%gams.lo%
$ifE errorLevel<>0 $abort Problems with mkinc. Check mkinc.lst.
$onEchoV > test2.gms
set ii 'Error' / i1*i20 /;
set i(*) /
$include inc.gms
/;
$offEcho
$call gams test2 lo=%gams.lo% pf2=2
$ifE errorlevel=0 $abort Problems with test2 (expecting error). Check test2.lst.