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