Manages the execution of a GAMS program given by GAMS model source. More...
Public Member Functions | |
logical | interrupt () |
Send interrupt message to GAMS during Job instance executes its run method. | |
void | run (varargin) |
run Job | |
void | runEngine (gams.control.engine.RunParameters parameters) |
Run Engine Job with engine.RunParameters. | |
Public Attributes | |
string | fileName |
(read only) file name associated to Job | |
string | jobName |
(read only) name of Job | |
gams.control.Database | outDB |
(read only) Database created by run method | |
Detailed Description
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 Workspace) of a text file containing the GAMS model source. The run method organizes the export of the input Database(s), calls the GAMS compiler and execution system with the supplied options and on successful completion provides through the property outDB (of type Database) the results of the model run.
While the result data is captured in a Database, the run method can also create a Checkpoint that not only captures data but represents the state of the entire Job and allows some other Job to continue from this state. In case of a compilation or execution error, the run method will raise an error. If the log output of GAMS is of interest, this can be captured.
A Job is connected to external resources and needs to be properly disposed before the Java garbage collector can claim the instance.
Member Function Documentation
◆ interrupt()
logical matlab.gams.control.Job.interrupt | ( | ) |
◆ run()
void matlab.gams.control.Job.run | ( | varargin | ) |
run Job
Valid VARARGIN signatures:
- [ ]
- Checkpoint cp
- Database db1, ..., Database dbN
- {Database db1, ..., Database dbN}
- Options opt
- logical createOutDB
- PrintStream output
- Checkpoint cp, Database db1, ..., Database dbN
- Checkpoint cp, {Database db1, ..., Database dbN}
- Checkpoint cp, logical createOutDB
- Checkpoint cp, PrintStream output
- Options opt, Checkpoint cp
- Options opt, Database db1, ..., Database dbN
- Options opt, {Database db1, ..., Database dbN}
- Options opt, logical createOutDB
- Options opt, PrintStream output
- logical createOutDB, Database db1, ..., Database dbN
- logical createOutDB, {Database db1, ..., Database dbN}
- PrintStream output, Database db1, ..., Database dbN
- PrintStream output, {Database db1, ..., Database dbN}
- PrintStream output, logical createOutDB
- Checkpoint cp, logical createOutDB, Database db1, ..., Database dbN
- Checkpoint cp, logical createOutDB, {Database db1, ..., Database dbN}
- Checkpoint cp, PrintStream output, Database db1, ..., Database dbN
- Checkpoint cp, PrintStream output, {Database db1, ..., Database dbN}
- Options opt, Checkpoint cp, Database db1, ..., Database dbN
- Options opt, Checkpoint cp, {Database db1, ..., Database dbN}
- Options opt, Checkpoint cp, logical createOutDB
- Options opt, Checkpoint cp, PrintStream output
- Options opt, logical createOutDB, Database db1, ..., Database dbN
- Options opt, logical createOutDB, {Database db1, ..., Database dbN}
- Options opt, PrintStream output, Database db1, ..., Database dbN
- Options opt, PrintStream output, {Database db1, ..., Database dbN}
- Options opt, PrintStream output, logical createOutDB
- PrintStream output, logical createOutDB, Database db1, ..., Database dbN
- PrintStream output, logical createOutDB, {Database db1, ..., Database dbN}
- Checkpoint cp, PrintStream output, logical createOutDB, Database db1, ..., Database dbN
- Checkpoint cp, PrintStream output, logical createOutDB, {Database db1, ..., Database dbN}
- Options opt, Checkpoint cp, logical createOutDB, Database db1, ..., Database dbN
- Options opt, Checkpoint cp, logical createOutDB, {Database db1, ..., Database dbN}
- Options opt, Checkpoint cp, PrintStream output, Database db1, ..., Database dbN
- Options opt, Checkpoint cp, PrintStream output, {Database db1, ..., Database dbN}
- Options opt, Checkpoint cp, PrintStream output, logical createOutDB
- Options opt, PrintStream output, logical createOutDB, Database db1, ..., Database dbN
- Options opt, PrintStream output, logical createOutDB, {Database db1, ..., Database dbN}
- Options opt, Checkpoint cp, PrintStream output, logical createOutDB, Database db1, ..., Database dbN
- Options opt, Checkpoint cp, PrintStream output, logical createOutDB, {Database db1, ..., Database dbN}
Arguments:
- cp: Checkpoint to be created by Job
- db1,...,dbN: Arbitrary number of GAMS databases
- opt: GAMS opt to control job
- createOutDB: Flag determined if outDB should be created
- output: File name to store output in or 'cmdout' to print to command line
- See also
- ExitCodeMessage
◆ runEngine()
void matlab.gams.control.Job.runEngine | ( | gams.control.engine.RunParameters | parameters | ) |
Run Engine Job with engine.RunParameters.
Valid VARARGIN signatures:
- engine.RunParameters parameters
Arguments:
- parameters: engine.RunParameters to control the engine job