Pgams_engine.gms : Test gams_engine API

Description

Contributor: Clemens Westphal, October 2020


Small Model of Type : Python


Category : GAMS API library


Main file : Pgams_engine.gms

$TITLE 'Test gams_engine API' (PGAMS_ENGINE,SEQ=60)

$ontext
Contributor: Clemens Westphal, October 2020
$offtext


$if not setEnv ENGINE_URL $abort.noError Environment variables for GAMS Engine are not set

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

$ifthen setenv PYTHON38
*Make sure that the correct libssl and libcrypto Dlls are found
$  ifthen.WIN %system.buildcode% == WEI
$    prefixPath %sysenv.PYTHON38%\..\Library\bin
$  endif.WIN
$  call.checkErrorLevel cd . && "%sysenv.PYTHON38%" "%srcRoot%engine%system.dirsep%transport_engine.py" "%gams.sysdir%."
$  call.checkErrorLevel cd . && "%sysenv.PYTHON38%" "%srcRoot%control%system.dirsep%run_engine.py" "%gams.sysdir%."
$endif

$ifThen dExist "%gams.sysdir%GMSPython"
$  dropEnv PYTHONUSERBASE
$  call.checkErrorLevel cd . && "%gams.sysdir%GMSPython%system.dirsep%python" "%srcRoot%engine%system.dirsep%transport_engine.py" "%gams.sysdir%."
$  call.checkErrorLevel cd . && "%gams.sysdir%GMSPython%system.dirsep%python" "%srcRoot%control%system.dirsep%run_engine.py" "%gams.sysdir%."
$endIf