Creating Inner/Outer Models for Context Dynamic Behavior

You can create an "inner" model that will be applied to "outer" models.

An "inner" model is used to create a global context for a logical model, provided that:

  • the "inner" model is stored in a context dynamic behavior (inserted in a logical component)
  • the "outer" models are stored in dynamic behaviors (inserted in the logical sub-components)
  • the "inner" and "outer" models share the same name.

Note that from the Modelica Standard Library, you can also use predefined:

  • "inner" models: for example, the World component from Mechanics > Multibody.
  • "outer" models: all the components contained in Mechanics > Multibody (except World) are outer models.


Before you begin: You can define an Inner type to any model in a library representation or in a logical behavior.

However, for the purpose of this scenario, you should insert a context dynamic behavior in a logical component.

Related Topics
Inserting a Behavior in an Existing Function/Logical Component
  1. Activate the Context model.

  2. Click New Class .

  3. Select Model as a class type.

  4. Enter a name for you model, Global for example.

    Warning: The same name must be used for the inner model and for the associated outer models.

  5. Click OK to finish your creation and exit the New Class dialog box.

  6. Instantiate your new Global model in the Context behavior.

  7. Select the model from the Component Browser or from the diagram layer.

    The contextual balloon toolbar appears.

  8. Select Edit Parameters from the contextual toolbar.

    The Component Parameters Edition dialog box appears.

  9. From the Attributes tab, in the Dynamic Typing area, select Inner.

    Tip: To create an "outer" model, select the Outer option from the Dynamic Typing area.

  10. Click OK to validate your parameters modification and close the Component Parameters Edition dialog box.

    The Global model is now an inner behavior.