Loading...
Searching...
No Matches
transport6 Namespace Reference

Functions

def run_scenario (workspace, checkpoint, io_lock, b)
 

Variables

str GAMS_MODEL
 
sys sys_dir = sys.argv[1] if len(sys.argv) > 1 else None
 
GamsWorkspace ws = GamsWorkspace(system_directory=sys_dir)
 
GamsWorkspace cp = ws.add_checkpoint()
 
GamsWorkspace job = ws.add_job_from_string(GAMS_MODEL)
 
 checkpoint
 
list bmult = [0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3]
 
Lock io_lock = Lock()
 
dict threads = {}
 
 target
 
 run_scenario
 
 args
 

Function Documentation

◆ run_scenario()

def transport6.run_scenario (   workspace,
  checkpoint,
  io_lock,
  b 
)

Definition at line 61 of file transport6.py.

61def run_scenario(workspace, checkpoint, io_lock, b):
62 job = workspace.add_job_from_string(
63 f"bmult={b}; solve transport min z use lp; ms=transport.modelstat; ss=transport.solvestat;",
64 checkpoint,
65 )
66 job.run()
67 # we need to make the ouput a critical section to avoid messed up report informations
68 io_lock.acquire()
69 print(f"Scenario bmult={b}:")
70 print(f" Modelstatus: {job.out_db['ms'].first_record().value}")
71 print(f" Solvestatus: {job.out_db['ss'].first_record().value}")
72 print(f" Obj: {job.out_db['z'].first_record().level}")
73 io_lock.release()
74
75

Variable Documentation

◆ args

transport6.args

Definition at line 91 of file transport6.py.

◆ bmult

list transport6.bmult = [0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3]

Definition at line 85 of file transport6.py.

◆ checkpoint

transport6.checkpoint

Definition at line 84 of file transport6.py.

◆ cp

GamsWorkspace transport6.cp = ws.add_checkpoint()

Definition at line 80 of file transport6.py.

◆ GAMS_MODEL

str transport6.GAMS_MODEL

Definition at line 11 of file transport6.py.

◆ io_lock

Lock transport6.io_lock = Lock()

Definition at line 88 of file transport6.py.

◆ job

GamsWorkspace transport6.job = ws.add_job_from_string(GAMS_MODEL)

Definition at line 83 of file transport6.py.

◆ run_scenario

transport6.run_scenario

Definition at line 91 of file transport6.py.

◆ sys_dir

sys transport6.sys_dir = sys.argv[1] if len(sys.argv) > 1 else None

Definition at line 77 of file transport6.py.

◆ target

transport6.target

Definition at line 91 of file transport6.py.

◆ threads

dict transport6.threads = {}

Definition at line 89 of file transport6.py.

◆ ws

GamsWorkspace transport6.ws = GamsWorkspace(system_directory=sys_dir)

Definition at line 78 of file transport6.py.