CSWarehouse.gms : Test object oriented C# API using a warehouse location problem

Description

Contributor: Lutz Westermann, October 2012


Small Model of Type : .Net


Category : GAMS API library


Main file : CSWarehouse.gms

$title 'Test object oriented C# API using a warehouse location problem' (CSWAREHOUSE,SEQ=39)

$onText
Contributor: Lutz Westermann, October 2012
$offText


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

$escape &
$if %system.filesys% == UNIX
$if %sysenv.MPATH% == %&sysenv.MPATH%& $abort.noError Need Mono to run this on Unix

$                             set COMP csc.exe
$if %system.filesys% == UNIX $set COMP $MPATH/mcs
$                             set EXEC
$if %system.filesys% == UNIX $set EXEC $MPATH/mono

$if %system.platform% == WEX
$if not set flags $set flags /platform:x64
$if %system.platform% == LEX
$if not set flags $set flags
$if %system.platform% == DEX
$if not set flags $set flags /define:__APPLE__
$if %system.platform% == DAX
$if not set flags $set flags /define:__APPLE__

* Make sure that correct GAMS system is found when checking the registry
$if not %system.filesys% == UNIX $call findthisgams -q

$call cp "%gams.sysdir%%system.dirsep%GAMS.net4.dll" . && %COMP% %flags% -out:GMSWarehouse.exe "%srcRoot%GMSWarehouse%system.dirsep%GMSWarehouse.cs" -r:GAMS.net4.dll
$if errorlevel 1 $abort 'Problem compiling GMSWarehouse.cs'
$call %EXEC% GMSWarehouse.exe "%gams.sysdir%."
$if errorlevel 1 $abort 'Problem executing GMSWarehouse'