Exposing Modelica Parameters as Knowledgeware Parameters

You can expose Modelica parameters as Knowledgeware parameters, to be able to use Modelica parameters in Knowledgeware formulas.

Important: In this simple scenario you only work with exposing the 'value', 'min' and 'max' attributes to Knowledgeware parameters. You can also select other attributes, this means that other columns in the Parameter and Variable Editor are involved.

See Also
Exposing Modelica Component Parameters as Knowledgeware Parameters
Defining Parameters and Editing Properties of Parameters
About Knowledge Handling Features in Dymola Behavior Modeling
  1. From the Parameter and Variable Editor, select or multiselect the parameters you want to edit.

    In this scenario, it is assumed that you have tree parameters p1, p2, and p3 defined, of type real. Select p2.

  2. Select Edit the selected parameter, constant or variable (or Create a parameter, constant or variable if you need a new parameter or variable).

    Tip: To edit a parameter or variable from the Parameter and Variable Editor, you can also right-click it and select Edit Parameter or Variable.

  3. Select the Attributes tab to specify additional type prefixes.
  4. From the Expose in Knowledgeware area, specify attributes to expose as a Knowledgeware parameter.

    Tip: You can also right-click the parameter or variable in the Parameter and Variable Editor and select (variable name) object > Expose in Knowledgeware to specify the attributes.

    In this scenario, select the 'value', 'min' and 'max' attributes for the parameter p2.

  5. Click OK to exit the Variable and Parameter Editior dialog box and validate your creation or modification.
    The following is the result:
    • In the Parameter and Variable Editor, in the Value column, a symbol appears to indicate that the parameter is exposed as a Knowledgeware parameter. In the below image, p2 is exposed as a Knowledgeware parameter.

      Important: The above is valid for the "value, min and max attribute". If you select to expose any of the "start", "nominal" or "fixed" attribute for a parameter, constant or variable, the indication appears also in the corresponding column in the Parameter and Variable Editor.
    • In the tree, the parameter appears with a similar symbol, under the related class.
  6. Expose p3 as a Knowledgeware parameter the same way.

    Tip: To be able to expose several parameters to Knowledgeware at the same time, press Ctrl and click several parameters from the Parameter and Variable Editor, and then right-click any of them and select Selected objects > Expose in Knowledgeware .
    Note: Tickmark means all selected parameters have the setting activated, grayed tickmark means some, not all, parameters have the setting activated.

  7. To use formulas for a Knowledgeware parameter, from the Tools section of the action bar, click Formula .

    Tip: You can also, in the Parameter and Variable Editor, right-click the parameter and select Edit Formula .

    Perform this for the parameter p3.

    The Forumla editor appears. For creating knowledge formulas, see the Knowledge Basics: Managing Relations: Formulas: Creating a Formula.

    When the formula is defined for the parameter, the following is the result:

    • In the Parameter and Variable Editor, in the Value column, a symbol appears to indicate that the value of the exposed parameter is computed from a formula, or it has a direct link with another Knowledgeware parameter or PLM parameter. In the above image, this is now valid for the parameter p3.
    • In the Component Browser, if parameters are displayed, the same symbol is displayed for the parameter.
    • In the tree:
      • Under the related class, the parameter appears with a similar symbol.
      • A new node Relations.1 is created, and under that node the formula is displayed with the icon and the formula.
        Note: There can be only one Relations node for each Modelica library.

  8. To unexpose a parameter exposed in Knowledgeware, clear the corresponding boxes in the dialog box for knowledgeware exposition, and click OK.
    The parameter is unexposed from Knowledgeware.

In summary, the knowledge variables can be displayed the following from the actions in this task:

  • The Parameter and Variable Editor, the Component Browser, and the tree of the related class displays the parameters exposed to Knowledgeware:
    • indicates that the Modelica parameter is exposed as a Knowledgeware parameter.
    • indicates that the value of the exposed parameter is computed from a formula, or it has a direct link with another Knowledgeware parameter or PLM parameter.
    • ( Only in Component Browser: The item is not exposed in knowledgeware.)
    In the Parameter and Variable Editor, a green marker in front of the icon indicates that the value is overloaded, an orange marker in front of the icon indicates that the value is local. As examples, such formula driven values are marked by and , respectively, in the Parameter and Variable Editor.
  • For parameters where the knowledge exposed parameter is computed from a formula, the formulas are displayed in the tree, under the Relations.1 node.