.TH v.net.flow 1grass "" "GRASS 6.4.4" "Grass User's Manual" .SH NAME \fI\fBv.net.flow\fR\fR - Computes the maximum flow between two sets of nodes in the network. .SH KEYWORDS vector, network, flow .SH SYNOPSIS \fBv.net.flow\fR .br \fBv.net.flow help\fR .br \fBv.net.flow input\fR=\fIname\fR [\fBlayer\fR=\fIinteger\fR] \fBoutput\fR=\fIname\fR \fBcut\fR=\fIname\fR [\fBafcolumn\fR=\fIname\fR] [\fBabcolumn\fR=\fIname\fR] [\fBsource_layer\fR=\fIinteger\fR] [\fBsource_cats\fR=\fIrange\fR] [\fBsource_where\fR=\fIsql_query\fR] [\fBsink_layer\fR=\fIinteger\fR] [\fBsink_cats\fR=\fIrange\fR] [\fBsink_where\fR=\fIsql_query\fR] [\-\-\fBoverwrite\fR] [\-\-\fBverbose\fR] [\-\-\fBquiet\fR] .SS Flags: .IP "\fB\-\-overwrite\fR" 4m .br Allow output files to overwrite existing files .IP "\fB\-\-verbose\fR" 4m .br Verbose module output .IP "\fB\-\-quiet\fR" 4m .br Quiet module output .PP .SS Parameters: .IP "\fBinput\fR=\fIname\fR" 4m .br Name of input vector map .IP "\fBlayer\fR=\fIinteger\fR" 4m .br Layer number .br A single vector map can be connected to multiple database tables. This number determines which table to use. .br Default: \fI1\fR .IP "\fBoutput\fR=\fIname\fR" 4m .br Name for output vector map .IP "\fBcut\fR=\fIname\fR" 4m .br Name for output vector map containing a minimum cut .IP "\fBafcolumn\fR=\fIname\fR" 4m .br Name of arc forward/both direction(s) capacity column .IP "\fBabcolumn\fR=\fIname\fR" 4m .br Name of arc backward direction capacity column .IP "\fBsource_layer\fR=\fIinteger\fR" 4m .br Source layer number or name .br A single vector map can be connected to multiple database tables. This number determines which table to use. .br Default: \fI1\fR .IP "\fBsource_cats\fR=\fIrange\fR" 4m .br Source category values .br Example: 1,3,7-9,13 .IP "\fBsource_where\fR=\fIsql_query\fR" 4m .br Source WHERE conditions of SQL statement without 'where' keyword .br Example: income = 10000 .IP "\fBsink_layer\fR=\fIinteger\fR" 4m .br Sink layer number or name .br A single vector map can be connected to multiple database tables. This number determines which table to use. .br Default: \fI1\fR .IP "\fBsink_cats\fR=\fIrange\fR" 4m .br Sink category values .br Example: 1,3,7-9,13 .IP "\fBsink_where\fR=\fIsql_query\fR" 4m .br Sink WHERE conditions of SQL statement without 'where' keyword .br Example: income = 10000 .PP .SH DESCRIPTION \fIv.net.flow\fR computes the maximum flow and minimum cut between two sets of nodes. .SH NOTES The two sets of nodes are called \fIsources\fR and \fIsink\fR and \fIv.net.flow\fR finds the maximimum flow from the former to the latter ones. Edge capacities can be specified by \fBafcolumn\fR for forward direction and \fBabcolumn\fR for backward direction. If the latter parameter is ommited then the same capacity is used in either direction. The sets are given by the respective \fBcats\fR, \fBlayer\fR and \fBwhere\fR parameters. 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 the \fBoutput\fR map. The table consists of two columns: \fIcat\fR and \fIflow\fR and stores the flow along each line. Negative flow means that "water" is flowing in the backward direction. \fBCut\fR map contains the edges in the minimum cut. .br A famous result says that the total amount of water flowing is equal to the minimum cut. .SH EXAMPLES Find maximum flow from factories to stores using SPEED for the capacities. \fC .DS .br v.net.flow input=roads output=roads_flow cut=roads_cut afcolumn=SPEED \(rs .br source_where="type=factory" sink_where="type=store" .br .DE \fR .PP If all the capacties are one then the minimum cut corresponds to the minimum number of edges separating sources from sinks. \fC .DS .br v.net.flow input=network output=flow cut=cut afcolumn=ones \(rs .br source_cats=1-10 sink_cats=100-100 .br .DE \fR .SH SEE ALSO \fI v.net, v.net.connectivity \fR .SH AUTHORS Daniel Bundala, Google Summer of Code 2009, Student .br Wolf Bergenheim, Mentor .PP \fILast changed: $Date: 2013-05-23 22:01:55 +0200 (Thu, 23 May 2013) $\fR .PP Full index .PP © 2003-2014 GRASS Development Team