force.balance: force.balance - repeatedly applies balance until...

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/force.balance.R

Description

This function repeatedly balances a model, sequentially with the output being passed back to the balance function, until it is within tolerance or the maximum number of iterations is reached.

Usage

1
force.balance(x, tol = 5, max.itr = 10, method = "AVG2")

Arguments

x

A network object.

tol

Percent error tolerance for difference between inputs and outputs.

max.itr

Maximum number iterations.

method

The balancing method to use, see balance. DEFAULT = AVG2.

Value

Returns a balanced network model.

Author(s)

Matthew K. Lau Stuart R. Borrett

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

balance

Examples

1
2
3
data(troModels)
ssCheck(troModels[[1]])
fb.model = force.balance(troModels[[2]])  #produces a balanced model

enaR documentation built on May 30, 2017, 7:57 a.m.

Search within the enaR package
Search all R packages, documentation and source code