Yang responded to your message, I'm forwarding it on here.

Yang <[EMAIL PROTECTED]> wrote:

> Hi David,
> 
> In the wireless domain, we have a Channel component(which is an Actor type) 
> that manages connections between actors and no static connections need to 
> be drawn. There are different channel models in this domain. Mainly of them 
> decide whether a port is connected to other ports by their locations using 
> the _isInRange() method (see 
> ptolemy.domains.wireless.kernel.AtomicWirelessChannel). This domain was 
> originally designed for model sensor networks. It preserves the Discrete 
> Event semantics but using channel components to decide dynamic connections 
> between sensors.
> 
> I think you can easily extend the AtomicWirelessChannel class to specify 
> your connection mechanism if this domain is feasible for your problem. One 
> possible approach is to create a table to specify which port is connected 
> to which port, and have the _isInRange method to refer to the table to 
> decide the connectivity. You might want to look at some demos of this 
> domain at ptolemy/domains/wireless/demo. The CircularRange and 
> WirelessSoundDetection are good to start with.
> 
> Let me know if you have further questions.
> 
> Yang

[EMAIL PROTECTED] (Dave from Dublin) wrote:    
    Hi again,
    
    Thanks first of all for the quick and helpful response to my last
    question.
    At the moment I am trying to create an actor that will store and be
    able to show relations and links without having a graphical link
    displayed (in Vergil).  For my purposes there are too many connections
    needed that using a regular click-and-drag relation will result in too
    much clutter on the graph editor so I would like to add the relations
    and links manually.  In this regard (and looking at the very simple
    model (code below):
    
    1. How do I name ports that they will be recognised as the same as the
     ones shown in the model (some sort of global name??).  If I create
    all the actors and their ports from my own Java program this is not an
    issue but if Vergil creates them how does it name, how can I refer to
    objects it has created?
    
    2. A submodel is a TypedCompositeActor object as I understand it? 
    Regarding setting a Director at the top level (above all submodels)
    what do I use to add it to?  Does the empty graph editor have a type?
    CompositeEntity/CompositeActor? (only CompositeActor has a
    setDirector() method)  And if so, does this have a name?
    
    Thanks again for any help you can give me,
    David Mc Guinness
    Performance Engineering Laboratory,
    University College Dublin
    
    
    XML:
    
    (I just want to "invisibly" connect a Const to the input port of the
    submodel)
     
    
    <?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="Need_Invisible_Connection"
    class="ptolemy.actor.TypedCompositeActor">
        <property name="_createdBy"
    class="ptolemy.kernel.attributes.VersionAttribute" value="3.0.2">
        </property>
        <property name="DE Director"
    class="ptolemy.domains.de.kernel.DEDirector">
            <property name="startTime" class="ptolemy.data.expr.Parameter"
    value="0.0">
            </property>
            <property name="stopTime" class="ptolemy.data.expr.Parameter"
    value="1.7976931348623E308">
            </property>
            <property name="stopWhenQueueIsEmpty"
    class="ptolemy.data.expr.Parameter" value="true">
            </property>
            <property name="synchronizeToRealTime"
    class="ptolemy.data.expr.Parameter" value="false">
            </property>
            <property name="isCQAdaptive"
    class="ptolemy.data.expr.Parameter" value="true">
            </property>
            <property name="minBinCount"
    class="ptolemy.data.expr.Parameter" value="2">
            </property>
            <property name="binCountFactor"
    class="ptolemy.data.expr.Parameter" value="2">
            </property>
            <property name="_location"
    class="ptolemy.kernel.util.Location" value="75.0, 45.0">
            </property>
        </property>
        <property name="_windowProperties"
    class="ptolemy.actor.gui.WindowPropertiesAttribute"
    value="{bounds={551, 337, 817, 526}}">
        </property>
        <property name="_vergilSize"
    class="ptolemy.actor.gui.SizeAttribute" value="[600, 400]">
        </property>
        <entity name="composite actor"
    class="ptolemy.actor.TypedCompositeActor">
            <property name="_location"
    class="ptolemy.kernel.util.Location" value="285.0, 140.0">
            </property>
            <port name="port" class="ptolemy.actor.TypedIOPort">
                <property name="input"/>
                <property name="multiport"/>
                <property name="_location"
    class="ptolemy.kernel.util.Location" value="25.0, 200.0">
                </property>
            </port>
            <entity name="Display" class="ptolemy.actor.lib.gui.Display">
                <property name="rowsDisplayed"
    class="ptolemy.data.expr.Parameter" value="10">
                </property>
                <property name="columnsDisplayed"
    class="ptolemy.data.expr.Parameter" value="40">
                </property>
                <property name="title"
    class="ptolemy.kernel.util.StringAttribute">
                </property>
                <property name="_windowProperties"
    class="ptolemy.actor.gui.WindowPropertiesAttribute">
                </property>
                <property name="_location"
    class="ptolemy.kernel.util.Location" value="270.0, 200.0">
                </property>
                <port name="input" class="ptolemy.actor.TypedIOPort">
                    <property name="input"/>
                    <property name="multiport"/>
                </port>
            </entity>
            <relation name="relation"
    class="ptolemy.actor.TypedIORelation">
            </relation>
            <link port="port" relation="relation"/>
            <link port="Display.input" relation="relation"/>
        </entity>
        <entity name="Const" class="ptolemy.actor.lib.Const">
            <property name="value" class="ptolemy.data.expr.Parameter"
    value="1">
            </property>
            <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="40">
                </property>
            </property>
            <property name="_location"
    class="ptolemy.kernel.util.Location" value="75.0, 120.0">
            </property>
            <port name="output" class="ptolemy.actor.TypedIOPort">
                <property name="output"/>
            </port>
            <port name="trigger" class="ptolemy.actor.TypedIOPort">
                <property name="input"/>
                <property name="multiport"/>
            </port>
        </entity>
        <entity name="Const2" class="ptolemy.actor.lib.Const">
            <property name="value" class="ptolemy.data.expr.Parameter"
    value="1">
            </property>
            <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="40">
                </property>
            </property>
            <property name="_location"
    class="ptolemy.kernel.util.Location" value="75.0, 180.0">
            </property>
            <port name="output" class="ptolemy.actor.TypedIOPort">
                <property name="output"/>
            </port>
            <port name="trigger" class="ptolemy.actor.TypedIOPort">
                <property name="input"/>
                <property name="multiport"/>
            </port>
        </entity>
    </entity>
    
    ------- End of Forwarded Message
    
    _______________________________________________
    Ptolemy maillist  -  [EMAIL PROTECTED]
    http://chess.eecs.berkeley.edu/ptolemy/listinfo/ptolemy
--------

----------------------------------------------------------------------------
Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]

Reply via email to