special_values Namespace Reference

Functions

def get_model ()
 

Variables

 ws = GamsWorkspace(system_directory = sys.argv[1])
 
 dbIn = ws.add_database(in_model_name = "myDB")
 
 value
 
 gj = ws.add_job_from_string(get_model())
 
 databases
 
 dbOut = gj.out_db
 
 GUndef = dbOut["GUndef"].first_record().value
 
 GNA = dbOut["GNA"].first_record().value
 
 GPInf = dbOut["GPInf"].first_record().value
 
 GMInf = dbOut["GMInf"].first_record().value
 
 GEps = dbOut["GEps"].first_record().value
 

Function Documentation

◆ get_model()

def special_values.get_model ( )

Definition at line 14 of file special_values.py.

14def get_model():
15 return '''
16Scalar GUndef
17 GNA / NA /
18 GPInf / +Inf /
19 GMInf / -Inf /
20 GEps / eps /
21 pythonUndef
22 pythonNA
23 pythonPInf
24 pythonMInf
25 pythonEps ;
26
27$onUndf
28$gdxIn %myDB%
29$load pythonUndef pythonNA pythonPInf pythonMInf pythonEps
30$gdxIn
31
32GUndef = 1/0;
33ExecError = 0;
34
35abort$(GUndef <> pythonUndef) 'pythonUndef not as expected', GUndef, pythonUndef;
36abort$(GNA <> pythonNA ) 'pythonNA not as expected', GNA, pythonNA;
37abort$(GPInf <> pythonPInf ) 'pythonPInf not as expected', GPInf, pythonPInf;
38abort$(GMInf <> pythonMInf ) 'pythonMInf not as expected', GMInf, pythonMInf;
39abort$(GEps <> pythonEps ) 'pythonEps not as expected', GEps, pythonEps;'''
40
41

Variable Documentation

◆ databases

special_values.databases

Definition at line 58 of file special_values.py.

◆ dbIn

special_values.dbIn = ws.add_database(in_model_name = "myDB")

Definition at line 49 of file special_values.py.

◆ dbOut

special_values.dbOut = gj.out_db

Definition at line 59 of file special_values.py.

◆ GEps

special_values.GEps = dbOut["GEps"].first_record().value

Definition at line 73 of file special_values.py.

◆ gj

special_values.gj = ws.add_job_from_string(get_model())

Definition at line 56 of file special_values.py.

◆ GMInf

special_values.GMInf = dbOut["GMInf"].first_record().value

Definition at line 70 of file special_values.py.

◆ GNA

special_values.GNA = dbOut["GNA"].first_record().value

Definition at line 64 of file special_values.py.

◆ GPInf

special_values.GPInf = dbOut["GPInf"].first_record().value

Definition at line 67 of file special_values.py.

◆ GUndef

special_values.GUndef = dbOut["GUndef"].first_record().value

Definition at line 61 of file special_values.py.

◆ value

special_values.value

Definition at line 50 of file special_values.py.

◆ ws

special_values.ws = GamsWorkspace(system_directory = sys.argv[1])

Definition at line 45 of file special_values.py.