| 1 |
<h2>DESCRIPTION</h2> |
| 2 |
|
| 3 |
<em>v.net.flow</em> computes the maximum flow and minimum cut |
| 4 |
between two sets of nodes. |
| 5 |
|
| 6 |
<h2>NOTES</h2> |
| 7 |
|
| 8 |
The two sets of nodes are called <em>sources</em> and <em>sink</em> |
| 9 |
and <em>v.net.flow</em> finds the maximum flow from the former to |
| 10 |
the latter ones. Edge capacities can be specified by <b>arc_column</b> |
| 11 |
for forward direction and <b>arc_backward_column</b> for backward direction. If |
| 12 |
the latter parameter is omitted then the same capacity is used in |
| 13 |
either direction. The sets are given by the respective <b>cats</b>, |
| 14 |
<b>layer</b> and <b>where</b> parameters. Maximum flow corresponds |
| 15 |
to the maximum amount of water possibly flowing through the network |
| 16 |
preserving the capacity constraints and minimum cut to the set of edges |
| 17 |
of minimum total capacity completely separating sources from sinks. |
| 18 |
The cut produced by this module corresponds to the first fully |
| 19 |
saturated edges from sources to sinks. An attribute table containing |
| 20 |
the flow information is linked to the <b>output</b> map. The table |
| 21 |
consists of two columns: <em>cat</em> and <em>flow</em> and stores |
| 22 |
the flow along each line. Negative flow means that "water" is |
| 23 |
flowing in the backward direction. <b>Cut</b> map contains the edges |
| 24 |
in the minimum cut. |
| 25 |
<br> |
| 26 |
A famous <a href="https://en.wikipedia.org/wiki/Max-flow_min-cut_theorem">result</a> |
| 27 |
says that the total amount of water flowing is equal to the minimum |
| 28 |
cut. |
| 29 |
|
| 30 |
<h2>EXAMPLES</h2> |
| 31 |
|
| 32 |
Find maximum flow from factories to stores using SPEED for the capacities. |
| 33 |
<div class="code"><pre> |
| 34 |
v.net.flow input=roads output=roads_flow cut=roads_cut arc_column=SPEED \ |
| 35 |
source_where="type=factory" sink_where="type=store" |
| 36 |
</pre></div> |
| 37 |
<p> |
| 38 |
|
| 39 |
If all the capacties are one then the minimum cut corresponds to the |
| 40 |
minimum number of edges separating sources from sinks. |
| 41 |
<div class="code"><pre> |
| 42 |
v.net.flow input=network output=flow cut=cut arc_column=ones \ |
| 43 |
source_cats=1-10 sink_cats=100-100 |
| 44 |
</pre></div> |
| 45 |
|
| 46 |
<h2>SEE ALSO</h2> |
| 47 |
|
| 48 |
<em> |
| 49 |
<a href="v.net.html">v.net</a>, |
| 50 |
<a href="v.net.connectivity.html">v.net.connectivity</a> |
| 51 |
</em> |
| 52 |
|
| 53 |
<h2>AUTHORS</h2> |
| 54 |
|
| 55 |
Daniel Bundala, Google Summer of Code 2009, Student<br> |
| 56 |
Wolf Bergenheim, Mentor |