transport12 Namespace Reference

## Functions

def get_model_text ()

def guss_call (dict, mi, solve_statement, opt=None, mi_opt=None, output=None)

## Variables

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

checkpoint

list bmultlist = [ 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3 ]

int i = 0

value

output

## ◆ get_model_text()

 def transport12.get_model_text ( )

Definition at line 10 of file transport12.py.

10def get_model_text():
11  return '''
12  Sets
13  i canning plants / seattle, san-diego /
14  j markets / new-york, chicago, topeka / ;
15
16  Parameters
17
18  a(i) capacity of plant i in cases
19  / seattle 350
20  san-diego 600 /
21
22  b(j) demand at market j in cases
23  / new-york 325
24  chicago 300
25  topeka 275 / ;
26
27  Table d(i,j) distance in thousands of miles
28  new-york chicago topeka
29  seattle 2.5 1.7 1.8
30  san-diego 2.5 1.8 1.4 ;
31
32  Scalar f freight in dollars per case per thousand miles /90/ ;
33  Scalar bmult demand multiplier /1/;
34
35  Parameter c(i,j) transport cost in thousands of dollars per case ;
36
37  c(i,j) = f * d(i,j) / 1000 ;
38
39  Variables
40  x(i,j) shipment quantities in cases
41  z total transportation costs in thousands of dollars ;
42
43  Positive Variable x ;
44
45  Equations
46  cost define objective function
47  supply(i) observe supply limit at plant i
48  demand(j) satisfy demand at market j ;
49
50  cost .. z =e= sum((i,j), c(i,j)*x(i,j)) ;
51
52  supply(i) .. sum(j, x(i,j)) =l= a(i) ;
53
54  demand(j) .. sum(i, x(i,j)) =g= bmult*b(j) ;
55
56  Model transport /all/ ;
57 '''
58
59
60 # Needs to be called with an uninstantiated GAMSModelInstance

## ◆ guss_call()

 def transport12.guss_call ( dict, mi, solve_statement, opt = `None`, mi_opt = `None`, output = `None` )

Definition at line 61 of file transport12.py.

References markowitz.key.

## ◆ bmult

Definition at line 191 of file transport12.py.

## ◆ bmultlist

 list transport12.bmultlist = [ 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3 ]

Definition at line 186 of file transport12.py.

## ◆ checkpoint

 transport12.checkpoint

Definition at line 181 of file transport12.py.

## ◆ cp

Definition at line 177 of file transport12.py.

## ◆ db

Definition at line 188 of file transport12.py.

## ◆ db2

Definition at line 214 of file transport12.py.

## ◆ dict

Definition at line 201 of file transport12.py.

## ◆ dict2

Definition at line 226 of file transport12.py.

## ◆ i

 int transport12.i = 0

Definition at line 194 of file transport12.py.

## ◆ mi

Definition at line 184 of file transport12.py.

## ◆ mi2

Definition at line 213 of file transport12.py.

## ◆ output

 transport12.output

Definition at line 231 of file transport12.py.

## ◆ scen

Definition at line 190 of file transport12.py.

## ◆ scen2

Definition at line 216 of file transport12.py.

## ◆ t12

Definition at line 180 of file transport12.py.

## ◆ value

 transport12.value

Definition at line 196 of file transport12.py.

## ◆ ws

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

Definition at line 173 of file transport12.py.

## ◆ xup

Definition at line 218 of file transport12.py.

## ◆ zscen

Definition at line 192 of file transport12.py.