OpenOCL v5.08 now supports multi-stage problems. There are two examples: bouncing ball (2 stages) and bouncing ball simulation (uncontrolled, 5-stages).
Multi-stage problems arrise when the dynamics change during the trajectory (spacecraft re-entry, multiple stages of a rocket), or they can be used to model
events
that happen between stages. The states are allowed to jump during these events (or transitions), for examples the velocity of a ball changes direction when the ball hits the ground.
The new version is available as a Matlab toolbox or zip, at Matlab Add-Ons or at File Exchange.
We also created a support channel for you to ask questions or share your work with OpenOCL. We will also share some interesting material that is generally related to optimal control and control theory.