Abstract switch in Modelica
问题 I would like to motivate a question I asked before about a Modelica array of partial model. Consider the following model of a switch between 2 controllers. model Switch input Real u; input Integer sel; output Real y; protected Real x; equation if sel == 1 then y = 0.1 * (0 - u); der(x) = 0; else y = 0.1 * (0 - u) + 0.2 * x; der(x) = 0 - u; end if; end Switch; Let's ignore the fact that the PI controller may break when it is not selected for some time due to divergence of x . This can be fixed