From the Parameter and Variable Editor, select the parameter you want to edit.
Select Edit (or Create if you need a new parameter/variable).
The Parameter and Variable Edition dialog box appears.
From the Declaration tab, modify or enter your Modelica specifications as it will appear in the Modelica text browser. - Variability: select a variable type between Parameter, Constant, Discrete variables or let this field empty. By default, the field is empty and a continuous variable is created.
- Type: Select either a basic type from the combo box (Real, Integer, Boolean, String) or a class from the Package Browser.
- Name: type the name that will appear from the Parameter and Variable Editor.
- Array Dimension: if need be, define an array. By default, this field is left empty and the value is 1.
- Value: enter the default value for this parameter/variable. The value can be a number or the complete modifier of the variable. Example for a Resistor instance "(R=4)".
- Description field: if need be, enter a description for the parameter/variable.
Click the Attributes tab to specify additional type prefixes.
From the Properties area, specify how the parameter/variable can be accessed or changed in modifiers. - Final: the value of the parameter/variable cannot be modified.
- Protected: the parameter/variable cannot be accessed from outside the model.
- Replaceable: the parameter/variable can be re-declared in a modifier.
From the Connector members, select Flow to specify that this quantity sums to zero when connected. This option is available for the parameters/variables of a connector. Examples of such quantities are torque and current.
From the Causality area, specify the causality that is needed for public parameters/variables. - None: the parameter/variable has unspecified causality (determined during translation).
- Input: the parameter/variable is an input to the model.
- Output: the parameter/variable is calculated by the model.
From the Dynamic Typing area, specify type properties for the parameter/variable: - Normal: the parameter/variable has no dynamic type.
- Inner: the parameter/variable can be referenced by inner parameter/variable in nested components.
- Outer: the parameter/variable will match an outer parameter/variable in an enclosing scope.
From the Expose in Knowledgeware area, specify attributes for the linked Knowledge parameter. Also refer to Creating a Knowledge Parameter in a Modelica Class.
Click the Annotations tab to create and edit annotations.
From the Evaluate area, specify whether a parameter should be evaluated during translation. - Default: the parameter is evaluated as defined in the Execution Setup dialog box. Refer to Execution Setup Dialog Box.
- On: the parameter is always evaluated during translation.
- Off: the parameter is never evaluated during translation.
From the Hide area, specify whether a variable should be hidden. Note:
If a variable is internal, it is better to declare it protected using the Attributes tab.
- Default: show variable (if not declared as protected).
- On: never show variable in variable browser.
- Off: always show variable in variable browser.
From the Parameter dialog placement area, specify in which tab and group of parameters the variable input field should be present, and make the input field conditionally enabled depending on other parameters. - Tab: specifies in which tab the variable input field should be added.
- Group: specifies in which group of parameters the variable input field should be added.
- Enable: specify whether the input field should be enabled. If true, the conditional input field in the parameter dialog box is enabled.
From the Graphical information area, specify attributes of the graphical component. - Extent: defines the extent of the graphical component. Accepted value format is {{real,real},{real,real}}, for example {{-10,-10},{10,10}}.
- Origin: defines the origin of the graphical component. Accepted value format is {real,real}, for example {0,0}.
- Rotation: defines the rotation of the graphical component. Accepted value format is real, for example 90.
Click OK to exit the Variable and Parameter Declaration dialog box and validate your modifications.
|