rhs()#

ParametricContinuousModel.rhs(t, parameter, state, input_func=None)#

Evaluate the right-hand side of the model by applying each operator and summing the results.

This is the right-hand side of the model, i.e., the function \(\fhat(\qhat(t), \u(t); \bfmu)\) where the model is given by \(\ddt \qhat(t; \bfmu) = \fhat(\qhat(t), \u(t); \bfmu)\).

Parameters:
tfloat

Time \(t\), a scalar.

parameter(p,) ndarray

Parameter value \(\bfmu\).

state(r,) ndarray

State vector \(\qhat(t)\) corresponding to time t.

input_funccallable(float) -> (m,), or None

Input function that maps time t to the input vector \(\u(t)\).

Returns:
dqdt(r,) ndarray

Evaluation of the right-hand side of the model.

Notes

For repeated rhs() calls with the same parameter value, use evaluate() to first get the nonparametric model corresponding to the parameter value.

# Instead of this...
>>> values = [parametric_model.rhs(t, parameter, q, input_func)
...           for t, q in zip(times, states)]
# ...it is faster to do this.
>>> model_at_parameter = parametric_model.evaluate(parameter)
>>> values = [model_at_parameter.rhs(t, parameter, q, input_func)
...           for t, q in zip(times, states)]