Skip to contents

Applies the methods of Allesina and Bondavalli (2003) for balancing flow network models.

Usage

balance(x, method = c("AVG2", "AVG", "IO", "OI", "I", "O"), tol = 5)

Arguments

x

A network object.

method

Methods for model balancing, see Allesina and Bondavalli (2003).

tol

Percent error tolerance used in the steady state check prior to balancing.

Value

Returns a network object with a balanced flow network model.

References

Allesina, S., Bondavalli, C., 2003. Steady state of ecosystem flow networks: a comparison between balancing procedures. Ecological Modelling 165(2-3):231-239.

See also

Author

Matthew K. Lau Stuart R. Borrett

Examples




data(troModels)
balance(troModels[[6]])
#> [1] BALANCED
#>  Network attributes:
#>   vertices = 5 
#>   directed = TRUE 
#>   hyper = FALSE 
#>   loops = TRUE 
#>   multiple = FALSE 
#>   bipartite = FALSE 
#>   balanced = TRUE 
#>   total edges= 8 
#>     missing edges= 0 
#>     non-missing edges= 8 
#> 
#>  Vertex attribute names: 
#>     export input living output respiration storage vertex.names 
#> 
#>  Edge attribute names: 
#>     flow