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 12 of file special_values.py.

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

Variable Documentation

◆ databases

special_values.databases

Definition at line 56 of file special_values.py.

◆ dbIn

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

Definition at line 47 of file special_values.py.

◆ dbOut

special_values.dbOut = gj.out_db

Definition at line 57 of file special_values.py.

◆ GEps

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

Definition at line 71 of file special_values.py.

◆ gj

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

Definition at line 54 of file special_values.py.

◆ GMInf

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

Definition at line 68 of file special_values.py.

◆ GNA

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

Definition at line 62 of file special_values.py.

◆ GPInf

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

Definition at line 65 of file special_values.py.

◆ GUndef

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

Definition at line 59 of file special_values.py.

◆ value

special_values.value

Definition at line 48 of file special_values.py.

◆ ws

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

Definition at line 43 of file special_values.py.