Pex2.gms : Test Python core API to read and write GDX, set options and execute GAMS

Description

Contributor: Lutz Westermann, October 2012


Small Model of Type : Python


Category : GAMS API library


Main file : Pex2.gms

$TITLE 'Test Python core API to read and write GDX, set options and execute GAMS' (PEX2,SEQ=19)

$ontext
Contributor: Lutz Westermann, October 2012
$offtext


$set srcRoot %gams.sysdir%api%system.dirsep%python%system.dirsep%examples%system.dirsep%core%system.dirsep%

$ifthen setenv PYTHON37
$  call.checkErrorLevel cd . && "%sysenv.PYTHON37%" "%srcRoot%core_example2.py" "%gams.sysdir%." model2.gms
$  call.checkErrorLevel gdxdiff demanddata.gdx demandwant.gdx
$endif
$ifthen setenv PYTHON38
$  call.checkErrorLevel cd . && "%sysenv.PYTHON38%" "%srcRoot%core_example2.py" "%gams.sysdir%." model2.gms
$  call.checkErrorLevel gdxdiff demanddata.gdx demandwant.gdx
$endif
$ifthen setenv PYTHON39
$  call.checkErrorLevel cd . && "%sysenv.PYTHON39%" "%srcRoot%core_example2.py" "%gams.sysdir%." model2.gms
$  call.checkErrorLevel gdxdiff demanddata.gdx demandwant.gdx
$endif
$ifthen setenv PYTHON310
$  call.checkErrorLevel cd . && "%sysenv.PYTHON310%" "%srcRoot%core_example2.py" "%gams.sysdir%." model2.gms
$  call.checkErrorLevel gdxdiff demanddata.gdx demandwant.gdx
$endif
$ifthen setenv PYTHON311
$  call.checkErrorLevel cd . && "%sysenv.PYTHON311%" "%srcRoot%core_example2.py" "%gams.sysdir%." model2.gms
$  call.checkErrorLevel gdxdiff demanddata.gdx demandwant.gdx
$endif

$ifThen dExist "%gams.sysdir%GMSPython"
$  call.checkErrorLevel cd . && "%gams.sysdir%GMSPython%system.dirsep%python" "%srcRoot%core_example2.py" "%gams.sysdir%." model2.gms
$  call.checkErrorLevel gdxdiff demanddata.gdx demandwant.gdx
$endIf