About Components
A component is an instance of a class. Its parameter values can be changed.
Components appear in the Component Browser, and in the diagram layer.
About ComponentsA component is an instance of a class. Its parameter values can be changed. Components appear in the Component Browser, and in the diagram layer. About Replaceable ComponentsIn a replaceable component, you can redeclare:
See Working with Replaceable Components Modelica TextIn Modelica, a replaceable component is declared in the following way: class C1 replaceable MyClass M1; end C1; The component can be replaced either in another class that extends C1: class C2 extends C1(redeclareMyOtherClass M1); end C2; or by creating a component from C1: class C2 C1 c1comp(redeclare MyOtherClass M1); end C2; When replaced, M1 attributes are modified in both C1 and C2. Note that you can edit only components that have a graphical representation. It is also possible to set constraints on which the class of the replaceable component can be replaced with:
class C3 replaceable MyClass M1 constrainedby MySpecialClass; end C3; For more information about the capabilities and attributes of replaceable and replaced components, see the Modelica Language Specification, available at http://www.modelica.org. |