A unified framework for hybrid control: model and optimal control theory | Synapse