Pex1.gms : Test Python core API to read and write GDX

Description

Contributor: Lutz Westermann, October 2012


Small Model of Type : Python


Category : GAMS API library


Main file : Pex1.gms

$title 'Test Python core API to read and write GDX' (PEX1,SEQ=11)

$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 PYTHON39
$  call.checkErrorLevel cd . && "%sysenv.PYTHON39%" "%srcRoot%core_example1.py" "%gams.sysdir%."
$  call.checkErrorLevel gdxdiff demanddata.gdx demandwant.gdx
$  call.checkErrorLevel cd . && "%sysenv.PYTHON39%" "%srcRoot%core_example1.py" "%gams.sysdir%."
$endIf
$ifThen setenv PYTHON310
$  call.checkErrorLevel cd . && "%sysenv.PYTHON310%" "%srcRoot%core_example1.py" "%gams.sysdir%."
$  call.checkErrorLevel gdxdiff demanddata.gdx demandwant.gdx
$  call.checkErrorLevel cd . && "%sysenv.PYTHON310%" "%srcRoot%core_example1.py" "%gams.sysdir%."
$endIf
$ifThen setenv PYTHON311
$  call.checkErrorLevel cd . && "%sysenv.PYTHON311%" "%srcRoot%core_example1.py" "%gams.sysdir%."
$  call.checkErrorLevel gdxdiff demanddata.gdx demandwant.gdx
$  call.checkErrorLevel cd . && "%sysenv.PYTHON311%" "%srcRoot%core_example1.py" "%gams.sysdir%."
$endIf
$ifThen setenv PYTHON312
$  call.checkErrorLevel cd . && "%sysenv.PYTHON312%" "%srcRoot%core_example1.py" "%gams.sysdir%."
$  call.checkErrorLevel gdxdiff demanddata.gdx demandwant.gdx
$  call.checkErrorLevel cd . && "%sysenv.PYTHON312%" "%srcRoot%core_example1.py" "%gams.sysdir%."
$endIf
$ifThen setenv PYTHON313
$  call.checkErrorLevel cd . && "%sysenv.PYTHON313%" "%srcRoot%core_example1.py" "%gams.sysdir%."
$  call.checkErrorLevel gdxdiff demanddata.gdx demandwant.gdx
$  call.checkErrorLevel cd . && "%sysenv.PYTHON313%" "%srcRoot%core_example1.py" "%gams.sysdir%."
$endIf



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