Equation-Based Modeling Of Variable-Structure Systems