Loading...
Searching...
No Matches
special_values Namespace Reference

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 db_in = ws.add_database(in_model_name="myDB")
 
 value
 
GamsWorkspace job = ws.add_job_from_string(GAMS_MODEL)
 
 databases
 
GamsWorkspace db_out = job.out_db
 
GamsWorkspace GUndef = db_out["GUndef"].first_record().value
 
GamsWorkspace GNA = db_out["GNA"].first_record().value
 
GamsWorkspace GPInf = db_out["GPInf"].first_record().value
 
GamsWorkspace GMInf = db_out["GMInf"].first_record().value
 
GamsWorkspace GEps = db_out["GEps"].first_record().value
 

Variable Documentation

◆ databases

special_values.databases

Definition at line 52 of file special_values.py.

◆ db_in

GamsWorkspace special_values.db_in = ws.add_database(in_model_name="myDB")

Definition at line 44 of file special_values.py.

◆ db_out

GamsWorkspace special_values.db_out = job.out_db

Definition at line 53 of file special_values.py.

◆ GAMS_MODEL

str special_values.GAMS_MODEL
Initial value:
1= """
2Scalar
3 GUndef
4 GNA / NA /
5 GPInf / +INF /
6 GMInf / -INF /
7 GEps / EPS /
8 PythonUndef
9 PythonNA
10 PythonPInf
11 PythonMInf
12 PythonEps;
13
14$onUndf
15$gdxIn %myDB%
16$load PythonUndef PythonNA PythonPInf PythonMInf PythonEps
17$gdxIn
18
19GUndef = 1/0;
20ExecError = 0;
21
22abort$(GUndef <> PythonUndef) 'PythonUndef not as expected', GUndef, PythonUndef;
23abort$(GNA <> PythonNA ) 'PythonNA not as expected', GNA, PythonNA;
24abort$(GPInf <> PythonPInf ) 'PythonPInf not as expected', GPInf, PythonPInf;
25abort$(GMInf <> PythonMInf ) 'PythonMInf not as expected', GMInf, PythonMInf;
26abort$(GEps <> PythonEps ) 'PythonEps not as expected', GEps, PythonEps;
27"""

Definition at line 12 of file special_values.py.

◆ GEps

GamsWorkspace special_values.GEps = db_out["GEps"].first_record().value

Definition at line 67 of file special_values.py.

◆ GMInf

GamsWorkspace special_values.GMInf = db_out["GMInf"].first_record().value

Definition at line 64 of file special_values.py.

◆ GNA

GamsWorkspace special_values.GNA = db_out["GNA"].first_record().value

Definition at line 58 of file special_values.py.

◆ GPInf

GamsWorkspace special_values.GPInf = db_out["GPInf"].first_record().value

Definition at line 61 of file special_values.py.

◆ GUndef

GamsWorkspace special_values.GUndef = db_out["GUndef"].first_record().value

Definition at line 55 of file special_values.py.

◆ job

GamsWorkspace special_values.job = ws.add_job_from_string(GAMS_MODEL)

Definition at line 51 of file special_values.py.

◆ sys_dir

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

Definition at line 41 of file special_values.py.

◆ value

special_values.value

Definition at line 45 of file special_values.py.

◆ ws

GamsWorkspace special_values.ws = GamsWorkspace(system_directory=sys_dir)

Definition at line 42 of file special_values.py.