Description
Contributor: Jarungjit Parnjai, November 2012
Small Model of Type : Java
Category : GAMS API library
Main file : JBenders.gms
$title 'Test object oriented Java API using a (multi-threaded) Benders Decomposition Algorithm' (JBENDERS,SEQ=27)
$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.benders
* compile Bender2Stage.java
$call %DOLLAR1%JPATH%DOLLAR2%%system.dirsep%javac -cp "%srcRoot%api%system.dirsep%GAMSJavaAPI.jar"%C%"%srcRoot%benders" -d . "%srcRoot%benders%system.dirsep%Benders2Stage.java"
$if errorlevel 1 $abort 'Problem compiling Benders2Stagejava'
* run Bender2Stage.class
$call %DOLLAR1%JPATH%DOLLAR2%%system.dirsep%java -cp "%srcRoot%api%system.dirsep%GAMSJavaAPI.jar"%C%. -Djava.library.path="%srcRoot%api" %package%.Benders2Stage "%gams.sysdir%."
$if errorlevel 1 $abort 'Problem executing Benders2Stage.class'
* compile Bender2StageMT.java
$call %DOLLAR1%JPATH%DOLLAR2%%system.dirsep%javac -cp "%srcRoot%api%system.dirsep%GAMSJavaAPI.jar"%C%"%srcRoot%benders" -d . "%srcRoot%benders%system.dirsep%Benders2StageMT.java"
$if errorlevel 1 $abort 'Problem compiling Benders2StageMT.java'
* run Bender2StageMT.class
$call %DOLLAR1%JPATH%DOLLAR2%%system.dirsep%java -cp "%srcRoot%api%system.dirsep%GAMSJavaAPI.jar"%C%. -Djava.library.path="%srcRoot%api" %package%.Benders2StageMT "%gams.sysdir%."
$if errorlevel 1 $abort 'Problem executing Benders2StageMT.class'