Loading...
Searching...
No Matches
transport_gdx Namespace Reference

Variables

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 db2 = ws.add_database_from_gdx("data.gdx")
 

Variable Documentation

◆ a

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

Definition at line 46 of file transport_gdx.py.

◆ b

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

Definition at line 51 of file transport_gdx.py.

◆ capacity

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

Definition at line 21 of file transport_gdx.py.

◆ d

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

Definition at line 56 of file transport_gdx.py.

◆ db

GamsWorkspace transport_gdx.db = ws.add_database()

Definition at line 33 of file transport_gdx.py.

◆ db2

GamsWorkspace transport_gdx.db2 = ws.add_database_from_gdx("data.gdx")

Definition at line 71 of file transport_gdx.py.

◆ demand

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

Definition at line 22 of file transport_gdx.py.

◆ distance

dict transport_gdx.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 23 of file transport_gdx.py.

◆ f

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

Definition at line 61 of file transport_gdx.py.

◆ i

list transport_gdx.i = db.add_set("i", 1, "canning plants")

Definition at line 36 of file transport_gdx.py.

◆ j

list transport_gdx.j = db.add_set("j", 1, "markets")

Definition at line 41 of file transport_gdx.py.

◆ markets

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

Definition at line 20 of file transport_gdx.py.

◆ plants

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

Definition at line 19 of file transport_gdx.py.

◆ sys_dir

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

Definition at line 15 of file transport_gdx.py.

◆ value

transport_gdx.value

Definition at line 48 of file transport_gdx.py.

◆ ws

GamsWorkspace transport_gdx.ws = GamsWorkspace(system_directory=sys_dir)

Definition at line 16 of file transport_gdx.py.