modelMixedAlgebraicAndStatesArray

Cascaded first order block, where an element of a vector is algebraic and the other elements are states (arrays must be expanded)

Extends from Modelica.Icons.Example.

Information

This model is a variant of a set of cascaded first order blocks (model ScalableTestSuite.Elementary.SimpleODE.Models.CascadedFirstOrder) from the ScalableTestSuite. In this model element x[1] is an algebraic variable, whereas elements x[2:N] are states. Such a model can only be processed if arrays are expanded. However, it is easy to rewrite the model, for example, in the form BenchmarksForResizeableArrays.ForLoops.CascadedFirstOrder, so that it can be processed without array expansion.

In similar cases, you need to split the arrays in different pieces so that all elements of an array are either algebraic or states.

Parameters

TypeNameDefaultDescription
IntegerN3
Realtau0.1Time constant

Components

TypeNameDefaultDescription
Realu
Real[N]x

Revisions

  • 2025-05-02 by Hilding Elmqvist (Mogram AB): Initial version.

Copyright © 2025 Mogram AB