Skip to contents

SSRootfind(alg) finds the steady state of a SteadyStateProblem() by solving f(u, p, Inf) = 0 with a nonlinear algorithm. DynamicSS(alg) integrates the differential equations with an ODE algorithm until every derivative satisfies |du| <= abstol + reltol * |u|, or tspan is reached.

Usage

SSRootfind(alg = NULL)

DynamicSS(alg = NULL, abstol = 1e-08, reltol = 1e-06, tspan = 1e+06)

Arguments

alg

A nonlinear algorithm for SSRootfind, an ODE algorithm for DynamicSS; defaults are chosen when NULL.

abstol, reltol

Tolerances on the derivatives for DynamicSS.

tspan

The longest time to integrate.

Value

An algorithm object.

Examples

prob <- SteadyStateProblem(function(u, p, t) p[1] - p[2] * u, u0 = 0, p = c(3, 2))
solve(prob, SSRootfind())$u
#> [1] 1.5
solve(prob, DynamicSS())$u
#> [1] 1.5