Simulation object for a continuous-time mss model.
Source:
src/simulator/@continuousTimeMss/continuousTimeMss.m
continuousTimeMss is an mtiSimulator subclass
that carries out the simulation of a continuous-time mss model (one whose
timeStepSize == 0). It is normally constructed by msim, which packs the
model, the initial state, the input trajectory, the solver options and
the solver name into the object, runs the simulation in the constructor,
and reads the results back from the time and
variableTrajectory properties. Users are advised to call
msim rather than build this object directly.
The model is the explicit multilinear state-space system
with monomial vector
over the signal vector
and parameter split
.
Because an mss is explicit and carries neither algebraic
nor binary signals, there is nothing to solve implicitly and no
switching surface to detect: the constructor always takes the same route
and hands the state equation to a plain ODE integrator in simulate.
This is the structural difference to continuousTimeMdss,
which must dispatch between a DAE solver and an event-driven hybrid
solver and therefore carries initialAlgebraicGuess,
initialBinaryGuess and eventTime properties
that have no counterpart here.
What is dispatched is the evaluation path and the integrator:
solverType names the MATLAB
solver used to build the ode object ("ode45"
when msim is called
without one). Explicit Runge–Kutta solvers (ode45,
ode23, ode78, ode89,
ode113) never evaluate a Jacobian, so none is attached for
them; every other solver (e.g. ode15s, ode23t)
gets an analytic Jacobian handle.CPNTensor which takes
the compiled hot path: the state-equation block is compiled once into
the MTISIM kernel form and evaluated there on every solver
stage. Any other mtiTensor (e.g. TTTensor) is evaluated
through the model’s own functionValue
and stateJacobian
methods.The simulator integrates the state equation only. The output equation
is not evaluated here — msim computes
from the returned state trajectory, and only when a third output
argument is requested.
| Property | Description |
|---|---|
mtiModel |
The continuous-time mss / mtiModel being
simulated. |
initialState |
Initial state vector
;
must have nState entries. |
inputTime |
Time samples of the input trajectory; its first and last entry define the integration time span. |
inputTrajectory |
Input values
,
one column per input, one row per input-time sample. Interpolated
linearly (with linear extrapolation) at the times the solver asks for.
There are nInputs inputs. |
time |
Result: simulation time vector, i.e. the time grid chosen by the solver. |
variableTrajectory |
Result: state trajectory
,
one row per state and one column per entry of
time. msim transposes it before returning
it. |
functionTrajectory |
Result: recorded function values. Not populated by the
mss scheme. |
solverOptions |
Solver option struct passed through to applySolverOptions;
[] uses the defaults. |
solverType |
Name of the MATLAB ODE solver to use, e.g. "ode45",
"ode15s". Also decides whether a Jacobian is supplied. |
| Method | Description |
|---|---|
simulate |
Integrate the state equation over the input time span with the selected solver. |
msim · mss · discreteTimeMss
· applySolverOptions
· continuousTimeMdss
MyToolbox Documentation | Generated automatically by CI/CD pipeline