Title: | Bifurcation Analysis of Ordinary Differential Equation Systems |
---|---|
Description: | Shiny application that performs bifurcation and phaseplane analysis of systems of ordinary differential equations. The package allows for computation of equilibrium curves as a function of a single free parameter, detection of transcritical, saddle-node and hopf bifurcation points along these curves, and computation of curves representing these transcritical, saddle-node and hopf bifurcation points as a function of two free parameters. The shiny-based GUI allows visualization of the results in both 2D- and 3D-plots. The implemented methods for solution localisation and curve continuation are based on the book "Elements of applied bifurcation theory" (Kuznetsov, Y. A., 1995; ISBN: 0-387-94418-4). |
Authors: | Andre M. de Roos [aut, cre] |
Maintainer: | Andre M. de Roos <[email protected]> |
License: | GPL-3 |
Version: | 0.1.9 |
Built: | 2024-10-25 04:32:23 UTC |
Source: | https://github.com/amderoos/debif |
bifurcation
bifurcation(model, state, parms, resume = TRUE, ...)
bifurcation(model, state, parms, resume = TRUE, ...)
model |
(function, required) An R-function that computes the values of the derivatives in the ODE system (the model definition) at time t. The model must be defined as: model <- function(t, state, parms), where t is the current time point in the integration, state is the current value of the variables in the ODE #' system and parms is a vector or list of parameters. The return value of func should be a list, whose first and single element is a vector containing the derivatives of y with respect to time. The derivatives must be specified in the same order as the state variables state. The vector state and parms should both have name attributes for all their elements |
state |
(numeric vector, required) The initial (state) values for the ODE system. This vector should have name attributes for all its elements |
parms |
(numeric vector, required) The values of the parameters in the ODE system. This vector should have name attributes for all its elements |
resume |
(boolean, optional) If TRUE the program will try to load the curves computed during the last session from the global variable '<model>BifCurves' and try to restore the numerical and plot settings by importing them from the global variable '<model>BifSettings', where the substring '<model>' is the name of the function describing the dynamics, which is passed as first argument to 'bifurcation()'. The program saves the curves computed during a session and the numerical and plot settings of this last session in these global variables '<model>BifCurves' and '<model>BifSettings'. |
... |
(optional arguments) Additional arguments that can be included at the command line to tweak graphical default values used by the application. Valid arguments are:
|
bifurcation(model, state, parms, resume = TRUE, ...)
None.
if(interactive()){ # The initial state of the system has to be specified as a named vector of state values. state <- c(R=1, N=0.01) # Parameters has to be specified as a named vector of parameters. parms <- c(r=1, K=1, a=1, c=1, delta=0.5) # The model has to be specified as a function that returns # the derivatives as a list. model <- function(t, state, parms) { with(as.list(c(state,parms)), { dR <- r*R*(1 - R/K) - a*R*N dN <- c*a*R*N - delta*N # The order of the derivatives in the returned list has to be # identical to the order of the state variables contained in # the argument "state" return(list(c(dR, dN))) }) } bifurcation(model, state, parms) }
if(interactive()){ # The initial state of the system has to be specified as a named vector of state values. state <- c(R=1, N=0.01) # Parameters has to be specified as a named vector of parameters. parms <- c(r=1, K=1, a=1, c=1, delta=0.5) # The model has to be specified as a function that returns # the derivatives as a list. model <- function(t, state, parms) { with(as.list(c(state,parms)), { dR <- r*R*(1 - R/K) - a*R*N dN <- c*a*R*N - delta*N # The order of the derivatives in the returned list has to be # identical to the order of the state variables contained in # the argument "state" return(list(c(dR, dN))) }) } bifurcation(model, state, parms) }
deBifExample
deBifExample(example)
deBifExample(example)
example |
(string, optional) Name of the example. If not provided a list of examples is returned |
deBifExample(example)
Function runs one of the examples provided with the deBif package
None.
deBifHelp
opens the manual of the the deBif package in html format.
deBifHelp()
deBifHelp()
None.
if(interactive()){ deBifHelp() }
if(interactive()){ deBifHelp() }
deBifReset
unloads and reloads the deBif package.
deBifReset()
deBifReset()
None.
if(interactive()){ deBifReset() }
if(interactive()){ deBifReset() }
phaseplane
phaseplane(model, state, parms, resume = TRUE, ...)
phaseplane(model, state, parms, resume = TRUE, ...)
model |
(function, required) An R-function that computes the values of the derivatives in the ODE system (the model definition) at time t. The model must be defined as: model <- function(t, state, parms), where t is the current time point in the integration, state is the current value of the variables in the ODE #' system and parms is a vector or list of parameters. The return value of func should be a list, whose first and single element is a vector containing the derivatives of y with respect to time. The derivatives must be specified in the same order as the state variables state. The vector state and parms should both have name attributes for all their elements |
state |
(numeric vector, required) The initial (state) values for the ODE system. This vector should have name attributes for all its elements |
parms |
(numeric vector, required) The values of the parameters in the ODE system. This vector should have name attributes for all its elements |
resume |
(boolean, optional) If TRUE the program will try to load the curves computed during the last session from the global variable '<model>PhaseCurves' and try to restore the numerical and plot settings by importing them from the global variable '<model>PhaseSettings', where the substring '<model>' is the name of the function describing the dynamics, which is passed as first argument to 'bifurcation()'. The program saves the curves computed during a session and the numerical and plot settings of this last session in these global variables '<model>PhaseCurves' and '<model>PhaseSettings'. |
... |
(optional arguments) Additional arguments that can be included at the command line to tweak graphical default values used by the application. Valid arguments are:
|
phaseplane(model, state, parms, resume = TRUE, ...)
None.
if(interactive()){ # The initial state of the system has to be specified as a named vector of state values. state <- c(R=1, N=0.01) # Parameters has to be specified as a named vector of parameters. parms <- c(r=1, K=1, a=1, c=1, delta=0.5) # The model has to be specified as a function that returns # the derivatives as a list. model <- function(t, state, parms) { with(as.list(c(state,parms)), { dR <- r*R*(1 - R/K) - a*R*N dN <- c*a*R*N - delta*N # The order of the derivatives in the returned list has to be # identical to the order of the state variables contained in # the argument "state" return(list(c(dR, dN))) }) } phaseplane(model, state, parms) }
if(interactive()){ # The initial state of the system has to be specified as a named vector of state values. state <- c(R=1, N=0.01) # Parameters has to be specified as a named vector of parameters. parms <- c(r=1, K=1, a=1, c=1, delta=0.5) # The model has to be specified as a function that returns # the derivatives as a list. model <- function(t, state, parms) { with(as.list(c(state,parms)), { dR <- r*R*(1 - R/K) - a*R*N dN <- c*a*R*N - delta*N # The order of the derivatives in the returned list has to be # identical to the order of the state variables contained in # the argument "state" return(list(c(dR, dN))) }) } phaseplane(model, state, parms) }