Exposing Modelica Component Parameters as Knowledgeware Parameters

You can expose Modelica component parameters as Knowledgeware parameters, to be able to use Modelica parameters in Knowledgeware formulas. This is done by propagating the component parameters and expose the propagated parameters as Knowledgeware parameters.

Important: In this simple scenario you only work with exposing the 'value', 'min' and 'max' attributes to Knowledgeware parameters, and apply a formula for the 'value' attribute. You can also select other attributes.

See Also
Exposing Modelica Parameters as Knowledgeware Parameters
Displaying and Editing Modelica Parameters
About Knowledge Handling Features in Dymola Behavior Modeling
  1. From the Component Browser or from the diagram, right-click the relevant component and select Edit Modelica Parameters .

    Tip: From the diagram, from the context toolbar, you can also select Edit Modelica Parameters .

    The dialog box for editing the component Modelica parameters appears to let you edit the component Modelica parameters and some other modifiers.
  2. In the dialog, click the small triangle after the box of the parameter you want to propagate and select Propagate and Edit Formula.

    Tip: You can also right-click the parameter box and select Propagate and Edit Formula.

    In this scenario, it is assumed that you have tree parameters p1, p2, and p3 defined, of type real. Start working with p2 (later you will work on p3).

    The Propagate dialog box appears, with prefilled data.
  3. In this scenario, with prefilled data unchanged, click OK.
    The Knowledge parameters dialog box appears to let you select the data to expose to Knowledgeware.
  4. In this scenario, activate 'value', 'min' and 'max' for parameters and constants.
    The following is the result:
    • The parameter p2 is propagated.

      For more information on propagating, see Propagating Parameters.

    • The selected attributes of the parameter p2 are exposed to Knowledgeware
    • The Forumla editor appears for the Knowledgeware parameter
  5. If you only want the parameter to be exposed to Knowledgeware, without applying any formula, click Cancel.

    Note: You can apply formulas later if needed.

    In this scenario, do this for p2.

    The result of the previous step applies; the parameter is propagated and exposed to Knowledgeware. The expositon to Knowledgeware is indicated by:
    • In the Parameter and Variable Editor, in the Value column, a symbol appears. In the above image, this is now valid for the propagated parameter p2.
    • 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.
  6. If you want to apply a formula to the exposed parameter, use the Forumla editor to do so. For creating knowledge formulas, see the Knowledge Basics: Managing Relations: Formulas: Creating a Formula.

    Important: The Formula editor that appears only works with the 'value' attribute. If you want to apply formulas to the other attributes, you must apply the ordinary formula command to do so. See the above reference.

    In this scenario, to do this for the parameter p3, perform Step 1 - Step 4 for p3, and then use the Forumla editor to create a formula.

    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 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.

  7. 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 node.