Introductory Example

Consider the following transshipment problem for
an oil company.
Crude oil is shipped to refineries where it is processed
into gasoline and diesel fuel.
The gasoline and diesel fuel are then distributed to service stations.
At each stage,
there are shipping, processing, and distribution costs.
Also, there are lower flow bounds and capacities.

In addition, there are two sets of side constraints.
The first set is that two times the
crude from the Middle East cannot exceed the throughput
of a refinery plus 15 units.
(The words "plus 15 units" that finishes the last sentence
is used to enable some side constraints in this example to have a nonzero
rhs.) The second set of constraints are necessary to model
the situation that
one unit of crude mix processed at a refinery yields
three-fourths of a unit of gasoline and one-fourth of a unit of
diesel fuel.
Because there are two products that are not independent in the
way in that
they flow through the network, a network programming problem
with side constraints is an appropriate model for this example
(see Figure 4.6).
The side constraints are used to model the limitations on the
amount of Middle Eastern crude that can be processed by each
refinery and the conversion proportions of crude to gasoline
and diesel fuel.

Figure 4.6: Oil Industry Example

To solve this problem with PROC NETFLOW, save a representation
of the model in three SAS data sets.
In the NODEDATA= data set, you name the supply
and demand nodes and give the associated supplies and demands.
To distinguish
demand nodes from supply nodes, specify demands
as negative quantities. For the oil example, the NODEDATA= data set
can be saved as follows:

The ARCDATA= data set contains the rest of the information
about the network.
Each observation in the data set identifies
an arc in the network and gives the cost per flow unit
across the arc,
the capacities of the arc, the lower bound on flow across the arc,
and the name of the arc.

Note that the SAS variable names in the CONDATA= data set are the
names of arcs given in the ARCDATA= data set.
These are the
arcs that have nonzero constraint coefficients in side constraints.
For example, the proportionality constraint
that specifies that one unit of crude at each refinery
yields three-fourths of a
unit of gasoline and one-fourth of a unit of diesel fuel is
given for REFINERY 1 in the third observation and for REFINERY 2
in the last observation. The third observation requires
that each unit of flow on arc THRUPUT1 equals three-fourths of a
unit of flow on arc
R1_GAS.
Because all crude processed at
REFINERY 1 flows through THRUPUT1 and all gasoline produced
at REFINERY 1 flows through R1_GAS, the constraint models
the situation. It proceeds similarly for REFINERY 2 in the last
observation.

To find the minimum cost flow through the network that
satisfies the supplies, demands, and side constraints,
invoke PROC NETFLOW as follows:

The following messages, that appear on the SAS log, summarize
the model as read by PROC NETFLOW and note the progress toward a
solution:

NOTE: Number of nodes= 14 .
NOTE: Number of supply nodes= 2 .
NOTE: Number of demand nodes= 4 .
NOTE: Total supply= 180 , total demand= 180 .
NOTE: Number of arcs= 18 .
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= 50600 .
NOTE: Number of <= side constraints= 0 .
NOTE: Number of == side constraints= 2 .
NOTE: Number of >= side constraints= 2 .
NOTE: Number of arc and nonarc variable side constraint
coefficients= 8 .
NOTE: Number of iterations, optimizing with constraints= 4 .
NOTE: Of these, 0 were degenerate.
NOTE: Optimum reached.
NOTE: Minimal total cost= 50875 .
NOTE: The data set WORK.SOLUTION has 18 observations and 14
variables.

Unlike PROC LP, which displays the solution and other information as output,
PROC NETFLOW saves the optimum in output SAS data sets that you specify.
For this example, the solution is saved in the SOLUTION data set. It can be
displayed with the PRINT procedure as

Notice that, in CONOUT=SOLUTION (Figure 4.7), the optimal flow
through each arc in the network
is given in the variable named _FLOW_, and the cost of flow
through each arc is given in the variable _FCOST_.