The NETFLOW Procedure |
For generalized networks you can specify either EXCESS=SUPPLY or EXCESS=DEMAND to indicate which nodal flow conservation constraints have slack variables associated with them. The default option is EXCESS=NONE.
Figure 5.48: Generalized Network: Supply = Demand
You can use the following SAS code to create the input data sets:
data garcs; input _from_ $ _to_ $ _cost_ _mult_; datalines; s1 d1 1 . s1 d2 8 . s2 d1 4 2 s2 d2 2 2 s2 d3 1 2 s3 d2 5 0.5 s3 d3 4 0.5 ; data gnodes; input _node_ $ _sd_ ; datalines; s1 5 s2 20 s3 10 d1 -5 d2 -10 d3 -20 ;
To solve the problem, use the following call to PROC NETFLOW:
title1 'The NETFLOW Procedure'; proc netflow arcdata = garcs nodedata = gnodes excess = supply conout = gnetout; run;
The optimal solution is displayed in Output 5.11.1.
Output 5.11.1: Optimal Solution Obtained Using the EXCESS=SUPPLY OptionNote: If you do not specify the EXCESS= option, or if you specify the EXCESS=DEMAND option, the procedure will declare the problem infeasible. Therefore, in case of real-life problems, you would need to have a little more detail about how the arc multipliers end up affecting the network --- whether they tend to create excess demand or excess supply.
data garcs1; input _from_ $ _to_ $ _cost_ _mult_; datalines; s1 d1 1 0.5 s1 d2 8 0.5 s2 d1 4 . s2 d2 2 . s2 d3 1 . s3 d2 5 0.5 s3 d3 4 0.5 ;
Note that the node data set remains unchanged. You can use the following call to PROC NETFLOW to solve the problem:
title1 'The NETFLOW Procedure'; proc netflow arcdata = garcs1 nodedata = gnodes excess = demand conout = gnetout1; run;
The optimal solution is displayed in Output 5.11.2.
Output 5.11.2: Optimal Solution Obtained Using the EXCESS=DEMAND Option
|
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.