Hi Hackers,

 

At the end of his post on 23 Feb 06, responding to Erwin De Ley, Prof. Lee writes:

“The latest version does visually indicate channel ordering at a multiport.” I’m not

seeing how to get this to work – I’m using Pt 5.0.1. The plotter in the demo model

“HysteresisWithRandomDelay.xml” has multiple relations into its multiport; hovering

over the port graphic, for example, doesn’t seem to indicate anything.

 

I’m trying to understand more of how things get wired on the fly when using the

MultiInstanceComposite. The enclosed model gives an error “Attempt to link a bus

relation to a single port”. I’m finding this quite hard to diagnose. Another error down

in the FSM is currently suppressed (“output port q_out must be connected to a multi-

port…”).

 

I am starting to poke around in the MIC (and related) source, and slowly making my

way through more of the manual, but I was wondering if anyone has any immediate

advice on this one.

 

All help continually appreciated,

 

Chuck Lutz

Lockheed Martin

Systems of Systems - Modeling and Operations Analysis

BMC4I Modeling and Simulation

Moorestown, NJ

(856)638-7234 (office)

[EMAIL PROTECTED]

 

“Everyone spoke of an information overload, but what there

was in fact was a non-information overload.”

– Richard Saul Wurman

 

<?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="QueueOutsideMIC" class="ptolemy.actor.TypedCompositeActor">
    <property name="_createdBy" class="ptolemy.kernel.attributes.VersionAttribute" value="5.0.1">
    </property>
    <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={0, 1, 1154, 459}, maximized=false}">
    </property>
    <property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[939, 350]">
    </property>
    <property name="_vergilZoomFactor" class="ptolemy.data.expr.ExpertParameter" value="1.0">
    </property>
    <property name="_vergilCenter" class="ptolemy.data.expr.ExpertParameter" value="{469.5, 175.0}">
    </property>
    <property name="DE Director" class="ptolemy.domains.de.kernel.DEDirector">
        <property name="stopTime" class="ptolemy.data.expr.Parameter" value="20">
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[65.0, 40.0]">
        </property>
    </property>
    <property name="Annotation" class="ptolemy.vergil.kernel.attributes.TextAttribute">
        <property name="textSize" class="ptolemy.data.expr.Parameter" value="10">
        </property>
        <property name="text" class="ptolemy.kernel.util.StringAttribute" value="Beginnings of attempt to&#10;get parallel outputs from&#10;MIC into one queue.">
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="{535.0, 160.0}">
        </property>
    </property>
    <property name="Annotation2" class="ptolemy.vergil.kernel.attributes.TextAttribute">
        <property name="textSize" class="ptolemy.data.expr.Parameter" value="10">
        </property>
        <property name="text" class="ptolemy.kernel.util.StringAttribute" value="Diamond:&#10;see Vol.&#10;1, p. 75">
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[355.0, 150.0]">
        </property>
    </property>
    <entity name="MIC" class="ptolemy.actor.lib.hoc.MultiInstanceComposite">
        <property name="nInstances" class="ptolemy.data.expr.Parameter" value="5">
        </property>
        <doc>Creates multiple instances of itself</doc>
        <property name="_location" class="ptolemy.kernel.util.Location" value="{450.0, 135.0}">
        </property>
        <property name="annotation" class="ptolemy.kernel.util.Attribute">
            <property name="_hideName" class="ptolemy.kernel.util.SingletonAttribute">
            </property>
            <property name="_iconDescription" class="ptolemy.kernel.util.SingletonConfigurableAttribute">
                <configure><svg><text x="20" y="20" style="font-size:14; font-family:SansSerif; fill:blue">Make sure there is a director here!</text></svg></configure>
            </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">-A-</text>
                </svg>
              </configure>
            </property>
            <property name="_controllerFactory" class="ptolemy.vergil.basic.NodeControllerFactory">
            </property>
            <property name="_editorFactory" class="ptolemy.vergil.toolbox.AnnotationEditorFactory">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[120.0, 10.0]">
            </property>
        </property>
        <property name="DE Director" class="ptolemy.domains.de.kernel.DEDirector">
            <property name="_location" class="ptolemy.kernel.util.Location" value="[65.0, 35.0]">
            </property>
        </property>
        <port name="q_out" class="ptolemy.actor.TypedIOPort">
            <property name="output"/>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[300.0, 100.0]">
            </property>
            <property name="_showName" class="ptolemy.data.expr.SingletonParameter" value="true">
            </property>
            <property name="_type" class="ptolemy.actor.TypeAttribute" value="int">
            </property>
        </port>
        <port name="q_in" class="ptolemy.actor.TypedIOPort">
            <property name="input"/>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[30.0, 100.0]">
            </property>
            <property name="_showName" class="ptolemy.data.expr.SingletonParameter" value="true">
            </property>
            <property name="_type" class="ptolemy.actor.TypeAttribute" value="int">
            </property>
        </port>
        <entity name="ModalModel" 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="{130.0, 100.0}">
            </property>
            <port name="queue_in" class="ptolemy.domains.fsm.modal.ModalPort">
                <property name="input"/>
                <property name="_showName" class="ptolemy.data.expr.SingletonParameter" value="true">
                </property>
                <property name="_hide" class="ptolemy.data.expr.SingletonParameter" value="false">
                </property>
                <property name="_cardinal" class="ptolemy.kernel.util.StringAttribute" value="WEST">
                </property>
            </port>
            <port name="queue_out" class="ptolemy.domains.fsm.modal.ModalPort">
                <property name="output"/>
                <property name="_cardinal" class="ptolemy.kernel.util.StringAttribute" value="EAST">
                </property>
                <property name="_showName" class="ptolemy.data.expr.SingletonParameter" value="true">
                </property>
            </port>
            <entity name="_Controller" class="ptolemy.domains.fsm.modal.ModalController">
                <property name="initialStateName" class="ptolemy.kernel.util.StringAttribute" value="init">
                </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={460, 604, 818, 388}, maximized=false}">
                </property>
                <property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[600, 400]">
                </property>
                <property name="_vergilZoomFactor" class="ptolemy.data.expr.ExpertParameter" value="1.0">
                </property>
                <property name="_vergilCenter" class="ptolemy.data.expr.ExpertParameter" value="{300.0, 200.0}">
                </property>
                <property name="annotation2" class="ptolemy.kernel.util.Attribute">
                    <property name="_hideName" class="ptolemy.kernel.util.SingletonAttribute">
                    </property>
                    <property name="_iconDescription" class="ptolemy.kernel.util.SingletonConfigurableAttribute">
                        <configure><svg><text x="20" y="20" style="font-size:9; font-family:SansSerif; fill:blue">Changed queue_in to just input (4-May-04 based on advice from EAL):
"The problem here is that queue_in is both an input and an output. DE does not support
such ports (they in fact are treated as causality loops).  Is there a reason that you
made queue_in be both an input and output?  If I change it to just be an input, then the
model runs."
</text></svg></configure>
                    </property>
                    <property name="_location" class="ptolemy.kernel.util.Location" value="[-10.0, 0.0]">
                    </property>
                    <property name="_controllerFactory" class="ptolemy.vergil.basic.NodeControllerFactory">
                    </property>
                    <property name="_editorFactory" class="ptolemy.vergil.toolbox.AnnotationEditorFactory">
                    </property>
                </property>
                <property name="annotation3" class="ptolemy.kernel.util.Attribute">
                    <property name="_hideName" class="ptolemy.kernel.util.SingletonAttribute">
                    </property>
                    <property name="_iconDescription" class="ptolemy.kernel.util.SingletonConfigurableAttribute">
                        <configure><svg><text x="20" y="20" style="font-size:9; font-family:SansSerif; fill:blue">(9May06: currently supressed, possibly,
by bus relation problem):
Changed to multiport because:
.QueueOutsideMIC.MIC.preinitialize():
output port q_out must be connected to
a multi-port in .QueueOutsideMIC.MIC
=>changed back to single port</text></svg></configure>
                    </property>
                    <property name="_location" class="ptolemy.kernel.util.Location" value="[395.0, 0.0]">
                    </property>
                    <property name="_controllerFactory" class="ptolemy.vergil.basic.NodeControllerFactory">
                    </property>
                    <property name="_editorFactory" class="ptolemy.vergil.toolbox.AnnotationEditorFactory">
                    </property>
                </property>
                <port name="queue_in" class="ptolemy.domains.fsm.modal.RefinementPort">
                    <property name="input"/>
                    <property name="_location" class="ptolemy.kernel.util.Location" value="[25.0, 125.0]">
                    </property>
                </port>
                <port name="queue_out" class="ptolemy.domains.fsm.modal.RefinementPort">
                    <property name="input"/>
                    <property name="output"/>
                    <property name="_location" class="ptolemy.kernel.util.Location" value="[435.0, 120.0]">
                    </property>
                </port>
                <entity name="Using" class="ptolemy.domains.fsm.kernel.State">
                    <property name="_controllerFactory" class="ptolemy.vergil.fsm.modal.HierarchicalStateControllerFactory">
                    </property>
                    <property name="_location" class="ptolemy.kernel.util.Location" value="[95.0, 120.0]">
                    </property>
                </entity>
                <entity name="Idle" class="ptolemy.domains.fsm.kernel.State">
                    <property name="_controllerFactory" class="ptolemy.vergil.fsm.modal.HierarchicalStateControllerFactory">
                    </property>
                    <property name="_location" class="ptolemy.kernel.util.Location" value="[375.0, 120.0]">
                    </property>
                </entity>
                <entity name="init" class="ptolemy.domains.fsm.kernel.State">
                    <property name="_controllerFactory" class="ptolemy.vergil.fsm.modal.HierarchicalStateControllerFactory">
                    </property>
                    <property name="_location" class="ptolemy.kernel.util.Location" value="[335.0, 190.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="outputActions" class="ptolemy.domains.fsm.kernel.OutputActionsAttribute" value="queue_out = queue_out + 2">
                    </property>
                    <property name="exitAngle" class="ptolemy.data.expr.Parameter" value="0.21083136556515109">
                    </property>
                    <property name="gamma" class="ptolemy.data.expr.Parameter" value="0.009761096271117788">
                    </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>
                <relation name="relation2" class="ptolemy.domains.fsm.kernel.Transition">
                    <property name="guardExpression" class="ptolemy.kernel.util.StringAttribute" value="queue_in &gt; 0">
                    </property>
                    <property name="outputActions" class="ptolemy.domains.fsm.kernel.OutputActionsAttribute" value="queue_out = queue_out - 1">
                    </property>
                    <property name="exitAngle" class="ptolemy.data.expr.Parameter" value="0.23628591370860905">
                    </property>
                    <property name="gamma" class="ptolemy.data.expr.Parameter" value="-3.13067682051917">
                    </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>
                <relation name="relation3" class="ptolemy.domains.fsm.kernel.Transition">
                    <property name="guardExpression" class="ptolemy.kernel.util.StringAttribute" value="true">
                    </property>
                    <property name="outputActions" class="ptolemy.domains.fsm.kernel.OutputActionsAttribute" value="queue_out = 1">
                    </property>
                    <property name="exitAngle" class="ptolemy.data.expr.Parameter" value="0.6283185307179586">
                    </property>
                    <property name="gamma" class="ptolemy.data.expr.Parameter" value="-0.3452534141203151">
                    </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="Using.incomingPort" relation="relation2"/>
                <link port="Using.outgoingPort" relation="relation"/>
                <link port="Idle.incomingPort" relation="relation"/>
                <link port="Idle.incomingPort" relation="relation3"/>
                <link port="Idle.outgoingPort" relation="relation2"/>
                <link port="init.outgoingPort" relation="relation3"/>
            </entity>
            <relation name="queue_inRelation" class="ptolemy.actor.TypedIORelation">
            </relation>
            <relation name="queue_outRelation" class="ptolemy.actor.TypedIORelation">
            </relation>
            <link port="queue_in" relation="queue_inRelation"/>
            <link port="queue_out" relation="queue_outRelation"/>
            <link port="_Controller.queue_in" relation="queue_inRelation"/>
            <link port="_Controller.queue_out" relation="queue_outRelation"/>
        </entity>
        <entity name="Display" class="ptolemy.actor.lib.gui.Display">
            <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={30, 716, 292, 273}, maximized=false}">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[285.0, 155.0]">
            </property>
        </entity>
        <relation name="relation2" class="ptolemy.actor.TypedIORelation">
        </relation>
        <relation name="relation3" class="ptolemy.actor.TypedIORelation">
            <vertex name="vertex1" value="[235.0, 100.0]">
            </vertex>
        </relation>
        <link port="q_out" relation="relation3"/>
        <link port="q_in" relation="relation2"/>
        <link port="ModalModel.queue_in" relation="relation2"/>
        <link port="ModalModel.queue_out" relation="relation3"/>
        <link port="Display.input" relation="relation3"/>
    </entity>
    <entity name="Queue" class="ptolemy.domains.de.lib.Queue">
        <property name="QueueIcon" class="ptolemy.vergil.icon.EditorIcon">
            <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds = {104, 126, 815, 516}, maximized = false}">
            </property>
            <property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[600, 400]">
            </property>
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[315.0, 140.0]">
        </property>
        <port name="input" class="ptolemy.actor.TypedIOPort">
            <property name="input"/>
            <property name="_type" class="ptolemy.actor.TypeAttribute" value="int">
            </property>
        </port>
        <port name="output" class="ptolemy.actor.TypedIOPort">
            <property name="output"/>
            <property name="_type" class="ptolemy.actor.TypeAttribute" value="int">
            </property>
        </port>
    </entity>
    <entity name="Clock" class="ptolemy.actor.lib.Clock">
        <doc>Create a set of pulses</doc>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[45.0, 260.0]">
        </property>
    </entity>
    <entity name="TimedDelay" class="ptolemy.domains.de.lib.TimedDelay">
        <property name="TimedDelayIcon" class="ptolemy.vergil.icon.EditorIcon">
            <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={137, 109, 815, 518}, maximized=false}">
            </property>
            <property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[600, 400]">
            </property>
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[55.0, 140.0]">
        </property>
    </entity>
    <entity name="TopLevel" class="ptolemy.actor.lib.gui.Display">
        <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={32, 433, 292, 276}, maximized=false}">
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[710.0, 80.0]">
        </property>
    </entity>
    <entity name="SingleEvent" class="ptolemy.domains.de.lib.SingleEvent">
        <property name="value" class="ptolemy.data.expr.Parameter" value="1">
        </property>
        <property name="SingleEventIcon" class="ptolemy.vergil.icon.EditorIcon">
            <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={292, 266, 815, 518}, maximized=false}">
            </property>
            <property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[600, 400]">
            </property>
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[215.0, 185.0]">
        </property>
    </entity>
    <entity name="Commutator" class="ptolemy.actor.lib.Commutator">
        <property name="CommutatorIcon" class="ptolemy.vergil.icon.EditorIcon">
            <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds = {46, 101, 815, 516}, maximized = false}">
            </property>
            <property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[600, 400]">
            </property>
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[575.0, 140.0]">
        </property>
    </entity>
    <relation name="relation" class="ptolemy.actor.TypedIORelation">
    </relation>
    <relation name="relation5" class="ptolemy.actor.TypedIORelation">
        <vertex name="vertex1" value="[650.0, 80.0]">
        </vertex>
    </relation>
    <relation name="relation4" class="ptolemy.actor.TypedIORelation">
        <vertex name="vertex1" value="[270.0, 140.0]">
        </vertex>
    </relation>
    <relation name="relation2" class="ptolemy.actor.TypedIORelation">
        <vertex name="vertex1" value="[375.0, 140.0]">
        </vertex>
    </relation>
    <relation name="relation3" class="ptolemy.actor.TypedIORelation">
    </relation>
    <link port="MIC.q_out" relation="relation3"/>
    <link port="MIC.q_in" relation="relation2"/>
    <link port="Queue.input" relation="relation4"/>
    <link port="Queue.output" relation="relation2"/>
    <link port="Queue.trigger" relation="relation"/>
    <link port="Clock.output" relation="relation"/>
    <link port="TimedDelay.input" relation="relation5"/>
    <link port="TimedDelay.output" relation="relation4"/>
    <link port="TopLevel.input" relation="relation5"/>
    <link port="SingleEvent.output" relation="relation4"/>
    <link port="Commutator.input" relation="relation3"/>
    <link port="Commutator.output" relation="relation5"/>
</entity>

Reply via email to