It seems like the problem may be more than that. The test-case I posted was a stripped-down version of a more complex model in which the internal CT model did have components which care about the passage of time.
I've attached a new proof-of-concept showing this.

        Xavier Snelgrove


<?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="CTinDEinCTNEW" class="ptolemy.actor.TypedCompositeActor">
    <property name="_createdBy" class="ptolemy.kernel.attributes.VersionAttribute" value="6.1.devel">
    </property>
    <property name="CT Director" class="ptolemy.domains.ct.kernel.CTMixedSignalDirector">
        <property name="_location" class="ptolemy.kernel.util.Location" value="{55, 40}">
        </property>
    </property>
    <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={125, 22, 813, 507}, 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="Annotation" class="ptolemy.vergil.kernel.attributes.TextAttribute">
        <property name="text" class="ptolemy.kernel.util.StringAttribute" value="This is a proof of concept of a bug in Ptolemy II 6.0.&#10;Time does not pass, unless you remove the CT actor&#10;within the DE actor shown here.">
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[170.0, 25.0]">
        </property>
    </property>
    <entity name="PeriodicSampler" class="ptolemy.domains.ct.lib.CTPeriodicSampler">
        <property name="_location" class="ptolemy.kernel.util.Location" value="[235.0, 180.0]">
        </property>
    </entity>
    <entity name="Nested DE" class="ptolemy.actor.TypedCompositeActor">
        <property name="_location" class="ptolemy.kernel.util.Location" value="[345.0, 185.0]">
        </property>
        <property name="DE Director" class="ptolemy.domains.de.kernel.DEDirector">
            <property name="_location" class="ptolemy.kernel.util.Location" value="{45, 35}">
            </property>
        </property>
        <property name="Annotation" class="ptolemy.vergil.kernel.attributes.TextAttribute">
            <property name="text" class="ptolemy.kernel.util.StringAttribute" value="Remove me to make execution work again!">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[175.0, 70.0]">
            </property>
        </property>
        <property name="Line" class="ptolemy.vergil.kernel.attributes.LineAttribute">
            <property name="_location" class="ptolemy.kernel.util.Location" value="[310.0, 90.0]">
            </property>
            <property name="x" class="ptolemy.data.expr.Parameter" value="-20">
            </property>
            <property name="y" class="ptolemy.data.expr.Parameter" value="80">
            </property>
        </property>
        <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={106, 130, 813, 507}, 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>
        <port name="port" class="ptolemy.actor.TypedIOPort">
            <property name="input"/>
            <property name="_location" class="ptolemy.kernel.util.Location" value="{20.0, 200.0}">
            </property>
        </port>
        <port name="port2" class="ptolemy.actor.TypedIOPort">
            <property name="output"/>
            <property name="_location" class="ptolemy.kernel.util.Location" value="{580.0, 200.0}">
            </property>
        </port>
        <entity name="Nested CT" class="ptolemy.actor.TypedCompositeActor">
            <property name="_location" class="ptolemy.kernel.util.Location" value="[255.0, 230.0]">
            </property>
            <property name="CT Director" class="ptolemy.domains.ct.kernel.CTMixedSignalDirector">
                <property name="_location" class="ptolemy.kernel.util.Location" value="{40, 50}">
                </property>
            </property>
            <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={105, 130, 813, 507}, 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>
            <port name="port" class="ptolemy.actor.TypedIOPort">
                <property name="input"/>
                <property name="_location" class="ptolemy.kernel.util.Location" value="{20.0, 200.0}">
                </property>
            </port>
            <port name="port2" class="ptolemy.actor.TypedIOPort">
                <property name="output"/>
                <property name="_location" class="ptolemy.kernel.util.Location" value="{580.0, 200.0}">
                </property>
            </port>
            <entity name="First-order" class="ptolemy.domains.ct.lib.ContinuousTransferFunction">
                <property name="denominator" class="ptolemy.data.expr.Parameter" value="{1.0, 1.0}">
                </property>
                <property name="_location" class="ptolemy.kernel.util.Location" value="[270.0, 205.0]">
                </property>
                <entity name="InputAdder" class="ptolemy.actor.lib.AddSubtract">
                </entity>
                <entity name="OutputAdder" class="ptolemy.actor.lib.AddSubtract">
                </entity>
                <entity name="Integrator0" class="ptolemy.domains.ct.lib.Integrator">
                    <property name="initialState" class="ptolemy.data.expr.Parameter" value="0.0">
                    </property>
                    <property name="IntegratorIcon" class="ptolemy.vergil.icon.EditorIcon">
                        <property name="rectangle" class="ptolemy.vergil.kernel.attributes.RectangleAttribute">
                            <property name="_location" class="ptolemy.kernel.util.Location" value="-0.0, 0.0">
                            </property>
                            <property name="width" class="ptolemy.data.expr.Parameter" value="38.0">
                            </property>
                            <property name="height" class="ptolemy.data.expr.Parameter" value="40.0">
                            </property>
                            <property name="centered" class="ptolemy.data.expr.Parameter" value="true">
                            </property>
                            <property name="fillColor" class="ptolemy.actor.gui.ColorAttribute" value="{1.0, 1.0, 1.0, 1.0}">
                            </property>
                        </property>
                        <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={117, 239, 815, 518}, maximized=false}">
                        </property>
                        <property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[600, 400]">
                        </property>
                        <property name="_vergilZoomFactor" class="ptolemy.data.expr.ExpertParameter" value="4.0">
                        </property>
                        <property name="_vergilCenter" class="ptolemy.data.expr.ExpertParameter" value="{0.0, 0.0}">
                        </property>
                        <property name="image" class="ptolemy.vergil.kernel.attributes.ImageAttribute">
                            <property name="source" class="ptolemy.data.expr.FileParameter" value="$CLASSPATH/ptolemy/domains/ct/lib/integral.gif">
                            </property>
                            <property name="_location" class="ptolemy.kernel.util.Location" value="[-5.0, -16.0]">
                            </property>
                        </property>
                    </property>
                    <port name="input" class="ptolemy.actor.TypedIOPort">
                        <property name="input"/>
                        <property name="signalType" class="ptolemy.data.expr.Parameter" value="&quot;CONTINUOUS&quot;">
                        </property>
                    </port>
                    <port name="output" class="ptolemy.actor.TypedIOPort">
                        <property name="output"/>
                        <property name="signalType" class="ptolemy.data.expr.Parameter" value="&quot;CONTINUOUS&quot;">
                        </property>
                    </port>
                </entity>
                <entity name="Feedback0" class="ptolemy.actor.lib.Scale">
                    <property name="factor" class="ptolemy.data.expr.Parameter" value="-1.0">
                    </property>
                    <property name="scaleOnLeft" class="ptolemy.data.expr.Parameter" value="true">
                    </property>
                    <property name="_icon" class="ptolemy.vergil.icon.AttributeValueIcon">
                        <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="factor">
                        </property>
                    </property>
                </entity>
                <entity name="Feedforward0" class="ptolemy.actor.lib.Scale">
                    <property name="factor" class="ptolemy.data.expr.Parameter" value="1.0">
                    </property>
                    <property name="scaleOnLeft" class="ptolemy.data.expr.Parameter" value="true">
                    </property>
                    <property name="_icon" class="ptolemy.vergil.icon.AttributeValueIcon">
                        <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="factor">
                        </property>
                    </property>
                </entity>
                <relation name="node0" class="ptolemy.actor.TypedIORelation">
                    <property name="width" class="ptolemy.data.expr.Parameter" value="1">
                    </property>
                </relation>
                <relation name="_R" class="ptolemy.actor.TypedIORelation">
                    <property name="width" class="ptolemy.data.expr.Parameter" value="1">
                    </property>
                </relation>
                <relation name="_R2" class="ptolemy.actor.TypedIORelation">
                    <property name="width" class="ptolemy.data.expr.Parameter" value="1">
                    </property>
                </relation>
                <relation name="_R3" class="ptolemy.actor.TypedIORelation">
                    <property name="width" class="ptolemy.data.expr.Parameter" value="1">
                    </property>
                </relation>
                <relation name="inputRelation" class="ptolemy.actor.TypedIORelation">
                    <property name="width" class="ptolemy.data.expr.Parameter" value="1">
                    </property>
                </relation>
                <relation name="outputRelation" class="ptolemy.actor.TypedIORelation">
                    <property name="width" class="ptolemy.data.expr.Parameter" value="1">
                    </property>
                </relation>
                <link port="input" relation="inputRelation"/>
                <link port="output" relation="outputRelation"/>
                <link port="InputAdder.plus" relation="_R"/>
                <link port="InputAdder.plus" relation="inputRelation"/>
                <link port="InputAdder.output" relation="_R3"/>
                <link port="OutputAdder.plus" relation="_R2"/>
                <link port="OutputAdder.output" relation="outputRelation"/>
                <link port="Integrator0.input" relation="_R3"/>
                <link port="Integrator0.output" relation="node0"/>
                <link port="Feedback0.input" relation="node0"/>
                <link port="Feedback0.output" relation="_R"/>
                <link port="Feedforward0.input" relation="node0"/>
                <link port="Feedforward0.output" relation="_R2"/>
            </entity>
            <entity name="ZeroOrderHold" class="ptolemy.domains.ct.lib.ZeroOrderHold">
                <property name="_location" class="ptolemy.kernel.util.Location" value="[135.0, 200.0]">
                </property>
                <property name="_hideName" class="ptolemy.kernel.util.SingletonAttribute">
                </property>
            </entity>
            <entity name="PeriodicSampler" class="ptolemy.domains.ct.lib.CTPeriodicSampler">
                <property name="samplePeriod" class="ptolemy.data.expr.Parameter" value="0.2">
                </property>
                <property name="_location" class="ptolemy.kernel.util.Location" value="[480.0, 195.0]">
                </property>
                <property name="_hideName" class="ptolemy.kernel.util.SingletonAttribute">
                </property>
            </entity>
            <relation name="relation" class="ptolemy.actor.TypedIORelation">
                <property name="width" class="ptolemy.data.expr.Parameter" value="1">
                </property>
            </relation>
            <relation name="relation2" class="ptolemy.actor.TypedIORelation">
                <property name="width" class="ptolemy.data.expr.Parameter" value="1">
                </property>
            </relation>
            <relation name="relation3" class="ptolemy.actor.TypedIORelation">
                <property name="width" class="ptolemy.data.expr.Parameter" value="1">
                </property>
            </relation>
            <relation name="relation4" class="ptolemy.actor.TypedIORelation">
                <property name="width" class="ptolemy.data.expr.Parameter" value="1">
                </property>
            </relation>
            <link port="port" relation="relation"/>
            <link port="port2" relation="relation4"/>
            <link port="First-order.input" relation="relation2"/>
            <link port="First-order.output" relation="relation3"/>
            <link port="ZeroOrderHold.input" relation="relation"/>
            <link port="ZeroOrderHold.output" relation="relation2"/>
            <link port="PeriodicSampler.input" relation="relation3"/>
            <link port="PeriodicSampler.output" relation="relation4"/>
        </entity>
        <relation name="relation2" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
            </property>
        </relation>
        <relation name="relation" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
            </property>
        </relation>
        <link port="port" relation="relation"/>
        <link port="port2" relation="relation2"/>
        <link port="Nested CT.port" relation="relation"/>
        <link port="Nested CT.port2" relation="relation2"/>
    </entity>
    <entity name="TimedPlotter" class="ptolemy.actor.lib.gui.TimedPlotter">
        <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={262, 211, 500, 345}, maximized=false}">
        </property>
        <property name="_plotSize" class="ptolemy.actor.gui.SizeAttribute" value="[500, 300]">
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[490.0, 185.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>
<xRange min="0.0" max="0.0"/>
<yRange min="0.0" max="0.0"/>
</plot>?>
        </configure>
    </entity>
    <entity name="Const" class="ptolemy.actor.lib.Const">
        <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="[45.0, 180.0]">
        </property>
    </entity>
    <relation name="relation2" class="ptolemy.actor.TypedIORelation">
        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
        </property>
    </relation>
    <relation name="relation3" class="ptolemy.actor.TypedIORelation">
        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
        </property>
    </relation>
    <relation name="relation" class="ptolemy.actor.TypedIORelation">
        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
        </property>
    </relation>
    <link port="PeriodicSampler.input" relation="relation"/>
    <link port="PeriodicSampler.output" relation="relation2"/>
    <link port="Nested DE.port" relation="relation2"/>
    <link port="Nested DE.port2" relation="relation3"/>
    <link port="TimedPlotter.input" relation="relation3"/>
    <link port="Const.output" relation="relation"/>
</entity>

On 28-Feb-07, at 16:29, Edward A. Lee wrote:


Very interesting... I've verified that the same bug occurs in
our new Continuous domain (see attached model).  The problem is that
the innermost CT model has a straight through connection:


   in>---------out>

with no actors, and the CTDirector calls fireAt(_currentTime)
every time it fires.  This prevents time from advancing.

Haiyang: It seems that we aren't dealing correctly with the
case where there are no actors at all that care about step size.
The code is choosing a step size of zero in this circumstance,
but this probably isn't the right choice...

Suggestions?
Edward



At 10:26 AM 2/12/2007, [EMAIL PROTECTED] wrote:
Hello all,

There appears to be some sort of a bug when you nest a CT actor within a DE actor which is, in turn, within a CT domain. Time does not ever advance past 0. This problem is new with v6.0, and can be seen with a test- case
I've made at:

http://wxs.ca/ptII/CTinDEinCTbase.xml

That example will run normally in v5, time advances and it plots a
straight line as you would expect. In v6 it sits at time 0.

I'm on a Mac, but I assume that's a non-issue for something as fundamental as this. I have not, however, tested it on any other systems, so it may be
platform-specific.

  Thanks,
    Xavier Snelgrove


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

------------
Edward A. Lee
Chair of EECS and Robert S. Pepper Distinguished Professor
231 Cory Hall, UC Berkeley, Berkeley, CA 94720-1770
phone: 510-642-0253, fax: 510-642-2845
[EMAIL PROTECTED], http://ptolemy.eecs.berkeley.edu/~eal
<ContinuousInDEInContinuous.xml>

Reply via email to