load14.gms : Test loading of GDX file with bad UELs

Description

This model tests some variants of loading a broken GDX file. There is
not much one can do with that file, but it es expected that GAMS
send a clear signal in form of a compilation or execution error.

The GDX file used in this model was provided by Tom Rutherford. It is unclear
how it was created.

Contributor: Lutz Westermann, March 2021


Small Model of Type : GAMS


Category : GAMS Test library


Main file : load14.gms

$title Test loading of GDX file with bad UELs (LOAD14,SEQ=857)

$onText
This model tests some variants of loading a broken GDX file. There is
not much one can do with that file, but it es expected that GAMS
send a clear signal in form of a compilation or execution error.

The GDX file used in this model was provided by Tom Rutherford. It is unclear
how it was created.

Contributor: Lutz Westermann, March 2021
$offText



$onEcho > expectCompError1.gms
positive Variable X(*,*,*);
$gdxIn bau_p.gdx
$load x
$offEcho

$call gams expectCompError1.gms lo=%GAMS.lo%
$ifE errorlevel<>2 $abort Expected Compilation Error 1

$onEcho > expectCompError2.gms
$gdxIn bau_p
set u;
$load u=*
positive Variable X(*,*,*);
$load x
$offEcho

$call gams expectCompError2.gms lo=%GAMS.lo%
$ifE errorlevel<>2 $abort Expected Compilation Error 2

$onEcho > expectExecError1.gms
$gdxIn bau_p
set u;
$load u=*
positive Variable X(*,*,*);
execute_load 'bau_p', x;
$offEcho

$call gams expectExecError1.gms lo=%GAMS.lo%
$ifE errorlevel<>3 $abort Expected Execution Error 1


$onEcho > expectExecError2.gms
positive Variable X(*,*,*);
execute_load 'bau_p', x;
$offEcho

$call gams expectExecError2.gms lo=%GAMS.lo%
$ifE errorlevel<>3 $abort Expected Execution Error 2

$onEcho > expectExecError3.gms
set u /1*100/;
positive Variable X(*,*,*);
execute_load 'bau_p', x;
$offEcho

$call gams expectExecError3.gms lo=%GAMS.lo%
$ifE errorlevel<>3 $abort Expected Execution Error 3

$onEcho > expectExecError4.gms
set u /1*100000/;
positive Variable X(*,*,*);
execute_load 'bau_p', x;
$offEcho

$call gams expectExecError4.gms lo=%GAMS.lo%
$ifE errorlevel<>3 $abort Expected Execution Error 4