Abstract
It becomes increasingly important to create more accurate models that can be simulated fast. To accomplish 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 accurate. In this paper we present a Python package that enables the user to specify such models in an easy and intuitive 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.