<?xml version="1.0" encoding="UTF-8"?>
<Program:PROGRAM xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Class="http://www.openmodelica.org/openmodelica.abstract.syntax/Class" xmlns:ClassDef="http://www.openmodelica.org/openmodelica.abstract.syntax/ClassDef" xmlns:ClassPart="http://www.openmodelica.org/openmodelica.abstract.syntax/ClassPart" xmlns:Component="http://www.openmodelica.org/openmodelica.abstract.syntax/Component" xmlns:ComponentItem="http://www.openmodelica.org/openmodelica.abstract.syntax/ComponentItem" xmlns:Direction="http://www.openmodelica.org/openmodelica.abstract.syntax/Direction" xmlns:Element="http://www.openmodelica.org/openmodelica.abstract.syntax/Element" xmlns:ElementArg="http://www.openmodelica.org/openmodelica.unparsed/ElementArg" xmlns:ElementAttributes="http://www.openmodelica.org/openmodelica.abstract.syntax/ElementAttributes" xmlns:ElementItem="http://www.openmodelica.org/openmodelica.abstract.syntax/ElementItem" xmlns:ElementSpec="http://www.openmodelica.org/openmodelica.abstract.syntax/ElementSpec" xmlns:Equation="http://www.openmodelica.org/openmodelica.unparsed/Equation" xmlns:EquationItem="http://www.openmodelica.org/openmodelica.abstract.syntax/EquationItem" xmlns:Modifications="http://www.openmodelica.org/openmodelica.abstract.syntax/Modifications" xmlns:Path="http://www.openmodelica.org/openmodelica.abstract.syntax/Path" xmlns:Program="http://www.openmodelica.org/openmodelica.abstract.syntax/Program" xmlns:RedeclareKeywords="http://www.openmodelica.org/openmodelica.abstract.syntax/RedeclareKeywords" xmlns:Restriction="http://www.openmodelica.org/openmodelica.abstract.syntax/Restriction" xmlns:TypeSpec="http://www.openmodelica.org/openmodelica.abstract.syntax/TypeSpec" xmlns:Variability="http://www.openmodelica.org/openmodelica.abstract.syntax/Variability">
  <classes xsi:type="Class:CLASS" name="TwoTankExample">
    <body xsi:type="ClassDef:PARTS">
      <classParts xsi:type="ClassPart:PUBLIC">
        <contents xsi:type="ElementItem:ELEMENTITEM">
          <element xsi:type="Element:ELEMENT">
            <specification xsi:type="ElementSpec:CLASSDEF">
              <class_ xsi:type="Class:CLASS" name="ActSignal">
                <body xsi:type="ClassDef:PARTS">
                  <classParts xsi:type="ClassPart:PUBLIC">
                    <contents xsi:type="ElementItem:ELEMENTITEM">
                      <element xsi:type="Element:ELEMENT">
                        <specification xsi:type="ElementSpec:COMPONENTS">
                          <attributes xsi:type="ElementAttributes:ATTR">
                            <variability xsi:type="Variability:VAR"/>
                          </attributes>
                          <components xsi:type="ComponentItem:COMPONENTITEM">
                            <component xsi:type="Component:COMPONENT" name="act">
                              <modification xsi:type="Modifications:CLASSMOD">
                                <expOption/>
                              </modification>
                            </component>
                            <condition/>
                          </components>
                          <typeSpec xsi:type="TypeSpec:TPATH">
                            <path xsi:type="Path:IDENT" name="Real"/>
                          </typeSpec>
                        </specification>
                        <redeclareKeywords xsi:type="RedeclareKeywords:REPLACEABLE"/>
                      </element>
                    </contents>
                  </classParts>
                </body>
                <restriction xsi:type="Restriction:R_CONNECTOR"/>
              </class_>
            </specification>
          </element>
        </contents>
        <contents xsi:type="ElementItem:ELEMENTITEM">
          <element xsi:type="Element:ELEMENT">
            <specification xsi:type="ElementSpec:CLASSDEF">
              <class_ xsi:type="Class:CLASS" name="BaseController" partialPrefix="true">
                <body xsi:type="ClassDef:PARTS">
                  <classParts xsi:type="ClassPart:PUBLIC">
                    <contents xsi:type="ElementItem:ELEMENTITEM">
                      <element xsi:type="Element:ELEMENT">
                        <specification xsi:type="ElementSpec:COMPONENTS">
                          <attributes xsi:type="ElementAttributes:ATTR">
                            <variability xsi:type="Variability:PARAM"/>
                          </attributes>
                          <components xsi:type="ComponentItem:COMPONENTITEM">
                            <component xsi:type="Component:COMPONENT" name="K">
                              <modification xsi:type="Modifications:CLASSMOD">
                                <expOption unparsedExp="2"/>
                              </modification>
                            </component>
                            <condition/>
                          </components>
                          <typeSpec xsi:type="TypeSpec:TPATH">
                            <path xsi:type="Path:IDENT" name="Real"/>
                          </typeSpec>
                        </specification>
                        <redeclareKeywords xsi:type="RedeclareKeywords:REPLACEABLE"/>
                      </element>
                    </contents>
                    <contents xsi:type="ElementItem:ELEMENTITEM">
                      <element xsi:type="Element:ELEMENT">
                        <specification xsi:type="ElementSpec:COMPONENTS">
                          <attributes xsi:type="ElementAttributes:ATTR">
                            <variability xsi:type="Variability:PARAM"/>
                          </attributes>
                          <components xsi:type="ComponentItem:COMPONENTITEM">
                            <component xsi:type="Component:COMPONENT" name="T">
                              <modification xsi:type="Modifications:CLASSMOD">
                                <elementArgLst xsi:type="ElementArg:MODIFICATION" unparsedElementArg="unit = &quot;s&quot;"/>
                                <expOption unparsedExp="10"/>
                              </modification>
                            </component>
                            <condition/>
                          </components>
                          <typeSpec xsi:type="TypeSpec:TPATH">
                            <path xsi:type="Path:IDENT" name="Real"/>
                          </typeSpec>
                        </specification>
                        <redeclareKeywords xsi:type="RedeclareKeywords:REPLACEABLE"/>
                      </element>
                    </contents>
                    <contents xsi:type="ElementItem:ELEMENTITEM">
                      <element xsi:type="Element:ELEMENT">
                        <specification xsi:type="ElementSpec:COMPONENTS">
                          <attributes xsi:type="ElementAttributes:ATTR"/>
                          <components xsi:type="ComponentItem:COMPONENTITEM">
                            <component xsi:type="Component:COMPONENT" name="cIn">
                              <modification xsi:type="Modifications:CLASSMOD"/>
                            </component>
                            <condition/>
                          </components>
                          <typeSpec xsi:type="TypeSpec:TPATH">
                            <path xsi:type="Path:IDENT" name="ReadSignal"/>
                          </typeSpec>
                        </specification>
                        <redeclareKeywords xsi:type="RedeclareKeywords:REPLACEABLE"/>
                      </element>
                    </contents>
                    <contents xsi:type="ElementItem:ELEMENTITEM">
                      <element xsi:type="Element:ELEMENT">
                        <specification xsi:type="ElementSpec:COMPONENTS">
                          <attributes xsi:type="ElementAttributes:ATTR"/>
                          <components xsi:type="ComponentItem:COMPONENTITEM">
                            <component xsi:type="Component:COMPONENT" name="cOut">
                              <modification xsi:type="Modifications:CLASSMOD"/>
                            </component>
                            <condition/>
                          </components>
                          <typeSpec xsi:type="TypeSpec:TPATH">
                            <path xsi:type="Path:IDENT" name="ActSignal"/>
                          </typeSpec>
                        </specification>
                        <redeclareKeywords xsi:type="RedeclareKeywords:REPLACEABLE"/>
                      </element>
                    </contents>
                    <contents xsi:type="ElementItem:ELEMENTITEM">
                      <element xsi:type="Element:ELEMENT">
                        <specification xsi:type="ElementSpec:COMPONENTS">
                          <attributes xsi:type="ElementAttributes:ATTR">
                            <variability xsi:type="Variability:PARAM"/>
                          </attributes>
                          <components xsi:type="ComponentItem:COMPONENTITEM">
                            <component xsi:type="Component:COMPONENT" name="ref">
                              <modification xsi:type="Modifications:CLASSMOD">
                                <expOption/>
                              </modification>
                            </component>
                            <condition/>
                          </components>
                          <typeSpec xsi:type="TypeSpec:TPATH">
                            <path xsi:type="Path:IDENT" name="Real"/>
                          </typeSpec>
                        </specification>
                        <redeclareKeywords xsi:type="RedeclareKeywords:REPLACEABLE"/>
                      </element>
                    </contents>
                    <contents xsi:type="ElementItem:ELEMENTITEM">
                      <element xsi:type="Element:ELEMENT">
                        <specification xsi:type="ElementSpec:COMPONENTS">
                          <attributes xsi:type="ElementAttributes:ATTR">
                            <variability xsi:type="Variability:VAR"/>
                          </attributes>
                          <components xsi:type="ComponentItem:COMPONENTITEM">
                            <component xsi:type="Component:COMPONENT" name="error">
                              <modification xsi:type="Modifications:CLASSMOD">
                                <expOption/>
                              </modification>
                            </component>
                            <condition/>
                          </components>
                          <typeSpec xsi:type="TypeSpec:TPATH">
                            <path xsi:type="Path:IDENT" name="Real"/>
                          </typeSpec>
                        </specification>
                        <redeclareKeywords xsi:type="RedeclareKeywords:REPLACEABLE"/>
                      </element>
                    </contents>
                    <contents xsi:type="ElementItem:ELEMENTITEM">
                      <element xsi:type="Element:ELEMENT">
                        <specification xsi:type="ElementSpec:COMPONENTS">
                          <attributes xsi:type="ElementAttributes:ATTR">
                            <variability xsi:type="Variability:VAR"/>
                          </attributes>
                          <components xsi:type="ComponentItem:COMPONENTITEM">
                            <component xsi:type="Component:COMPONENT" name="outCtr">
                              <modification xsi:type="Modifications:CLASSMOD">
                                <expOption/>
                              </modification>
                            </component>
                            <condition/>
                          </components>
                          <typeSpec xsi:type="TypeSpec:TPATH">
                            <path xsi:type="Path:IDENT" name="Real"/>
                          </typeSpec>
                        </specification>
                        <redeclareKeywords xsi:type="RedeclareKeywords:REPLACEABLE"/>
                      </element>
                    </contents>
                  </classParts>
                  <classParts xsi:type="ClassPart:EQUATIONS">
                    <contents xsi:type="EquationItem:EQUATIONITEM">
                      <equation_ unparsedEquation="error = ref - cIn.val"/>
                    </contents>
                  </classParts>
                  <classParts xsi:type="ClassPart:EQUATIONS">
                    <contents xsi:type="EquationItem:EQUATIONITEM">
                      <equation_ unparsedEquation="cOut.act = outCtr"/>
                    </contents>
                  </classParts>
                </body>
                <restriction xsi:type="Restriction:R_MODEL"/>
              </class_>
            </specification>
          </element>
        </contents>
        <contents xsi:type="ElementItem:ELEMENTITEM">
          <element xsi:type="Element:ELEMENT">
            <specification xsi:type="ElementSpec:CLASSDEF">
              <class_ xsi:type="Class:CLASS" name="LiquidFlow">
                <body xsi:type="ClassDef:PARTS">
                  <classParts xsi:type="ClassPart:PUBLIC">
                    <contents xsi:type="ElementItem:ELEMENTITEM">
                      <element xsi:type="Element:ELEMENT">
                        <specification xsi:type="ElementSpec:COMPONENTS">
                          <attributes xsi:type="ElementAttributes:ATTR">
                            <variability xsi:type="Variability:VAR"/>
                          </attributes>
                          <components xsi:type="ComponentItem:COMPONENTITEM">
                            <component xsi:type="Component:COMPONENT" name="lflow">
                              <modification xsi:type="Modifications:CLASSMOD">
                                <elementArgLst xsi:type="ElementArg:MODIFICATION" unparsedElementArg="unit = &quot;m3/s&quot;"/>
                                <expOption/>
                              </modification>
                            </component>
                            <condition/>
                          </components>
                          <typeSpec xsi:type="TypeSpec:TPATH">
                            <path xsi:type="Path:IDENT" name="Real"/>
                          </typeSpec>
                        </specification>
                        <redeclareKeywords xsi:type="RedeclareKeywords:REPLACEABLE"/>
                      </element>
                    </contents>
                  </classParts>
                </body>
                <restriction xsi:type="Restriction:R_CONNECTOR"/>
              </class_>
            </specification>
          </element>
        </contents>
        <contents xsi:type="ElementItem:ELEMENTITEM">
          <element xsi:type="Element:ELEMENT">
            <specification xsi:type="ElementSpec:CLASSDEF">
              <class_ xsi:type="Class:CLASS" name="LiquidSource">
                <body xsi:type="ClassDef:PARTS">
                  <classParts xsi:type="ClassPart:PUBLIC">
                    <contents xsi:type="ElementItem:ELEMENTITEM">
                      <element xsi:type="Element:ELEMENT">
                        <specification xsi:type="ElementSpec:COMPONENTS">
                          <attributes xsi:type="ElementAttributes:ATTR"/>
                          <components xsi:type="ComponentItem:COMPONENTITEM">
                            <component xsi:type="Component:COMPONENT" name="qOut">
                              <modification xsi:type="Modifications:CLASSMOD"/>
                            </component>
                            <condition/>
                          </components>
                          <typeSpec xsi:type="TypeSpec:TPATH">
                            <path xsi:type="Path:IDENT" name="LiquidFlow"/>
                          </typeSpec>
                        </specification>
                        <redeclareKeywords xsi:type="RedeclareKeywords:REPLACEABLE"/>
                      </element>
                    </contents>
                    <contents xsi:type="ElementItem:ELEMENTITEM">
                      <element xsi:type="Element:ELEMENT">
                        <specification xsi:type="ElementSpec:COMPONENTS">
                          <attributes xsi:type="ElementAttributes:ATTR">
                            <variability xsi:type="Variability:PARAM"/>
                          </attributes>
                          <components xsi:type="ComponentItem:COMPONENTITEM">
                            <component xsi:type="Component:COMPONENT" name="flowLevel">
                              <modification xsi:type="Modifications:CLASSMOD">
                                <expOption unparsedExp="0.02"/>
                              </modification>
                            </component>
                            <condition/>
                          </components>
                          <typeSpec xsi:type="TypeSpec:TPATH">
                            <path xsi:type="Path:IDENT" name="Real"/>
                          </typeSpec>
                        </specification>
                        <redeclareKeywords xsi:type="RedeclareKeywords:REPLACEABLE"/>
                      </element>
                    </contents>
                  </classParts>
                  <classParts xsi:type="ClassPart:EQUATIONS">
                    <contents xsi:type="EquationItem:EQUATIONITEM">
                      <equation_ unparsedEquation="qOut.lflow = if time > 150 then 3*flowLevel else flowLevel"/>
                    </contents>
                  </classParts>
                </body>
                <restriction xsi:type="Restriction:R_MODEL"/>
              </class_>
            </specification>
          </element>
        </contents>
        <contents xsi:type="ElementItem:ELEMENTITEM">
          <element xsi:type="Element:ELEMENT">
            <specification xsi:type="ElementSpec:CLASSDEF">
              <class_ xsi:type="Class:CLASS" name="PIcontinuousController">
                <body xsi:type="ClassDef:PARTS">
                  <classParts xsi:type="ClassPart:PUBLIC">
                    <contents xsi:type="ElementItem:ELEMENTITEM">
                      <element xsi:type="Element:ELEMENT">
                        <specification xsi:type="ElementSpec:COMPONENTS">
                          <attributes xsi:type="ElementAttributes:ATTR">
                            <variability xsi:type="Variability:VAR"/>
                          </attributes>
                          <components xsi:type="ComponentItem:COMPONENTITEM">
                            <component xsi:type="Component:COMPONENT" name="x">
                              <modification xsi:type="Modifications:CLASSMOD">
                                <expOption/>
                              </modification>
                            </component>
                            <condition/>
                          </components>
                          <typeSpec xsi:type="TypeSpec:TPATH">
                            <path xsi:type="Path:IDENT" name="Real"/>
                          </typeSpec>
                        </specification>
                        <redeclareKeywords xsi:type="RedeclareKeywords:REPLACEABLE"/>
                      </element>
                    </contents>
                    <contents xsi:type="ElementItem:ELEMENTITEM">
                      <element xsi:type="Element:ELEMENT">
                        <specification xsi:type="ElementSpec:EXTENDS">
                          <path xsi:type="Path:IDENT" name="BaseController"/>
                          <elementArg xsi:type="ElementArg:MODIFICATION" unparsedElementArg="T = 10"/>
                          <elementArg xsi:type="ElementArg:MODIFICATION" unparsedElementArg="K = 2"/>
                        </specification>
                      </element>
                    </contents>
                  </classParts>
                  <classParts xsi:type="ClassPart:EQUATIONS">
                    <contents xsi:type="EquationItem:EQUATIONITEM">
                      <equation_ unparsedEquation="der(x) = error/T"/>
                    </contents>
                  </classParts>
                  <classParts xsi:type="ClassPart:EQUATIONS">
                    <contents xsi:type="EquationItem:EQUATIONITEM">
                      <equation_ unparsedEquation="outCtr = K*(error + x)"/>
                    </contents>
                  </classParts>
                </body>
                <restriction xsi:type="Restriction:R_MODEL"/>
              </class_>
            </specification>
          </element>
        </contents>
        <contents xsi:type="ElementItem:ELEMENTITEM">
          <element xsi:type="Element:ELEMENT">
            <specification xsi:type="ElementSpec:CLASSDEF">
              <class_ xsi:type="Class:CLASS" name="ReadSignal">
                <body xsi:type="ClassDef:PARTS">
                  <classParts xsi:type="ClassPart:PUBLIC">
                    <contents xsi:type="ElementItem:ELEMENTITEM">
                      <element xsi:type="Element:ELEMENT">
                        <specification xsi:type="ElementSpec:COMPONENTS">
                          <attributes xsi:type="ElementAttributes:ATTR">
                            <variability xsi:type="Variability:VAR"/>
                          </attributes>
                          <components xsi:type="ComponentItem:COMPONENTITEM">
                            <component xsi:type="Component:COMPONENT" name="val">
                              <modification xsi:type="Modifications:CLASSMOD">
                                <elementArgLst xsi:type="ElementArg:MODIFICATION" unparsedElementArg="unit = &quot;m&quot;"/>
                                <expOption/>
                              </modification>
                            </component>
                            <condition/>
                          </components>
                          <typeSpec xsi:type="TypeSpec:TPATH">
                            <path xsi:type="Path:IDENT" name="Real"/>
                          </typeSpec>
                        </specification>
                        <redeclareKeywords xsi:type="RedeclareKeywords:REPLACEABLE"/>
                      </element>
                    </contents>
                  </classParts>
                </body>
                <restriction xsi:type="Restriction:R_CONNECTOR"/>
              </class_>
            </specification>
          </element>
        </contents>
        <contents xsi:type="ElementItem:ELEMENTITEM">
          <element xsi:type="Element:ELEMENT">
            <specification xsi:type="ElementSpec:CLASSDEF">
              <class_ xsi:type="Class:CLASS" name="Tank">
                <body xsi:type="ClassDef:PARTS">
                  <classParts xsi:type="ClassPart:PUBLIC">
                    <contents xsi:type="ElementItem:ELEMENTITEM">
                      <element xsi:type="Element:ELEMENT">
                        <specification xsi:type="ElementSpec:COMPONENTS">
                          <attributes xsi:type="ElementAttributes:ATTR"/>
                          <components xsi:type="ComponentItem:COMPONENTITEM">
                            <component xsi:type="Component:COMPONENT" name="tSensor">
                              <modification xsi:type="Modifications:CLASSMOD"/>
                            </component>
                            <condition/>
                          </components>
                          <typeSpec xsi:type="TypeSpec:TPATH">
                            <path xsi:type="Path:IDENT" name="ReadSignal"/>
                          </typeSpec>
                        </specification>
                        <redeclareKeywords xsi:type="RedeclareKeywords:REPLACEABLE"/>
                      </element>
                    </contents>
                    <contents xsi:type="ElementItem:ELEMENTITEM">
                      <element xsi:type="Element:ELEMENT">
                        <specification xsi:type="ElementSpec:COMPONENTS">
                          <attributes xsi:type="ElementAttributes:ATTR"/>
                          <components xsi:type="ComponentItem:COMPONENTITEM">
                            <component xsi:type="Component:COMPONENT" name="tActuator">
                              <modification xsi:type="Modifications:CLASSMOD"/>
                            </component>
                            <condition/>
                          </components>
                          <typeSpec xsi:type="TypeSpec:TPATH">
                            <path xsi:type="Path:IDENT" name="ActSignal"/>
                          </typeSpec>
                        </specification>
                        <redeclareKeywords xsi:type="RedeclareKeywords:REPLACEABLE"/>
                      </element>
                    </contents>
                    <contents xsi:type="ElementItem:ELEMENTITEM">
                      <element xsi:type="Element:ELEMENT">
                        <specification xsi:type="ElementSpec:COMPONENTS">
                          <attributes xsi:type="ElementAttributes:ATTR"/>
                          <components xsi:type="ComponentItem:COMPONENTITEM">
                            <component xsi:type="Component:COMPONENT" name="qIn">
                              <modification xsi:type="Modifications:CLASSMOD"/>
                            </component>
                            <condition/>
                          </components>
                          <typeSpec xsi:type="TypeSpec:TPATH">
                            <path xsi:type="Path:IDENT" name="LiquidFlow"/>
                          </typeSpec>
                        </specification>
                        <redeclareKeywords xsi:type="RedeclareKeywords:REPLACEABLE"/>
                      </element>
                    </contents>
                    <contents xsi:type="ElementItem:ELEMENTITEM">
                      <element xsi:type="Element:ELEMENT">
                        <specification xsi:type="ElementSpec:COMPONENTS">
                          <attributes xsi:type="ElementAttributes:ATTR"/>
                          <components xsi:type="ComponentItem:COMPONENTITEM">
                            <component xsi:type="Component:COMPONENT" name="qOut">
                              <modification xsi:type="Modifications:CLASSMOD"/>
                            </component>
                            <condition/>
                          </components>
                          <typeSpec xsi:type="TypeSpec:TPATH">
                            <path xsi:type="Path:IDENT" name="LiquidFlow"/>
                          </typeSpec>
                        </specification>
                        <redeclareKeywords xsi:type="RedeclareKeywords:REPLACEABLE"/>
                      </element>
                    </contents>
                    <contents xsi:type="ElementItem:ELEMENTITEM">
                      <element xsi:type="Element:ELEMENT">
                        <specification xsi:type="ElementSpec:COMPONENTS">
                          <attributes xsi:type="ElementAttributes:ATTR">
                            <variability xsi:type="Variability:PARAM"/>
                          </attributes>
                          <components xsi:type="ComponentItem:COMPONENTITEM">
                            <component xsi:type="Component:COMPONENT" name="area">
                              <modification xsi:type="Modifications:CLASSMOD">
                                <elementArgLst xsi:type="ElementArg:MODIFICATION" unparsedElementArg="unit = &quot;m2&quot;"/>
                                <expOption unparsedExp="0.5"/>
                              </modification>
                            </component>
                            <condition/>
                          </components>
                          <typeSpec xsi:type="TypeSpec:TPATH">
                            <path xsi:type="Path:IDENT" name="Real"/>
                          </typeSpec>
                        </specification>
                        <redeclareKeywords xsi:type="RedeclareKeywords:REPLACEABLE"/>
                      </element>
                    </contents>
                    <contents xsi:type="ElementItem:ELEMENTITEM">
                      <element xsi:type="Element:ELEMENT">
                        <specification xsi:type="ElementSpec:COMPONENTS">
                          <attributes xsi:type="ElementAttributes:ATTR">
                            <variability xsi:type="Variability:PARAM"/>
                          </attributes>
                          <components xsi:type="ComponentItem:COMPONENTITEM">
                            <component xsi:type="Component:COMPONENT" name="flowGain">
                              <modification xsi:type="Modifications:CLASSMOD">
                                <elementArgLst xsi:type="ElementArg:MODIFICATION" unparsedElementArg="unit = &quot;m2/s&quot;"/>
                                <expOption unparsedExp="0.05"/>
                              </modification>
                            </component>
                            <condition/>
                          </components>
                          <typeSpec xsi:type="TypeSpec:TPATH">
                            <path xsi:type="Path:IDENT" name="Real"/>
                          </typeSpec>
                        </specification>
                        <redeclareKeywords xsi:type="RedeclareKeywords:REPLACEABLE"/>
                      </element>
                    </contents>
                    <contents xsi:type="ElementItem:ELEMENTITEM">
                      <element xsi:type="Element:ELEMENT">
                        <specification xsi:type="ElementSpec:COMPONENTS">
                          <attributes xsi:type="ElementAttributes:ATTR">
                            <variability xsi:type="Variability:PARAM"/>
                          </attributes>
                          <components xsi:type="ComponentItem:COMPONENTITEM">
                            <component xsi:type="Component:COMPONENT" name="minV">
                              <modification xsi:type="Modifications:CLASSMOD">
                                <expOption unparsedExp="0"/>
                              </modification>
                            </component>
                            <condition/>
                          </components>
                          <typeSpec xsi:type="TypeSpec:TPATH">
                            <path xsi:type="Path:IDENT" name="Real"/>
                          </typeSpec>
                        </specification>
                        <redeclareKeywords xsi:type="RedeclareKeywords:REPLACEABLE"/>
                      </element>
                    </contents>
                    <contents xsi:type="ElementItem:ELEMENTITEM">
                      <element xsi:type="Element:ELEMENT">
                        <specification xsi:type="ElementSpec:COMPONENTS">
                          <attributes xsi:type="ElementAttributes:ATTR">
                            <variability xsi:type="Variability:PARAM"/>
                          </attributes>
                          <components xsi:type="ComponentItem:COMPONENTITEM">
                            <component xsi:type="Component:COMPONENT" name="maxV">
                              <modification xsi:type="Modifications:CLASSMOD">
                                <expOption unparsedExp="10"/>
                              </modification>
                            </component>
                            <condition/>
                          </components>
                          <typeSpec xsi:type="TypeSpec:TPATH">
                            <path xsi:type="Path:IDENT" name="Real"/>
                          </typeSpec>
                        </specification>
                        <redeclareKeywords xsi:type="RedeclareKeywords:REPLACEABLE"/>
                      </element>
                    </contents>
                    <contents xsi:type="ElementItem:ELEMENTITEM">
                      <element xsi:type="Element:ELEMENT">
                        <specification xsi:type="ElementSpec:COMPONENTS">
                          <attributes xsi:type="ElementAttributes:ATTR">
                            <variability xsi:type="Variability:VAR"/>
                          </attributes>
                          <components xsi:type="ComponentItem:COMPONENTITEM">
                            <component xsi:type="Component:COMPONENT" name="h">
                              <modification xsi:type="Modifications:CLASSMOD">
                                <elementArgLst xsi:type="ElementArg:MODIFICATION" unparsedElementArg="start = 0.0"/>
                                <elementArgLst xsi:type="ElementArg:MODIFICATION" unparsedElementArg="unit = &quot;m&quot;"/>
                                <expOption/>
                              </modification>
                            </component>
                            <condition/>
                          </components>
                          <typeSpec xsi:type="TypeSpec:TPATH">
                            <path xsi:type="Path:IDENT" name="Real"/>
                          </typeSpec>
                        </specification>
                        <redeclareKeywords xsi:type="RedeclareKeywords:REPLACEABLE"/>
                      </element>
                    </contents>
                  </classParts>
                  <classParts xsi:type="ClassPart:EQUATIONS">
                    <contents xsi:type="EquationItem:EQUATIONITEM">
                      <equation_ unparsedEquation="der(h) = (qIn.lflow - qOut.lflow)/area"/>
                    </contents>
                  </classParts>
                  <classParts xsi:type="ClassPart:EQUATIONS">
                    <contents xsi:type="EquationItem:EQUATIONITEM">
                      <equation_ unparsedEquation="tSensor.val = h"/>
                    </contents>
                  </classParts>
                  <classParts xsi:type="ClassPart:EQUATIONS">
                    <contents xsi:type="EquationItem:EQUATIONITEM">
                      <equation_ unparsedEquation="assert(minV >= 0, &quot;minV - minimum Valve level must be  >= 0 &quot;);"/>
                    </contents>
                  </classParts>
                  <classParts xsi:type="ClassPart:EQUATIONS">
                    <contents xsi:type="EquationItem:EQUATIONITEM">
                      <equation_ unparsedEquation="qOut.lflow = limitValue(minV, maxV, -flowGain*tActuator.act)"/>
                    </contents>
                  </classParts>
                </body>
                <restriction xsi:type="Restriction:R_MODEL"/>
              </class_>
            </specification>
          </element>
        </contents>
        <contents xsi:type="ElementItem:ELEMENTITEM">
          <element xsi:type="Element:ELEMENT">
            <specification xsi:type="ElementSpec:CLASSDEF">
              <class_ xsi:type="Class:CLASS" name="TanksConnectedPI">
                <body xsi:type="ClassDef:PARTS">
                  <classParts xsi:type="ClassPart:PUBLIC">
                    <contents xsi:type="ElementItem:ELEMENTITEM">
                      <element xsi:type="Element:ELEMENT">
                        <specification xsi:type="ElementSpec:COMPONENTS">
                          <components xsi:type="ComponentItem:COMPONENTITEM">
                            <component xsi:type="Component:COMPONENT" name="source">
                              <modification xsi:type="Modifications:CLASSMOD">
                                <elementArgLst xsi:type="ElementArg:MODIFICATION" unparsedElementArg="flowLevel = 0.02"/>
                              </modification>
                            </component>
                            <condition/>
                          </components>
                          <typeSpec xsi:type="TypeSpec:TPATH">
                            <path xsi:type="Path:IDENT" name="LiquidSource"/>
                          </typeSpec>
                        </specification>
                        <redeclareKeywords xsi:type="RedeclareKeywords:REPLACEABLE"/>
                      </element>
                    </contents>
                    <contents xsi:type="ElementItem:ELEMENTITEM">
                      <element xsi:type="Element:ELEMENT">
                        <specification xsi:type="ElementSpec:COMPONENTS">
                          <components xsi:type="ComponentItem:COMPONENTITEM">
                            <component xsi:type="Component:COMPONENT" name="tank1">
                              <modification xsi:type="Modifications:CLASSMOD">
                                <elementArgLst xsi:type="ElementArg:MODIFICATION" unparsedElementArg="area = 1"/>
                              </modification>
                            </component>
                            <condition/>
                          </components>
                          <typeSpec xsi:type="TypeSpec:TPATH">
                            <path xsi:type="Path:IDENT" name="Tank"/>
                          </typeSpec>
                        </specification>
                        <redeclareKeywords xsi:type="RedeclareKeywords:REPLACEABLE"/>
                      </element>
                    </contents>
                    <contents xsi:type="ElementItem:ELEMENTITEM">
                      <element xsi:type="Element:ELEMENT">
                        <specification xsi:type="ElementSpec:COMPONENTS">
                          <components xsi:type="ComponentItem:COMPONENTITEM">
                            <component xsi:type="Component:COMPONENT" name="tank2">
                              <modification xsi:type="Modifications:CLASSMOD">
                                <elementArgLst xsi:type="ElementArg:MODIFICATION" unparsedElementArg="area = 1.3"/>
                              </modification>
                            </component>
                            <condition/>
                          </components>
                          <typeSpec xsi:type="TypeSpec:TPATH">
                            <path xsi:type="Path:IDENT" name="Tank"/>
                          </typeSpec>
                        </specification>
                        <redeclareKeywords xsi:type="RedeclareKeywords:REPLACEABLE"/>
                      </element>
                    </contents>
                    <contents xsi:type="ElementItem:ELEMENTITEM">
                      <element xsi:type="Element:ELEMENT">
                        <specification xsi:type="ElementSpec:COMPONENTS">
                          <components xsi:type="ComponentItem:COMPONENTITEM">
                            <component xsi:type="Component:COMPONENT" name="piContinuous1">
                              <modification xsi:type="Modifications:CLASSMOD">
                                <elementArgLst xsi:type="ElementArg:MODIFICATION" unparsedElementArg="ref = 0.25"/>
                              </modification>
                            </component>
                            <condition/>
                          </components>
                          <typeSpec xsi:type="TypeSpec:TPATH">
                            <path xsi:type="Path:IDENT" name="PIcontinuousController"/>
                          </typeSpec>
                        </specification>
                        <redeclareKeywords xsi:type="RedeclareKeywords:REPLACEABLE"/>
                      </element>
                    </contents>
                    <contents xsi:type="ElementItem:ELEMENTITEM">
                      <element xsi:type="Element:ELEMENT">
                        <specification xsi:type="ElementSpec:COMPONENTS">
                          <components xsi:type="ComponentItem:COMPONENTITEM">
                            <component xsi:type="Component:COMPONENT" name="piContinuous2">
                              <modification xsi:type="Modifications:CLASSMOD">
                                <elementArgLst xsi:type="ElementArg:MODIFICATION" unparsedElementArg="ref = 0.4"/>
                              </modification>
                            </component>
                            <condition/>
                          </components>
                          <typeSpec xsi:type="TypeSpec:TPATH">
                            <path xsi:type="Path:IDENT" name="PIcontinuousController"/>
                          </typeSpec>
                        </specification>
                        <redeclareKeywords xsi:type="RedeclareKeywords:REPLACEABLE"/>
                      </element>
                    </contents>
                  </classParts>
                  <classParts xsi:type="ClassPart:EQUATIONS">
                    <contents xsi:type="EquationItem:EQUATIONITEM">
                      <equation_ xsi:type="Equation:EQ_CONNECT" unparsedEquation="connect(tank1.tSensor,piContinuous1.cIn);"/>
                    </contents>
                  </classParts>
                  <classParts xsi:type="ClassPart:EQUATIONS">
                    <contents xsi:type="EquationItem:EQUATIONITEM">
                      <equation_ xsi:type="Equation:EQ_CONNECT" unparsedEquation="connect(tank2.tSensor,piContinuous2.cIn);"/>
                    </contents>
                  </classParts>
                  <classParts xsi:type="ClassPart:EQUATIONS">
                    <contents xsi:type="EquationItem:EQUATIONITEM">
                      <equation_ xsi:type="Equation:EQ_CONNECT" unparsedEquation="connect(tank1.tActuator,piContinuous1.cOut);"/>
                    </contents>
                  </classParts>
                  <classParts xsi:type="ClassPart:EQUATIONS">
                    <contents xsi:type="EquationItem:EQUATIONITEM">
                      <equation_ xsi:type="Equation:EQ_CONNECT" unparsedEquation="connect(source.qOut,tank1.qIn);"/>
                    </contents>
                  </classParts>
                  <classParts xsi:type="ClassPart:EQUATIONS">
                    <contents xsi:type="EquationItem:EQUATIONITEM">
                      <equation_ xsi:type="Equation:EQ_CONNECT" unparsedEquation="connect(tank1.qOut,tank2.qIn);"/>
                    </contents>
                  </classParts>
                  <classParts xsi:type="ClassPart:EQUATIONS">
                    <contents xsi:type="EquationItem:EQUATIONITEM">
                      <equation_ xsi:type="Equation:EQ_CONNECT" unparsedEquation="connect(tank2.tActuator,piContinuous2.cOut);"/>
                    </contents>
                  </classParts>
                </body>
                <restriction xsi:type="Restriction:R_MODEL"/>
              </class_>
            </specification>
          </element>
        </contents>
        <contents xsi:type="ElementItem:ELEMENTITEM">
          <element xsi:type="Element:ELEMENT">
            <specification xsi:type="ElementSpec:CLASSDEF">
              <class_ xsi:type="Class:CLASS" name="limitValue">
                <body xsi:type="ClassDef:PARTS">
                  <classParts xsi:type="ClassPart:PUBLIC">
                    <contents xsi:type="ElementItem:ELEMENTITEM">
                      <element xsi:type="Element:ELEMENT">
                        <specification xsi:type="ElementSpec:COMPONENTS">
                          <attributes xsi:type="ElementAttributes:ATTR">
                            <variability xsi:type="Variability:VAR"/>
                            <direction xsi:type="Direction:INPUT"/>
                          </attributes>
                          <components xsi:type="ComponentItem:COMPONENTITEM">
                            <component xsi:type="Component:COMPONENT" name="pMin">
                              <modification xsi:type="Modifications:CLASSMOD">
                                <expOption/>
                              </modification>
                            </component>
                          </components>
                          <typeSpec xsi:type="TypeSpec:TPATH">
                            <path xsi:type="Path:IDENT" name="Real"/>
                          </typeSpec>
                        </specification>
                        <redeclareKeywords xsi:type="RedeclareKeywords:REPLACEABLE"/>
                      </element>
                    </contents>
                    <contents xsi:type="ElementItem:ELEMENTITEM">
                      <element xsi:type="Element:ELEMENT">
                        <specification xsi:type="ElementSpec:COMPONENTS">
                          <attributes xsi:type="ElementAttributes:ATTR">
                            <variability xsi:type="Variability:VAR"/>
                            <direction xsi:type="Direction:INPUT"/>
                          </attributes>
                          <components xsi:type="ComponentItem:COMPONENTITEM">
                            <component xsi:type="Component:COMPONENT" name="pMax">
                              <modification xsi:type="Modifications:CLASSMOD">
                                <expOption/>
                              </modification>
                            </component>
                          </components>
                          <typeSpec xsi:type="TypeSpec:TPATH">
                            <path xsi:type="Path:IDENT" name="Real"/>
                          </typeSpec>
                        </specification>
                        <redeclareKeywords xsi:type="RedeclareKeywords:REPLACEABLE"/>
                      </element>
                    </contents>
                    <contents xsi:type="ElementItem:ELEMENTITEM">
                      <element xsi:type="Element:ELEMENT">
                        <specification xsi:type="ElementSpec:COMPONENTS">
                          <attributes xsi:type="ElementAttributes:ATTR">
                            <variability xsi:type="Variability:VAR"/>
                            <direction xsi:type="Direction:INPUT"/>
                          </attributes>
                          <components xsi:type="ComponentItem:COMPONENTITEM">
                            <component xsi:type="Component:COMPONENT" name="p">
                              <modification xsi:type="Modifications:CLASSMOD">
                                <expOption/>
                              </modification>
                            </component>
                          </components>
                          <typeSpec xsi:type="TypeSpec:TPATH">
                            <path xsi:type="Path:IDENT" name="Real"/>
                          </typeSpec>
                        </specification>
                        <redeclareKeywords xsi:type="RedeclareKeywords:REPLACEABLE"/>
                      </element>
                    </contents>
                    <contents xsi:type="ElementItem:ELEMENTITEM">
                      <element xsi:type="Element:ELEMENT">
                        <specification xsi:type="ElementSpec:COMPONENTS">
                          <attributes xsi:type="ElementAttributes:ATTR">
                            <variability xsi:type="Variability:VAR"/>
                            <direction xsi:type="Direction:OUTPUT"/>
                          </attributes>
                          <components xsi:type="ComponentItem:COMPONENTITEM">
                            <component xsi:type="Component:COMPONENT" name="pLim">
                              <modification xsi:type="Modifications:CLASSMOD">
                                <expOption/>
                              </modification>
                            </component>
                          </components>
                          <typeSpec xsi:type="TypeSpec:TPATH">
                            <path xsi:type="Path:IDENT" name="Real"/>
                          </typeSpec>
                        </specification>
                        <redeclareKeywords xsi:type="RedeclareKeywords:REPLACEABLE"/>
                      </element>
                    </contents>
                  </classParts>
                  <classParts xsi:type="ClassPart:ALGORITHMS">
                    <contents unparsedAlgorithmItem="pLim := if p > pMax then pMax else if p &lt; pMin then pMin else p;"/>
                  </classParts>
                </body>
                <restriction xsi:type="Restriction:R_FUNCTION"/>
              </class_>
            </specification>
          </element>
        </contents>
      </classParts>
    </body>
    <restriction xsi:type="Restriction:R_PACKAGE"/>
  </classes>
</Program:PROGRAM>
