Skip to content

CollInt/ModelicaMixin: Avoid aliasing derivatives

Tjerk Vreeken requested to merge disallow-derivative-aliases into master

Aliasing of algebraic states to derivative states could result in common processing/methods failing. For example, when an algebraic state z is an alias of a derivative der(x), we could no longer ask for state_at("z") or state_vector("z").

To avoid these issues, this commit uses a new compiler option allow_derivative_aliases added in Pymoca 0.8.1. By setting it False, algebraic states are no longer aliased to derivative states when the compiler option detect_alias is set to True.

Merge request reports