JInterrupt.gms : Test object oriented Java API for interrupting running GAMS jobs

Description

Contributor: Jarungjit Parnjai, November 2012


Small Model of Type : Java


Category : GAMS API library


Main file : JInterrupt.gms

$TITLE 'Test object oriented Java API using a warehouse location problem' (JINTERRUPT,SEQ=35)

$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.interrupt

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

* run ConsoleInterrupt.class
$call %DOLLAR1%JPATH%DOLLAR2%%system.dirsep%java -cp "%srcRoot%api%system.dirsep%GAMSJavaAPI.jar"%C%. -Djava.library.path="%srcRoot%api" %package%.ConsoleInterrupt "%gams.sysdir%."
$if errorlevel 1 $abort 'Problem executing ConsoleInterrupt.class'

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

* run InterruptGUI.class
* $call %DOLLAR1%JPATH%DOLLAR2%%system.dirsep%java -cp "%srcRoot%api%system.dirsep%GAMSJavaAPI.jar"%C%. -Djava.library.path="%srcRoot%api" %package%.InterruptGUI "%gams.sysdir%."
* $if errorlevel 1 $abort 'Problem executing InterruptGUI.class'