Ptrseq.gms : Test object oriented Python API running a sequence of examples based on a transport model

Description

Contributor: Clemens Westphal, October 2012


Small Model of Type : Python


Category : GAMS API library


Main file : Ptrseq.gms

$TITLE 'Test object oriented Python API running a sequence of examples based on a transport model' (PTRSEQ,SEQ=24)

$ontext
Contributor: Clemens Westphal, October 2012
$offtext


$set srcRoot %gams.sysdir%apifiles%system.dirsep%Python%system.dirsep%

$                             set C ;
$if %system.filesys% == UNIX $set C :
$                             set SET set
$if %system.filesys% == UNIX $set SET export

* The C extension comes with the system, this is only required when doing manual changes there
$if not set rebuildCExtension $goto haveCExtension

$call cd "%srcRoot%api" && %sysenv.PYTHON27% setup.py build --build-lib .
$if errorlevel 1 $abort 'Problem running dist utils (setup.py)'

$label haveCExtension

$onechoV > exTrans
$set S     \
$if %system.filesys% == UNIX $set S /
$set C     ;
$if %system.filesys% == UNIX $set C :
$set SET   set
$if %system.filesys% == UNIX $set SET export

$call %SET% PYTHONPATH=%srcRoot%api && %sysenv.PYTHON27% "%srcRoot%transport%1.py" "%gams.sysdir%."
$if errorlevel 1 $abort 'Problem executing transport%1.py'

$escape &
$ifThen not %sysenv.PYTHON26% == %&sysenv.PYTHON26%&
$call %SET% PYTHONPATH=%srcRoot%api_26 && %sysenv.PYTHON26% "%srcRoot%transport%1.py" "%gams.sysdir%."
$if errorlevel 1 $abort 'Problem executing transport%1.py with Python 2.6'
$endif

$ifThen not %sysenv.PYTHON34% == %&sysenv.PYTHON34%&
$call %SET% PYTHONPATH=%srcRoot%api_34 && %sysenv.PYTHON34% "%srcRoot%transport%1.py" "%gams.sysdir%."
$if errorlevel 1 $abort 'Problem executing transport%1.py with Python 3.4'
$endif

$ifThen not %sysenv.PYTHON36% == %&sysenv.PYTHON36%&
$call %SET% PYTHONPATH=%srcRoot%api_36 && %sysenv.PYTHON36% "%srcRoot%transport%1.py" "%gams.sysdir%."
$if errorlevel 1 $abort 'Problem executing transport%1.py with Python 3.6'
$endif
$offecho

$batinclude exTrans 1
$batinclude exTrans 2
$batinclude exTrans 3
$batinclude exTrans 4
$batinclude exTrans 5
$batinclude exTrans 6
$batinclude exTrans 7
$batinclude exTrans 8
$batinclude exTrans 8a
* These two need more references, cannot assume that they are the same one all machines
*$batinclude exTrans 9
*$batinclude exTrans 10
$batinclude exTrans 11
$batinclude exTrans 12
$batinclude exTrans 13
$batinclude exTrans 14