dplytest.gms : A Deployment Test Model

Description

This small model demonstrates the use of the deploy model. If anything
goes wrong, a compilation error is issued.

Keywords: GAMS language features

  Retrieve model lp01 and deploy from the GAMS Model Library

  Execute the deploy model and build a GAMS/CONOPT deployment system

  Unzip the GAMS/CONOPT deployment system in the scratch directory


Reference

  • GAMS Development Corporation, Formulation and Language Example.

Small Model of Type : GAMS


Category : GAMS Model library


Main file : dplytest.gms

$title A Deployment Test Model (DPLYTEST,SEQ=316)

$onText
This small model demonstrates the use of the deploy model. If anything
goes wrong, a compilation error is issued.

Keywords: GAMS language features
$offText

* Retrieve model lp01 and deploy from the GAMS Model Library
$call testlib -q lp01
$call gamslib -q deploy

* Execute the deploy model and build a GAMS/CONOPT deployment system
$call =gams deploy lo=2
$ifE errorLevel<>0 $abort Error running model deploy
$if not exist gmsdeply.zip $abort Error finding deploy zip file gmsdeply.zip

* Unzip the GAMS/CONOPT deployment system in the scratch directory
$call =gmsunzip -oqq -d"%gams.scrdir%gmssys" gmsdeply.zip
$ifE errorLevel<>0 $abort Error unzipping gmsdeply.zip i into '%gams.scrdir%gmssys'

$set QUOTE '"'
$if %system.filesys% == UNIX $set QUOTE ''

* Run model lp01 with the newly installed GAMS system
$call =%QUOTE%%gams.scrdir%gmssys%system.dirsep%gams%QUOTE% lp01 lp=conopt lo=2
$ifE errorLevel<>0 $abort Error running lp01 with new GAMS system

* Remove newly created GAMS system directory
$call =rm -rf "%gams.scrdir%gmssys"
$ifE errorLevel<>0 $eval sleep 5
$call =rm -rf "%gams.scrdir%gmssys"
$ifE errorLevel<>0 $abort Error removing newly created GAMS system directory