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

Description

Contributor: Jarungjit Parnjai, November 2012


Small Model of Type : Java


Category : GAMS API library


Main file : Jtrseq.gms

$title 'Test object oriented Java API running a sequence of examples based on a transport model' (JTRSEQ,SEQ=23)

$onText
Contributor: Jarungjit Parnjai, November 2012
$offText


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

$                             set C ;
$if %system.filesys% == UNIX $set C :
$                             set SET set
$if %system.filesys% == UNIX $set SET export
$                             set DOLLAR1 %
$if %system.filesys% == UNIX $set DOLLAR1 ${
$                             set DOLLAR2 %
$if %system.filesys% == UNIX $set DOLLAR2 }
$set package com.gams.examples.transport

* compile TransportModel.java
$call %DOLLAR1%JPATH%DOLLAR2%%system.dirsep%javac -cp "%srcRoot%api%system.dirsep%GAMSJavaAPI.jar"%C%"%srcRoot%transport" -d . "%srcRoot%transport%system.dirsep%TransportModel.java"
$if errorlevel 1 $abort 'Problem compiling TransportModel.java'

$onEchoV > JexTrans

$call %DOLLAR1%JPATH%DOLLAR2%%system.dirsep%javac -cp "%srcRoot%api%system.dirsep%GAMSJavaAPI.jar"%C%.%C%"%srcRoot%transport" -d . "%srcRoot%transport%system.dirsep%Transport%1.java"
$if errorlevel 1 $abort 'Problem compiling Transport%1.java'

$call %DOLLAR1%JPATH%DOLLAR2%%system.dirsep%java -cp "%srcRoot%api%system.dirsep%GAMSJavaAPI.jar"%C%. %package%.Transport%1 "%gams.sysdir%."
$if errorlevel 1 $abort 'Problem executing transport%1.class'

$offEcho

$batInclude JexTrans GDX
$batInclude JexTrans 1
$batInclude JexTrans 2
$batInclude JexTrans 3
$batInclude JexTrans 4
$batInclude JexTrans 5
$batInclude JexTrans 6
$batInclude JexTrans 7
$batInclude JexTrans 8

* do not test examples using msaccess/msexcel java library
* $batInclude JexTrans 9
* $batInclude JexTrans 10

$batInclude JexTrans 11
$batInclude JexTrans 12
$batInclude JexTrans 13
$batInclude JexTrans 14
* Should redo some checks in the test, not a good idea to check each single variable level for a degenerated model
$batInclude JexTrans Engine

* compile TransportGUI.java
* $call %DOLLAR1%JPATH%DOLLAR2%%system.dirsep%javac -cp "%srcRoot%api%system.dirsep%GAMSJavaAPI.jar"%C%.%C%"%srcRoot%transport" -d . "%srcRoot%transport%system.dirsep%TransportGUI.java"
* $if errorlevel 1 $abort 'Problem compiling TransportGUI.java'

* compile TransportGUI.class
* $call %DOLLAR1%JPATH%DOLLAR2%%system.dirsep%java -cp "%srcRoot%api%system.dirsep%GAMSJavaAPI.jar"%C%. %package%.TransportGUI "%gams.sysdir%."
* $if errorlevel 1 $abort 'Problem executing transportGUI.class'