Uploaded by Kriezl Caldito

Maximal-Flow-Problem

advertisement
Maximal Flow
Problem
Introduction
The maximal flow problem is to
maximize the amount of flow of
items from an origin to a
destination.
Maximal flow problems can involve the flow
of water, gas, or oil through a network of
pipelines; the flow of forms through a paper
processing system (such as a government
agency); the flow of traffic through a road
network; or the flow of products through a
production line system. In each of these
examples, the branches of the network have
limited and often different flow capacities.
Given these conditions, the decision maker
wants to determine the maximum flow that
can be obtained through the system..
Example:
The Scott Tractor Company ships tractor parts from Omaha to St. Louis by railroad.
However, a contract limits the number of railroad cars the company can secure on each
branch during a week. Given these limiting conditions, the company wants to know the
maximum number of railroad cars containing tractor parts that can be shipped from
Omaha to St. Louis during a week.
Figure 7.18. Network of Railway System
Figure 7.18. Network of Railway System
The number of railroad cars available to the tractor company on each rail branch is indicated by
the number on the branch to the immediate right of each node (which represents a rail junction).
For example, six cars are available from node 1 (Omaha) to node 2, eight cars are available from
node 2 to node 5, five cars are available from node 4 to node 6 (St. Louis), and so forth. The
number on each branch to the immediate left of each node is the number of cars available for
shipping in the opposite direction. For example, no cars are available from node 2 to node 1. The
branch from node 1 to node 2 is referred to as a directed branch because flow is possible in only
one direction (from node 1 to node 2, but not from 2 to 1). Notice that flow is possible in both
directions on the branches between nodes 2 and 4 and nodes 3 and 4. These are referred to as
undirected branches .
The first step in determining the maximum possible flow of railroad cars through the rail
system is to choose any path arbitrarily from origin to destination and ship as much as
possible on that path. In Figure 7.19 we will arbitrarily select the path 1256. The maximum
number of railroad cars that can be sent through this route is four. We are limited to four
cars because that is the maximum amount available on the branch between nodes 5 and 6.
This path is shown in Figure 7.19. Arbitrarily choose any path through the network from
origin to destination and ship as much as possible .
Figure 7.19 Maximal flow for path 1-2-5-6
Notice that the remaining capacities of the branches from node 1 to node 2 and from
node 2 to node 5 are two and four cars, respectively, and that no cars are available from
node 5 to node 6. These values were computed by subtracting the flow of four cars from
the number available. The actual flow of four cars along each branch is shown enclosed
in a box. Notice that the present input of four cars into node 1 and output of four cars
from node 6 are also designated.
Figure 7.19 Maximal flow for path 1-2-5-6
Step 2: Re-compute branch flow in both directions
Step 3: Select other feasible paths arbitrarily and determine maximum flow along the paths until
flow is no longer possible.
The final adjustment on this path is to add the designated flow of four cars to the values at the
immediate left of each node on our path, 1256. These are the flows in the opposite direction. Thus, the
value 4 is added to the zeros at nodes 2, 5, and 6. It may seem incongruous to designate flow in a
direction that is not possible; however, it is the means used in this solution approach to compute the net
flow along a branch. (If, for example, a later iteration showed a flow of one car from node 5 to node 2,
then the net flow in the correct direction would be computed by subtracting this flow of one in the wrong
direction from the previous flow of four in the correct direction. The result would be a net flow of three in
the correct direction.)
Figure 7.20 Maximal flow for path 1-4-6
We have now completed one iteration of the solution process and must repeat the preceding steps.
Again, we arbitrarily select a path. This time we will select path 146, as shown in Figure 7.20. The
maximum flow along this path is four cars, which is subtracted at each of the nodes. This increases the
total flow through the network to eight cars (because the flow of four along path 146 is added to the flow
previously determined in Figure 7.19).
As a final step, the flow of four cars is added to the flow along the path in the opposite direction at nodes
4 and 6.
Figure 7.20 Maximal flow for path 1-4-6
Now we arbitrarily select another path. This time we will choose path 136, with a maximum possible
flow of six cars. This flow of six is subtracted from the branches along path 136 and added to the
branches in the opposite direction, as shown in Figure 7.21. The flow of 6 for this path is added to
the previous flow of 8, which results in a total flow of 14 railroad cars.
Notice that at this point the number of paths we can take is restricted. For example, we cannot take
the branch from node 3 to node 6 because zero flow capacity is available. Likewise, no path that
includes the branch from node 1 to node 4 is possible.
Figure 7.21 Maximal flow for path 1-3-6
The available flow capacity along the path 1346 is one car, as shown in Figure 7.22. This increases
the total flow from 14 cars to 15 cars. The resulting network is shown in Figure 7.23. Close
observation of the network in Figure 7.23 shows that there are no more paths with available flow
capacity. All paths out of nodes 3, 4, and 5 show zero available capacity, which prohibits any
further paths through the network.
Figure 7.22. Maximal flow for path 1346
This completes the maximal flow solution for our example problem. The
maximum flow is 15 railroad cars. The flows that will occur along each branch
appear in boxes in Figure 7.23.
Figure 7.23 Maximal flow for railway network
SUMMARY
1.
Arbitrarily select any path in the network from origin to
destination.
2.
Adjust the capacities at each node by subtracting the
maximal flow for the path selected in step 1.
3.
Add the maximal flow along the path in the opposite
direction at each node.
4. Repeat steps 1, 2, and 3 until there are no more paths with
available flow capacity.
5.
Thank You
Download