Description
This program calls a number of GAMS programs. Each program performs one task in the given sequence: Data extraction --> Data manipulation --> Model definition --> Model solution --> Report writing This model is referenced in section "Strategies" from the MDB2GMS Documentation. Keywords: MDB2GMS, data exchange, GAMS language features
Category : GAMS Data Utilities library
Main file : MDBSr5.gms includes : MDBSr0.gms Transportation.accdb MDBSr5.gms Sr1.gms Sr2.gms Sr3.gms Sr4.gms
$title Sequence of GAMS Models using the save/restart Facility (MDBSr5,SEQ=041)
$onText
This program calls a number of GAMS programs. Each program performs one task in the given sequence:
Data extraction --> Data manipulation --> Model definition --> Model solution --> Report writing
This model is referenced in section "Strategies" from the MDB2GMS Documentation.
Keywords: MDB2GMS, data exchange, GAMS language features
$offText
$callTool win32.msappavail Access
$if errorlevel 1 $abort.noError "No Access available"
*Data extraction
execute '=gams.exe MDBSr0 lo=%GAMS.lo% save=s0';
abort$errorLevel "step 0 failed";
*Data manipulation
execute '=gams.exe Sr1 lo=%GAMS.lo% restart=s0 save=s1';
abort$errorLevel "step 1 failed";
*Model definition
execute '=gams.exe Sr2 lo=%GAMS.lo% restart=s1 save=s2';
abort$errorLevel "step 2 failed";
*Model solution
execute '=gams.exe Sr3 lo=%GAMS.lo% restart=s2 save=s3';
abort$errorLevel "step 3 failed";
*Report writing
execute '=gams.exe Sr4 lo=%GAMS.lo% restart=s3';
abort$errorLevel "step 4 failed";