<?xml version="1.0" standalone="no"?>
<!DOCTYPE entity PUBLIC "-//UC Berkeley//DTD MoML 1//EN"
    "http://ptolemy.eecs.berkeley.edu/xml/dtd/MoML_1.dtd">
<entity name="power_window_fulladapt" class="ptolemy.actor.TypedCompositeActor">
    <property name="_createdBy" class="ptolemy.kernel.attributes.VersionAttribute" value="8.0.1_20101021">
    </property>
    <property name="DE Director" class="ptolemy.domains.de.kernel.DEDirector">
        <property name="stopTime" class="ptolemy.data.expr.Parameter" value="17.0">
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[30.0, 20.0]">
        </property>
    </property>
    <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={0, 93, 1935, 957}, maximized=false}">
    </property>
    <property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[1722, 847]">
    </property>
    <property name="_vergilZoomFactor" class="ptolemy.data.expr.ExpertParameter" value="1.4861943644688">
    </property>
    <property name="_vergilCenter" class="ptolemy.data.expr.ExpertParameter" value="{555.48828125, 198.9559991107729}">
    </property>
    <property name="Annotation" class="ptolemy.vergil.kernel.attributes.TextAttribute">
        <property name="textSize" class="ptolemy.data.expr.Parameter" value="12">
        </property>
        <property name="text" class="ptolemy.kernel.util.StringAttribute" value="Model of the power window with explicit adaptation &#10;between DE (global model) and SDF (window model)&#10;&#10;The SDF sampling clock handles the adaptation &#10;of time and control for the SDF window model (blue zone).&#10;&#10;The Signal2Event blocks produce a DE event only when &#10;the value of SDF signal changes.&#10;">
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[745.0, 210.0]">
        </property>
    </property>
    <property name="signalName" class="ptolemy.data.expr.Parameter" value="&quot;position&quot;">
    </property>
    <property name="offset" class="ptolemy.data.expr.Parameter" value="0">
        <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
        </property>
    </property>
    <property name="Rectangle" class="ptolemy.vergil.kernel.attributes.RectangleAttribute">
        <property name="_location" class="ptolemy.kernel.util.Location" value="[320.0, 133.0]">
        </property>
        <property name="width" class="ptolemy.data.expr.Parameter" value="86.0">
        </property>
        <property name="height" class="ptolemy.data.expr.Parameter" value="176.0">
        </property>
        <property name="centered" class="ptolemy.data.expr.Parameter" value="true">
        </property>
        <property name="fillColor" class="ptolemy.actor.gui.ColorAttribute" value="{0.0,0.8,0.8,1.0}">
        </property>
        <property name="rounding" class="ptolemy.data.expr.Parameter" value="5.0">
        </property>
        <property name="_renderFirst" class="ptolemy.kernel.util.SingletonAttribute">
        </property>
    </property>
    <property name="Annotation2" class="ptolemy.vergil.kernel.attributes.TextAttribute">
        <property name="textSize" class="ptolemy.data.expr.Parameter" value="10">
        </property>
        <property name="textColor" class="ptolemy.actor.gui.ColorAttribute" value="{0.2,0.6,0.0,1.0}">
        </property>
        <property name="text" class="ptolemy.kernel.util.StringAttribute" value="Signals:&#10;* position = position of the window (0 = open, 5 = fully closed)&#10;* command = command from the use (0 = stop, -1 = open, 1 = close)&#10;* endStop = event produced when the window is either completely open or completely closed">
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[165.0, -85.0]">
        </property>
    </property>
    <property name="Rectangle2" class="ptolemy.vergil.kernel.attributes.RectangleAttribute">
        <property name="_location" class="ptolemy.kernel.util.Location" value="[540.0, 115.0]">
        </property>
        <property name="width" class="ptolemy.data.expr.Parameter" value="95.0">
        </property>
        <property name="height" class="ptolemy.data.expr.Parameter" value="161.0">
        </property>
        <property name="centered" class="ptolemy.data.expr.Parameter" value="true">
        </property>
        <property name="fillColor" class="ptolemy.actor.gui.ColorAttribute" value="{1.0,0.8,0.0,1.0}">
        </property>
        <property name="rounding" class="ptolemy.data.expr.Parameter" value="5.0">
        </property>
        <property name="_renderFirst" class="ptolemy.kernel.util.SingletonAttribute">
        </property>
    </property>
    <entity name="TimedPlotter" class="ptolemy.actor.lib.gui.TimedPlotter">
        <property name="legend" class="ptolemy.kernel.util.StringAttribute" value="position, command, endStop">
        </property>
        <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={464, 22, 1186, 714}, maximized=false}">
        </property>
        <property name="_plotSize" class="ptolemy.actor.gui.SizeAttribute" value="[1186, 670]">
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[955.0, 135.0]">
        </property>
        <configure>
<?plotml <!DOCTYPE plot PUBLIC "-//UC Berkeley//DTD PlotML 1//EN"
"http://ptolemy.eecs.berkeley.edu/xml/dtd/PlotML_1.dtd">
<plot>
<title>TimedPlotter</title>
<caption></caption>
<xLabel></xLabel>
<yLabel></yLabel>
<xRange min="0.0" max="14.0"/>
<yRange min="-1.0" max="5.0"/>
<default marks="bigdots"/>
</plot>?>
        </configure>
    </entity>
    <entity name="Controler" class="ptolemy.domains.modal.modal.ModalModel">
        <property name="_tableauFactory" class="ptolemy.vergil.modal.modal.ModalTableauFactory">
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[190.0, 95.0]">
        </property>
        <port name="command" class="ptolemy.domains.modal.modal.ModalPort">
            <property name="input"/>
        </port>
        <port name="power" class="ptolemy.domains.modal.modal.ModalPort">
            <property name="output"/>
        </port>
        <port name="endStop" class="ptolemy.domains.modal.modal.ModalPort">
            <property name="input"/>
        </port>
        <port name="timeDelay" class="ptolemy.domains.modal.modal.ModalPort">
            <property name="output"/>
        </port>
        <entity name="_Controller" class="ptolemy.domains.modal.modal.ModalController">
            <property name="_library" class="ptolemy.moml.LibraryAttribute">
                <configure>
      <entity name="state library" class="ptolemy.kernel.CompositeEntity"><input source="ptolemy/configs/basicUtilities.xml"></input><entity name="state" class="ptolemy.domains.modal.kernel.State"><property name="_centerName" class="ptolemy.kernel.util.Attribute"></property><property name="_controllerFactory" class="ptolemy.vergil.modal.modal.HierarchicalStateControllerFactory"></property></entity></entity>
    </configure>
            </property>
            <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={681, 215, 1198, 1009}, maximized=false}">
            </property>
            <property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[985, 898]">
            </property>
            <property name="_vergilZoomFactor" class="ptolemy.data.expr.ExpertParameter" value="0.9879032924519">
            </property>
            <property name="_vergilCenter" class="ptolemy.data.expr.ExpertParameter" value="{71.5264966560133, 63.5302611071656}">
            </property>
            <property name="Annotation" class="ptolemy.vergil.kernel.attributes.TextAttribute">
                <property name="textSize" class="ptolemy.data.expr.Parameter" value="12">
                </property>
                <property name="text" class="ptolemy.kernel.util.StringAttribute" value="Model of the controler&#10;&#10;Manual and automatic modes:&#10;  - if the user hold the button for less than 0.5s, the window goes into automatic mode, else it goes into manual mode&#10;">
                </property>
                <property name="_location" class="ptolemy.kernel.util.Location" value="[-280.0, 335.0]">
                </property>
            </property>
            <property name="autoTime" class="ptolemy.data.expr.Parameter" value="0.5">
                <property name="_hideName" class="ptolemy.kernel.util.SingletonAttribute">
                </property>
                <property name="_icon" class="ptolemy.vergil.icon.ValueIcon">
                    <property name="_color" class="ptolemy.actor.gui.ColorAttribute" value="{0.0, 0.0, 1.0, 1.0}">
                    </property>
                </property>
                <property name="_smallIconDescription" class="ptolemy.kernel.util.SingletonConfigurableAttribute">
                    <configure>
      <svg>
        <text x="20" style="font-size:14; font-family:SansSerif; fill:blue" y="20">-P-</text>
      </svg>
    </configure>
                </property>
                <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
                </property>
                <property name="_location" class="ptolemy.kernel.util.Location" value="{460, -160}">
                </property>
            </property>
            <property name="Annotation2" class="ptolemy.vergil.kernel.attributes.TextAttribute">
                <property name="textSize" class="ptolemy.data.expr.Parameter" value="12">
                </property>
                <property name="text" class="ptolemy.kernel.util.StringAttribute" value="Note: the delay in the Up and GoDown states is necessary so that the controller ignores temporarily&#10;the endStop signal which is present when the window starts from the fully closed or open positions.">
                </property>
                <property name="_location" class="ptolemy.kernel.util.Location" value="[-280.0, 445.0]">
                </property>
            </property>
            <port name="command" class="ptolemy.domains.modal.modal.RefinementPort">
                <property name="input"/>
                <property name="_location" class="ptolemy.kernel.util.Location" value="[-330.0, -205.0]">
                </property>
            </port>
            <port name="power" class="ptolemy.domains.modal.modal.RefinementPort">
                <property name="input"/>
                <property name="output"/>
                <property name="_location" class="ptolemy.kernel.util.Location" value="[385.0, -225.0]">
                </property>
            </port>
            <port name="endStop" class="ptolemy.domains.modal.modal.RefinementPort">
                <property name="input"/>
                <property name="_location" class="ptolemy.kernel.util.Location" value="[-330.0, -165.0]">
                </property>
            </port>
            <port name="timeDelay" class="ptolemy.domains.modal.modal.RefinementPort">
                <property name="input"/>
                <property name="output"/>
                <property name="_location" class="ptolemy.kernel.util.Location" value="[355.0, -250.0]">
                </property>
            </port>
            <entity name="Stop" class="ptolemy.domains.modal.kernel.State">
                <property name="isInitialState" class="ptolemy.data.expr.Parameter" value="false">
                </property>
                <property name="_hideName" class="ptolemy.data.expr.SingletonParameter" value="true">
                </property>
                <property name="_controllerFactory" class="ptolemy.vergil.modal.modal.HierarchicalStateControllerFactory">
                </property>
                <property name="_location" class="ptolemy.kernel.util.Location" value="[-105.0, -25.0]">
                </property>
            </entity>
            <entity name="Up" class="ptolemy.domains.modal.kernel.State">
                <property name="refinementName" class="ptolemy.kernel.util.StringAttribute" value="Up">
                </property>
                <property name="_hideName" class="ptolemy.data.expr.SingletonParameter" value="true">
                </property>
                <property name="_controllerFactory" class="ptolemy.vergil.modal.modal.HierarchicalStateControllerFactory">
                </property>
                <property name="_location" class="ptolemy.kernel.util.Location" value="[-30.0, -185.0]">
                </property>
            </entity>
            <entity name="DownManu" class="ptolemy.domains.modal.kernel.State">
                <property name="_hideName" class="ptolemy.data.expr.SingletonParameter" value="true">
                </property>
                <property name="_controllerFactory" class="ptolemy.vergil.modal.modal.HierarchicalStateControllerFactory">
                </property>
                <property name="_location" class="ptolemy.kernel.util.Location" value="[65.0, 55.0]">
                </property>
            </entity>
            <entity name="UpAuto" class="ptolemy.domains.modal.kernel.State">
                <property name="_hideName" class="ptolemy.data.expr.SingletonParameter" value="true">
                </property>
                <property name="_controllerFactory" class="ptolemy.vergil.modal.modal.HierarchicalStateControllerFactory">
                </property>
                <property name="_location" class="ptolemy.kernel.util.Location" value="[200.0, -190.0]">
                </property>
            </entity>
            <entity name="UpManu" class="ptolemy.domains.modal.kernel.State">
                <property name="_hideName" class="ptolemy.data.expr.SingletonParameter" value="true">
                </property>
                <property name="_controllerFactory" class="ptolemy.vergil.modal.modal.HierarchicalStateControllerFactory">
                </property>
                <property name="_location" class="ptolemy.kernel.util.Location" value="[60.0, -135.0]">
                </property>
            </entity>
            <entity name="init" class="ptolemy.domains.modal.kernel.State">
                <property name="isInitialState" class="ptolemy.data.expr.Parameter" value="true">
                </property>
                <property name="_hideName" class="ptolemy.data.expr.SingletonParameter" value="true">
                </property>
                <property name="_controllerFactory" class="ptolemy.vergil.modal.modal.HierarchicalStateControllerFactory">
                </property>
                <property name="_location" class="ptolemy.kernel.util.Location" value="[-250.0, -25.0]">
                </property>
            </entity>
            <entity name="Down" class="ptolemy.domains.modal.kernel.State">
                <property name="refinementName" class="ptolemy.kernel.util.StringAttribute" value="GoDown">
                </property>
                <property name="_hideName" class="ptolemy.data.expr.SingletonParameter" value="true">
                </property>
                <property name="_controllerFactory" class="ptolemy.vergil.modal.modal.HierarchicalStateControllerFactory">
                </property>
                <property name="_location" class="ptolemy.kernel.util.Location" value="[-40.0, 105.0]">
                </property>
            </entity>
            <entity name="DownAuto" class="ptolemy.domains.modal.kernel.State">
                <property name="_hideName" class="ptolemy.data.expr.SingletonParameter" value="true">
                </property>
                <property name="_controllerFactory" class="ptolemy.vergil.modal.modal.HierarchicalStateControllerFactory">
                </property>
                <property name="_location" class="ptolemy.kernel.util.Location" value="[205.0, 170.0]">
                </property>
            </entity>
            <relation name="relation" class="ptolemy.domains.modal.kernel.Transition">
                <property name="guardExpression" class="ptolemy.kernel.util.StringAttribute" value="command_isPresent &amp;&amp; command == 1">
                </property>
                <property name="outputActions" class="ptolemy.domains.modal.kernel.OutputActionsAttribute" value="power = 1">
                </property>
                <property name="exitAngle" class="ptolemy.data.expr.Parameter" value="-0.6346419107170251">
                </property>
                <property name="gamma" class="ptolemy.data.expr.Parameter" value="-0.6164267719301637">
                </property>
                <property name="reset" class="ptolemy.data.expr.Parameter" value="true">
                </property>
            </relation>
            <relation name="relation2" class="ptolemy.domains.modal.kernel.Transition">
                <property name="guardExpression" class="ptolemy.kernel.util.StringAttribute" value="command_isPresent &amp;&amp; command == -1">
                </property>
                <property name="outputActions" class="ptolemy.domains.modal.kernel.OutputActionsAttribute" value="power = -1">
                </property>
                <property name="exitAngle" class="ptolemy.data.expr.Parameter" value="0.6283185307179586">
                    <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
                    </property>
                </property>
                <property name="gamma" class="ptolemy.data.expr.Parameter" value="2.039779146634266">
                </property>
                <property name="reset" class="ptolemy.data.expr.Parameter" value="true">
                </property>
            </relation>
            <relation name="relation3" class="ptolemy.domains.modal.kernel.Transition">
                <property name="guardExpression" class="ptolemy.kernel.util.StringAttribute" value="endStop_isPresent || (command_isPresent &amp;&amp; command == 0)">
                </property>
                <property name="outputActions" class="ptolemy.domains.modal.kernel.OutputActionsAttribute" value="power = 0">
                </property>
                <property name="exitAngle" class="ptolemy.data.expr.Parameter" value="0.0753112107442339">
                    <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
                    </property>
                </property>
                <property name="gamma" class="ptolemy.data.expr.Parameter" value="-2.254369851179794">
                </property>
            </relation>
            <relation name="relation7" class="ptolemy.domains.modal.kernel.Transition">
                <property name="guardExpression" class="ptolemy.kernel.util.StringAttribute" value="command_isPresent &amp;&amp; command == 0">
                </property>
                <property name="exitAngle" class="ptolemy.data.expr.Parameter" value="-0.5864268197872577">
                    <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
                    </property>
                </property>
                <property name="gamma" class="ptolemy.data.expr.Parameter" value="-0.11356537998210135">
                </property>
            </relation>
            <relation name="relation8" class="ptolemy.domains.modal.kernel.Transition">
                <property name="guardExpression" class="ptolemy.kernel.util.StringAttribute" value="timeDelay_isPresent">
                </property>
                <property name="exitAngle" class="ptolemy.data.expr.Parameter" value="-0.022261368464828932">
                    <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
                    </property>
                </property>
                <property name="gamma" class="ptolemy.data.expr.Parameter" value="0.6965892267642328">
                </property>
            </relation>
            <relation name="relation4" class="ptolemy.domains.modal.kernel.Transition">
                <property name="guardExpression" class="ptolemy.kernel.util.StringAttribute" value="endStop_isPresent || (command_isPresent &amp;&amp; command == 0)">
                </property>
                <property name="outputActions" class="ptolemy.domains.modal.kernel.OutputActionsAttribute" value="power = 0">
                </property>
                <property name="exitAngle" class="ptolemy.data.expr.Parameter" value="-0.23587594333045872">
                    <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
                    </property>
                </property>
                <property name="gamma" class="ptolemy.data.expr.Parameter" value="2.4115924111898077">
                </property>
            </relation>
            <relation name="relation10" class="ptolemy.domains.modal.kernel.Transition">
                <property name="guardExpression" class="ptolemy.kernel.util.StringAttribute" value="endStop_isPresent || command_isPresent">
                </property>
                <property name="outputActions" class="ptolemy.domains.modal.kernel.OutputActionsAttribute" value="power = 0">
                </property>
                <property name="exitAngle" class="ptolemy.data.expr.Parameter" value="1.5109180150737866">
                    <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
                    </property>
                </property>
                <property name="gamma" class="ptolemy.data.expr.Parameter" value="2.6798954478228634">
                </property>
            </relation>
            <relation name="relation11" class="ptolemy.domains.modal.kernel.Transition">
                <property name="guardExpression" class="ptolemy.kernel.util.StringAttribute" value="true">
                </property>
                <property name="outputActions" class="ptolemy.domains.modal.kernel.OutputActionsAttribute" value="power = 0">
                </property>
                <property name="exitAngle" class="ptolemy.data.expr.Parameter" value="-0.0031447373909807737">
                </property>
                <property name="gamma" class="ptolemy.data.expr.Parameter" value="-5.352738399609937E-4">
                </property>
            </relation>
            <relation name="relation12" class="ptolemy.domains.modal.kernel.Transition">
                <property name="guardExpression" class="ptolemy.kernel.util.StringAttribute" value="timeDelay_isPresent">
                </property>
                <property name="exitAngle" class="ptolemy.data.expr.Parameter" value="0.45987546568392396">
                    <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
                    </property>
                </property>
                <property name="gamma" class="ptolemy.data.expr.Parameter" value="-0.453873614520995">
                </property>
            </relation>
            <relation name="relation13" class="ptolemy.domains.modal.kernel.Transition">
                <property name="guardExpression" class="ptolemy.kernel.util.StringAttribute" value="command_isPresent &amp;&amp; command == 0">
                </property>
                <property name="exitAngle" class="ptolemy.data.expr.Parameter" value="0.029845120824393556">
                    <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
                    </property>
                </property>
                <property name="gamma" class="ptolemy.data.expr.Parameter" value="0.26355060402450536">
                </property>
            </relation>
            <relation name="relation14" class="ptolemy.domains.modal.kernel.Transition">
                <property name="guardExpression" class="ptolemy.kernel.util.StringAttribute" value="endStop_isPresent">
                </property>
                <property name="exitAngle" class="ptolemy.data.expr.Parameter" value="-1.2988096856873086">
                </property>
                <property name="gamma" class="ptolemy.data.expr.Parameter" value="-2.6059507144456853">
                </property>
            </relation>
            <link port="Stop.incomingPort" relation="relation3"/>
            <link port="Stop.incomingPort" relation="relation4"/>
            <link port="Stop.incomingPort" relation="relation10"/>
            <link port="Stop.incomingPort" relation="relation11"/>
            <link port="Stop.incomingPort" relation="relation14"/>
            <link port="Stop.outgoingPort" relation="relation"/>
            <link port="Stop.outgoingPort" relation="relation2"/>
            <link port="Up.incomingPort" relation="relation"/>
            <link port="Up.outgoingPort" relation="relation7"/>
            <link port="Up.outgoingPort" relation="relation8"/>
            <link port="DownManu.incomingPort" relation="relation12"/>
            <link port="DownManu.outgoingPort" relation="relation3"/>
            <link port="UpAuto.incomingPort" relation="relation7"/>
            <link port="UpAuto.outgoingPort" relation="relation10"/>
            <link port="UpManu.incomingPort" relation="relation8"/>
            <link port="UpManu.outgoingPort" relation="relation4"/>
            <link port="init.outgoingPort" relation="relation11"/>
            <link port="Down.incomingPort" relation="relation2"/>
            <link port="Down.outgoingPort" relation="relation12"/>
            <link port="Down.outgoingPort" relation="relation13"/>
            <link port="DownAuto.incomingPort" relation="relation13"/>
            <link port="DownAuto.outgoingPort" relation="relation14"/>
        </entity>
        <entity name="Up" class="ptolemy.domains.modal.modal.Refinement">
            <property name="DE Director" class="ptolemy.domains.de.kernel.DEDirector">
                <property name="_location" class="ptolemy.kernel.util.Location" value="{-295, -285}">
                </property>
            </property>
            <port name="command" class="ptolemy.domains.modal.modal.RefinementPort">
                <property name="input"/>
                <property name="_location" class="ptolemy.kernel.util.Location" value="[-330.0, -205.0]">
                </property>
            </port>
            <port name="power" class="ptolemy.domains.modal.modal.RefinementPort">
                <property name="output"/>
                <property name="_location" class="ptolemy.kernel.util.Location" value="[55.0, -185.0]">
                </property>
            </port>
            <port name="endStop" class="ptolemy.domains.modal.modal.RefinementPort">
                <property name="input"/>
                <property name="_location" class="ptolemy.kernel.util.Location" value="[-295.0, -190.0]">
                </property>
            </port>
            <port name="timeDelay" class="ptolemy.domains.modal.modal.RefinementPort">
                <property name="output"/>
                <property name="_location" class="ptolemy.kernel.util.Location" value="[25.0, -210.0]">
                </property>
            </port>
            <entity name="DiscreteClock" class="ptolemy.actor.lib.DiscreteClock">
                <property name="period" class="ptolemy.actor.parameters.PortParameter" value="autoTime">
                </property>
                <property name="offsets" class="ptolemy.data.expr.Parameter" value="{autoTime}">
                </property>
                <doc>Create periodic timed events.</doc>
                <property name="_location" class="ptolemy.kernel.util.Location" value="{-165, -210}">
                </property>
            </entity>
            <relation name="relation" class="ptolemy.actor.TypedIORelation">
            </relation>
            <link port="timeDelay" relation="relation"/>
            <link port="DiscreteClock.output" relation="relation"/>
        </entity>
        <entity name="GoDown" class="ptolemy.domains.modal.modal.Refinement">
            <property name="DE Director" class="ptolemy.domains.de.kernel.DEDirector">
                <property name="_location" class="ptolemy.kernel.util.Location" value="[-310.0, -275.0]">
                </property>
            </property>
            <port name="command" class="ptolemy.domains.modal.modal.RefinementPort">
                <property name="input"/>
                <property name="_location" class="ptolemy.kernel.util.Location" value="[-330.0, -205.0]">
                </property>
            </port>
            <port name="power" class="ptolemy.domains.modal.modal.RefinementPort">
                <property name="output"/>
                <property name="_location" class="ptolemy.kernel.util.Location" value="[10.0, -195.0]">
                </property>
            </port>
            <port name="endStop" class="ptolemy.domains.modal.modal.RefinementPort">
                <property name="input"/>
                <property name="_location" class="ptolemy.kernel.util.Location" value="[-295.0, -190.0]">
                </property>
            </port>
            <port name="timeDelay" class="ptolemy.domains.modal.modal.RefinementPort">
                <property name="output"/>
                <property name="_location" class="ptolemy.kernel.util.Location" value="[-20.0, -220.0]">
                </property>
            </port>
            <entity name="DiscreteClock" class="ptolemy.actor.lib.DiscreteClock">
                <property name="period" class="ptolemy.actor.parameters.PortParameter" value="autoTime">
                </property>
                <property name="offsets" class="ptolemy.data.expr.Parameter" value="{autoTime}">
                </property>
                <doc>Create periodic timed events.</doc>
                <property name="_location" class="ptolemy.kernel.util.Location" value="{-135, -220}">
                </property>
            </entity>
            <relation name="relation" class="ptolemy.actor.TypedIORelation">
            </relation>
            <link port="timeDelay" relation="relation"/>
            <link port="DiscreteClock.output" relation="relation"/>
        </entity>
        <relation name="commandRelation" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="Auto">
            </property>
        </relation>
        <relation name="powerRelation" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="Auto">
            </property>
        </relation>
        <relation name="endStopRelation" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="Auto">
            </property>
        </relation>
        <relation name="timeDelayRelation" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="Auto">
            </property>
        </relation>
        <link port="command" relation="commandRelation"/>
        <link port="power" relation="powerRelation"/>
        <link port="endStop" relation="endStopRelation"/>
        <link port="timeDelay" relation="timeDelayRelation"/>
        <link port="_Controller.command" relation="commandRelation"/>
        <link port="_Controller.power" relation="powerRelation"/>
        <link port="_Controller.endStop" relation="endStopRelation"/>
        <link port="_Controller.timeDelay" relation="timeDelayRelation"/>
        <link port="Up.command" relation="commandRelation"/>
        <link port="Up.power" relation="powerRelation"/>
        <link port="Up.endStop" relation="endStopRelation"/>
        <link port="Up.timeDelay" relation="timeDelayRelation"/>
        <link port="GoDown.command" relation="commandRelation"/>
        <link port="GoDown.power" relation="powerRelation"/>
        <link port="GoDown.endStop" relation="endStopRelation"/>
        <link port="GoDown.timeDelay" relation="timeDelayRelation"/>
    </entity>
    <entity name="Window" class="ptolemy.actor.TypedCompositeActor">
        <property name="_location" class="ptolemy.kernel.util.Location" value="[425.0, 85.0]">
        </property>
        <property name="SDF Director" class="ptolemy.domains.sdf.kernel.SDFDirector">
            <property name="allowDisconnectedGraphs" class="ptolemy.data.expr.Parameter" value="true">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[85.0, 45.0]">
            </property>
        </property>
        <property name="low" class="ptolemy.data.expr.Parameter" value="0.0">
            <property name="_hideName" class="ptolemy.kernel.util.SingletonAttribute">
            </property>
            <property name="_icon" class="ptolemy.vergil.icon.ValueIcon">
                <property name="_color" class="ptolemy.actor.gui.ColorAttribute" value="{0.0, 0.0, 1.0, 1.0}">
                </property>
            </property>
            <property name="_smallIconDescription" class="ptolemy.kernel.util.SingletonConfigurableAttribute">
                <configure>
      <svg>
        <text x="20" style="font-size:14; font-family:SansSerif; fill:blue" y="20">-P-</text>
      </svg>
    </configure>
            </property>
            <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="{270, 50}">
            </property>
        </property>
        <property name="high" class="ptolemy.data.expr.Parameter" value="5.0">
            <property name="_hideName" class="ptolemy.kernel.util.SingletonAttribute">
            </property>
            <property name="_icon" class="ptolemy.vergil.icon.ValueIcon">
                <property name="_color" class="ptolemy.actor.gui.ColorAttribute" value="{0.0, 0.0, 1.0, 1.0}">
                </property>
            </property>
            <property name="_smallIconDescription" class="ptolemy.kernel.util.SingletonConfigurableAttribute">
                <configure>
      <svg>
        <text x="20" style="font-size:14; font-family:SansSerif; fill:blue" y="20">-P-</text>
      </svg>
    </configure>
            </property>
            <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[270.0, 70.0]">
            </property>
        </property>
        <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={773, 470, 907, 580}, maximized=false}">
        </property>
        <property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[694, 470]">
        </property>
        <property name="_vergilZoomFactor" class="ptolemy.data.expr.ExpertParameter" value="1.0">
        </property>
        <property name="_vergilCenter" class="ptolemy.data.expr.ExpertParameter" value="{347.0, 235.0}">
        </property>
        <port name="power" class="ptolemy.actor.TypedIOPort">
            <property name="input"/>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[30.0, 180.0]">
            </property>
        </port>
        <port name="position" class="ptolemy.actor.TypedIOPort">
            <property name="output"/>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[480.0, 190.0]">
            </property>
        </port>
        <port name="endStop" class="ptolemy.actor.TypedIOPort">
            <property name="output"/>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[645.0, 295.0]">
            </property>
        </port>
        <entity name="Scale" class="ptolemy.actor.lib.Scale">
            <property name="factor" class="ptolemy.data.expr.Parameter" value="1">
            </property>
            <property name="_icon" class="ptolemy.vergil.icon.AttributeValueIcon">
                <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="factor">
                </property>
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[115.0, 180.0]">
            </property>
        </entity>
        <entity name="Accumulator" class="ptolemy.actor.lib.Accumulator">
            <property name="lowerBound" class="ptolemy.data.expr.Parameter" value="0">
            </property>
            <property name="upperBound" class="ptolemy.data.expr.Parameter" value="10">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[265.0, 190.0]">
            </property>
        </entity>
        <entity name="Comparator" class="ptolemy.actor.lib.logic.Comparator">
            <property name="comparison" class="ptolemy.kernel.util.StringAttribute" value="&gt;=">
                <property name="style" class="ptolemy.actor.gui.style.ChoiceStyle">
                    <property name="gt" class="ptolemy.kernel.util.StringAttribute" value="&gt;">
                    </property>
                    <property name="ge" class="ptolemy.kernel.util.StringAttribute" value="&gt;=">
                    </property>
                    <property name="lt" class="ptolemy.kernel.util.StringAttribute" value="&lt;">
                    </property>
                    <property name="le" class="ptolemy.kernel.util.StringAttribute" value="&lt;=">
                    </property>
                    <property name="eq" class="ptolemy.kernel.util.StringAttribute" value="==">
                    </property>
                </property>
            </property>
            <property name="_icon" class="ptolemy.vergil.icon.AttributeValueIcon">
                <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="comparison">
                </property>
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[385.0, 285.0]">
            </property>
        </entity>
        <entity name="Comparator2" class="ptolemy.actor.lib.logic.Comparator">
            <property name="comparison" class="ptolemy.kernel.util.StringAttribute" value="&lt;=">
                <property name="style" class="ptolemy.actor.gui.style.ChoiceStyle">
                    <property name="gt" class="ptolemy.kernel.util.StringAttribute" value="&gt;">
                    </property>
                    <property name="ge" class="ptolemy.kernel.util.StringAttribute" value="&gt;=">
                    </property>
                    <property name="lt" class="ptolemy.kernel.util.StringAttribute" value="&lt;">
                    </property>
                    <property name="le" class="ptolemy.kernel.util.StringAttribute" value="&lt;=">
                    </property>
                    <property name="eq" class="ptolemy.kernel.util.StringAttribute" value="==">
                    </property>
                </property>
            </property>
            <property name="_icon" class="ptolemy.vergil.icon.AttributeValueIcon">
                <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="comparison">
                </property>
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[385.0, 365.0]">
            </property>
        </entity>
        <entity name="Const" class="ptolemy.actor.lib.Const">
            <property name="value" class="ptolemy.data.expr.Parameter" value="high">
            </property>
            <doc>Create a constant sequence.</doc>
            <property name="_icon" class="ptolemy.vergil.icon.BoxedValueIcon">
                <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="value">
                </property>
                <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="60">
                </property>
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[205.0, 295.0]">
            </property>
        </entity>
        <entity name="Const2" class="ptolemy.actor.lib.Const">
            <property name="value" class="ptolemy.data.expr.Parameter" value="low">
            </property>
            <doc>Create a constant sequence.</doc>
            <property name="_icon" class="ptolemy.vergil.icon.BoxedValueIcon">
                <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="value">
                </property>
                <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="60">
                </property>
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[208.3332290649414, 374.99879455566406]">
            </property>
        </entity>
        <entity name="Limiter" class="ptolemy.actor.lib.Limiter">
            <property name="bottom" class="ptolemy.data.expr.Parameter" value="low">
            </property>
            <property name="top" class="ptolemy.data.expr.Parameter" value="high">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[415.0, 190.0]">
            </property>
        </entity>
        <entity name="BooleanToAnything" class="ptolemy.actor.lib.conversions.BooleanToAnything">
            <property name="falseValue" class="ptolemy.data.expr.Parameter" value="0">
            </property>
            <property name="trueValue" class="ptolemy.data.expr.Parameter" value="1">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[475.0, 285.0]">
            </property>
            <property name="_flipPortsHorizontal" class="ptolemy.data.expr.Parameter" value="false">
            </property>
            <property name="_hideName" class="ptolemy.data.expr.SingletonParameter" value="true">
            </property>
        </entity>
        <entity name="BooleanToAnything2" class="ptolemy.actor.lib.conversions.BooleanToAnything">
            <property name="falseValue" class="ptolemy.data.expr.Parameter" value="0">
            </property>
            <property name="trueValue" class="ptolemy.data.expr.Parameter" value="1">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[475.0, 365.0]">
            </property>
            <property name="_flipPortsHorizontal" class="ptolemy.data.expr.Parameter" value="false">
            </property>
            <property name="_hideName" class="ptolemy.data.expr.SingletonParameter" value="true">
            </property>
        </entity>
        <entity name="AddSubtract" class="ptolemy.actor.lib.AddSubtract">
            <property name="_location" class="ptolemy.kernel.util.Location" value="[570.0, 295.0]">
            </property>
        </entity>
        <relation name="relation" class="ptolemy.actor.TypedIORelation">
        </relation>
        <relation name="relation3" class="ptolemy.actor.TypedIORelation">
            <vertex name="vertex1" value="[325.0, 190.0]">
            </vertex>
        </relation>
        <relation name="relation4" class="ptolemy.actor.TypedIORelation">
        </relation>
        <relation name="relation6" class="ptolemy.actor.TypedIORelation">
        </relation>
        <relation name="relation10" class="ptolemy.actor.TypedIORelation">
        </relation>
        <relation name="relation2" class="ptolemy.actor.TypedIORelation">
        </relation>
        <relation name="relation5" class="ptolemy.actor.TypedIORelation">
        </relation>
        <relation name="relation7" class="ptolemy.actor.TypedIORelation">
        </relation>
        <relation name="relation8" class="ptolemy.actor.TypedIORelation">
        </relation>
        <relation name="relation9" class="ptolemy.actor.TypedIORelation">
        </relation>
        <relation name="relation11" class="ptolemy.actor.TypedIORelation">
        </relation>
        <link port="power" relation="relation"/>
        <link port="position" relation="relation10"/>
        <link port="endStop" relation="relation11"/>
        <link port="Scale.input" relation="relation"/>
        <link port="Scale.output" relation="relation2"/>
        <link port="Accumulator.input" relation="relation2"/>
        <link port="Accumulator.output" relation="relation3"/>
        <link port="Comparator.left" relation="relation3"/>
        <link port="Comparator.right" relation="relation4"/>
        <link port="Comparator.output" relation="relation5"/>
        <link port="Comparator2.left" relation="relation3"/>
        <link port="Comparator2.right" relation="relation6"/>
        <link port="Comparator2.output" relation="relation7"/>
        <link port="Const.output" relation="relation4"/>
        <link port="Const2.output" relation="relation6"/>
        <link port="Limiter.input" relation="relation3"/>
        <link port="Limiter.output" relation="relation10"/>
        <link port="BooleanToAnything.input" relation="relation5"/>
        <link port="BooleanToAnything.output" relation="relation8"/>
        <link port="BooleanToAnything2.input" relation="relation7"/>
        <link port="BooleanToAnything2.output" relation="relation9"/>
        <link port="AddSubtract.plus" relation="relation8"/>
        <link port="AddSubtract.minus" relation="relation9"/>
        <link port="AddSubtract.output" relation="relation11"/>
    </entity>
    <entity name="TimeDelay" class="ptolemy.actor.lib.TimeDelay">
        <property name="delay" class="ptolemy.data.expr.Parameter" value="0.1">
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[200.0, 230.0]">
        </property>
        <property name="_flipPortsHorizontal" class="ptolemy.data.expr.Parameter" value="true">
        </property>
        <property name="_hideName" class="ptolemy.data.expr.SingletonParameter" value="true">
        </property>
    </entity>
    <entity name="SDF sampling clock" class="ptolemy.actor.lib.DiscreteClock">
        <property name="period" class="ptolemy.actor.parameters.PortParameter" value="1.0">
        </property>
        <doc>Create periodic timed events.</doc>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[320.0, 170.0]">
        </property>
        <property name="_rotatePorts" class="ptolemy.data.expr.Parameter" value="-90">
        </property>
    </entity>
    <entity name="Sampler" class="ptolemy.domains.de.lib.Sampler">
        <property name="_location" class="ptolemy.kernel.util.Location" value="[320.0, 85.0]">
        </property>
    </entity>
    <entity name="Publisher7" class="ptolemy.actor.lib.Publisher">
        <property name="channel" class="ptolemy.data.expr.StringParameter" value="command">
        </property>
        <doc>Publish the input values to all matching Subscribers.</doc>
        <property name="_icon" class="ptolemy.vergil.icon.BoxedValueIcon">
            <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="channel">
            </property>
            <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="60">
            </property>
            <property name="boxColor" class="ptolemy.actor.gui.ColorAttribute" value="{0.85, 0.6, 0.58, 1.0}">
            </property>
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[135.0, 30.0]">
        </property>
        <property name="_rotatePorts" class="ptolemy.data.expr.Parameter" value="-90">
        </property>
        <property name="_hideName" class="ptolemy.data.expr.SingletonParameter" value="true">
        </property>
    </entity>
    <entity name="Subscriber7" class="ptolemy.actor.lib.Subscriber">
        <property name="channel" class="ptolemy.data.expr.StringParameter" value="command">
        </property>
        <doc>Produce a sequence generated by a matching Publisher.</doc>
        <property name="_icon" class="ptolemy.vergil.icon.BoxedValueIcon">
            <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="channel">
            </property>
            <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="60">
            </property>
            <property name="boxColor" class="ptolemy.actor.gui.ColorAttribute" value="{0.76, 0.84, 0.6, 1.0}">
            </property>
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[795.0, 130.0]">
        </property>
        <property name="_hideName" class="ptolemy.data.expr.SingletonParameter" value="true">
        </property>
    </entity>
    <entity name="Publisher" class="ptolemy.actor.lib.Publisher">
        <property name="channel" class="ptolemy.data.expr.StringParameter" value="endStop">
        </property>
        <doc>Publish the input values to all matching Subscribers.</doc>
        <property name="_icon" class="ptolemy.vergil.icon.BoxedValueIcon">
            <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="channel">
            </property>
            <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="60">
            </property>
            <property name="boxColor" class="ptolemy.actor.gui.ColorAttribute" value="{0.85, 0.6, 0.58, 1.0}">
            </property>
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[615.0, 255.0]">
        </property>
        <property name="_rotatePorts" class="ptolemy.data.expr.Parameter" value="90">
            <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
            </property>
        </property>
        <property name="_hideName" class="ptolemy.data.expr.SingletonParameter" value="true">
        </property>
    </entity>
    <entity name="Subscriber3" class="ptolemy.actor.lib.Subscriber">
        <property name="channel" class="ptolemy.data.expr.StringParameter" value="endStop">
        </property>
        <doc>Produce a sequence generated by a matching Publisher.</doc>
        <property name="_icon" class="ptolemy.vergil.icon.BoxedValueIcon">
            <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="channel">
            </property>
            <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="60">
            </property>
            <property name="boxColor" class="ptolemy.actor.gui.ColorAttribute" value="{0.76, 0.84, 0.6, 1.0}">
            </property>
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[800.0, 175.0]">
        </property>
        <property name="_hideName" class="ptolemy.data.expr.SingletonParameter" value="true">
        </property>
    </entity>
    <entity name="Publisher2" class="ptolemy.actor.lib.Publisher">
        <property name="channel" class="ptolemy.data.expr.StringParameter" value="position">
        </property>
        <doc>Publish the input values to all matching Subscribers.</doc>
        <property name="_icon" class="ptolemy.vergil.icon.BoxedValueIcon">
            <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="channel">
            </property>
            <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="60">
            </property>
            <property name="boxColor" class="ptolemy.actor.gui.ColorAttribute" value="{0.85, 0.6, 0.58, 1.0}">
            </property>
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[640.0, 75.0]">
        </property>
        <property name="_hideName" class="ptolemy.data.expr.SingletonParameter" value="true">
        </property>
    </entity>
    <entity name="Subscriber" class="ptolemy.actor.lib.Subscriber">
        <property name="channel" class="ptolemy.data.expr.StringParameter" value="position">
        </property>
        <doc>Produce a sequence generated by a matching Publisher.</doc>
        <property name="_icon" class="ptolemy.vergil.icon.BoxedValueIcon">
            <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="channel">
            </property>
            <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="60">
            </property>
            <property name="boxColor" class="ptolemy.actor.gui.ColorAttribute" value="{0.76, 0.84, 0.6, 1.0}">
            </property>
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[800.0, 85.0]">
        </property>
        <property name="_hideName" class="ptolemy.data.expr.SingletonParameter" value="true">
        </property>
    </entity>
    <entity name="Signal2Event" class="ptolemy.actor.TypedCompositeActor">
        <property name="_location" class="ptolemy.kernel.util.Location" value="[540.0, 75.0]">
        </property>
        <property name="Annotation" class="ptolemy.vergil.kernel.attributes.TextAttribute">
            <property name="text" class="ptolemy.kernel.util.StringAttribute" value="This actor converts a sampled signal into an event.&#10;An occurrence of the event is produced each time&#10;the value of the signal changes.&#10;For this, the current sample of the signal is compared&#10;to the previous sample. When they differ, and event&#10;with the current value of the signal is produced.&#10;A value which is impossible for the signal is used to &#10;produce an event for the first sample.">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[70.0, 175.0]">
            </property>
        </property>
        <property name="ImpossibleValue" class="ptolemy.data.expr.Parameter" value="-1">
            <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
            </property>
        </property>
        <port name="signal" class="ptolemy.actor.TypedIOPort">
            <property name="input"/>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[30.0, 50.0]">
            </property>
        </port>
        <port name="event" class="ptolemy.actor.TypedIOPort">
            <property name="output"/>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[475.0, 50.0]">
            </property>
        </port>
        <entity name="SampleDelay" class="ptolemy.domains.sdf.lib.SampleDelay">
            <property name="initialOutputs" class="ptolemy.data.expr.Parameter" value="{ImpossibleValue}">
            </property>
            <property name="_icon" class="ptolemy.vergil.icon.BoxedValueIcon">
                <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="initialOutputs">
                </property>
                <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="20">
                </property>
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[85.0, 110.0]">
            </property>
            <property name="_hideName" class="ptolemy.data.expr.SingletonParameter" value="true">
            </property>
        </entity>
        <entity name="Sampler" class="ptolemy.domains.de.lib.Sampler">
            <property name="_location" class="ptolemy.kernel.util.Location" value="[410.0, 50.0]">
            </property>
        </entity>
        <entity name="Not" class="ptolemy.actor.lib.logic.LogicalNot">
            <property name="_location" class="ptolemy.kernel.util.Location" value="[265.0, 100.0]">
            </property>
        </entity>
        <entity name="Comparator" class="ptolemy.actor.lib.logic.Comparator">
            <property name="comparison" class="ptolemy.kernel.util.StringAttribute" value="==">
                <property name="style" class="ptolemy.actor.gui.style.ChoiceStyle">
                    <property name="gt" class="ptolemy.kernel.util.StringAttribute" value="&gt;">
                    </property>
                    <property name="ge" class="ptolemy.kernel.util.StringAttribute" value="&gt;=">
                    </property>
                    <property name="lt" class="ptolemy.kernel.util.StringAttribute" value="&lt;">
                    </property>
                    <property name="le" class="ptolemy.kernel.util.StringAttribute" value="&lt;=">
                    </property>
                    <property name="eq" class="ptolemy.kernel.util.StringAttribute" value="==">
                    </property>
                </property>
            </property>
            <property name="_icon" class="ptolemy.vergil.icon.AttributeValueIcon">
                <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="comparison">
                </property>
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[195.0, 100.0]">
            </property>
        </entity>
        <entity name="EventFilter" class="ptolemy.domains.de.lib.EventFilter">
            <property name="_location" class="ptolemy.kernel.util.Location" value="[340.0, 100.0]">
            </property>
        </entity>
        <relation name="relation" class="ptolemy.actor.TypedIORelation">
            <vertex name="vertex1" value="[65.0, 50.0]">
            </vertex>
        </relation>
        <relation name="relation2" class="ptolemy.actor.TypedIORelation">
        </relation>
        <relation name="relation3" class="ptolemy.actor.TypedIORelation">
        </relation>
        <relation name="relation4" class="ptolemy.actor.TypedIORelation">
        </relation>
        <relation name="relation5" class="ptolemy.actor.TypedIORelation">
        </relation>
        <relation name="relation6" class="ptolemy.actor.TypedIORelation">
        </relation>
        <link port="signal" relation="relation"/>
        <link port="event" relation="relation6"/>
        <link port="SampleDelay.input" relation="relation"/>
        <link port="SampleDelay.output" relation="relation5"/>
        <link port="Sampler.input" relation="relation"/>
        <link port="Sampler.output" relation="relation6"/>
        <link port="Sampler.trigger" relation="relation2"/>
        <link port="Not.input" relation="relation4"/>
        <link port="Not.output" relation="relation3"/>
        <link port="Comparator.left" relation="relation"/>
        <link port="Comparator.right" relation="relation5"/>
        <link port="Comparator.output" relation="relation4"/>
        <link port="EventFilter.input" relation="relation3"/>
        <link port="EventFilter.output" relation="relation2"/>
    </entity>
    <entity name="Signal2Event2" class="ptolemy.actor.TypedCompositeActor">
        <display name="Signal2Event"/>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[540.0, 155.0]">
        </property>
        <property name="Annotation" class="ptolemy.vergil.kernel.attributes.TextAttribute">
            <property name="text" class="ptolemy.kernel.util.StringAttribute" value="This actor converts a sampled signal into an event.&#10;An occurrence of the event is produced each time&#10;the value of the signal changes.&#10;For this, the current sample of the signal is compared&#10;to the previous sample. When they differ, and event&#10;with the current value of the signal is produced.&#10;A value which is impossible for the signal is used to &#10;produce an event for the first sample.">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[60.0, 300.0]">
            </property>
        </property>
        <property name="ImpossibleValue" class="ptolemy.data.expr.Parameter" value="-3">
            <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
            </property>
        </property>
        <port name="signal" class="ptolemy.actor.TypedIOPort">
            <property name="input"/>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[35.0, 200.0]">
            </property>
        </port>
        <port name="event" class="ptolemy.actor.TypedIOPort">
            <property name="output"/>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[480.0, 200.0]">
            </property>
        </port>
        <entity name="SampleDelay" class="ptolemy.domains.sdf.lib.SampleDelay">
            <property name="initialOutputs" class="ptolemy.data.expr.Parameter" value="{ImpossibleValue}">
            </property>
            <property name="_icon" class="ptolemy.vergil.icon.BoxedValueIcon">
                <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="initialOutputs">
                </property>
                <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="20">
                </property>
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[90.0, 260.0]">
            </property>
            <property name="_hideName" class="ptolemy.data.expr.SingletonParameter" value="true">
            </property>
        </entity>
        <entity name="Sampler" class="ptolemy.domains.de.lib.Sampler">
            <property name="_location" class="ptolemy.kernel.util.Location" value="[415.0, 200.0]">
            </property>
        </entity>
        <entity name="Not" class="ptolemy.actor.lib.logic.LogicalNot">
            <property name="_location" class="ptolemy.kernel.util.Location" value="[270.0, 250.0]">
            </property>
        </entity>
        <entity name="Comparator" class="ptolemy.actor.lib.logic.Comparator">
            <property name="comparison" class="ptolemy.kernel.util.StringAttribute" value="==">
                <property name="style" class="ptolemy.actor.gui.style.ChoiceStyle">
                    <property name="gt" class="ptolemy.kernel.util.StringAttribute" value="&gt;">
                    </property>
                    <property name="ge" class="ptolemy.kernel.util.StringAttribute" value="&gt;=">
                    </property>
                    <property name="lt" class="ptolemy.kernel.util.StringAttribute" value="&lt;">
                    </property>
                    <property name="le" class="ptolemy.kernel.util.StringAttribute" value="&lt;=">
                    </property>
                    <property name="eq" class="ptolemy.kernel.util.StringAttribute" value="==">
                    </property>
                </property>
            </property>
            <property name="_icon" class="ptolemy.vergil.icon.AttributeValueIcon">
                <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="comparison">
                </property>
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[200.0, 250.0]">
            </property>
        </entity>
        <entity name="EventFilter" class="ptolemy.domains.de.lib.EventFilter">
            <property name="_location" class="ptolemy.kernel.util.Location" value="[345.0, 250.0]">
            </property>
        </entity>
        <relation name="relation" class="ptolemy.actor.TypedIORelation">
            <vertex name="vertex1" value="[70.0, 200.0]">
            </vertex>
        </relation>
        <relation name="relation2" class="ptolemy.actor.TypedIORelation">
        </relation>
        <relation name="relation3" class="ptolemy.actor.TypedIORelation">
        </relation>
        <relation name="relation4" class="ptolemy.actor.TypedIORelation">
        </relation>
        <relation name="relation5" class="ptolemy.actor.TypedIORelation">
        </relation>
        <relation name="relation6" class="ptolemy.actor.TypedIORelation">
        </relation>
        <link port="signal" relation="relation"/>
        <link port="event" relation="relation6"/>
        <link port="SampleDelay.input" relation="relation"/>
        <link port="SampleDelay.output" relation="relation5"/>
        <link port="Sampler.input" relation="relation"/>
        <link port="Sampler.output" relation="relation6"/>
        <link port="Sampler.trigger" relation="relation2"/>
        <link port="Not.input" relation="relation4"/>
        <link port="Not.output" relation="relation3"/>
        <link port="Comparator.left" relation="relation"/>
        <link port="Comparator.right" relation="relation5"/>
        <link port="Comparator.output" relation="relation4"/>
        <link port="EventFilter.input" relation="relation3"/>
        <link port="EventFilter.output" relation="relation2"/>
    </entity>
    <entity name="Input scenario" class="ptolemy.actor.lib.DiscreteClock">
        <property name="period" class="ptolemy.actor.parameters.PortParameter" value="17.0">
        </property>
        <property name="offsets" class="ptolemy.data.expr.Parameter" value="{2.0, 2.8, 3.0, 5.0, 7.0, 7.4, 10.0, 10.1}">
        </property>
        <property name="values" class="ptolemy.data.expr.Parameter" value="{1,    0,    1,    0,    1,    0,    -1,     0   }">
        </property>
        <doc>Create periodic timed events.</doc>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[10.0, 85.0]">
        </property>
    </entity>
    <relation name="relation3" class="ptolemy.actor.TypedIORelation">
    </relation>
    <relation name="relation13" class="ptolemy.actor.TypedIORelation">
        <vertex name="vertex1" value="[80.0, 85.0]">
        </vertex>
    </relation>
    <relation name="relation10" class="ptolemy.actor.TypedIORelation">
        <vertex name="vertex1" value="[615.0, 230.0]">
        </vertex>
    </relation>
    <relation name="relation9" class="ptolemy.actor.TypedIORelation">
    </relation>
    <relation name="relation6" class="ptolemy.actor.TypedIORelation">
    </relation>
    <relation name="relation24" class="ptolemy.actor.TypedIORelation">
    </relation>
    <relation name="relation2" class="ptolemy.actor.TypedIORelation">
    </relation>
    <relation name="relation8" class="ptolemy.actor.TypedIORelation">
    </relation>
    <relation name="relation7" class="ptolemy.actor.TypedIORelation">
    </relation>
    <relation name="relation11" class="ptolemy.actor.TypedIORelation">
    </relation>
    <relation name="relation12" class="ptolemy.actor.TypedIORelation">
    </relation>
    <relation name="relation4" class="ptolemy.actor.TypedIORelation">
    </relation>
    <link port="TimedPlotter.input" relation="relation7"/>
    <link port="TimedPlotter.input" relation="relation11"/>
    <link port="TimedPlotter.input" relation="relation12"/>
    <link port="Controler.command" relation="relation13"/>
    <link port="Controler.power" relation="relation8"/>
    <link port="Controler.endStop" relation="relation9"/>
    <link port="Window.power" relation="relation2"/>
    <link port="Window.position" relation="relation6"/>
    <link port="Window.endStop" relation="relation4"/>
    <link port="TimeDelay.input" relation="relation10"/>
    <link port="TimeDelay.output" relation="relation9"/>
    <link port="SDF sampling clock.output" relation="relation3"/>
    <link port="Sampler.input" relation="relation8"/>
    <link port="Sampler.output" relation="relation2"/>
    <link port="Sampler.trigger" relation="relation3"/>
    <link port="Publisher7.input" relation="relation13"/>
    <link port="Subscriber7.output" relation="relation11"/>
    <link port="Publisher.input" relation="relation10"/>
    <link port="Subscriber3.output" relation="relation12"/>
    <link port="Publisher2.input" relation="relation24"/>
    <link port="Subscriber.output" relation="relation7"/>
    <link port="Signal2Event.signal" relation="relation6"/>
    <link port="Signal2Event.event" relation="relation24"/>
    <link port="Signal2Event2.signal" relation="relation4"/>
    <link port="Signal2Event2.event" relation="relation10"/>
    <link port="Input scenario.output" relation="relation13"/>
</entity>
