generator-polyPdmpModel-method: Generator

Description Usage Arguments Value Note Examples

Description

Compute the generator of a PDMP. The generator is defined as follows: Let Xₜ be a PDMP with statespace K x D where K ⊂ ℝᵏ and D is the state space for the discrete variable. Let furthermore φˢ(t,i,z) be the dynamics for the continous variables, s = 1,...,k and Λᵢⱼ(z) be the transition rates i → j for i,j ϵ D. Let z* be the new continous values after a jump from x := (i,z) to j. The generator for a function f: K x D → ℝᵏ lying in its domain is defined as

Q(f)(t,x) = Q(f)(t,i,z) := Σ φˢ(t,i,z) ∂f(i,z)/∂zₛ + Σ Λᵢⱼ(z)(f(j,z*) - f(i,z))

where the first sum goes from s = 1 to k and the second sums over all j ϵ D.

Usage

1
2
## S4 method for signature 'polyPdmpModel'
generator(obj)

Arguments

obj

an object of class polyPdmpModel.

Value

The generator Q of obj as defined above. This is a function which takes as argument a single polynomial f (represented as spray object). The variables of f represent the variables of the PDMP, given in the same order as the variables given in slot init(obj). The result Q(f) is a function with parameter discVar. As can be seen in the formula, the resulting polynomial Q(f)(i, z) depends on the value i of the discrete variable. The returned value of function Q(f) is a polynomial represented as spray object.

Note

Method generator only works for one discrete variable and this variable should be the last entry in slot init.

Examples

1
2
3
4
5
6
7
8
library(spray)
data("simplePoly")
g <- product(c(1,1))
generator(simplePoly)(g)(-1)

# comparison with theoretic solution:
Qg_theoretic <- product(c(2,0))-2*product(c(1,1))
identical(generator(simplePoly)(g)(1), subs(Qg_theoretic, 1, 1))

CharlotteJana/pdmppoly documentation built on Sept. 4, 2019, 4:40 p.m.