Simulation object for a discrete-time mss model.
Source:
src/simulator/@discreteTimeMss/discreteTimeMss.m
discreteTimeMss is an mtiSimulator subclass
that carries out the simulation of a discrete-time mss model (one with a
non-zero timeStepSize). It is normally constructed by msim, which packs the
model, the initial state, the input trajectory and the solver options
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 recursion
with monomial vector
over the signal vector
and parameter split
.
Since the successor state is given explicitly, each step is a single
evaluation of the state equation — there is no implicit solve, no
tearing and no binary enumeration. This is the structural difference to
discreteTimeMdss,
which must solve for
at every sample and therefore carries the algebraic/binary guesses, the
solving order and the event bookkeeping that have no counterpart in this
case.
The constructor immediately calls simulate,
which begins the recursion from
over as many samples as inputTime has entries. Two
evaluation paths exist:
CPNTensor
model is compiled once into the MTISIM kernel form and the
whole horizon is run inside the MEX kernel in a single
call.mtiTensor (e.g. TTTensor) is marched in
a MATLAB loop, one call to computeFunctionValueMss per
sample.Both paths implement the same forward convention: input row
drives the step from
to
,
so the last row of inputTrajectory is never used. The
simulator does not resample: inputTime is expected to be
spaced by the model’s timeStepSize, and it is copied to
time unchanged.
| Property | Description |
|---|---|
mtiModel |
The discrete-time mss
/ mtiModel being
simulated. |
initialState |
Initial state vector
;
must have nState entries. |
inputTime |
Time samples of the input trajectory; step spacing should match
timeStepSize, and its length sets the number of simulated
samples. |
inputTrajectory |
Input values
,
one column per input, one row per input-time sample. There are
nInputs inputs. |
time |
Result: simulation time vector; identical to
inputTime. |
variableTrajectory |
Result: state trajectory
,
one row per state and one column per sample.
msim transposes it before returning it. |
functionTrajectory |
Result: recorded function values. Not populated by the
mss scheme. |
solverOptions |
Solver option struct. Stored for interface compatibility with the other simulators; the explicit recursion needs no solver. |
| Method | Description |
|---|---|
simulate |
March the recursion over the horizon given by
inputTime. |
msim · mss · continuousTimeMss
· discreteTimeMdss
MyToolbox Documentation | Generated automatically by CI/CD pipeline