Optimal control problems are formulated using the YopOcp class. How to declare, formulate and solve optimal control problems are found under the different topics:

### Formulating optimal control problems

An in-depth description on how to formulate optimal control problems are found at the OCP formulation page.

How to use t_0 and t_f

Declaring optimal control problems

Declaring the objective function

Declaring the constraints

How to formulate individual constraints

Information on box constraints

Strict path constraints

Problem scaling

Multi-phase problems

### Initial guess

To be able to solve non-convex optimal control problems an initial guess may be necessary. For a description on how to provide and initial guess, see the initial guess page.

Omitting to provide an initial guess

Using simulation to find an initial guess

Using an old solution as initial guess

Providing a general initial guess

Setting the initial guess to a fixed value

### Solving optimal control problems

How to solve optimal control problems, how the results are obtained, and the available settings are found at the solving optimal controls problems page.

Running the solve command

How to obtain the results

Symbolic plotting

Symbolic signals

Speed-up by re-parameterizing the problem

An example of re-parametrization