Measure-driven impulsive systems : stabilization, optimal control and applications