Provided by: grass-doc_6.4.3-3_all

**NAME**

v.net.flow- Computes the maximum flow between two sets of nodes in the network.

**KEYWORDS**

vector, network, flow

**SYNOPSIS**

v.net.flowv.net.flowhelpv.net.flowinput=name[layer=integer]output=namecut=name[afcolumn=name] [abcolumn=name] [source_layer=integer] [source_cats=range] [source_where=sql_query] [sink_layer=integer] [sink_cats=range] [sink_where=sql_query] [--overwrite] [--verbose] [--quiet]Flags:--overwriteAllow output files to overwrite existing files--verboseVerbose module output--quietQuiet module outputParameters:input=nameName of input vector maplayer=integerLayer number A single vector map can be connected to multiple database tables. This number determines which table to use. Default:1output=nameName for output vector mapcut=nameName for output vector map containing a minimum cutafcolumn=nameName of arc forward/both direction(s) capacity columnabcolumn=nameName of arc backward direction capacity columnsource_layer=integerSource layer number or name A single vector map can be connected to multiple database tables. This number determines which table to use. Default:1source_cats=rangeSource category values Example: 1,3,7-9,13source_where=sql_querySource WHERE conditions of SQL statement without 'where' keyword Example: income = 10000sink_layer=integerSink layer number or name A single vector map can be connected to multiple database tables. This number determines which table to use. Default:1sink_cats=rangeSink category values Example: 1,3,7-9,13sink_where=sql_querySink WHERE conditions of SQL statement without 'where' keyword Example: income = 10000

**DESCRIPTION**

v.net.flowcomputes the maximum flow and minimum cut between two sets of nodes.

**NOTES**

The two sets of nodes are calledsourcesandsinkandv.net.flowfinds the maximimum flow from the former to the latter ones. Edge capacities can be specified byafcolumnfor forward direction andabcolumnfor backward direction. If the latter parameter is ommited then the same capacity is used in either direction. The sets are given by the respectivecats,layerandwhereparameters. Maximum flow corresponds to the maximum amount of water possibly flowing through the network preserving the capacity constraints and minimum cut to the set of edges of minimum total capacity completely separating sources from sinks. The cut produced by this module corresponds to the first fully saturated edges from sources to sinks. An attribute table containing the flow information is linked to theoutputmap. The table consists of two columns:catandflowand stores the flow along each line. Negative flow means that "water" is flowing in the backward direction.Cutmap contains the edges in the minimum cut. A famous result says that the total amount of water flowing is equal to the minimum cut.

**EXAMPLES**

Find maximum flow from factories to stores using SPEED for the capacities. v.net.flow input=roads output=roads_flow cut=roads_cut afcolumn=SPEED \ source_where="type=factory" sink_where="type=store" If all the capacties are one then the minimum cut corresponds to the minimum number of edges separating sources from sinks. v.net.flow input=network output=flow cut=cut afcolumn=ones \ source_cats=1-10 sink_cats=100-100

**SEE** **ALSO**

v.net,v.net.connectivity

**AUTHORS**

Daniel Bundala, Google Summer of Code 2009, Student Wolf Bergenheim, MentorLastchanged:$Date:2013-05-2313:01:55-0700(Thu,23May2013)$Full index © 2003-2013 GRASS Development Team