Loading...
Searching...
No Matches
transport4 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)
 
list plants = ["Seattle", "San-Diego"]
 
list markets = ["New-York", "Chicago", "Topeka"]
 
dict capacity = {"Seattle": 350.0, "San-Diego": 600.0}
 
dict demand = {"New-York": 325.0, "Chicago": 300.0, "Topeka": 275.0}
 
dict distance
 
GamsWorkspace db = ws.add_database()
 
GamsWorkspace i = db.add_set("i", 1, "canning plants")
 
GamsWorkspace j = db.add_set("j", 1, "markets")
 
GamsWorkspace a = db.add_parameter_dc("a", [i], "capacity of plant i in cases")
 
 value
 
GamsWorkspace b = db.add_parameter_dc("b", [j], "demand at market j in cases")
 
GamsWorkspace d = db.add_parameter_dc("d", [i, j], "distance in thousands of miles")
 
GamsWorkspace f = db.add_parameter("f", 0, "freight in dollars per case per thousand miles")
 
GamsWorkspace job = ws.add_job_from_string(GAMS_MODEL)
 
GamsWorkspace opt = ws.add_options()
 
 all_model_types
 
 databases
 

Variable Documentation

◆ a

GamsWorkspace transport4.a = db.add_parameter_dc("a", [i], "capacity of plant i in cases")

Definition at line 82 of file transport4.py.

◆ all_model_types

transport4.all_model_types

Definition at line 100 of file transport4.py.

◆ b

GamsWorkspace transport4.b = db.add_parameter_dc("b", [j], "demand at market j in cases")

Definition at line 86 of file transport4.py.

◆ capacity

dict transport4.capacity = {"Seattle": 350.0, "San-Diego": 600.0}

Definition at line 61 of file transport4.py.

◆ d

GamsWorkspace transport4.d = db.add_parameter_dc("d", [i, j], "distance in thousands of miles")

Definition at line 90 of file transport4.py.

◆ databases

transport4.databases

Definition at line 101 of file transport4.py.

◆ db

GamsWorkspace transport4.db = ws.add_database()

Definition at line 72 of file transport4.py.

◆ demand

dict transport4.demand = {"New-York": 325.0, "Chicago": 300.0, "Topeka": 275.0}

Definition at line 62 of file transport4.py.

◆ distance

dict transport4.distance
Initial value:
1= {
2 ("Seattle", "New-York"): 2.5,
3 ("Seattle", "Chicago"): 1.7,
4 ("Seattle", "Topeka"): 1.8,
5 ("San-Diego", "New-York"): 2.5,
6 ("San-Diego", "Chicago"): 1.8,
7 ("San-Diego", "Topeka"): 1.4,
8 }

Definition at line 63 of file transport4.py.

◆ f

GamsWorkspace transport4.f = db.add_parameter("f", 0, "freight in dollars per case per thousand miles")

Definition at line 94 of file transport4.py.

◆ GAMS_MODEL

str transport4.GAMS_MODEL

Definition at line 11 of file transport4.py.

◆ i

GamsWorkspace transport4.i = db.add_set("i", 1, "canning plants")

Definition at line 74 of file transport4.py.

◆ j

GamsWorkspace transport4.j = db.add_set("j", 1, "markets")

Definition at line 78 of file transport4.py.

◆ job

GamsWorkspace transport4.job = ws.add_job_from_string(GAMS_MODEL)

Definition at line 97 of file transport4.py.

◆ markets

list transport4.markets = ["New-York", "Chicago", "Topeka"]

Definition at line 60 of file transport4.py.

◆ opt

transport4.opt = ws.add_options()

Definition at line 98 of file transport4.py.

◆ plants

list transport4.plants = ["Seattle", "San-Diego"]

Definition at line 59 of file transport4.py.

◆ sys_dir

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

Definition at line 56 of file transport4.py.

◆ value

transport4.value

Definition at line 84 of file transport4.py.

◆ ws

GamsWorkspace transport4.ws = GamsWorkspace(system_directory=sys_dir)

Definition at line 57 of file transport4.py.