This PR adds a new example to the examples/ directory that illustrates a simple multiphase problem. This example highlights key multiphase features, including:
The OptimalControlProblem.new_phase_like method, which allows a second phase with copied definition (same state variables, control variables, state equations etc.) to be created.
A variable time boundary between phases by setting a lower and upper bound on the final and initial time of two adjacent phases, and enforcing their continuity using an endpoint constraint bounded to 0.
This PR adds a new example to the
examples/
directory that illustrates a simple multiphase problem. This example highlights key multiphase features, including:OptimalControlProblem.new_phase_like
method, which allows a second phase with copied definition (same state variables, control variables, state equations etc.) to be created.0
.