Bryson Denham
This problem can be found here.
Packages that will be used
using NLOptControl, PrettyPlots
Define the Problem:
n=define(numStates=2,numControls=1,X0=[0.,1],XF=[0.,-1.],XL=[0.,NaN],XU=[1/9,NaN]);
Differential Equations
dx=[:(x2[j]),:(u1[j])]
dynamics!(n,dx)
Configure the Problem
configure!(n;(:Nck=>[100]),(:finalTimeDV=>true));
Objective Function
obj=integrate!(n,:(0.5*u1[j]^2));
@NLobjective(n.ocp.mdl,Min,obj);
Optimize
optimize!(n);
Post Process
allPlots(n)