GeneralModel: additional function to create Models

View source: R/GeneralModel.R

GeneralModelR Documentation

additional function to create Models

Description

In previous SoilR Version GeneralModel was the function to create linear models, a task now fulfilled by the function Model. To ensure backward compatibility this function remains as a wrapper. In future versions it might take on the role of an abstract factory that produces several classes of models (i.e autonomous or non-autonomous and linear or non-linear) depending on different combinations of arguments. It creates a Model object from any combination of arguments that can be converted into the required set of building blocks for a model for n arbitrarily connected pools.

Usage

GeneralModel(
  t,
  A,
  ivList,
  inputFluxes,
  solverfunc = deSolve.lsoda.wrapper,
  pass = FALSE,
  timeSymbol
)

Arguments

t

A vector containing the points in time where the solution is sought.

A

Anything that can be converted by GeneralDecompOp to any of the available DecompositionOperator classes

ivList

A vector containing the initial amount of carbon for the n pools. The length of this vector is equal to the number of pools and thus equal to the length of k. This is checked by an internal function.

inputFluxes

something that can be converted to any of the available InFluxes classes

solverfunc

The function used by to actually solve the ODE system. This can be deSolve.lsoda.wrapper or any other user provided function with the same interface.

pass

Forces the constructor to create the model even if it is invalid

timeSymbol

A string (character vector of length 1) identifying the variable name

Value

A model object that can be further queried.

See Also

TwopParallelModel, TwopSeriesModel, TwopFeedbackModel


SoilR documentation built on Oct. 13, 2023, 5:06 p.m.