Hi.  Chuck Lutz and I are trying to develop a generic queuing system inside of Ptolemy.  The model is a simple customer model in a supermarket.  Customers are generated by a Poisson clock by the Customer Generator actor.  Eventually, each customer will be instantiated in a multi-instance composite actor (modal model).  Currently, we only have this as the Customer Checkout Modal Model to simulate one customer (starting small to get this working).  We are having a few problems and have many questions along the way.  The model is attached.  Our questions are as follows:

 

1.         CT director is on the top level of the model.  If we put a CT director inside the Customer Generator, we get no observable output.  If we remove the CT director from the Customer Generator, the display shows results from the Poisson clock.  Why is this?

2.         What are the differences between a parameter, a port, and a port parameter?  How do we pass data between composite actors using these?

3.         Checkout Process Modal Model will need to be a Mutli-Instance Composite Actor (to have one instance per register in the store).  How do we dynamically create a new Checkout Process Modal Model with each firing of the Customer Generator?

4.         We are not able to access the ItemCount parameter inside of a refinement for Continue Here.  Why?

5.         Do you have a list of known current bugs?

 

Thanks for all of your help,

Mitchell Kerman

 

<?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="Test Project" class="ptolemy.actor.TypedCompositeActor">
    <property name="_createdBy" class="ptolemy.kernel.attributes.VersionAttribute" value="5.0.1">
    </property>
    <property name="CheckersAvailable" class="ptolemy.data.expr.Parameter" value="3">
        <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="[-345.0, -230.0]">
        </property>
    </property>
    <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={-4, -4, 1032, 748}, maximized=true}">
    </property>
    <property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[817, 639]">
    </property>
    <property name="_vergilZoomFactor" class="ptolemy.data.expr.ExpertParameter" value="1.0969876620825">
    </property>
    <property name="_vergilCenter" class="ptolemy.data.expr.ExpertParameter" value="{-13.9774061032867, -42.4375000000001}">
    </property>
    <property name="CT Director" class="ptolemy.domains.ct.kernel.CTMixedSignalDirector">
        <property name="_location" class="ptolemy.kernel.util.Location" value="[-300.0, -270.0]">
        </property>
    </property>
    <entity name="Checkout Process Modal Model" class="ptolemy.domains.fsm.modal.ModalModel">
        <property name="_tableauFactory" class="ptolemy.vergil.fsm.modal.ModalTableauFactory">
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[-145.0, -160.0]">
        </property>
        <property name="_icon" class="ptolemy.vergil.icon.EditorIcon">
        </property>
        <port name="Items" class="ptolemy.domains.fsm.modal.ModalPort">
            <property name="input"/>
            <property name="_type" class="ptolemy.actor.TypeAttribute" value="double">
            </property>
        </port>
        <entity name="_Controller" class="ptolemy.domains.fsm.modal.ModalController">
            <property name="initialStateName" class="ptolemy.kernel.util.StringAttribute" value="Initialize">
            </property>
            <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.fsm.kernel.State"><property name="_centerName" class="ptolemy.kernel.util.Attribute"></property><property name="_controllerFactory" class="ptolemy.vergil.fsm.modal.HierarchicalStateControllerFactory"></property></entity></entity>
      </configure>
            </property>
            <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={-4, -4, 1032, 748}, maximized=true}">
            </property>
            <property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[817, 639]">
            </property>
            <property name="_vergilZoomFactor" class="ptolemy.data.expr.ExpertParameter" value="1.0">
            </property>
            <property name="_vergilCenter" class="ptolemy.data.expr.ExpertParameter" value="{315.6689404188985, 361.0795269975759}">
            </property>
            <property name="ItemCount" class="ptolemy.data.expr.Parameter" value="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="[35.0, 90.0]">
                </property>
            </property>
            <port name="Items" class="ptolemy.domains.fsm.modal.RefinementPort">
                <property name="input"/>
                <property name="_location" class="ptolemy.kernel.util.Location" value="[40.0, 140.0]">
                </property>
            </port>
            <entity name="Initialize" class="ptolemy.domains.fsm.kernel.State">
                <property name="refinementName" class="ptolemy.kernel.util.StringAttribute" value="Initialize">
                </property>
                <property name="_controllerFactory" class="ptolemy.vergil.fsm.modal.HierarchicalStateControllerFactory">
                </property>
                <property name="_location" class="ptolemy.kernel.util.Location" value="{75.0, 220.0}">
                </property>
            </entity>
            <entity name="Continue Here" class="ptolemy.domains.fsm.kernel.State">
                <property name="refinementName" class="ptolemy.kernel.util.StringAttribute">
                </property>
                <property name="_controllerFactory" class="ptolemy.vergil.fsm.modal.HierarchicalStateControllerFactory">
                </property>
                <property name="_location" class="ptolemy.kernel.util.Location" value="[145.0, 365.0]">
                </property>
            </entity>
            <relation name="relation" class="ptolemy.domains.fsm.kernel.Transition">
                <property name="guardExpression" class="ptolemy.kernel.util.StringAttribute" value="true">
                </property>
                <property name="exitAngle" class="ptolemy.data.expr.Parameter" value="0.6283185307179586">
                </property>
                <property name="gamma" class="ptolemy.data.expr.Parameter" value="0.9641177762950953">
                </property>
                <property name="reset" class="ptolemy.data.expr.Parameter" value="false">
                </property>
                <property name="preemptive" class="ptolemy.data.expr.Parameter" value="false">
                </property>
                <property name="nondeterministic" class="ptolemy.data.expr.Parameter" value="false">
                </property>
            </relation>
            <link port="Initialize.outgoingPort" relation="relation"/>
            <link port="Continue Here.incomingPort" relation="relation"/>
        </entity>
        <entity name="Initialize" class="ptolemy.domains.fsm.modal.Refinement">
            <property name="DE Director" class="ptolemy.domains.de.kernel.DEDirector">
                <property name="_location" class="ptolemy.kernel.util.Location" value="{30.0, -90.0}">
                </property>
            </property>
            <port name="Items" class="ptolemy.domains.fsm.modal.RefinementPort">
                <property name="input"/>
                <property name="_location" class="ptolemy.kernel.util.Location" value="{0.0, 0.0}">
                </property>
            </port>
            <entity name="Display" class="ptolemy.actor.lib.gui.Display">
                <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={270, 288, 292, 222}, maximized=false}">
                </property>
                <property name="_location" class="ptolemy.kernel.util.Location" value="[135.0, 75.0]">
                </property>
            </entity>
            <entity name="SetVariable" class="ptolemy.actor.lib.SetVariable">
                <property name="variableName" class="ptolemy.kernel.util.StringAttribute" value="ItemCount">
                </property>
                <property name="delayed" class="ptolemy.data.expr.Parameter" value="false">
                </property>
                <property name="_icon" class="ptolemy.vergil.icon.BoxedValueIcon">
                    <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="variableName">
                    </property>
                    <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="40">
                    </property>
                </property>
                <property name="_location" class="ptolemy.kernel.util.Location" value="[155.0, 0.0]">
                </property>
            </entity>
            <relation name="relation" class="ptolemy.actor.TypedIORelation">
                <vertex name="vertex1" value="[55.0, 0.0]">
                </vertex>
            </relation>
            <link port="Items" relation="relation"/>
            <link port="Display.input" relation="relation"/>
            <link port="SetVariable.input" relation="relation"/>
        </entity>
        <relation name="ItemsRelation" class="ptolemy.actor.TypedIORelation">
        </relation>
        <link port="Items" relation="ItemsRelation"/>
        <link port="_Controller.Items" relation="ItemsRelation"/>
        <link port="Initialize.Items" relation="ItemsRelation"/>
    </entity>
    <entity name="Customer Generator" class="ptolemy.actor.TypedCompositeActor">
        <property name="_location" class="ptolemy.kernel.util.Location" value="[-300.0, -160.0]">
        </property>
        <port name="port" class="ptolemy.actor.TypedIOPort">
            <property name="output"/>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[0.0, 20.0]">
            </property>
        </port>
        <entity name="Uniform" class="ptolemy.actor.lib.Uniform">
            <property name="upperBound" class="ptolemy.data.expr.Parameter" value="100.0">
            </property>
            <doc>Create a sequence of uniformly distributed random numbers</doc>
            <property name="_location" class="ptolemy.kernel.util.Location" value="{-160.0, -40.0}">
            </property>
        </entity>
        <entity name="PoissonClock" class="ptolemy.actor.lib.PoissonClock">
            <property name="meanTime" class="ptolemy.data.expr.Parameter" value="2">
            </property>
            <property name="values" class="ptolemy.data.expr.Parameter" value="{1}">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="{-285.0, -40.0}">
            </property>
        </entity>
        <entity name="Display" class="ptolemy.actor.lib.gui.Display">
            <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={601, 285, 292, 222}, maximized=false}">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[10.0, -65.0]">
            </property>
        </entity>
        <relation name="relation2" class="ptolemy.actor.TypedIORelation">
        </relation>
        <relation name="relation" class="ptolemy.actor.TypedIORelation">
            <vertex name="vertex1" value="[-65.0, -40.0]">
            </vertex>
        </relation>
        <link port="port" relation="relation"/>
        <link port="Uniform.output" relation="relation"/>
        <link port="Uniform.trigger" relation="relation2"/>
        <link port="PoissonClock.output" relation="relation2"/>
        <link port="Display.input" relation="relation"/>
    </entity>
    <relation name="relation" class="ptolemy.actor.TypedIORelation">
    </relation>
    <link port="Checkout Process Modal Model.Items" relation="relation"/>
    <link port="Customer Generator.port" relation="relation"/>
</entity>

Reply via email to