Loading...
Searching...
No Matches
transport_engine Namespace Reference

Variables

sys sys_dir = sys.argv[1] if len(sys.argv) > 1 else None
 
GamsWorkspace ws = GamsWorkspace(system_directory=sys_dir)
 
str model = "trnsport"
 
os model_data_path = os.path.join(ws.working_directory, model + ".zip")
 
 arcname
 
str stdout_filename = "log_stdout.txt"
 
list arguments
 
None data = None
 
None pf_file_name = None
 
list text_entries = []
 
list stream_entries = []
 
None inex_file = None
 
gams configuration
 
 temp_folder_path
 
os namespace
 
jobs_api job_api_instance = jobs_api.JobsApi(api_client)
 
 try :
 
jobs_api create_job_response
 
jobs_api token = create_job_response.token
 
int time_spent = 0
 
jobs_api resp = job_api_instance.pop_job_logs(token)
 
 message
 
 end
 
 else :
 
zf gdx_file = zf.extract(model + ".gdx", path=ws.working_directory)
 
GamsWorkspace result_db
 

Variable Documentation

◆ arcname

transport_engine.arcname

Definition at line 21 of file transport_engine.py.

◆ arguments

list transport_engine.arguments
Initial value:
1= [
2 "gdx=default"
3 ]

Definition at line 25 of file transport_engine.py.

◆ configuration

gams transport_engine.configuration
Initial value:
1= gams.engine.Configuration(
2 host=os.environ["ENGINE_URL"],
3 username=os.environ["ENGINE_USER"],
4 password=os.environ["ENGINE_PASSWORD"],
5 discard_unknown_keys=True,
6 )

Definition at line 35 of file transport_engine.py.

◆ create_job_response

jobs_api transport_engine.create_job_response
Initial value:
1= job_api_instance.create_job(
2 model,
3 namespace,
4 stdout_filename=stdout_filename,
5 model_data=model_data,
6 arguments=arguments,
7 )

Definition at line 53 of file transport_engine.py.

◆ data

None transport_engine.data = None

Definition at line 29 of file transport_engine.py.

◆ else

transport_engine.else :

Definition at line 86 of file transport_engine.py.

◆ end

transport_engine.end

Definition at line 72 of file transport_engine.py.

◆ gdx_file

zf transport_engine.gdx_file = zf.extract(model + ".gdx", path=ws.working_directory)

Definition at line 95 of file transport_engine.py.

◆ inex_file

None transport_engine.inex_file = None

Definition at line 33 of file transport_engine.py.

◆ job_api_instance

jobs_api transport_engine.job_api_instance = jobs_api.JobsApi(api_client)

Definition at line 49 of file transport_engine.py.

◆ message

transport_engine.message

Definition at line 72 of file transport_engine.py.

◆ model

str transport_engine.model = "trnsport"

Definition at line 14 of file transport_engine.py.

◆ model_data_path

os transport_engine.model_data_path = os.path.join(ws.working_directory, model + ".zip")

Definition at line 17 of file transport_engine.py.

◆ namespace

os transport_engine.namespace
Initial value:
1= os.environ[
2 "ENGINE_NAMESPACE"
3 ]

Definition at line 42 of file transport_engine.py.

◆ pf_file_name

None transport_engine.pf_file_name = None

Definition at line 30 of file transport_engine.py.

◆ resp

jobs_api transport_engine.resp = job_api_instance.pop_job_logs(token)

Definition at line 71 of file transport_engine.py.

◆ result_db

GamsWorkspace transport_engine.result_db
Initial value:
1= ws.add_database_from_gdx(
2 os.path.join(ws.working_directory, gdx_file)
3 )

Definition at line 107 of file transport_engine.py.

◆ stdout_filename

str transport_engine.stdout_filename = "log_stdout.txt"

Definition at line 24 of file transport_engine.py.

◆ stream_entries

list transport_engine.stream_entries = []

Definition at line 32 of file transport_engine.py.

◆ sys_dir

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

Definition at line 11 of file transport_engine.py.

◆ temp_folder_path

transport_engine.temp_folder_path

Definition at line 41 of file transport_engine.py.

◆ text_entries

list transport_engine.text_entries = []

Definition at line 31 of file transport_engine.py.

◆ time_spent

int transport_engine.time_spent = 0

Definition at line 68 of file transport_engine.py.

◆ token

jobs_api transport_engine.token = create_job_response.token

Definition at line 61 of file transport_engine.py.

◆ try

transport_engine.try :

Definition at line 50 of file transport_engine.py.

◆ ws

GamsWorkspace transport_engine.ws = GamsWorkspace(system_directory=sys_dir)

Definition at line 12 of file transport_engine.py.