Skip to content

Latest commit

 

History

History
45 lines (38 loc) · 840 Bytes

File metadata and controls

45 lines (38 loc) · 840 Bytes

Bryson Denham

This problem can be found here.

Packages that will be used

using NLOptControl
nothing # hide

Define the Problem:

n=define(numStates=2,numControls=1,X0=[0.,1],XF=[0.,-1.],XL=[0.,NaN],XU=[1/9,NaN]);
nothing # hide

Differential Equations

dx=[:(x2[j]),:(u1[j])]
dynamics!(n,dx)
nothing # hide

Configure the Problem

configure!(n;(:Nck=>[100]),(:finalTimeDV=>true));
nothing # hide

Objective Function

obj=integrate!(n,:(0.5*u1[j]^2));
@NLobjective(n.ocp.mdl,Min,obj);
nothing # hide

Optimize

optimize!(n);
nothing # hide

Post Process

allPlots(n)