Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The NETFLOW Procedure

Example 4.3: Using a Warm Start

Suppose that the airlines state that the freight cost per pineapple in flights that leave Chicago has been reduced by 30. How many pineapples should take each route between Hawaii and London? This example illustrates how PROC NETFLOW uses a warm start. In Example 4.2, the RESET statement of PROC NETFLOW is used to specify FUTURE1. A NODEOUT= data set is also specified. The warm start information is saved in the arcout1 and nodeout1 data sets.

In the following DATA step, the costs, reduced costs, and flows in the arcout1 data set are saved in variables called oldcost, oldflow, and oldfc. These variables form an implicit ID list in the following PROC NETFLOW run and will appear in ARCOUT=arcout2. Thus, it is easy to compare the previous optimum and the new optimum.

title 'Minimum Cost Flow Problem - Warm Start';
title2 'How to get Hawaiian Pineapples to a London Restaurant';
data aircost2;
   set arcout1;
      oldcost=_cost_;
      oldflow=_flow_;
      oldfc=_fcost_;
      if ffrom='Chicago' then _cost_=_cost_-30;
proc netflow
   warm
      arcdata=aircost2
      nodedata=nodeout1
      arcout=arcout2;
         tail    ffrom;
         head    tto;
proc print data=arcout2;
   var ffrom tto _cost_ oldcost _capac_ _lo_ 
       _flow_ oldflow _fcost_ oldfc; 
   sum _fcost_ oldfc;
run;
The following notes appear on the SAS log:
NOTE: Number of nodes= 8 .
NOTE: Number of supply nodes= 1 .
NOTE: Number of demand nodes= 1 .
NOTE: Total supply= 500 , total demand= 500 .
NOTE: Number of iterations performed (neglecting any
      constraints)= 3 .
NOTE: Of these, 1 were degenerate.
NOTE: Optimum (neglecting any constraints) found.
NOTE: Minimal total cost= 93150 .

ARCOUT=arcout2 is shown in Output 4.3.1.

Output 4.3.1: ARCOUT=ARCOUT2

Minimum Cost Flow Problem - Warm Start
How to get Hawaiian Pineapples to a London Restaurant

Obs ffrom tto _cost_ oldcost _CAPAC_ _LO_ _FLOW_ oldflow _FCOST_ oldfc
1 San Francisco Atlanta 63 63 350 0 0 0 0 0
2 Los Angeles Atlanta 57 57 350 0 0 150 0 8550
3 Chicago Boston 15 45 350 0 150 0 2250 0
4 San Francisco Boston 71 71 350 0 0 0 0 0
5 Honolulu Chicago 105 105 350 0 150 0 15750 0
6 Boston Heathrow London 88 88 350 0 150 0 13200 0
7 New York Heathrow London 65 65 350 0 350 350 22750 22750
8 Atlanta Heathrow London 76 76 350 0 0 150 0 11400
9 Honolulu Los Angeles 68 68 350 0 350 350 23800 23800
10 Chicago New York 26 56 350 0 0 0 0 0
11 San Francisco New York 48 48 350 0 0 150 0 7200
12 Los Angeles New York 44 44 350 0 350 200 15400 8800
13 Honolulu San Francisco 75 75 350 0 0 150 0 11250
                  93150 93750

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.