A timed merge actor for the DE domain. It merges a set of input signals into a single output signal based on the order of the tags associated with the events of signals. A tag is a tuple of a timestamp (as double) and a microstep or index (as non-negative integer). Tags have a lexicographic order.
This actor has an input port (a multiport) and an output port (a single port). The types of the ports are undeclared and will be resolved by the type resolution mechanism, with the constraint that the output type must be greater than or equal to the input type.
There is a boolean parameter discardEvents associated with this actor, which decides how to handle simultaneously available inputs. Each time this actor fires, it reads the first available tokens from an input channel and sends them to the output port. If the discardEvents parameter is configured to true, then this actor discards all the remaining inputs in the rest of channels. Otherwise, this actor requests refirings at the current time until no more events are left in the channels. By default, the discardEvents parameter is false.
@author Edward A. Lee, Haiyang Zheng
@version $Id: Merge.java,v 1.36 2005/10/28 20:18:11 cxh Exp $
@since Ptolemy II 0.4
@Pt.ProposedRating Green (hyzheng)
@Pt.AcceptedRating Green (hyzheng)