Text this: Equation-based modeling of variable-structure systems