Project

General

Profile

Bug #4519

SDF Director cannot schedule when composite actor input port is disconnected

Added by Oliver Soong almost 10 years ago. Updated almost 10 years ago.

Status:
New
Priority:
Normal
Assignee:
Category:
general
Target version:
Start date:
11/03/2009
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
4519

Description

A workflow with an RExpression actor with unconnected input ports will work (see attached example 1). However, if I put that RExpression actor inside a composite actor (see attached example 2), the workflow can no longer be scheduled.

I'm not sure what the "correct" behavior is, but I like being able to have optional ports on RExpression actors and I like wrapping RExpression actors into composite actors, so I would prefer it if the composite actor could be scheduled with disconnected ports.

Unattached RExpression.xml (30 KB) Unattached RExpression.xml Oliver Soong, 11/03/2009 02:42 PM
Unattached Composite.xml (31.8 KB) Unattached Composite.xml Oliver Soong, 11/03/2009 02:42 PM
sdfCompositeNoR.xml (27.5 KB) sdfCompositeNoR.xml Christopher Brooks, 11/03/2009 03:46 PM

History

#3 Updated by Christopher Brooks almost 10 years ago

Need a test case here.
Also, try selecting "Allow disconnected graphs" in the SDF director.

#4 Updated by Christopher Brooks almost 10 years ago

Ah, nevermind, I see the test cases.

#5 Updated by Oliver Soong almost 10 years ago

I tried disconnected graphs, but it still throws the error.

I realize it's a slightly complicated case, as the scheduler would need to check up the chain of ports to see whether it's actually connected. Of course, that code might be useful in general. There's a problem with report design and ports from composite actors, and it might be at least partially related to identifying the actual source port.

#6 Updated by Christopher Brooks almost 10 years ago

This Ptolemy model has a top level with a const connected to one port of a two port composite. Inside the composite, the two ports are connected to the plus and minus ports of an AddSubtract and the output is connected to a Display.
When the model is run, the error message is:

ptolemy.actor.sched.NotSchedulableException: Actors remain that cannot be scheduled!

Note that there are many reasons why a graph cannot be scheduled:
  • SDF Graphs with feedback loops should have an actor with a delay in the loop, such as a SampleDelay.* The SDF director has an "allowDisconnectedGraphs"parameter, which, when true, permits disconnected SDF graphs.
  • The token consumption rate and production rates might be mismatched. Usually, actors produce one token or consume one token on a port. To produce or consume multiple tokens per firing, add a "tokenConsumptionRate" or "tokenConsumptionRate" parameter to the appropriate port.
    For details, see the SDF chapter in Volume Three of the Ptolemy II design doc at http://ptolemy.eecs.berkeley.edu/ptolemyII/designdoc.htm
    Unscheduled actors:
    .sdfCompositeNoR.CompositeActor.Add or Subtract .sdfCompositeNoR.CompositeActor.Display
    Scheduled actors:
    .sdfCompositeNoR.Constant

The workaround is to not connect the inner connection that goes no where.
I'm not sure if this is a bug or an RFE. It is bug in that the model does
not behave as expected, even if the "Allow disconnected ports" is set.
It is an RFE in that the model has a disconnected port.

#7 Updated by Redmine Admin over 6 years ago

Original Bugzilla ID was 4519

Also available in: Atom PDF