Public Member Functions | |
bool | Interrupt () |
Send interrupt signal to running GAMSJob. | |
void | Run (GAMSOptions gamsOptions=null, GAMSCheckpoint checkpoint=null, TextWriter output=null, Boolean createOutDB=true) |
Run GAMSJob. | |
void | Run (params GAMSDatabase[] databases) |
Run GAMSJob. | |
void | Run (GAMSOptions gamsOptions, params GAMSDatabase[] databases) |
Run GAMSJob. | |
void | Run (GAMSCheckpoint checkpoint, params GAMSDatabase[] databases) |
Run GAMSJob. | |
void | Run (TextWriter output, params GAMSDatabase[] databases) |
Run GAMSJob. | |
void | Run (GAMSOptions gamsOptions, GAMSCheckpoint checkpoint, params GAMSDatabase[] databases) |
Run GAMSJob. | |
void | Run (GAMSOptions gamsOptions, TextWriter output, params GAMSDatabase[] databases) |
Run GAMSJob. | |
void | Run (GAMSCheckpoint checkpoint, TextWriter output, params GAMSDatabase[] databases) |
Run GAMSJob. | |
void | Run (GAMSOptions gamsOptions, GAMSCheckpoint checkpoint, TextWriter output, params GAMSDatabase[] databases) |
Run GAMSJob. | |
void | Run (Boolean createOutDB, params GAMSDatabase[] databases) |
Run GAMSJob. | |
void | Run (GAMSOptions gamsOptions, Boolean createOutDB, params GAMSDatabase[] databases) |
Run GAMSJob. | |
void | Run (GAMSCheckpoint checkpoint, Boolean createOutDB, params GAMSDatabase[] databases) |
Run GAMSJob. | |
void | Run (TextWriter output, Boolean createOutDB, params GAMSDatabase[] databases) |
Run GAMSJob. | |
void | Run (GAMSOptions gamsOptions, GAMSCheckpoint checkpoint, Boolean createOutDB, params GAMSDatabase[] databases) |
Run GAMSJob. | |
void | Run (GAMSOptions gamsOptions, TextWriter output, Boolean createOutDB, params GAMSDatabase[] databases) |
Run GAMSJob. | |
void | Run (GAMSCheckpoint checkpoint, TextWriter output, Boolean createOutDB, params GAMSDatabase[] databases) |
Run GAMSJob. | |
void | Run (GAMSOptions gamsOptions, GAMSCheckpoint checkpoint, TextWriter output, Boolean createOutDB, params GAMSDatabase[] databases) |
Run GAMSJob. | |
void | RunEngine (GAMSEngineConfiguration engineConfiguration, HashSet< string > extraModelFiles=null, Dictionary< string, string > engineOptions=null, GAMSOptions gamsOptions=null, GAMSCheckpoint checkpoint=null, TextWriter output=null, Boolean createOutDB=true, Boolean removeResults=true, params GAMSDatabase[] databases) |
Run GAMSJob on GAMS Engine. | |
Properties | |
string | Name [get] |
Retrieve name of GAMSJob. | |
GAMSWorkspace | Workspace [get] |
Get GAMSWorkspace containing GAMSJob. | |
GAMSDatabase | OutDB [get] |
Get GAMSDatabase created by Run method. | |
Detailed Description
The GAMSJob class manages the execution of a GAMS program given by GAMS model source. The GAMS source (or more precisely the root of a model source tree) of the job can be provided as a string or by a filename (relative to the working directory of the GAMSWorkspace) of a text file containing the GAMS model source. The Run method organizes the export of the input GAMSDatabases, calls the GAMS compiler and execution system with the supplied options and on successful completion provides through the property OutDB (of type GAMSDatabase) the results of the model run.
While the result data is captured in a GAMSDatabase, the Run method can also create a GAMSCheckpoint that not only captures data but represents the state of the entire GAMSJob and allows some other GAMSJob to continue from this state. In case of a compilation or execution error, the Run method will throw an exception. If the log output of GAMS is of interest, this can be captured by providing a TextWriter instance.
A GAMSJob is connected to external resources and needs to be properly disposed before the .NET garbage collector can claim the instance.
Member Function Documentation
◆ Interrupt()
|
inline |
Send interrupt signal to running GAMSJob.
- Returns
- True meaning "the signal was sent", false meaning "there is no Job running"
◆ Run() [1/17]
|
inline |
Run GAMSJob.
- Parameters
-
createOutDB Flag to define if OutDB should be created databases GAMSDatabases read by the GAMSJob
◆ Run() [2/17]
|
inline |
Run GAMSJob.
- Parameters
-
checkpoint GAMSCheckpoint to be created by GAMSJob createOutDB Flag to define if OutDB should be created databases GAMSDatabases read by the GAMSJob
◆ Run() [3/17]
|
inline |
Run GAMSJob.
- Parameters
-
checkpoint GAMSCheckpoint to be created by GAMSJob databases GAMSDatabases read by the GAMSJob
◆ Run() [4/17]
|
inline |
Run GAMSJob.
- Parameters
-
checkpoint GAMSCheckpoint to be created by GAMSJob output Stream to capture GAMS log createOutDB Flag to define if OutDB should be created databases GAMSDatabases read by the GAMSJob
◆ Run() [5/17]
|
inline |
Run GAMSJob.
- Parameters
-
checkpoint GAMSCheckpoint to be created by GAMSJob output Stream to capture GAMS log databases GAMSDatabases read by the GAMSJob
◆ Run() [6/17]
|
inline |
Run GAMSJob.
- Parameters
-
gamsOptions GAMS options to control job createOutDB Flag to define if OutDB should be created databases GAMSDatabases read by the GAMSJob
◆ Run() [7/17]
|
inline |
Run GAMSJob.
- Parameters
-
gamsOptions GAMS options to control job checkpoint GAMSCheckpoint to be created by GAMSJob createOutDB Flag to define if OutDB should be created databases GAMSDatabases read by the GAMSJob
◆ Run() [8/17]
|
inline |
Run GAMSJob.
- Parameters
-
gamsOptions GAMS options to control job checkpoint GAMSCheckpoint to be created by GAMSJob databases GAMSDatabases read by the GAMSJob
◆ Run() [9/17]
|
inline |
Run GAMSJob.
- Parameters
-
gamsOptions GAMS options to control job checkpoint GAMSCheckpoint to be created by GAMSJob output Stream to capture GAMS log createOutDB Flag to define if OutDB should be created databases GAMSDatabases read by the GAMSJob
◆ Run() [10/17]
|
inline |
Run GAMSJob.
- Parameters
-
gamsOptions GAMS options to control job checkpoint GAMSCheckpoint to be created by GAMSJob output Stream to capture GAMS log databases GAMSDatabases read by the GAMSJob
◆ Run() [11/17]
|
inline |
Run GAMSJob.
- Parameters
-
gamsOptions GAMS options to control job databases GAMSDatabases read by the GAMSJob
◆ Run() [12/17]
|
inline |
Run GAMSJob.
- Parameters
-
gamsOptions GAMS options to control job output Stream to capture GAMS log createOutDB Flag to define if OutDB should be created databases GAMSDatabases read by the GAMSJob
◆ Run() [13/17]
|
inline |
Run GAMSJob.
- Parameters
-
gamsOptions GAMS options to control job output Stream to capture GAMS log databases GAMSDatabases read by the GAMSJob
◆ Run() [14/17]
|
inline |
Run GAMSJob.
- Parameters
-
gamsOptions GAMS options to control job checkpoint GAMSCheckpoint to be created by GAMSJob output Stream to capture GAMS log createOutDB Flag to define if OutDB should be created
◆ Run() [15/17]
|
inline |
Run GAMSJob.
- Parameters
-
databases GAMSDatabases read by the GAMSJob
◆ Run() [16/17]
|
inline |
Run GAMSJob.
- Parameters
-
output Stream to capture GAMS log createOutDB Flag to define if OutDB should be created databases GAMSDatabases read by the GAMSJob
◆ Run() [17/17]
|
inline |
Run GAMSJob.
- Parameters
-
output Stream to capture GAMS log databases GAMSDatabases read by the GAMSJob
◆ RunEngine()
|
inline |
Run GAMSJob on GAMS Engine.
- Parameters
-
engineConfiguration GAMSEngineConfiguration object extraModelFiles Set of additional file paths (apart from main file) required to run the model (e.g. include files) engineOptions Dictionary of GAMS Engine options to control job execution gamsOptions GAMS options to control job checkpoint GAMSCheckpoint to be created by GAMSJob output Stream to capture GAMS log createOutDB Flag to define if OutDB should be created removeResults Remove results from GAMS Engine after downloading them databases GAMSDatabases read by the GAMSJob
Property Documentation
◆ Name
|
get |
Retrieve name of GAMSJob.
◆ OutDB
|
get |
Get GAMSDatabase created by Run method.
◆ Workspace
|
get |
Get GAMSWorkspace containing GAMSJob.