Pantelides Structural Index Reduction
Implementation: PantelidesEngine in packages/runtime/src/wasm/structural/pantelides.ts
Academic Citations
- Pantelides, C. C. (1988). "The consistent initialization of differential-algebraic systems."
SIAM Journal on Scientific and Statistical Computing, 9(2), pp. 213–231.
DOI: 10.1137/0909014 - Mattsson, S. E., & Söderlind, G. (1993). "Index reduction in differential-algebraic equations using dummy derivatives."
SIAM Journal on Scientific Computing, 14(3), pp. 677–692.
DOI: 10.1137/0914043
ModelScript Architectural Rationale
Object-oriented multi-domain physical models (such as constrained multi-body mechanics, closed kinematic linkages, and incompressible hydraulic loops) inherently generate high-index Differential-Algebraic Equations (DAEs) where the differential index satisfies
Standard numerical integrators (including BDF, Radau, and Runge-Kutta methods) become severely ill-conditioned or fail to converge on systems with differential index greater than 1.
Pantelides' algorithm identifies minimally singular subsets of equations and differentiates them analytically with respect to time until an index-1 or index-0 formulation is attained. To prevent over-determination and numerical drift along algebraic constraint manifolds, the Mattsson-Söderlind dummy derivative method dynamically replaces redundant derivative states with algebraic placeholders.
ModelScript Modifications & WASM Architecture
- In-WASM Linear Memory Execution: Operates as an unmanaged WebAssembly kernel (
@unmanaged) with zero garbage collection allocations. - Direct Arena Symbolic Differentiation: Derivatives of equations (
) are differentiated directly on DAEBuilderlinear expression nodes in memory. - Flat Chunked Arrays: Equation dependency incidence pointers, differentiation levels, and matching arrays are stored in flat
ChunkedInt32Arraybuffers. - Augmenting Path Bipartite Matching: Alternating path searches run directly over highest-derivative variables, passing matching data to the downstream
BltEngine.
Algorithm Description & Mathematics
Mathematical Steps
- Variable Classification: Identify highest-order derivatives
and purely algebraic variables . - Alternating Augmenting Paths: For each equation
, attempt to find an augmenting path in the bipartite incidence graph to an unmatched highest-order derivative. - Index Reduction by Differentiation: If no augmenting path exists, the reachable set of equations
is structurally singular. Increment the differentiation index for all , symbolically compute , and repeat the matching. - Dummy Derivatives: For each differentiated state variable where both
and appear in algebraic constraints, select a dummy algebraic variable to replace , preserving degrees of freedom.
Upstream & Downstream Pipeline Connections
- Upstream Inputs:
- Ingests the flat DAE representation from
DAEBuilderproduced byModelicaFlattener. - Uses
Cstlinear nodes for symbolic expressions.
- Ingests the flat DAE representation from
- Downstream Consumers:
- Feeds the index-reduced DAE directly into
BltEnginefor block lower triangular partitioning. - Determines consistent initial conditions for
SUNDIALS IDAandTR-BDF2.
- Feeds the index-reduced DAE directly into

