Changed initial conditions to fixed.
Removed unrequired sum operator.
Corrected wrong StopTime annotation.
Changed assignment of X to avoid an error in OpenModelica.
Added missing each keyword.
Redesigned implementation to avoid mixing textual and graphical declaration in the equation section.

Restructured code. Moved non-essential models into the protected
section.
Changed initialization to FixedInitial, and cleaned up code.
Moved assignment of <code>startTime</code> to <code>initial algorithm</code> section.

This avoids an error in OpenModelica.
Corrected StopTime annotation and redeclaration statement.
Added missing each keyword and reformatted code.
Merge pull request #181 from lbl-srg/openmodelica

Merge OpenModelica to master.