Loading...
Searching...
No Matches
run_engine.py File Reference

This is an example how to run a GamsJob on GAMS Engine using the run_engine method: More...

Go to the source code of this file.

Variables

str run_engine.GAMS_DATA
 
str run_engine.GAMS_MODEL
 
sys run_engine.sys_dir = sys.argv[1] if len(sys.argv) > 1 else None
 
GamsWorkspace run_engine.ws = GamsWorkspace(system_directory=sys_dir)
 
GamsEngineConfiguration run_engine.engine_configuration
 
GamsWorkspace run_engine.job = ws.add_job_from_string(GAMS_DATA)
 
os run_engine.gdx_file_path = os.path.join(ws.working_directory, "tdata.gdx")
 
GamsWorkspace run_engine.opt = ws.add_options()
 
 run_engine.all_model_types
 
 run_engine.extra_model_files
 
 run_engine.engine_options
 
 run_engine.gams_options
 
dict run_engine.expected_levels
 
GamsWorkspace run_engine.cp = ws.add_checkpoint()
 
GamsWorkspace run_engine.job_a = ws.add_job_from_string(GAMS_DATA)
 
GamsWorkspace run_engine.job_b = ws.add_job_from_string(GAMS_MODEL)
 
 run_engine.databases
 
 run_engine.out_db
 
 run_engine.checkpoint
 
list run_engine.expected_bmult
 
os run_engine.option_file1_path = os.path.join(ws.working_directory, "cplex.opt")
 
os run_engine.option_file2_path = os.path.join(ws.working_directory, "cplex.op2")
 
 run_engine.mip
 
 run_engine.optfile
 
 run_engine.solvelink
 
StringIO run_engine.sw = StringIO()
 
Thread run_engine.opt_thread
 
StringIO run_engine.log = sw.getvalue()
 

Detailed Description

This is an example how to run a GamsJob on GAMS Engine using the run_engine method:

  • How to send along additional model files (besides the main file)
  • How to provide additional Engine options
  • How to use checkpoints with run_engine
  • How to interrupt a GamsJob running on GAMS Engine

It is recommended to first look at the tutorial examples transport1.py-transport14.py

Definition in file run_engine.py.