An optimal control approach to mode generation in hybrid systems