embgms08.gms : Test filtered load from Embedded Code

Description

This test ensures that we get the expected result when doing a filtered load
from embedded code. The symbol to be loaded has some records which violate
the given domain and should be just ignored.

Contributor: Michael Bussieck, January 2023


Small Model of Type : GAMS


Category : GAMS Test library


Main file : embgms08.gms

$title Test filtered load from Embedded Code (EMBGMS08,SEQ=931)

$onText
This test ensures that we get the expected result when doing a filtered load
from embedded code. The symbol to be loaded has some records which violate
the given domain and should be just ignored.

Contributor: Michael Bussieck, January 2023
$offText


$onEcho > makeWant.gms
Set
   i          /1*2/
   w          /1*2/
   s          / s1/ ;

Parameter QtableScen(s,i,w) / 's1'.'1'.'1' 2 
                              's1'.'1'.'2' 2 /;
$offEcho

$call.checkErrorLevel gams makeWant.gms gdx=want lo=%GAMS.lo%


Set
   i          /1*2/
   w          /1*2/
   s                ;

Parameter QtableScen(s<,i,w);

$onEmbeddedCode GAMS:
Parameter QtableScen / 's1'.'1'.'1' 2 
                       's1'.'1'.'2' 2 /;
$offEmbeddedCode QtableScen

execute_unloadDI 'have', QtableScen;

execute.checkErrorlevel 'gdxdiff want.gdx have.gdx > %system.nullFile%';