public class ExpandPortNames
extends EquationVisitor
Visit a UnitEquation and for each contained variable that represents a port
substitute it with a variable that represents the port from
the perspective of the model that contains the actor that contains the port.
For example, the variable representing the value of the plus port
of an actor named AddSubtract22 would originally have the variable
label plus which would be substituted with AddSubtract22.plus.
The reason for doing this is that a ComponentEntity will have
constraints on units specified as a set of UnitEquations. Within
each UnitEquation a variable of the form $PortName is used to
represent the Unit value at that port. Since a CompositeEntity will
have several ComponentEntities, each with a set of ports, it is
possible that port names will be duplicated.
- Since:
- Ptolemy II 8.0
- Version:
- $Id: ExpandPortNames.java 70398 2014-10-22 23:44:32Z cxh $
- Author:
- Rowland R Johnson
- Accepted Rating:
- Proposed Rating: