estimateDistances {ODEnetwork} | R Documentation |
Estimate distances between oscillators
Description
Estimates the distances between the oscillators of a ODEnetwork
from an equilibrium state.
Usage
estimateDistances(
odenet,
equilibrium,
distGround = c("combined", "individual", "fixed", c("A", "B", "123", "A")),
optim.control = list()
)
Arguments
odenet |
[ODEnetwork ]
List of class ODEnetwork .
|
equilibrium |
[numeric(n) ]
The desired equilibrium positions of the oscillators.
|
distGround |
[character(1) ] or [character(n) ]
"combined" estimates one value for all distances of the oscillators to the ground.
Optimisation starts from median(equilibrium) .
"individual" estimates individual distance values for every oscillator.
Optimisation starts from equilibrium .
"fixed" no estimation of the distances to the ground.
Set to diagonal of distances matrix in ODEnetwork .
character(n) specifies groups of oscillators which distances to the ground are
estimated by the same value. Optimisation starts from median(equilibrium) of the
specified groups.
Default is "combined"
|
optim.control |
[list() ]
A list of control parameters for optim.
See optim .
|
Value
an extended list of class ODEnetwork
.
Matrix of distances is added or overwritten.
Examples
masses <- c(1, 1)
dampers <- diag(c(1, 1))
springs <- diag(c(1, 1))
springs[1, 2] <- 1
equilibrium <- c(1/3, 5/3)
odenet <- ODEnetwork(masses, dampers, springs)
estimateDistances(odenet, equilibrium)$distances
estimateDistances(odenet, equilibrium, distGround="individual")$distances
[Package
ODEnetwork version 1.3.2
Index]