simulateNonHybrid

Method of continuousTimeMdss.

Integrate a non-hybrid mdss model as a DAE with ode15i.

Source: src/simulator/@continuousTimeMdss/simulateNonHybrid.m

What is solved

A non-hybrid model has no binaries and no inequalities, so it is a plain index-1 differential-algebraic system

0=F(ẋ,x,u(t),y)=Φeqm(ẋ,x,u,y), 0 = F(\dot x, x, u(t), y) = \Phi_{\mathrm{eq}}\, m(\dot x, x, u, y),

integrated with MATLAB’s fully-implicit ode15i. The solver state is w=[x;y]w=[x;\,y] with slope ẇ=[ẋ;ẏ]\dot w=[\dot x;\,\dot y]; the binary guess is empty and held fixed.

Residual and Jacobian handles

odeHandle returns FF at (ẇ,w,u(t))(\dot w, w, u(t)) with the inputs linearly interpolated. jacobiHandle returns the two blocks the fully-implicit solver needs:

Fw=[JF,xJF,y],Fẇ=[JF,ẋ0], \frac{\partial F}{\partial w} = \big[\,J_{F,x}\ \ J_{F,y}\,\big], \qquad \frac{\partial F}{\partial \dot w} = \big[\,J_{F,\dot x}\ \ 0\,\big],

the ẏ\dot y block being zero because algebraic variables are not differentiated. (The handles are referenced directly, not through anonymous wrappers, so the Jacobian reports nargout == 2 as ode15i requires.)

Consistent initial conditions

(ẋ0,y0,ẏ0)(\dot x_0, y_0, \dot y_0) are obtained from eventTotalDerivative with an empty event index (no mode enumeration); a non-zero algebraic guess is retried if the first attempt returns NaN/Inf. After applySolverOptions, solve runs over the input time span and the trajectory is stored in sim.time and sim.variableTrajectory; sim.eventTime is empty since there are no events.

Input arguments

Argument Description
sim The continuousTimeMdss object, with the model, initial state, input trajectory and solver options set.

Output arguments

Output Description
sim The same object with time and variableTrajectory filled in (eventTime empty — no events).

See also

continuousTimeMdss · eventTotalDerivative · jacobian · msim


MyToolbox Documentation | Generated automatically by CI/CD pipeline