Description
This test ensures that ECImplicitLoad=on/off behaves correctly with Embedded Code Python at execution time Contributor: Michael Bussieck, March 2022
Small Model of Type : GAMS
Category : GAMS Test library
Main file : embpy13.gms
$title 'Test implicit/explicit loading in Embedded Code (execution time)' (EMBPY13,SEQ=899)
$onText
This test ensures that ECImplicitLoad=on/off behaves correctly
with Embedded Code Python at execution time
Contributor: Michael Bussieck, March 2022
$offText
$log --- Using Python library %sysEnv.GMSPYTHONLIB%
set uni / i1*i4, j1*j3 /;
set s1(*), s2(*);
* Load sets implicitly
* Load sets explicitly
option clear=s1, clear=s2;
* Mix implicit and explicit loading
option clear=s1, clear=s2;
* Load parameter implicitly
set i / i1*i3 /, j / j1*j3 /;
parameter p1(i, j);
* Generate a domain violation with implicit loading and DomainCheckType.CHECKED
abort$(execerror) 'terminate with execution errors';
option clear=p1;
abort$(execerror=0) 'expect execution errors';
execerror = 0;
* Generate a domain violation (unknow UEL) with implicit loading and DomainCheckType.CHECKED
abort$(execerror) 'terminate with execution errors';
option clear=p1;
abort$(execerror=0) 'expect execution errors';
execerror = 0;
* Filter a domain violation with implicit loading
option clear=p1;
* Generate an execution error by loading a parameter that has not been set
parameter p4(i,j);
abort$(execerror) 'terminate with execution errors';
abort$(execerror=0) 'expect execution errors';
execerror = 0;
option ECImplicitLoad=off;
abort$(execerror) 'terminate with execution errors';
abort$(execerror=0) 'expect execution errors';
execerror = 0;