convert13.gms : CONVERT test suite - apply dict to gams format

Description

Tests that applying the dictionary dict.txt to the GAMS format as suggested in
the documentation works and yields the correct result.

Contributor: Renke Kuhlmann


Small Model of Type : GAMS


Category : GAMS Test library


Main file : convert13.gms

$title CONVERT test suite - apply dict to gams format (CONVERT13,SEQ=842)

$ontext
Tests that applying the dictionary dict.txt to the GAMS format as suggested in
the documentation works and yields the correct result.

Contributor: Renke Kuhlmann
$offtext

$call gamslib -q trnsport
$call gams trnsport.gms lo=%GAMS.lo% solver=convert
$call.checkErrorLevel '=test -e gams.gms'
$call.checkErrorLevel '=test -e dict.txt'

$ifthen %system.buildcode% == WEI
$call.checkErrorLevel 'sed -n -e "y/(),-/____/" -e "s:^ *\‍([exbi][0-9][0-9]*\‍)  \‍(.*\‍):s/\1/\2/g:gp" dict.txt | sed -n "1!G;h;$p" > mod.txt'
$else
$call.checkErrorLevel "sed -n -e 'y/(),-/____/' -e 's:^ *\‍([exbi][0-9][0-9]*\‍)  \‍(.*\‍):s/\1/\2/g:gp' dict.txt | sed -n '1!G;h;$p' > mod.txt"
$endif
$call.checkErrorLevel 'sed -f mod.txt gams.gms > mod.gms'
$echo "abort$(m.modelstat<>1 or m.solvestat<>1) 'Bad model/solvestatus';" >> mod.gms
$echo "abort$(abs(z.l-153.675)>1e-4) 'Bad z.l';" >> mod.gms
$call.checkErrorLevel "gams mod.gms lo=%GAMS.lo%"