discreteTimeMdss

Simulation object for a discrete-time mdss model.

Source: src/simulator/@discreteTimeMdss/discreteTimeMdss.m

Description

discreteTimeMdss is an mtiSimulator subclass that carries out the simulation of a discrete-time mdss 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, variableTrajectory and eventTime properties. Users are advised to call msim rather than build this object directly.

Each sample solves the implicit multilinear map for the successor state and the algebraic/binary signals,

Φeqm(xk+1,xk,uk,yk,zk)=0,Φineqm(xk+1,xk,uk,yk,zk)0, \Phi_{\mathrm{eq}}\, m(x_{k+1}, x_k, u_k, y_k, z_k) = 0, \qquad \Phi_{\mathrm{ineq}}\, m(x_{k+1}, x_k, u_k, y_k, z_k) \le 0,

with monomial vector mm and parameter split Φ=Φc+Φ+1Φ1\Phi=\Phi_c+\Phi_{+1}-\Phi_{-1}.

The constructor immediately calls discreteSimulation, which marches the model forward one sample at a time. Each step is a brute-force solve (solveStepBruteForce) that walks the model’s parallelized solving order, taking explicit variables directly and handing coupled subproblems (including any binary signals) to solveSubProblemVariableZ. The forward/backward discretizationType selects which input sample drives each step and where the resulting algebraic and binary values are stored.

Properties

Property Description
mtiModel The discrete-time mdss/mtiModel being simulated.
initialState Initial state vector x0x_0.
initialAlgebraicGuess Initial guess for the algebraic signals yy.
initialBinaryGuess Initial guess for the binary signals zz.
inputTime Time samples of the input trajectory; step spacing should match timeStepSize.
inputTrajectory Input values uu, one column per input, one row per input-time sample.
time Result: simulation time vector.
variableTrajectory Result: signals over time, ordered [x, y, z].
functionTrajectory Result: recorded function values (e.g. equality/inequality residuals).
eventTime Result: sample times (equal to time for a discrete run).
solverOptions Solver option struct; may carry a precomputed solvingOrder.

Methods

Method Description
discreteSimulation March the model forward sample by sample.
solveStepBruteForce Solve one time step, enumerating binary combinations per subproblem.
solveSubProblemVariableZ Solve a subproblem allowing the binaries to vary.

See also

msim · mdss · continuousTimeMdss


MyToolbox Documentation | Generated automatically by CI/CD pipeline