orderEqualities

Method of mdss.

Reorder the model’s equality equations into differential, algebraic and other blocks.

Source: src/model/@mdss/orderEqualities.m

Syntax

sysnew = orderEqualities(sys)

Description

orderEqualities reorders the equality equations of the model so that:

  1. equations containing a state derivative (ẋ\dot{x}) come first,
  2. then algebraic (yy) equations,
  3. then all remaining equations.

Within each group, equations are ordered by the index of the first ẋ\dot{x} or yy variable they contain, read from the model’s incidence matrix. Each state derivative is matched to at most one equation (a greedy assignment in row order), so two equations cannot claim the same ẋ\dot{x}.

The classification is computed from incidenceMatrix, and the resulting row permutation is applied with permuteEqualities.

Input arguments

Argument Description
sys The mdss model whose equations are reordered.

Output arguments

Output Description
sysnew The mdss model with its equality equations reordered (differential, then algebraic, then other).

Example

sysnew = orderEqualities(sys);

See also

mdss · permuteEqualities · incidenceMatrix · determineParallizedSolvingOrder


MyToolbox Documentation | Generated automatically by CI/CD pipeline