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
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | N | 3 | |
| Real | tau | 0.1 | Time constant |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Real | u | ||
| Real[N] | x |
Revisions
- 2025-05-02 by Hilding Elmqvist (Mogram AB): Initial version.
Copyright © 2025 Mogram AB