The Switch actor will do this in DE...
It will also do this in PN, without a timing model...
Edward
At 12:44 PM 11/19/2003 -0800, Christopher Hylands Brooks wrote:
In comp.soft-sys, [EMAIL PROTECTED] (Dave from Dublin) writes: -------- I am quite new to Ptolemy and I am working a little in the DE domain. I cannot seem to find an actor that will perform the equivalent of an IF statement, i.e. an actor that reads from a single input channel and chooses which output port to write to, based on the value read (e.g. >5 write to port1, else write to port2). Is there an actor to do this or is there another way to implement this kind of functionality? Any help greatly appreciated, --------
This sounds a bit like Dynamic Dataflow (DDF), which is not supported in Ptolemy II. In SDF, having an actor that fires to a different port depending on its value makes it difficult to figure out the balance equations.
You could try using a Comparator connected to a BooleanSelect or BooleanSwitch. Comparator is found under actor library -> logic BooleanSelect and BooleanSwitch are found under actor library -> boolean flow control -> boolean flow control.
Someone else might have a suggestion.
-Christopher
---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]
------------ Edward A. Lee, Professor 518 Cory Hall, UC Berkeley, Berkeley, CA 94720 phone: 510-642-0455, fax: 510-642-2739 [EMAIL PROTECTED], http://ptolemy.eecs.berkeley.edu/~eal
---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]