SDF Director cannot schedule when composite actor input port is disconnected
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.
#5 Updated by Oliver Soong about 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 about 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
.sdfCompositeNoR.CompositeActor.Add or Subtract .sdfCompositeNoR.CompositeActor.Display
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.