|
Chapter Contents |
Previous |
Next |
| The TRANS Procedure |
In this example, the optimal flow is found on a capacitated transportation network. Suppose that there are upper bounds on the amount that can be shipped within each city. The following SAS program and output show how this capacity constraint is included in the model:
title 'Capacitated Transportation Network';
data capcty;
input Atlanta Chicago Denver Houston Los_Ange Miami
New_York San_Fran Seattle Washingt city$;
datalines;
10 . . . . . . . . . Atlanta
. 60 . . . . . . . . Chicago
. . 100 . . . . . . . Denver
. . . 10 . . . . . . Houston
. . . . 30 . . . . . Los_Ange
. . . . . 20 . . . . Miami
. . . . . . 75 . . . New_York
. . . . . . . 25 . . San_Fran
. . . . . . . . 10 . Seattle
. . . . . . . . . 10 Washingt
;
proc trans cost=cst capacity=capcty;
HEADNODE Atlanta--Washingt;
TAILNODE city;
supply supply;
run;
proc print;
run;
After this program executes, the following message is written to the SAS log:
NOTE: Optimal Solution Total = 24036.
The preceding statements produce the SAS data set in Output 6.2.1
Output 6.2.1: Capacitated Transportation Network Solution
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.