16.01.2015 Views

GAMS — The Solver Manuals - Available Software

GAMS — The Solver Manuals - Available Software

GAMS — The Solver Manuals - Available Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

412 MPSWRITE<br />

< translate .lp file into a .pck file<br />

.. LOAD TRNSPORT<br />

.. WRITE TRNSPORT<br />

.. QUIT<br />

> ANALYZE<br />

< various credits etc. ><br />

ANALYZE... READIN PAC TRNSPORT<br />

ANALYZE... READIN SYN TRNSPORT<br />

< now we are ready to use ANALYZE commands ><br />

ANALYZE... QUIT<br />

Example 7 :<br />

This example shows how you can partially automate the name generation,<br />

MPS renaming and loading of the model into ANALYZE.<br />

@echo off<br />

:<br />

echo * MPSWRITE Option File > mpswrite.opt<br />

echo nametyp 2 >> mpswrite.opt<br />

echo namewid 16<br />

>> mpswrite.opt<br />

echo dobas 0 >> mpswrite.opt<br />

echo domap 2 >> mpswrite.opt<br />

echo domps 2 >> mpswrite.opt<br />

echo textopt 1 >> mpswrite.opt<br />

gams trnsport lp=mpswrite<br />

:<br />

echo LOAD <strong>GAMS</strong> > profile.exc<br />

echo WRITE <strong>GAMS</strong> >> profile.exc<br />

echo QUIT >> profile.exc<br />

lprename<br />

:<br />

echo $ ============ > profile.exc<br />

echo $ <strong>GAMS</strong>/ANALYZE >> profile.exc<br />

echo $ ============ >> profile.exc<br />

echo READIN PAC <strong>GAMS</strong> >> profile.exc<br />

echo READIN SYN <strong>GAMS</strong> >> profile.exc<br />

echo SUMMARY >> profile.exc<br />

echo $<br />

>> profile.exc<br />

echo $ SUBMAT ROW * >> profile.exc<br />

echo $ SUBMAT COL * >> profile.exc<br />

echo $ PICTURE >> profile.exc<br />

echo $<br />

>> profile.exc<br />

echo $ HELP<br />

>> profile.exc<br />

echo $<br />

>> profile.exc<br />

if not exist credits.doc goto ok<br />

: need to remove credits to prevent early prompt<br />

if exist credits.hld delete credits.hld<br />

rename credits.doc credits.hld<br />

:ok<br />

analyze<br />

<strong>The</strong> option and profile files for <strong>GAMS</strong>, LPRENAME and ANALYZE are created on the fly. <strong>The</strong> exact content<br />

of these files will depend on the version and installation of ANALYZE.<br />

Example 8 : This example shows how you can use ANALYZE as a <strong>GAMS</strong> solver . You need to consult<br />

your <strong>GAMS</strong> and ANALYZE system administrator to install the scripts with the right name and in the proper

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!