Reformatted code.
Moved parameter assignment out of initial algorithm section to avoid division by zero in OpenModelica.
Changed test in assert statement as OpenModelica had an error when comparing enumerations with integers.
Added missing each keyword.