Modelica allows to have algorithm and initial algorithm sections in models. Their semantics is described here. In particular:
An algorithm section is treated as an atomic vector-equation, which is sorted together with all other equations. For the sorting process (BLT), every algorithm section with $N$ different left-hand side variables, is treated as an atomic $N$-dimensional vector-equation containing all variables appearing in the algorithm section. This guarantees that all $N$ equations end up in an algebraic loop and the statements of the algorithm section remain together.
Supporting algorithms in functions in principle requires the same functionality that would be required to support Modelica functions, whose behaviour is specified by algorithms, see #24.
Modelica allows to have algorithm and initial algorithm sections in models. Their semantics is described here. In particular:
Supporting algorithms in functions in principle requires the same functionality that would be required to support Modelica functions, whose behaviour is specified by algorithms, see #24.