TwoStageOptimalControl.integ4 — Functioninteg4(n::Int64, h::Float64, F)integ4 performs 4th order integration (Simpson-method) method for datavector F with n points with a distance of h between each of them. If n > 1 and F = 1, F will be interpreted as a constant function over the n points.
TwoStageOptimalControl.integ2 — Functioninteg2(n::Int64, h::Float64, F)integ2 performs 2nd order integration (trapezoid) method for datavector F with n points with a distance of h between each of them. If n > 1 and F = 1, F will be interpreted as a constant function over the n points.
TwoStageOptimalControl.integ1 — Functioninteg1(n::Int64, h::Float64, F)integ1 performs 1st order left boundary integration method for datavector F with n points with a distance of h between each of them. If n > 1 and F = 1, F will be interpreted as a constant function over the n points.
TwoStageOptimalControl.CumInteg4 — FunctionCumInteg4(n::Int64, h::Float64, F)CumInteg4 calculates the cumulative integrals
\[\int_0^t F(s)ds \forall t\in(0,T)\]
of F using a 4th order integration method.
- n -> number of datapoints,
- h -> distance between datapoints.
TwoStageOptimalControl.interp1 — Functioninterp1(xpt, ypt; method = "Linear", extrapolation = Flat())One dimensional interpolation using either linear interpolation or BSplines
TwoStageOptimalControl.interp2 — Functioninterp2(xpt,ypt,zpt)Two dimensional interpolation using BSplines
TwoStageOptimalControl.SavitskyGolaySmoothing — FunctionSavitskyGolaySmoothing(x::Vector, windowSize::Integer, polyOrder::Integer; deriv::Integer=0)Smooth a vector x using the Savitsky-Golay method
TwoStageOptimalControl.ParaAdjust — FunctionParaAdjust(h_global::Float64, Para::Dict)ParaAdjust adjust all relevant elements of the Parameter dictionary Para to the step-size h_global.
TwoStageOptimalControl.LoadVariables — FunctionLoadVariables(Para, Results)Load inital profiles for the control variables from the Results dictionary and use interpolation if necessary
TwoStageOptimalControl.ConInterpol — FunctionConInterpol(Con_dist::Array{Float64,3}, Con::Array{Float64,3}, Para::Dict)Given Controls Con_dist and Con, ConInterpol performs an interpolation of these fields to fit the passed Parameter dict Para.
TwoStageOptimalControl.ConSmooth — FunctionConSmooth(Con::Array{Float64,3}, Con_dist::Array{Float64,3}, Para::Dict)Smooth the profiles of the control variables using a SavitskyGolaySmoother
TwoStageOptimalControl.GradSmooth — FunctionGradSmooth(dHam::Array{Float64,3}, dHam_dist::Array{Float64,3}, Para::Dict)Smooth the gradient by using the median value of a moving window.
TwoStageOptimalControl.WaitForEnter — Functionwait_for_enter(Para::Dict)Function allowing the calculations to stop and wait for an input by the user