Skip to content

Replacing subsystems #2038

Open
Open
@baggepinnen

Description

@baggepinnen

Modelica has the replaceable keyword to enable models that have replaceable components. This is useful in model libraries, where the user might want to replace one or several of the components in a larger model.

In MTK, our current option is to require the author of the model library to ensure that there are input arguments to the constructor of every model to allow the user to select model components.

As an example, consider a model component that models a heat pump, this model is likely to have hundreds of sub-models. Deep inside this model, I as a user want to replace a friction model to something more detailed, how do I do this? If I own the model library, I could make all the required changes to all constructors to take the friction model as an argument, but if I do not own the model library?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions