ratmak: Create 'ratmak' (Rational Mass Action Kinetics) object

Description Usage Arguments Details Value See Also Examples

Description

This function creates an object of class ratmak (subclass of ode), which holds the basic information of the Rational Mass Action Kinetics system in question.

Usage

1
2
ratmak(A, C, s = solver(), r1 = NULL, r2 = NULL, rx0 = reg("none", lower
  = 0, upper = Inf, fixed = TRUE))

Arguments

A

The matrix of powers (bxd). Here d the number of species.

C

The stoichiometric coefficient matrix (rxd). Here r is the number of reactions.

s

solver object.

r1

An object of class reg giving info about how to regularise and bound the first parameter. If not provided, the default one is used.

r2

An object of class reg giving info about how to regularise and bound the second parameters. If not provided, the default one is used.

rx0

An object of class reg giving info about how to regularise and bound the initial state parameter. If not provided, the default one is used. This default reg sets fixed = TRUE, which is generally recommended.

Details

Rational Mass Action Kinetics is a class of ODE systems, having the following vector field:

\frac{dx}{dt} = C^T * (θ_1 * x^A) / (1 + θ_2 * x^A)

with x^A = (∏_{i=1}^dx_i^{A_{ji}})_{j=1}^b, θ_1 and θ_2 estimatable parameter matrices of dimension rxb. θ_2 is restricted to non-negative values. The fraction is entry-wise. By convention the theta's will only be reported as vectors (concatinated column-wise).

Value

An object with S3 class "ratmak" and "ode".

See Also

ode, numsolve, field

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# Rational mass action kinetics
A <- matrix(
c(1, 0, 0, 0,
  0, 1, 2, 0,
  1, 0, 0, 1), ncol = 4, byrow = TRUE)
x0 <- c(X = 1, Y = 4, Z = 0.1, W = 0.1)
time <- seq(0, 1, by = .1)

rmak <- ratmak(A, diag(4))

# Solve system
numsolve(o = rmak, time = time, x0 = x0,
  param = list(theta1 = t(A * 1:3),
      theta2 = t((A + 1) * 3:1)))

# Evaluate field
field(rmak, x0,
  param = list(theta1 = t(A * 1:3),
      theta2 = t((A + 1) * 3:1)))

episode documentation built on May 1, 2019, 11:17 p.m.