transport2 Namespace Reference

Functions

def get_data_text ()
 
def get_model_text ()
 

Variables

 ws = GamsWorkspace(system_directory = sys.argv[1])
 
 file = open(os.path.join(ws.working_directory, "tdata.gms"), "w")
 
 t2 = ws.add_job_from_string(get_model_text())
 
 opt = ws.add_options()
 

Function Documentation

◆ get_data_text()

def transport2.get_data_text ( )

Definition at line 11 of file transport2.py.

11def get_data_text():
12  return '''
13  Sets
14  i canning plants / seattle, san-diego /
15  j markets / new-york, chicago, topeka / ;
16 
17  Parameters
18 
19  a(i) capacity of plant i in cases
20  / seattle 350
21  san-diego 600 /
22 
23  b(j) demand at market j in cases
24  / new-york 325
25  chicago 300
26  topeka 275 / ;
27 
28  Table d(i,j) distance in thousands of miles
29  new-york chicago topeka
30  seattle 2.5 1.7 1.8
31  san-diego 2.5 1.8 1.4 ;
32 
33  Scalar f freight in dollars per case per thousand miles /90/ ; '''
34 
35 

◆ get_model_text()

def transport2.get_model_text ( )

Definition at line 36 of file transport2.py.

Variable Documentation

◆ file

transport2.file = open(os.path.join(ws.working_directory, "tdata.gms"), "w")

Definition at line 85 of file transport2.py.

◆ opt

transport2.opt = ws.add_options()

Definition at line 90 of file transport2.py.

◆ t2

transport2.t2 = ws.add_job_from_string(get_model_text())

Definition at line 89 of file transport2.py.

◆ ws

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

Definition at line 81 of file transport2.py.

def get_data_text()
Definition: transport2.py:11