Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The NETFLOW Procedure

Example 4.5: Using an Unconstrained Solution Warm Start

This example examines the effect of changing some of the arc costs. The back order penalty costs are increased by twenty percent. The sales profit of 25-inch TVs sent to the shops in May is increased by thirty units. The backorder penalty costs of 25-inch TVs manufactured in May for April consumption is decreased by thirty units. The production cost of 19- and 25-inch TVs made in May are decreased by five units and twenty units, respectively. How does the optimal solution of the network after these arc cost alterations compare with the optimum of the original network? If you want to use the warm start facilities of PROC NETFLOW to solve this undefined problem, specify the WARM option. Notice that the FUTURE1 option was specified in the last PROC NETFLOW run.

These SAS statements produce the new NODEOUT= and ARCOUT= data sets.

title 'Minimum Cost Flow problem- Unconstrained Warm Start';
title2 'Production Planning/Inventory/Distribution';
data arc2;
   set arc1;
      oldcost=_cost_;
      oldfc=_fcost_;
      oldflow=_flow_;
      if key_id='backorder'
         then _cost_=_cost_*1.2;
         else if _tail_='f2_may_2' then _cost_=_cost_-30;
      if key_id='production' & mth_made='May' then
         if diagonal=19 then _cost_=_cost_-5;
                        else _cost_=_cost_-20;
proc netflow
   warm future1
   nodedata=node2
   arcdata=arc2
   nodeout=node3
   arcout=arc3;
proc print data=arc3 (drop = _status_ _rcost_);
   var _tail_ _head_ _capac_ _lo_ _supply_ _demand_ _name_ 
       _cost_ _flow_ _fcost_ oldcost oldflow oldfc 
       diagonal factory key_id mth_made _anumb_ _tnumb_;
       /* to get this variable order */
           sum oldfc _fcost_;
proc print data=node3;
run;
The following notes appear on the SAS log:
NOTE: Number of nodes= 21 .
NOTE: Number of supply nodes= 4 .
NOTE: Number of demand nodes= 5 .
NOTE: Total supply= 4350 , total demand= 4350 .
NOTE: Number of iterations performed (neglecting any 
      constraints)= 8 .
NOTE: Of these, 0 were degenerate.
NOTE: Optimum (neglecting any constraints) found.
NOTE: Minimal total cost= -1285086.45 .
NOTE: The data set WORK.ARC3 has 64 observations and
      21 variables.
NOTE: The data set WORK.NODE3 has 20 observations and
      10 variables.

The solution is displayed in Output 4.5.1.

Output 4.5.1: ARCOUT=ARC3

Minimum Cost Flow problem- Unconstrained Warm Start
Production Planning/Inventory/Distribution

Obs _tail_ _head_ _capac_ _lo_ _SUPPLY_ _DEMAND_ _name_ _cost_ _FLOW_ _FCOST_ oldcost oldflow oldfc diagonal factory key_id mth_made _ANUMB_ _TNUMB_
1 fact1_1 _EXCESS_ 99999999 0 1000 200   0.00 5 0.00 0.00 5 0.00 . .     65 1
2 fact2_1 _EXCESS_ 99999999 0 850 200   0.00 45 0.00 0.00 45 0.00 . .     66 10
3 fact1_2 _EXCESS_ 99999999 0 1000 200   0.00 0 0.00 0.00 10 0.00 . .     67 11
4 fact2_2 _EXCESS_ 99999999 0 1500 200   0.00 150 0.00 0.00 140 0.00 . .     68 20
5 fact1_1 f1_apr_1 600 50 1000 . prod f1 19 apl 78.60 540 42444.00 78.60 600 47160.00 19 1 production April 4 1
6 f1_mar_1 f1_apr_1 50 0 . .   15.00 0 0.00 15.00 0 0.00 19 1 storage March 5 2
7 f1_may_1 f1_apr_1 20 0 . . back f1 19 may 33.60 0 0.00 28.00 0 0.00 19 1 backorder May 6 4
8 f2_apr_1 f1_apr_1 40 0 . .   11.00 0 0.00 11.00 0 0.00 19 . f2_to_1 April 7 6
9 fact1_2 f1_apr_2 550 50 1000 . prod f1 25 apl 174.50 250 43625.00 174.50 550 95975.00 25 1 production April 36 11
10 f1_mar_2 f1_apr_2 40 0 . .   20.00 0 0.00 20.00 0 0.00 25 1 storage March 37 12
11 f1_may_2 f1_apr_2 15 0 . . back f1 25 may 49.20 15 738.00 41.00 15 615.00 25 1 backorder May 38 14
12 f2_apr_2 f1_apr_2 25 0 . .   21.00 0 0.00 21.00 0 0.00 25 . f2_to_1 April 39 16
13 fact1_1 f1_mar_1 500 50 1000 . prod f1 19 mar 127.90 340 43486.00 127.90 345 44125.50 19 1 production March 1 1
14 f1_apr_1 f1_mar_1 20 0 . . back f1 19 apl 33.60 20 672.00 28.00 20 560.00 19 1 backorder April 2 3
15 f2_mar_1 f1_mar_1 40 0 . .   10.00 40 400.00 10.00 40 400.00 19 . f2_to_1 March 3 5
16 fact1_2 f1_mar_2 400 40 1000 . prod f1 25 mar 217.90 400 87160.00 217.90 400 87160.00 25 1 production March 33 11
17 f1_apr_2 f1_mar_2 30 0 . . back f1 25 apl 38.40 30 1152.00 32.00 30 960.00 25 1 backorder April 34 13
18 f2_mar_2 f1_mar_2 25 0 . .   20.00 25 500.00 20.00 25 500.00 25 . f2_to_1 March 35 15
19 fact1_1 f1_may_1 400 50 1000 .   90.10 115 10361.50 95.10 50 4755.00 19 1 production May 8 1
20 f1_apr_1 f1_may_1 50 0 . .   12.00 0 0.00 12.00 50 600.00 19 1 storage April 9 3
21 f2_may_1 f1_may_1 40 0 . .   13.00 0 0.00 13.00 0 0.00 19 . f2_to_1 May 10 7
22 fact1_2 f1_may_2 350 40 1000 .   113.30 350 39655.00 133.30 40 5332.00 25 1 production May 40 11
23 f1_apr_2 f1_may_2 40 0 . .   18.00 0 0.00 18.00 0 0.00 25 1 storage April 41 13
24 f2_may_2 f1_may_2 25 0 . .   13.00 0 0.00 43.00 0 0.00 25 . f2_to_1 May 42 17
25 f1_apr_1 f2_apr_1 99999999 0 . .   11.00 20 220.00 11.00 30 330.00 19 . f1_to_2 April 14 3
26 fact2_1 f2_apr_1 480 35 850 . prod f2 19 apl 62.40 480 29952.00 62.40 480 29952.00 19 2 production April 15 10
27 f2_mar_1 f2_apr_1 30 0 . .   18.00 0 0.00 18.00 0 0.00 19 2 storage March 16 5
28 f2_may_1 f2_apr_1 15 0 . . back f2 19 may 30.00 0 0.00 25.00 0 0.00 19 2 backorder May 17 7
29 f1_apr_2 f2_apr_2 99999999 0 . .   23.00 0 0.00 23.00 0 0.00 25 . f1_to_2 April 46 13
30 fact2_2 f2_apr_2 680 35 1500 . prod f2 25 apl 196.70 680 133756.00 196.70 680 133756.00 25 2 production April 47 20
31 f2_mar_2 f2_apr_2 50 0 . .   28.00 0 0.00 28.00 0 0.00 25 2 storage March 48 15
32 f2_may_2 f2_apr_2 15 0 . . back f2 25 may 64.80 0 0.00 54.00 15 810.00 25 2 backorder May 49 17
33 f1_mar_1 f2_mar_1 99999999 0 . .   11.00 0 0.00 11.00 0 0.00 19 . f1_to_2 March 11 2
34 fact2_1 f2_mar_1 450 35 850 . prod f2 19 mar 88.00 290 25520.00 88.00 290 25520.00 19 2 production March 12 10
35 f2_apr_1 f2_mar_1 15 0 . . back f2 19 apl 20.40 0 0.00 17.00 0 0.00 19 2 backorder April 13 6
36 f1_mar_2 f2_mar_2 99999999 0 . .   23.00 0 0.00 23.00 0 0.00 25 . f1_to_2 March 43 12
37 fact2_2 f2_mar_2 650 35 1500 . prod f2 25 mar 182.00 635 115570.00 182.00 645 117390.00 25 2 production March 44 20
38 f2_apr_2 f2_mar_2 15 0 . . back f2 25 apl 37.20 0 0.00 31.00 0 0.00 25 2 backorder April 45 16
39 f1_may_1 f2_may_1 99999999 0 . .   16.00 115 1840.00 16.00 100 1600.00 19 . f1_to_2 May 18 4
40 fact2_1 f2_may_1 250 35 850 .   128.80 35 4508.00 133.80 35 4683.00 19 2 production May 19 10
41 f2_apr_1 f2_may_1 30 0 . .   20.00 0 0.00 20.00 15 300.00 19 2 storage April 20 6
42 f1_may_2 f2_may_2 99999999 0 . .   26.00 335 8710.00 26.00 0 0.00 25 . f1_to_2 May 50 14
43 fact2_2 f2_may_2 550 35 1500 .   181.40 35 6349.00 201.40 35 7049.00 25 2 production May 51 20
44 f2_apr_2 f2_may_2 50 0 . .   38.00 0 0.00 38.00 0 0.00 25 2 storage April 52 16
45 f1_mar_1 shop1_1 250 0 . 900   -327.65 150 -49147.50 -327.65 155 -50785.75 19 1 sales March 21 2
46 f1_apr_1 shop1_1 250 0 . 900   -300.00 250 -75000.00 -300.00 250 -75000.00 19 1 sales April 22 3
47 f1_may_1 shop1_1 250 0 . 900   -285.00 0 0.00 -285.00 0 0.00 19 1 sales May 23 4
48 f2_mar_1 shop1_1 250 0 . 900   -297.40 250 -74350.00 -297.40 250 -74350.00 19 2 sales March 24 5
49 f2_apr_1 shop1_1 250 0 . 900   -290.00 250 -72500.00 -290.00 245 -71050.00 19 2 sales April 25 6
50 f2_may_1 shop1_1 250 0 . 900   -292.00 0 0.00 -292.00 0 0.00 19 2 sales May 26 7
51 f1_mar_2 shop1_2 99999999 0 . 900   -559.76 0 0.00 -559.76 0 0.00 25 1 sales March 53 12
52 f1_apr_2 shop1_2 99999999 0 . 900   -524.28 0 0.00 -524.28 0 0.00 25 1 sales April 54 13
53 f1_may_2 shop1_2 99999999 0 . 900   -475.02 0 0.00 -475.02 25 -11875.50 25 1 sales May 55 14
54 f2_mar_2 shop1_2 500 0 . 900   -567.83 500 -283915.00 -567.83 500 -283915.00 25 2 sales March 56 15
55 f2_apr_2 shop1_2 500 0 . 900   -542.19 400 -216876.00 -542.19 375 -203321.25 25 2 sales April 57 16
56 f2_may_2 shop1_2 500 0 . 900   -491.56 0 0.00 -461.56 0 0.00 25 2 sales May 58 17
57 f1_mar_1 shop2_1 250 0 . 900   -362.74 250 -90685.00 -362.74 250 -90685.00 19 1 sales March 27 2
58 f1_apr_1 shop2_1 250 0 . 900   -300.00 250 -75000.00 -300.00 250 -75000.00 19 1 sales April 28 3
59 f1_may_1 shop2_1 250 0 . 900   -245.00 0 0.00 -245.00 0 0.00 19 1 sales May 29 4
60 f2_mar_1 shop2_1 250 0 . 900   -272.70 0 0.00 -272.70 0 0.00 19 2 sales March 30 5
61 f2_apr_1 shop2_1 250 0 . 900   -312.00 250 -78000.00 -312.00 250 -78000.00 19 2 sales April 31 6
62 f2_may_1 shop2_1 250 0 . 900   -299.00 150 -44850.00 -299.00 150 -44850.00 19 2 sales May 32 7
63 f1_mar_2 shop2_2 99999999 0 . 1450   -623.89 455 -283869.95 -623.89 455 -283869.95 25 1 sales March 59 12
64 f1_apr_2 shop2_2 99999999 0 . 1450   -549.68 235 -129174.80 -549.68 535 -294078.80 25 1 sales April 60 13
65 f1_may_2 shop2_2 99999999 0 . 1450   -460.00 0 0.00 -460.00 0 0.00 25 1 sales May 61 14
66 f2_mar_2 shop2_2 500 0 . 1450   -542.83 110 -59711.30 -542.83 120 -65139.60 25 2 sales March 62 15
67 f2_apr_2 shop2_2 500 0 . 1450   -559.19 280 -156573.20 -559.19 320 -178940.80 25 2 sales April 63 16
68 f2_may_2 shop2_2 500 0 . 1450   -519.06 370 -192052.20 -489.06 20 -9781.20 25 2 sales May 64 17
                    -1285086.45     -1281110.35            


The associated NODEOUT data set is in Output 4.5.1

Output 4.5.2: NODEOUT=NODE3

Obs _node_ _supdem_ _DUAL_ _NNUMB_ _PRED_ _TRAV_ _SCESS_ _ARCID_ _FLOW_ _FBQ_
1 _ROOT_ 238 0.00 22 0 8 0 3 166 -69
2 _EXCESS_ -200 -100000198.75 21 1 20 13 65 5 65
3 f1_apr_1 . -100000277.35 3 1 6 2 4 490 4
4 f1_apr_2 . -100000387.60 13 19 11 2 -60 235 36
5 f1_mar_1 . -100000326.65 2 8 1 20 -21 150 1
6 f1_mar_2 . -100000461.81 12 19 13 1 -59 455 33
7 f1_may_1 . -100000288.85 4 1 7 3 8 65 8
8 f1_may_2 . -100000330.98 14 17 10 1 -50 335 40
9 f2_apr_1 . -100000288.35 6 3 4 1 14 20 14
10 f2_apr_2 . -100000397.11 16 19 18 2 -63 280 46
11 f2_mar_1 . -100000286.75 5 10 22 1 12 255 11
12 f2_mar_2 . -100000380.75 15 20 19 9 44 600 43
13 f2_may_1 . -100000304.85 7 4 9 2 18 115 18
14 f2_may_2 . -100000356.98 17 19 14 2 -64 370 50
15 fact1_1 1000 -100000198.75 1 2 3 19 -1 290 -1
16 fact1_2 1000 -100000213.10 11 13 17 1 -36 200 -33
17 fact2_1 850 -100000198.75 10 21 5 2 -66 45 -33
18 fact2_2 1500 -100000198.75 20 21 15 10 -68 150 -65
19 shop1_1 -900 -99999999.00 8 22 2 21 0 0 21
20 shop1_2 -900 -99999854.92 18 16 12 1 57 400 53
21 shop2_1 -900 -100000005.85 9 7 21 1 32 150 27
22 shop2_2 -1450 -99999837.92 19 15 16 8 62 110 59

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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