Method of discreteTimeMdss.
Solve one coupled subproblem for its continuous unknowns and its binary signals.
Source:
src/simulator/@discreteTimeMdss/solveSubProblemVariableZ.m
A coupled subproblem is a block of equations from the solving order that must be solved jointly. Its unknowns are some continuous signals (successor states and algebraic variables) and some binary signals . Let
The block must satisfy its equality rows and stay inequality-feasible:
where
is the parameter-matrix split and
is the norm-1 monomial vector — the running product obtained by folding
each known signal value into the columns of the structure matrix (the
update rule is described on solveStepBruteForce).
Each binary can only be or , so there are possible binary vectors. The method enumerates all of them, ordered by ascending Hamming distance to the current (fewest switched bits first, since a mode usually changes as little as possible):
For each candidate :
1. Fold into (the binaries are now known), leaving a continuous-only solve for .
2. Solve the block’s equality rows
for
,
according to the block’s type flag.
Linear (type = -1):
is affine,
,
solved by
,
with
Nonlinear (type = 0): lsqnonlin
(Levenberg–Marquardt) drives
using the analytic product-rule Jacobian.
3. Check inequality feasibility. The candidate is accepted as soon as
and its are written out.
(
are the true/false/continuous structure rows of unknown
.)
If no binary vector yields a feasible solution, a
No Solution found warning is raised.
This method is called by solveStepBruteForce
whenever a coupled subproblem contains binary signals.
[xp, y, z, G, F, EqXUZ] = solveSubProblemVariableZ(sys, solvingOrderSubProblem, EqXUZ, xpInit, yInit, y0, zInit)
— returns the updated successor-state row xp
(),
algebraic row y, binary row z, the subproblem
inequality/equality function values G, F, and
the running monomial vector EqXUZ
().
discreteTimeMdss
· solveStepBruteForce
· msim
MyToolbox Documentation | Generated automatically by CI/CD pipeline