JTsp.gms : Test object oriented Java API using a Traveling Salesman Problem

Description

Contributor: Jarungjit Parnjai, April 2013


Small Model of Type : Java


Category : GAMS API library


Main file : JTsp.gms

$title 'Test object oriented Java API using a Traveling Salesman Problem' (JTSP,SEQ=37)

$onText
Contributor: Jarungjit Parnjai, April 2013
$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.tsp

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

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