Run EPM from GAMS Studio#
This method is recommended for debugging, testing, and initial setup of the model.
Steps#
Open GAMS Studio.
Open the project folder:
Go to the File menu at the top.
Click Open in New Group.
Navigate to the folder where the model files are located.
Select the file named
main.gms
and click Open.
Ensure
main.gms
is set as the main file (you’ll see a green triangle in the corner of its tab). If not, right-click it and choose Set as Main File.Specify the required command-line arguments in the Task Bar at the top of GAMS Studio.
All arguments must be prefixed with
--
.
Example:--FOLDER_INPUT epm/input/data_eapp/ --BASE_FILE base.gms
Note:
%FOLDER_INPUT%
must always be defined (no default).Other files have defaults if not specified (see below).
The
BASE_FILE
is only included if you are not restarting a run (gams.restart
is not set).
Click the Compile/Run button.
Check the Process Log for errors or messages. If successful, the output file
epmresults.gdx
will appear in the project directory.Tip: Rename or move these files after the run to avoid overwriting them next time.
Default GAMS File Arguments and Behavior#
If not provided on the command line, the following files are set to default values in the GAMS script:
Argument Name |
Default Filename |
Description |
---|---|---|
|
|
Base GAMS file, included only if not restarting |
|
|
Report generation script |
|
|
Input reading script |
|
|
Input verification script |
|
|
Input treatment/preprocessing script |
|
|
Demand generation script |
|
0 |
Detailed log when reading inputs |
Important Notes#
The
%FOLDER_INPUT%
argument must always be defined when running the model, as it points to the folder containing input.csv
files.The
BASE_FILE
is included only if no restart flag (gams.restart
) is set, meaning a fresh run.The system logs which files are used for each argument, helping with debugging.
You can override any of these files by specifying them explicitly as command-line arguments prefixed with
--
.
Example command-line arguments in GAMS Studio task bar:
–FOLDER_INPUT epm/input/data_sapp/ –BASE_FILE base_v2.gms –REPORT_FILE generate_report_v2.gms