Initial guess
Index
Documentation
CTBase.OptimalControlInit
— TypeInitial guess for OCP, contains
- functions of time for the state and control variables
- vector for optimization variables
Initialization data for each field can be left to default or:
- vector for optimization variables
- constant / vector / function for state and control
- existing solution ('warm start') for all fields
Constructors:
OptimalControlInit()
: default initializationOptimalControlInit(state, control, variable, time)
: constant vector, function handles and / or matrices / vectors interpolated along given time gridOptimalControlInit(sol)
: from existing solution
Examples
julia> init = OptimalControlInit()
julia> init = OptimalControlInit(state=[0.1, 0.2], control=0.3)
julia> init = OptimalControlInit(state=[0.1, 0.2], control=0.3, variable=0.5)
julia> init = OptimalControlInit(state=[0.1, 0.2], controlt=t->sin(t), variable=0.5)
julia> init = OptimalControlInit(state=[[0, 0], [1, 2], [5, -1]], time=[0, .3, 1.], controlt=t->sin(t))
julia> init = OptimalControlInit(sol)