createEvents {ODEnetwork} | R Documentation |
Creates Events
Description
Creates functions for constant and linear events of the given ODEnetwork
to know when events have to be replaced or forced.
Usage
createEvents(odenet)
Arguments
odenet |
[ |
Value
an extended list of class [ODEnetwork
].
Examples
if (interactive()) {
masses <- 1
dampers <- as.matrix(1.5)
springs <- as.matrix(4)
odenet <- ODEnetwork(masses, dampers, springs)
eventdat <- data.frame( var = c("x.1", "x.1")
, time = c(1, 3)
, value = c(1, 3)
, stringsAsFactors = TRUE
)
odenet <- setState(odenet, 0, 0)
odenet <- setEvents(odenet, eventdat)
createEvents(odenet)
}
[Package ODEnetwork version 1.3.2 Index]