Initial guess

Index

Documentation

CTBase.OptimalControlInitType

Initial 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 initialization
  • OptimalControlInit(state, control, variable, time): constant vector, function handles and / or matrices / vectors interpolated along given time grid
  • OptimalControlInit(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)
source