<p>On each firing, evaluate an expression that may include references
to the inputs, current time, and a count of the firing. The ports
are referenced by the identifiers that have the same name as the
port. To use this class, instantiate it, then add ports (instances
of TypedIOPort). In vergil, you can add ports by right clicking on
the icon and selecting "Configure Ports". In MoML you can add
ports by just including ports of class TypedIOPort, set to be
inputs, as in the following example:</p>
<pre>
<entity name="exp" class="ptolemy.actor.lib.Expression">
<port name="in" class="ptolemy.actor.TypedIOPort">
<property name="input"/>
</port>
</entity>
</pre>
<p> This actor is type-polymorphic. The types of the inputs can be
arbitrary and the types of the outputs are inferred from the
expression based on the types inferred for the inputs.</p>
<p> The <i>expression</i> parameter specifies an expression that
can refer to the inputs by name. By default, the expression is
empty, and attempting to execute the actor without setting it
triggers an exception. This actor can be used instead of many of
the arithmetic actors, such as AddSubtract, MultiplyDivide, and
TrigFunction. However, those actors will be usually be more
efficient, and sometimes more convenient to use.</p>
<p> The expression language understood by this actor is the same as
<a href="../../../../expressions.htm">that used to set any
parameter value</a>, with the exception that the expressions
evaluated by this actor can refer to the values of inputs, and to
the current time by the identifier name "time", and to the current
iteration count by the identifier named "iteration."</p>
<p> This actor requires its all of its inputs to be present. If
inputs are not all present, then an exception will be thrown.</p>
<p> NOTE: There are a number of limitations in the current
implementation. Primarily, multiports are not supported.</p>
Xiaojun Liu, Edward A. Lee, Steve Neuendorffer
$Id: Expression.java 70398 2014-10-22 23:44:32Z cxh $
Ptolemy II 0.2
Green (neuendor)
Green (neuendor)
The output port.
The expression that is evaluated to produce the output.