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 1
$batinclude JexTrans 2
$batinclude JexTrans 3
$batinclude JexTrans 4
$batinclude JexTrans 5
$batinclude JexTrans 6

* no gurobi on SIG, SOL, SOX
$if not %system.buildcode% == SIG $if not %system.buildcode% == SOL $if not  %system.buildcode% == SOX $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

* 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'