Example 1

method = dyn_sqp # Sequential Quadratic Programming
Method
epsilon = 1.0e-4 # solution tolerance
nodes = 11
# number of time nodes
cost_functional:
L = 0.5*u*u
initial_time = 0 # t_0
final_time = 1 # t_f
dynamic_equations:
ddt x1 = x2 # dx1/dt
= x2
ddt x2 = u
# dx2/dt = u
initial_conditions:
x1 = 1
# x1(t_0) = 1
x2 = 1
# x2(t_0) = 1
terminal_condition:
psi = x1
# x1(t_f) = 0
psi = x2
# x2(t_f) = 0
# end of file