// plant for the bouncing ball // macro g = -9.81; module Plant(hybrid real position, hybrid real velocity, hybrid real force) { while(true) { flow { drv(position) <- cont(velocity); drv(velocity) <- cont(force) + g; // to maintain values of variables drv(force) <- 0; } until(cont(position) <= 0 and cont(velocity) < 0); next(velocity) = -velocity/2.0; // to enable the plant to see the change flow {} until (true); } }