Skip to content

Latest commit

 

History

History
45 lines (38 loc) · 899 Bytes

File metadata and controls

45 lines (38 loc) · 899 Bytes

HyperSensitive

This problem can be found here.

Packages that will be used

using NLOptControl
nothing # hide

Define the Problem:

n=define(numStates=1,numControls=1,X0=[1.5],XF=[1.])
nothing # hide

Differential Equations

dx=[:(-x1[j]^3+u1[j])]
dynamics!(n,dx)
nothing # hide

Configure the Problem:

configure!(n;(:Nck=>[3,3,3,3,3,3,3,3,3,3,3,3]),(:finalTimeDV=>false),(:tf=>10000.0))
nothing # hide

Objective Function

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

Optimize

optimize!(n);
nothing # hide

Post Process

plotSettings(;(:size=>(1200,1200)));
allPlots(n)