Simulation Notes Europe, Volume 23(1), April 2013

A Python Package for Simulating Variable-Structure Models with Dymola

SNE Simulation Notes Europe SNE 23(1), 2013, 17-24
DOI: 10.11128/


It becomes increasingly important to create more accurate models that can be simulated fast. To ac­complish this we need models which can change their set of equations during runtime. These models are called variable-structure models. These models enable a user to specify a model with more than one mode and change between these modes during runtime. This can make a simulation faster and in some cases even more accu­rate. In this paper we present a Python package that enables the user to specify such models in an easy and in­tuitive manner. The introduced package provides means to use existing Dymola models as modes and simulate the variable-structure model with the Dymola simulation engine. Different examples are presented which were simulated with the new package and the advantages of variable-structure modeling with the Python package is discussed. Furthermore, requirements a model needs to fulfill to be used in a variable-structure model are explained.