API
OptimalControlProblems.AbstractModelBackend
OptimalControlProblems.JuMPBackend
OptimalControlProblems.OptimalControlBackend
OptimalControlProblems.beam
OptimalControlProblems.beam
OptimalControlProblems.beam
OptimalControlProblems.beam_s
OptimalControlProblems.beam_s
OptimalControlProblems.chain
OptimalControlProblems.chain
OptimalControlProblems.chain
OptimalControlProblems.chain_s
OptimalControlProblems.chain_s
OptimalControlProblems.double_oscillator
OptimalControlProblems.double_oscillator
OptimalControlProblems.double_oscillator
OptimalControlProblems.double_oscillator_s
OptimalControlProblems.double_oscillator_s
OptimalControlProblems.ducted_fan
OptimalControlProblems.ducted_fan
OptimalControlProblems.ducted_fan
OptimalControlProblems.ducted_fan_s
OptimalControlProblems.ducted_fan_s
OptimalControlProblems.electric_vehicle
OptimalControlProblems.electric_vehicle
OptimalControlProblems.electric_vehicle
OptimalControlProblems.electric_vehicle_s
OptimalControlProblems.electric_vehicle_s
OptimalControlProblems.glider
OptimalControlProblems.glider
OptimalControlProblems.glider
OptimalControlProblems.glider_s
OptimalControlProblems.glider_s
OptimalControlProblems.grid_size_data
OptimalControlProblems.insurance
OptimalControlProblems.insurance
OptimalControlProblems.insurance
OptimalControlProblems.insurance_s
OptimalControlProblems.insurance_s
OptimalControlProblems.jackson
OptimalControlProblems.jackson
OptimalControlProblems.jackson
OptimalControlProblems.jackson_s
OptimalControlProblems.jackson_s
OptimalControlProblems.merge
OptimalControlProblems.merge
OptimalControlProblems.merge
OptimalControlProblems.merge
OptimalControlProblems.metadata
OptimalControlProblems.metadata
OptimalControlProblems.parameters_data
OptimalControlProblems.parameters_data
OptimalControlProblems.problems
OptimalControlProblems.robbins
OptimalControlProblems.robbins
OptimalControlProblems.robbins
OptimalControlProblems.robbins_s
OptimalControlProblems.robbins_s
OptimalControlProblems.robot
OptimalControlProblems.robot
OptimalControlProblems.robot
OptimalControlProblems.robot_s
OptimalControlProblems.robot_s
OptimalControlProblems.rocket
OptimalControlProblems.rocket
OptimalControlProblems.rocket
OptimalControlProblems.rocket_s
OptimalControlProblems.rocket_s
OptimalControlProblems.space_shuttle
OptimalControlProblems.space_shuttle
OptimalControlProblems.space_shuttle
OptimalControlProblems.space_shuttle_s
OptimalControlProblems.space_shuttle_s
OptimalControlProblems.steering
OptimalControlProblems.steering
OptimalControlProblems.steering
OptimalControlProblems.steering_s
OptimalControlProblems.steering_s
OptimalControlProblems.vanderpol
OptimalControlProblems.vanderpol
OptimalControlProblems.vanderpol
OptimalControlProblems.vanderpol_s
OptimalControlProblems.vanderpol_s
CTModels.control
CTModels.control_components
CTModels.control_dimension
CTModels.costate
CTModels.iterations
CTModels.state
CTModels.state_components
CTModels.state_dimension
CTModels.time_grid
CTModels.variable_components
CTModels.variable_dimension
ExaModels.objective
ExaModels.variable
JuMPModels.costate_components
OptimalControlProblems.AbstractModelBackend
— Typeabstract type AbstractModelBackend
Abstract type for all optimal control problem model backends.
OptimalControlProblems.JuMPBackend
— Typestruct JuMPBackend <: OptimalControlProblems.AbstractModelBackend
Backend for modelling optimal control problems using the JuMP optimisation framework.
OptimalControlProblems.OptimalControlBackend
— Typestruct OptimalControlBackend <: OptimalControlProblems.AbstractModelBackend
Backend for modelling optimal control problems using the OptimalControl.jl package.
OptimalControlProblems.beam
— MethodDocStringExtensions.TypedMethodSignatures()
This method throws an ExtensionError
and is called if the required backend is not available. ```
OptimalControlProblems.beam_s
— MethodDocStringExtensions.TypedMethodSignatures()
This method throws an ExtensionError
and is called if the required backend is not available. ```
OptimalControlProblems.chain
— MethodDocStringExtensions.TypedMethodSignatures()
This method throws an ExtensionError
and is called if the required backend is not available. ```
OptimalControlProblems.chain_s
— MethodDocStringExtensions.TypedMethodSignatures()
This method throws an ExtensionError
and is called if the required backend is not available. ```
OptimalControlProblems.double_oscillator
— MethodDocStringExtensions.TypedMethodSignatures()
This method throws an ExtensionError
and is called if the required backend is not available. ```
OptimalControlProblems.double_oscillator_s
— MethodDocStringExtensions.TypedMethodSignatures()
This method throws an ExtensionError
and is called if the required backend is not available. ```
OptimalControlProblems.ducted_fan
— MethodDocStringExtensions.TypedMethodSignatures()
This method throws an ExtensionError
and is called if the required backend is not available. ```
OptimalControlProblems.ducted_fan_s
— MethodDocStringExtensions.TypedMethodSignatures()
This method throws an ExtensionError
and is called if the required backend is not available. ```
OptimalControlProblems.electric_vehicle
— MethodDocStringExtensions.TypedMethodSignatures()
This method throws an ExtensionError
and is called if the required backend is not available. ```
OptimalControlProblems.electric_vehicle_s
— MethodDocStringExtensions.TypedMethodSignatures()
This method throws an ExtensionError
and is called if the required backend is not available. ```
OptimalControlProblems.glider
— MethodDocStringExtensions.TypedMethodSignatures()
This method throws an ExtensionError
and is called if the required backend is not available. ```
OptimalControlProblems.glider_s
— MethodDocStringExtensions.TypedMethodSignatures()
This method throws an ExtensionError
and is called if the required backend is not available. ```
OptimalControlProblems.grid_size_data
— Methodgrid_size_data(problem::Symbol) -> Any
Return the number of discretisation steps, from the metadata, for a given optimal control problem.
Arguments
problem::Symbol
: The name of the problem.
Returns
Int
: The number of discretisation steps (N
) of the specified problem.
Example
julia> grid_size_data(:beam)
500
OptimalControlProblems.insurance
— MethodDocStringExtensions.TypedMethodSignatures()
This method throws an ExtensionError
and is called if the required backend is not available. ```
OptimalControlProblems.insurance_s
— MethodDocStringExtensions.TypedMethodSignatures()
This method throws an ExtensionError
and is called if the required backend is not available. ```
OptimalControlProblems.jackson
— MethodDocStringExtensions.TypedMethodSignatures()
This method throws an ExtensionError
and is called if the required backend is not available. ```
OptimalControlProblems.jackson_s
— MethodDocStringExtensions.TypedMethodSignatures()
This method throws an ExtensionError
and is called if the required backend is not available. ```
OptimalControlProblems.merge
— Methodmerge(
A::NamedTuple,
B::NamedTuple
) -> NamedTuple{names, T} where {N, names, T<:NTuple{N, Any}}
Merge two NamedTuple
s, with the second one overriding keys from the first when duplicated.
Arguments
A::NamedTuple
: first set of key–value pairs.B::NamedTuple
: second set of key–value pairs, takes precedence if keys overlap.
Returns
::NamedTuple
: merged named tuple containing keys from bothA
andB
.
Example
julia> merge((a=1, b=2), (b=3, c=4))
(a = 1, b = 3, c = 4)
OptimalControlProblems.merge
— Methodmerge(A::NamedTuple, _::Nothing) -> NamedTuple
Merge a NamedTuple
with nothing
.
Arguments
A::NamedTuple
: a named tuple to keep.::Nothing
: placeholder, ignored.
Returns
::NamedTuple
: returnsA
unchanged.
Example
julia> merge((a=1,), nothing)
(a = 1,)
OptimalControlProblems.merge
— Methodmerge(_::Nothing, _::NamedTuple)
Throw an error when attempting to merge nothing
with a NamedTuple
.
Arguments
::Nothing
: indicates there is no data to merge.::NamedTuple
: the data that cannot be merged.
Returns
- This function always throws
CTBase.UnauthorizedCall
.
Example
julia> merge(nothing, (a=1,))
ERROR: CTBase.UnauthorizedCall("There is nothing to merge.")
OptimalControlProblems.merge
— Methodmerge(_::Nothing, _::Nothing)
Merge two Nothing
values.
Arguments
::Nothing
: first argument.::Nothing
: second argument.
Returns
nothing::Nothing
: always returnsnothing
.
Example
julia> merge(nothing, nothing)
nothing
OptimalControlProblems.metadata
— Methodmetadata(problem::Symbol) -> Any
Return a dictionary containing the metadata of problem
.
To get specific data, the following keys are valid:
grid_size::Int
: the default number of steps. For example:
:grid_size => 500,
parameters::Union{Nothing,NamedTuple}
: the list of parameters. For example:
:parameters => (
t0 = 0,
tf = 1,
x₁_l = 0,
x₁_u = 0.1,
x₁_t0 = 0,
x₂_t0 = 1,
x₁_tf = 0,
x₂_tf = -1,
),
Example
julia> data = metadata(:beam)
julia> data[:grid_size]
500
OptimalControlProblems.metadata
— Methodmetadata() -> OrderedCollections.OrderedDict{Any, Any}
Return the dictionary containing the metadata of all available optimal control problems.
Example
julia> metadata()
OptimalControlProblems.parameters_data
— Methodparameters_data(
problem::Symbol,
parameters::Union{Nothing, NamedTuple}
) -> Union{Nothing, NamedTuple}
Return the parameter set associated with a given problem, optionally merged with user-supplied parameters.
Arguments
problem::Symbol
: the name of the problem.parameters::Union{Nothing,NamedTuple}
: user-supplied parameters to override or extend the defaults. Ifnothing
, returns the default parameters unchanged.
Returns
::Union{Nothing,NamedTuple}
: the merged parameters. ThrowsCTBase.UnauthorizedCall
if attempting to merge with a problem that has no parameters.
Example
julia> parameters_data(:beam, (tf = 2,))
(t0 = 0, tf = 2, ...)
OptimalControlProblems.parameters_data
— Methodparameters_data(problem::Symbol) -> Any
Return the parameter set associated with a given problem.
Arguments
problem::Symbol
: the name of the problem whose parameters are requested.
Returns
::Union{Nothing,NamedTuple}
: the parameters of the problem, ornothing
if none exist.
Example
julia> parameters_data(:beam)
(t0 = 0, tf = 1, ...)
OptimalControlProblems.problems
— Methodproblems() -> Vector{Symbol}
Returns the list of available optimal control problems.
Returns
Vector{Symbol}
: A vector of problem names as symbols.
Example
julia> OptimalControlProblems.problems()
[:problem1, :problem2, :problem3]
OptimalControlProblems.robbins
— MethodDocStringExtensions.TypedMethodSignatures()
This method throws an ExtensionError
and is called if the required backend is not available. ```
OptimalControlProblems.robbins_s
— MethodDocStringExtensions.TypedMethodSignatures()
This method throws an ExtensionError
and is called if the required backend is not available. ```
OptimalControlProblems.robot
— MethodDocStringExtensions.TypedMethodSignatures()
This method throws an ExtensionError
and is called if the required backend is not available. ```
OptimalControlProblems.robot_s
— MethodDocStringExtensions.TypedMethodSignatures()
This method throws an ExtensionError
and is called if the required backend is not available. ```
OptimalControlProblems.rocket
— MethodDocStringExtensions.TypedMethodSignatures()
This method throws an ExtensionError
and is called if the required backend is not available. ```
OptimalControlProblems.rocket_s
— MethodDocStringExtensions.TypedMethodSignatures()
This method throws an ExtensionError
and is called if the required backend is not available. ```
OptimalControlProblems.space_shuttle
— MethodDocStringExtensions.TypedMethodSignatures()
This method throws an ExtensionError
and is called if the required backend is not available. ```
OptimalControlProblems.space_shuttle_s
— MethodDocStringExtensions.TypedMethodSignatures()
This method throws an ExtensionError
and is called if the required backend is not available. ```
OptimalControlProblems.steering
— MethodDocStringExtensions.TypedMethodSignatures()
This method throws an ExtensionError
and is called if the required backend is not available. ```
OptimalControlProblems.steering_s
— MethodDocStringExtensions.TypedMethodSignatures()
This method throws an ExtensionError
and is called if the required backend is not available. ```
OptimalControlProblems.vanderpol
— MethodDocStringExtensions.TypedMethodSignatures()
This method throws an ExtensionError
and is called if the required backend is not available. ```
OptimalControlProblems.vanderpol_s
— MethodDocStringExtensions.TypedMethodSignatures()
This method throws an ExtensionError
and is called if the required backend is not available. ```
OptimalControlProblems.beam
— Methodbeam(
::OptimalControlBackend,
description::Symbol...;
grid_size,
parameters,
kwargs...
) -> Union{CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ADNLPBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}, CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ExaBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}}
Constructs an OptimalControl problem representing the Beam problem using the OptimalControl backend. The function sets up the state and control variables, boundary conditions, dynamics, path constraints, and the objective functional. It then performs direct transcription to generate a discrete optimal control problem (DOCP) and the corresponding nonlinear programming (NLP) model.
Arguments
::OptimalControlBackend
: Placeholder type to specify the OptimalControl backend or solver interface.grid_size::Int=500
: (Keyword) Number of discretisation points for the direct transcription grid.
Returns
docp
: The direct optimal control problem object, representing the discretised problem.nlp
: The corresponding nonlinear programming model generated from the DOCP, ready for solver input.
Example
julia> using OptimalControlProblems
julia> docp = OptimalControlProblems.beam(OptimalControlBackend(); N=100);
References
- BOCOP repository: https://github.com/control-toolbox/bocop/tree/main/bocop
OptimalControlProblems.beam_s
— Methodbeam_s(
::OptimalControlBackend,
description::Symbol...;
grid_size,
parameters,
kwargs...
) -> Union{CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ADNLPBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}, CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ExaBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}}
Constructs an OptimalControl problem representing the Beam problem using the OptimalControl backend. The function sets up the state and control variables, boundary conditions, dynamics, path constraints, and the objective functional. It then performs direct transcription to generate a discrete optimal control problem (DOCP) and the corresponding nonlinear programming (NLP) model.
Arguments
::OptimalControlBackend
: Placeholder type to specify the OptimalControl backend or solver interface.grid_size::Int=500
: (Keyword) Number of discretisation points for the direct transcription grid.
Returns
docp
: The direct optimal control problem object, representing the discretised problem.nlp
: The corresponding nonlinear programming model generated from the DOCP, ready for solver input.
Example
julia> using OptimalControlProblems
julia> docp = OptimalControlProblems.beam(OptimalControlBackend(); N=100);
References
- BOCOP repository: https://github.com/control-toolbox/bocop/tree/main/bocop
OptimalControlProblems.chain
— Methodchain(
::OptimalControlBackend,
description::Symbol...;
grid_size,
parameters,
kwargs...
) -> Union{CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ADNLPBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}, CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ExaBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}}
Constructs an OptimalControl problem representing the Hanging Chain problem. The function defines state and control variables, boundary conditions, and system dynamics, with the objective of minimising the vertical displacement of the chain's midpoint. It performs direct transcription to produce a discretised optimal control problem (DOCP) and the corresponding nonlinear programming (NLP) model.
Arguments
::OptimalControlBackend
: Placeholder type specifying the OptimalControl backend or solver interface.grid_size::Int=500
: (Keyword) Number of discretisation points for the direct transcription grid.
Returns
docp
: The direct optimal control problem object representing the discretised Hanging Chain problem.nlp
: The corresponding nonlinear programming model obtained from the DOCP, suitable for numerical optimisation.
Example
julia> using OptimalControlProblems
julia> docp = OptimalControlProblems.chain(OptimalControlBackend(); N=100);
References
- Formulation inspired by OptimalControl approach to variational problems and chain equilibrium.
- Original problem source: BOCOP repository
OptimalControlProblems.chain_s
— Methodchain_s(
::OptimalControlBackend,
description::Symbol...;
grid_size,
parameters,
kwargs...
) -> Union{CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ADNLPBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}, CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ExaBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}}
Constructs an OptimalControl problem representing the Hanging Chain problem. The function defines state and control variables, boundary conditions, and system dynamics, with the objective of minimising the vertical displacement of the chain's midpoint. It performs direct transcription to produce a discretised optimal control problem (DOCP) and the corresponding nonlinear programming (NLP) model.
Arguments
::OptimalControlBackend
: Placeholder type specifying the OptimalControl backend or solver interface.grid_size::Int=500
: (Keyword) Number of discretisation points for the direct transcription grid.
Returns
docp
: The direct optimal control problem object representing the discretised Hanging Chain problem.nlp
: The corresponding nonlinear programming model obtained from the DOCP, suitable for numerical optimisation.
Example
julia> using OptimalControlProblems
julia> docp = OptimalControlProblems.chain(OptimalControlBackend(); N=100);
References
- Formulation inspired by OptimalControl approach to variational problems and chain equilibrium.
- Original problem source: BOCOP repository
OptimalControlProblems.double_oscillator
— Methoddouble_oscillator(
::OptimalControlBackend,
description::Symbol...;
grid_size,
parameters,
kwargs...
) -> Union{CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ADNLPBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}, CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ExaBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}}
Constructs an OptimalControl problem representing a double oscillator system. The function defines state and control variables, system dynamics, boundary conditions, and an objective functional to be minimised. It uses direct transcription to produce a discretised optimal control problem (DOCP) and the corresponding nonlinear programming (NLP) model.
Arguments
::OptimalControlBackend
: Placeholder type specifying the OptimalControl backend or solver interface.grid_size::Int=500
: (Keyword) Number of discretisation points for the direct transcription grid.
Returns
docp
: The direct optimal control problem object representing the double oscillator system.nlp
: The corresponding nonlinear programming model obtained from the DOCP, suitable for numerical optimisation.
Example
julia> using OptimalControlProblems
julia> docp = OptimalControlProblems.double_oscillator(OptimalControlBackend(); N=100);
References
- Coudurier, C., Lepreux, O., & Petit, N. (2018). Optimal bang-bang control of a mechanical double oscillator using averaging methods. IFAC-PapersOnLine, 51(2), 49-54. [CLP2018]
- Formulation follows OptimalControl approach to mechanical oscillator trajectory optimisation.
OptimalControlProblems.double_oscillator_s
— Methoddouble_oscillator_s(
::OptimalControlBackend,
description::Symbol...;
grid_size,
parameters,
kwargs...
) -> Union{CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ADNLPBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}, CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ExaBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}}
Constructs an OptimalControl problem representing a double oscillator system. The function defines state and control variables, system dynamics, boundary conditions, and an objective functional to be minimised. It uses direct transcription to produce a discretised optimal control problem (DOCP) and the corresponding nonlinear programming (NLP) model.
Arguments
::OptimalControlBackend
: Placeholder type specifying the OptimalControl backend or solver interface.grid_size::Int=500
: (Keyword) Number of discretisation points for the direct transcription grid.
Returns
docp
: The direct optimal control problem object representing the double oscillator system.nlp
: The corresponding nonlinear programming model obtained from the DOCP, suitable for numerical optimisation.
Example
julia> using OptimalControlProblems
julia> docp = OptimalControlProblems.double_oscillator(OptimalControlBackend(); N=100);
References
- Coudurier, C., Lepreux, O., & Petit, N. (2018). Optimal bang-bang control of a mechanical double oscillator using averaging methods. IFAC-PapersOnLine, 51(2), 49-54. [CLP2018]
- Formulation follows OptimalControl approach to mechanical oscillator trajectory optimisation.
OptimalControlProblems.ducted_fan
— Methodducted_fan(
::OptimalControlBackend,
description::Symbol...;
grid_size,
parameters,
kwargs...
) -> Union{CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ADNLPBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}, CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ExaBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}}
Constructs an OptimalControl problem for a planar ducted fan system. The function defines state and control variables, system dynamics, boundary conditions, and a cost functional combining control effort and final time. It returns both a discretised direct optimal control problem (DOCP) and the corresponding nonlinear programming (NLP) model.
Arguments
::OptimalControlBackend
: Placeholder type specifying the OptimalControl backend or solver interface.grid_size::Int=250
: (Keyword) Number of discretisation points for the direct transcription grid.
Returns
docp
: The direct optimal control problem object representing the planar ducted fan.nlp
: The corresponding nonlinear programming model obtained from the DOCP, suitable for numerical optimisation.
Example
julia> using OptimalControlProblems
julia> docp = OptimalControlProblems.ducted_fan(OptimalControlBackend(); N=250);
References
- Graichen, K., & Petit, N. (2009). Incorporating a class of constraints into the dynamics of optimal control problems. Optimal Control Applications and Methods, 30(6), 537-561. [GP2009]
- Problem instance follows OptimalControl formulation for ducted fan trajectory optimisation.
OptimalControlProblems.ducted_fan_s
— MethodThe Ducted Fan Problem: Implement the optimal control of a planar ducted fan. Instance taken from [GP2009]. The problem is formulated as an OptimalControl model. Ref: Graichen, K., & Petit, N. (2009). Incorporating a class of constraints into the dynamics of optimal control problems. Optimal Control Applications and Methods, 30(6), 537-561.
OptimalControlProblems.electric_vehicle
— Methodelectric_vehicle(
::OptimalControlBackend,
description::Symbol...;
grid_size,
parameters,
kwargs...
) -> Union{CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ADNLPBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}, CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ExaBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}}
Constructs an OptimalControl problem for an electric vehicle trajectory. The function defines state and control variables, vehicle dynamics, boundary conditions, and a cost functional representing energy and control effort. It returns both a discretised direct optimal control problem (DOCP) and the corresponding nonlinear programming (NLP) model.
Arguments
::OptimalControlBackend
: Placeholder type specifying the OptimalControl backend or solver interface.grid_size::Int=500
: (Keyword) Number of discretisation points for the direct transcription grid.
Returns
docp
: The direct optimal control problem object representing the electric vehicle trajectory optimisation.nlp
: The corresponding nonlinear programming model obtained from the DOCP, suitable for numerical optimisation.
Example
julia> using OptimalControlProblems
julia> docp = OptimalControlProblems.electric_vehicle(OptimalControlBackend(); N=500);
References
- Nicolas Petit and Antonio Sciarretta. "Optimal drive of electric vehicles using an inversion-based trajectory generation approach." IFAC Proceedings Volumes 44, no. 1 (2011): 14519-14526. [PS2011]
- Problem instance follows OptimalControl formulation for electric vehicle trajectory optimisation.
OptimalControlProblems.electric_vehicle_s
— Methodelectric_vehicle_s(
::OptimalControlBackend,
description::Symbol...;
grid_size,
parameters,
kwargs...
) -> Union{CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ADNLPBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}, CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ExaBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}}
Constructs an OptimalControl problem for an electric vehicle trajectory. The function defines state and control variables, vehicle dynamics, boundary conditions, and a cost functional representing energy and control effort. It returns both a discretised direct optimal control problem (DOCP) and the corresponding nonlinear programming (NLP) model.
Arguments
::OptimalControlBackend
: Placeholder type specifying the OptimalControl backend or solver interface.grid_size::Int=500
: (Keyword) Number of discretisation points for the direct transcription grid.
Returns
docp
: The direct optimal control problem object representing the electric vehicle trajectory optimisation.nlp
: The corresponding nonlinear programming model obtained from the DOCP, suitable for numerical optimisation.
Example
julia> using OptimalControlProblems
julia> docp = OptimalControlProblems.electric_vehicle(OptimalControlBackend(); N=500);
References
- Nicolas Petit and Antonio Sciarretta. "Optimal drive of electric vehicles using an inversion-based trajectory generation approach." IFAC Proceedings Volumes 44, no. 1 (2011): 14519-14526. [PS2011]
- Problem instance follows OptimalControl formulation for electric vehicle trajectory optimisation.
OptimalControlProblems.glider
— Methodglider(
::OptimalControlBackend,
description::Symbol...;
grid_size,
parameters,
kwargs...
) -> Union{CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ADNLPBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}, CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ExaBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}}
Constructs an OptimalControl problem for a hang glider trajectory. The function defines state and control variables, glider dynamics in a thermal updraft, boundary conditions, and a cost functional aiming to maximise the final horizontal position. It returns both a discretised direct optimal control problem (DOCP) and the corresponding nonlinear programming (NLP) model.
Arguments
::OptimalControlBackend
: Placeholder type specifying the OptimalControl backend or solver interface.grid_size::Int=500
: (Keyword) Number of discretisation points for the direct transcription grid.
Returns
docp
: The direct optimal control problem object representing the hang glider trajectory optimisation.nlp
: The corresponding nonlinear programming model obtained from the DOCP, suitable for numerical optimisation.
Example
julia> using OptimalControlProblems
julia> docp = OptimalControlProblems.glider(OptimalControlBackend(); N=500);
References
- Original formulation from MadNLP/COPSBenchmark.
- Problem inspired by glider dynamics with thermal updraft and lift modelling.
OptimalControlProblems.glider_s
— Methodglider_s(
::OptimalControlBackend,
description::Symbol...;
grid_size,
parameters,
kwargs...
) -> Union{CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ADNLPBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}, CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ExaBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}}
Constructs an OptimalControl problem for a hang glider trajectory. The function defines state and control variables, glider dynamics in a thermal updraft, boundary conditions, and a cost functional aiming to maximise the final horizontal position. It returns both a discretised direct optimal control problem (DOCP) and the corresponding nonlinear programming (NLP) model.
Arguments
::OptimalControlBackend
: Placeholder type specifying the OptimalControl backend or solver interface.grid_size::Int=500
: (Keyword) Number of discretisation points for the direct transcription grid.
Returns
docp
: The direct optimal control problem object representing the hang glider trajectory optimisation.nlp
: The corresponding nonlinear programming model obtained from the DOCP, suitable for numerical optimisation.
Example
julia> using OptimalControlProblems
julia> docp = OptimalControlProblems.glider(OptimalControlBackend(); N=500);
References
- Original formulation from MadNLP/COPSBenchmark.
- Problem inspired by glider dynamics with thermal updraft and lift modelling.
OptimalControlProblems.insurance
— Methodinsurance(
::OptimalControlBackend,
description::Symbol...;
grid_size,
parameters,
kwargs...
) -> Union{CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ADNLPBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}, CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ExaBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}}
Constructs an OptimalControl problem for an insurance system optimisation. The function defines state and control variables, system dynamics, constraints on insurance, expenses, revenue, health, utility, and auxiliary variables, and sets up a cost functional aimed at maximising expected utility over time. It returns both a discretised direct optimal control problem (DOCP) and the corresponding nonlinear programming (NLP) model.
Arguments
::OptimalControlBackend
: Placeholder type specifying the OptimalControl backend or solver interface.grid_size::Int=500
: (Keyword) Number of discretisation points for the direct transcription grid.
Returns
docp
: The direct optimal control problem object representing the insurance optimisation problem.nlp
: The corresponding nonlinear programming model obtained from the DOCP, suitable for numerical optimisation.
Example
julia> using OptimalControlProblems
julia> docp = OptimalControlProblems.insurance(OptimalControlBackend(); N=500);
References
- Problem formulation available at Bocop repository
OptimalControlProblems.insurance_s
— Methodinsurance_s(
::OptimalControlBackend,
description::Symbol...;
grid_size,
parameters,
kwargs...
) -> Union{CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ADNLPBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}, CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ExaBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}}
Constructs an OptimalControl problem for an insurance system optimisation. The function defines state and control variables, system dynamics, constraints on insurance, expenses, revenue, health, utility, and auxiliary variables, and sets up a cost functional aimed at maximising expected utility over time. It returns both a discretised direct optimal control problem (DOCP) and the corresponding nonlinear programming (NLP) model.
Arguments
::OptimalControlBackend
: Placeholder type specifying the OptimalControl backend or solver interface.grid_size::Int=500
: (Keyword) Number of discretisation points for the direct transcription grid.
Returns
docp
: The direct optimal control problem object representing the insurance optimisation problem.nlp
: The corresponding nonlinear programming model obtained from the DOCP, suitable for numerical optimisation.
Example
julia> using OptimalControlProblems
julia> docp = OptimalControlProblems.insurance(OptimalControlBackend(); N=500);
References
- Problem formulation available at Bocop repository
OptimalControlProblems.jackson
— Methodjackson(
::OptimalControlBackend,
description::Symbol...;
grid_size,
parameters,
kwargs...
) -> Union{CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ADNLPBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}, CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ExaBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}}
Constructs an OptimalControl problem for the Jackson benchmark model. The function sets up state and control variables, system dynamics, bounds, initial and final conditions, and a cost functional aimed at minimising the third state variable at final time. It returns both a discretised direct optimal control problem (DOCP) and the corresponding nonlinear programming (NLP) model.
Arguments
::OptimalControlBackend
: Placeholder type specifying the OptimalControl backend or solver interface.grid_size::Int=500
: (Keyword) Number of discretisation points for the direct transcription grid.
Returns
docp
: The direct optimal control problem object representing the Jackson problem.nlp
: The corresponding nonlinear programming model obtained from the DOCP, suitable for numerical optimisation.
Example
julia> using OptimalControlProblems
julia> docp = OptimalControlProblems.jackson(OptimalControlBackend(); N=500);
References
- Problem formulation available at Bocop repository
OptimalControlProblems.jackson_s
— Methodjackson_s(
::OptimalControlBackend,
description::Symbol...;
grid_size,
parameters,
kwargs...
) -> Union{CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ADNLPBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}, CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ExaBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}}
Constructs an OptimalControl problem for the Jackson benchmark model. The function sets up state and control variables, system dynamics, bounds, initial and final conditions, and a cost functional aimed at minimising the third state variable at final time. It returns both a discretised direct optimal control problem (DOCP) and the corresponding nonlinear programming (NLP) model.
Arguments
::OptimalControlBackend
: Placeholder type specifying the OptimalControl backend or solver interface.grid_size::Int=500
: (Keyword) Number of discretisation points for the direct transcription grid.
Returns
docp
: The direct optimal control problem object representing the Jackson problem.nlp
: The corresponding nonlinear programming model obtained from the DOCP, suitable for numerical optimisation.
Example
julia> using OptimalControlProblems
julia> docp = OptimalControlProblems.jackson(OptimalControlBackend(); N=500);
References
- Problem formulation available at Bocop repository
OptimalControlProblems.robbins
— Methodrobbins(
::OptimalControlBackend,
description::Symbol...;
grid_size,
parameters,
kwargs...
) -> Union{CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ADNLPBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}, CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ExaBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}}
Constructs an OptimalControl problem for the Robbins benchmark model. This function defines the state and control variables, system dynamics, initial and final conditions, and the cost functional, which minimises a weighted sum of the state and control contributions. It returns both a discretised direct optimal control problem (DOCP) and the corresponding nonlinear programming (NLP) model. Reference: Robbins Problem on BOCOP
Arguments
::OptimalControlBackend
: Placeholder type specifying the OptimalControl backend or solver interface.grid_size::Int=500
: (Keyword) Number of discretisation points for the direct transcription grid.
Returns
docp
: The direct optimal control problem object representing the Robbins problem.nlp
: The corresponding nonlinear programming model obtained from the DOCP, suitable for numerical optimisation.
Example
julia> using OptimalControlProblems
julia> docp = OptimalControlProblems.robbins(OptimalControlBackend(); N=500);
OptimalControlProblems.robbins_s
— Methodrobbins_s(
::OptimalControlBackend,
description::Symbol...;
grid_size,
parameters,
kwargs...
) -> Union{CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ADNLPBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}, CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ExaBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}}
Constructs an OptimalControl problem for the Robbins benchmark model. This function defines the state and control variables, system dynamics, initial and final conditions, and the cost functional, which minimises a weighted sum of the state and control contributions. It returns both a discretised direct optimal control problem (DOCP) and the corresponding nonlinear programming (NLP) model. Reference: Robbins Problem on BOCOP
Arguments
::OptimalControlBackend
: Placeholder type specifying the OptimalControl backend or solver interface.grid_size::Int=500
: (Keyword) Number of discretisation points for the direct transcription grid.
Returns
docp
: The direct optimal control problem object representing the Robbins problem.nlp
: The corresponding nonlinear programming model obtained from the DOCP, suitable for numerical optimisation.
Example
julia> using OptimalControlProblems
julia> docp = OptimalControlProblems.robbins(OptimalControlBackend(); N=500);
OptimalControlProblems.robot
— Methodrobot(
::OptimalControlBackend,
description::Symbol...;
grid_size,
parameters,
kwargs...
) -> Union{CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ADNLPBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}, CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ExaBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}}
Constructs an OptimalControl problem for a robotic arm moving between two points. This function defines the state and control variables, system dynamics, initial and final conditions, and the cost functional, which minimises the total time taken to perform the motion. Reference: Robot arm problem on BOCOP here
Arguments
::OptimalControlBackend
: Placeholder type specifying the OptimalControl backend or solver interface.grid_size::Int=250
: (Keyword) Number of discretisation points for the direct transcription grid.
Returns
docp
: The direct optimal control problem object representing the robot arm problem.nlp
: The corresponding nonlinear programming model obtained from the DOCP, suitable for numerical optimisation.
Example
julia> using OptimalControlProblems
julia> docp = OptimalControlProblems.robot(OptimalControlBackend(); N=250);
OptimalControlProblems.robot_s
— Methodrobot_s(
::OptimalControlBackend,
description::Symbol...;
grid_size,
parameters,
kwargs...
) -> Union{CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ADNLPBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}, CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ExaBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}}
Constructs an OptimalControl problem for a robotic arm moving between two points. This function defines the state and control variables, system dynamics, initial and final conditions, and the cost functional, which minimises the total time taken to perform the motion. Reference: Robot arm problem on BOCOP here
Arguments
::OptimalControlBackend
: Placeholder type specifying the OptimalControl backend or solver interface.grid_size::Int=250
: (Keyword) Number of discretisation points for the direct transcription grid.
Returns
docp
: The direct optimal control problem object representing the robot arm problem.nlp
: The corresponding nonlinear programming model obtained from the DOCP, suitable for numerical optimisation.
Example
julia> using OptimalControlProblems
julia> docp = OptimalControlProblems.robot(OptimalControlBackend(); N=250);
OptimalControlProblems.rocket
— Methodrocket(
::OptimalControlBackend,
description::Symbol...;
grid_size,
parameters,
kwargs...
) -> Union{CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ADNLPBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}, CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ExaBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}}
Constructs an OptimalControl problem for the Goddard rocket. This function defines the state variables (altitude, velocity, mass), the control variable (thrust), system dynamics, constraints, initial and final conditions, and the cost functional, which maximises the final altitude. Reference: Goddard Rocket Problem here
Arguments
::OptimalControlBackend
: Placeholder type specifying the OptimalControl backend or solver interface.grid_size::Int=500
: (Keyword) Number of discretisation points for the direct transcription grid.
Returns
docp
: The direct optimal control problem object representing the Goddard rocket problem.nlp
: The corresponding nonlinear programming model obtained from the DOCP, suitable for numerical optimisation.
Example
julia> using OptimalControlProblems
julia> docp = OptimalControlProblems.rocket(OptimalControlBackend(); N=500);
OptimalControlProblems.rocket_s
— Methodrocket_s(
::OptimalControlBackend,
description::Symbol...;
grid_size,
parameters,
kwargs...
) -> Union{CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ADNLPBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}, CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ExaBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}}
Constructs an OptimalControl problem for the Goddard rocket. This function defines the state variables (altitude, velocity, mass), the control variable (thrust), system dynamics, constraints, initial and final conditions, and the cost functional, which maximises the final altitude. Reference: Goddard Rocket Problem here
Arguments
::OptimalControlBackend
: Placeholder type specifying the OptimalControl backend or solver interface.grid_size::Int=500
: (Keyword) Number of discretisation points for the direct transcription grid.
Returns
docp
: The direct optimal control problem object representing the Goddard rocket problem.nlp
: The corresponding nonlinear programming model obtained from the DOCP, suitable for numerical optimisation.
Example
julia> using OptimalControlProblems
julia> docp = OptimalControlProblems.rocket(OptimalControlBackend(); N=500);
OptimalControlProblems.space_shuttle
— Methodspace_shuttle(
::OptimalControlBackend,
description::Symbol...;
grid_size,
parameters,
kwargs...
) -> Union{CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ADNLPBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}, CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ExaBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}}
Constructs an OptimalControl problem for the Space Shuttle reentry trajectory. This function defines the state variables (altitude, longitude, latitude, velocity, flight path angle, azimuth), the control variables (angle of attack, bank angle), system dynamics, constraints, initial and terminal conditions, and the cost functional, which maximises the latitude (cross range) at the terminal point. Reference: Original JuMP model formulation here. Note: No heating limit path constraint is included.
Arguments
::OptimalControlBackend
: Placeholder type specifying the OptimalControl backend or solver interface.grid_size::Int=500
: (Keyword) Number of discretisation points for the direct transcription grid.
Returns
docp
: The direct optimal control problem object representing the Space Shuttle reentry trajectory.nlp
: The corresponding nonlinear programming model obtained from the DOCP, suitable for numerical optimisation.
Example
julia> using OptimalControlProblems
julia> docp = OptimalControlProblems.space_shuttle(OptimalControlBackend(); N=500);
OptimalControlProblems.space_shuttle_s
— Methodspace_shuttle_s(
::OptimalControlBackend,
description::Symbol...;
grid_size,
parameters,
kwargs...
) -> Union{CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ADNLPBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}, CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ExaBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}}
Constructs an OptimalControl problem for the Space Shuttle reentry trajectory. This function defines the state variables (altitude, longitude, latitude, velocity, flight path angle, azimuth), the control variables (angle of attack, bank angle), system dynamics, constraints, initial and terminal conditions, and the cost functional, which maximises the latitude (cross range) at the terminal point. Reference: Original JuMP model formulation here. Note: No heating limit path constraint is included.
Arguments
::OptimalControlBackend
: Placeholder type specifying the OptimalControl backend or solver interface.grid_size::Int=500
: (Keyword) Number of discretisation points for the direct transcription grid.
Returns
docp
: The direct optimal control problem object representing the Space Shuttle reentry trajectory.nlp
: The corresponding nonlinear programming model obtained from the DOCP, suitable for numerical optimisation.
Example
julia> using OptimalControlProblems
julia> docp = OptimalControlProblems.space_shuttle(OptimalControlBackend(); N=500);
OptimalControlProblems.steering
— Methodsteering(
::OptimalControlBackend,
description::Symbol...;
grid_size,
parameters,
kwargs...
) -> Union{CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ADNLPBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}, CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ExaBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}}
Constructs an OptimalControl problem for steering a particle along a trajectory. The objective is to minimise the total time taken to reach a specified terminal state, subject to control limits and particle dynamics. The state vector has four components, and the control is a single scalar input.
Arguments
::OptimalControlBackend
: Placeholder type specifying the OptimalControl backend or solver interface.grid_size::Int=500
: (Keyword) Number of discretisation points for the direct transcription grid.
Returns
docp
: The direct optimal control problem object representing the particle steering problem.nlp
: The corresponding nonlinear programming model obtained from the DOCP, suitable for numerical optimisation.
Example
julia> using OptimalControlProblems
julia> docp = OptimalControlProblems.steering(OptimalControlBackend(); N=500);
OptimalControlProblems.steering_s
— Methodsteering_s(
::OptimalControlBackend,
description::Symbol...;
grid_size,
parameters,
kwargs...
) -> Union{CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ADNLPBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}, CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ExaBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}}
Constructs an OptimalControl problem for steering a particle along a trajectory. The objective is to minimise the total time taken to reach a specified terminal state, subject to control limits and particle dynamics. The state vector has four components, and the control is a single scalar input.
Arguments
::OptimalControlBackend
: Placeholder type specifying the OptimalControl backend or solver interface.grid_size::Int=500
: (Keyword) Number of discretisation points for the direct transcription grid.
Returns
docp
: The direct optimal control problem object representing the particle steering problem.nlp
: The corresponding nonlinear programming model obtained from the DOCP, suitable for numerical optimisation.
Example
julia> using OptimalControlProblems
julia> docp = OptimalControlProblems.steering(OptimalControlBackend(); N=500);
OptimalControlProblems.vanderpol
— Methodvanderpol(
::OptimalControlBackend,
description::Symbol...;
grid_size,
parameters,
kwargs...
) -> Union{CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ADNLPBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}, CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ExaBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}}
Constructs an OptimalControl problem for the Van der Pol oscillator with a control input. The objective is to minimise a quadratic cost composed of the state and control effort over a fixed time horizon. The problem formulation can be found here.
Arguments
::OptimalControlBackend
: Placeholder type specifying the OptimalControl backend or solver interface.grid_size::Int=500
: (Keyword) Number of discretisation points for the direct transcription grid.
Returns
docp
: The direct optimal control problem object representing the Van der Pol problem.nlp
: The corresponding nonlinear programming model obtained from the DOCP, suitable for numerical optimisation.
Example
julia> using OptimalControlProblems
julia> docp = OptimalControlProblems.vanderpol(OptimalControlBackend(); N=500);
OptimalControlProblems.vanderpol_s
— Methodvanderpol_s(
::OptimalControlBackend,
description::Symbol...;
grid_size,
parameters,
kwargs...
) -> Union{CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ADNLPBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}, CTDirect.DOCP{_A, CTModels.Model{TD, TimesModelType, StateModelType, ControlModelType, VariableModelType, DynamicsModelType, ObjectiveModelType, ConstraintsModelType, BuildExaModelType}, CTDirect.ExaBackend} where {_A<:CTDirect.Discretization, TD<:CTModels.TimeDependence, TimesModelType<:CTModels.AbstractTimesModel, StateModelType<:CTModels.AbstractStateModel, ControlModelType<:CTModels.AbstractControlModel, VariableModelType<:CTModels.AbstractVariableModel, DynamicsModelType<:Function, ObjectiveModelType<:CTModels.AbstractObjectiveModel, ConstraintsModelType<:CTModels.AbstractConstraintsModel, BuildExaModelType<:Union{Nothing, Function}}}
Constructs an OptimalControl problem for the Van der Pol oscillator with a control input. The objective is to minimise a quadratic cost composed of the state and control effort over a fixed time horizon. The problem formulation can be found here.
Arguments
::OptimalControlBackend
: Placeholder type specifying the OptimalControl backend or solver interface.grid_size::Int=500
: (Keyword) Number of discretisation points for the direct transcription grid.
Returns
docp
: The direct optimal control problem object representing the Van der Pol problem.nlp
: The corresponding nonlinear programming model obtained from the DOCP, suitable for numerical optimisation.
Example
julia> using OptimalControlProblems
julia> docp = OptimalControlProblems.vanderpol(OptimalControlBackend(); N=500);
CTModels.control
— Methodcontrol(
model::GenericModel
) -> Union{JuMPModels.var"#457#459", JuMPModels.var"#458#460"}
Extract and interpolate the control trajectory from a JuMP model of an optimal control problem.
Arguments
model::JuMP.GenericModel
: The JuMP model containing the problem solution.
Returns
fu::Function
: A function of continuous time returning the interpolated control. If the control is scalar, the function returns a scalar; otherwise, a vector.
Example
julia> u = OptimalControlProblems.control(model)
julia> u(0.25)
0.42
CTModels.control_components
— Methodcontrol_components(model::GenericModel) -> Any
Return the list of control component names stored in a JuMP model.
Arguments
model::JuMP.GenericModel
: A JuMP model that contains the key:control_components
.
Returns
Vector{String}
: The names of the control components.
Example
julia> OptimalControlProblems.control_components(model)
["Fex"]
CTModels.control_dimension
— Methodcontrol_dimension(model::GenericModel) -> Any
Return the number of control components in a JuMP model.
Arguments
model::JuMP.GenericModel
: A JuMP model that contains the key:control_components
.
Returns
Int
: The number of control components.
Example
julia> OptimalControlProblems.control_dimension(model)
1
CTModels.costate
— Methodcostate(
model::GenericModel
) -> Union{JuMPModels.var"#462#465", JuMPModels.var"#463#466"}
Extract and interpolate the costate trajectory (dual variables associated with states) from a JuMP model of an optimal control problem.
Arguments
model::JuMP.GenericModel
: The JuMP model containing the problem solution.
Returns
fp::Function
: A function of continuous time returning the interpolated costate. If the costate is scalar, the function returns a scalar; otherwise, a vector.
Example
julia> p = OptimalControlProblems.costate(model)
julia> p(0.75)
[-0.12, 0.05]
CTModels.iterations
— Methoditerations(model::GenericModel) -> Any
Get the number of iterations from a JuMP model.
Arguments
model::JuMP.GenericModel
: The JuMP model containing the problem solution.
Example
julia> OptimalControlProblems.iterations(model)
20
CTModels.state
— Methodstate(
model::GenericModel
) -> Union{JuMPModels.var"#453#455", JuMPModels.var"#454#456"}
Extract and interpolate the state trajectory from a JuMP model of an optimal control problem.
Arguments
model::JuMP.GenericModel
: The JuMP model containing the problem solution.
Returns
fx::Function
: A function of continuous time returning the interpolated state. If the state is scalar, the function returns a scalar; otherwise, a vector.
Example
julia> x = OptimalControlProblems.state(model)
julia> x(0.5)
[0.23, 0.71]
CTModels.state_components
— Methodstate_components(model::GenericModel) -> Any
Return the list of state component names stored in a JuMP model.
Arguments
model::JuMP.GenericModel
: A JuMP model that contains the key:state_components
.
Returns
Vector{String}
: The names of the state components.
Example
julia> OptimalControlProblems.state_components(model)
["x", "v", "θ", "ω"]
CTModels.state_dimension
— Methodstate_dimension(model::GenericModel) -> Any
Return the number of state components in a JuMP model.
Arguments
model::JuMP.GenericModel
: A JuMP model that contains the key:state_components
.
Returns
Int
: The number of state components.
Example
julia> OptimalControlProblems.state_dimension(model)
4
CTModels.time_grid
— Methodtime_grid(model::GenericModel) -> Any
Compute the discretised time grid for a given optimal control problem solved with JuMP.
Arguments
model::JuMP.GenericModel
: The JuMP model containing the problem solution.
Returns
t_jp::AbstractVector{Float64}
: A vector of time points spanning from initial timet0 = 0
to the final timetf
.
Example
julia> tgrid = OptimalControlProblems.time_grid(model)
0.0:0.1:1.0
CTModels.variable_components
— Methodvariable_components(model::GenericModel) -> Any
Return the list of additional variable component names stored in a JuMP model.
Arguments
model::JuMP.GenericModel
: A JuMP model that contains the key:variable_components
.
Returns
Vector{String}
: The names of the additional variable components.
Example
julia> OptimalControlProblems.variable_components(model)
["tf", "ddx"]
CTModels.variable_dimension
— Methodvariable_dimension(model::GenericModel) -> Any
Return the number of additional variable components in a JuMP model.
Arguments
model::JuMP.GenericModel
: A JuMP model that contains the key:variable_components
.
Returns
Int
: The number of additional variable components.
Example
julia> OptimalControlProblems.variable_dimension(model)
2
ExaModels.objective
— Methodobjective(model::GenericModel) -> Any
Get the objective value from a JuMP model.
Arguments
model::JuMP.GenericModel
: The JuMP model containing the problem solution.
Example
julia> OptimalControlProblems.objective(model)
1.5
ExaModels.variable
— Methodvariable(model::GenericModel) -> Any
Extract scalar or vector decision variables (such as final time when free) from a JuMP model of an optimal control problem.
Arguments
model::JuMP.GenericModel
: The JuMP model containing the problem solution.
Returns
var::Union{Float64,Vector{Float64}}
:Float64[]
if the problem defines no additional variables.- A scalar if there is one variable.
- A vector if multiple variables exist.
Example
julia> v = OptimalControlProblems.variable(model)
1.5
JuMPModels.costate_components
— Methodcostate_components(model::GenericModel) -> Any
Return the list of costate component names stored in a JuMP model.
Arguments
model::JuMP.GenericModel
: A JuMP model that contains the key:costate_components
.
Returns
Vector{String}
: The names of the costate components.
Example
julia> costate_components(model)
["∂x", "∂v", "∂θ", "∂ω"]
OptimalControlProblems.beam
— Methodbeam(
::JuMPBackend,
args...;
grid_size,
parameters,
kwargs...
) -> JuMP.Model
Constructs a JuMP model representing the Beam optimal control problem. The objective is to minimise the control effort while satisfying boundary conditions and the linear beam dynamics. The problem is formulated as in the BOCOP repository.
Arguments
::JuMPBackend
: Placeholder type to specify the JuMP backend or solver interface.grid_size::Int=500
: (Keyword) Number of discretisation steps for the time grid.
Returns
model::JuMP.Model
: A JuMP model containing the decision variables, dynamics constraints, boundary conditions, and the quadratic objective function.
Example
julia> using OptimalControlProblems
julia> using JuMP
julia> model = OptimalControlProblems.beam(JuMPBackend(); N=100)
References
- Problem formulation available at: https://github.com/control-toolbox/bocop/tree/main/bocop
OptimalControlProblems.chain
— Methodchain(
::JuMPBackend,
args...;
grid_size,
parameters,
kwargs...
) -> JuMP.Model
Constructs and returns a JuMP model for the Hanging Chain Problem. The goal is to determine the equilibrium shape of a chain of fixed length L
hanging between two fixed points a
and b
, by minimising its potential energy. The formulation follows a standard optimal control approach with discretised dynamics and constraints.
Arguments
::JuMPBackend
: Specifies the backend for building the JuMP model.grid_size::Int=500
: (Keyword) Number of discretisation steps in the time grid.
Returns
model::JuMP.Model
: A JuMP model representing the hanging chain optimal control problem.
Example
julia> using OptimalControlProblems
julia> using JuMP
julia> model = OptimalControlProblems.chain(JuMPBackend(); N=300)
References
OptimalControlProblems.double_oscillator
— Methoddouble_oscillator(
::JuMPBackend,
args...;
grid_size,
parameters,
kwargs...
) -> JuMP.Model
Constructs and returns a JuMP model for the Double Oscillator Optimal Control Problem. The objective is to compute an optimal control trajectory for a mechanical double oscillator system, minimising a quadratic cost on positions and control. The system dynamics are discretised over N
steps, with collocation constraints enforcing the dynamics.
Arguments
::JuMPBackend
: Specifies the backend for building the JuMP model.grid_size::Int=500
: (Keyword) Number of discretisation steps in the time grid.
Returns
model::JuMP.Model
: A JuMP model representing the double oscillator optimal control problem.
Example
julia> using OptimalControlProblems
julia> using JuMP
julia> model = OptimalControlProblems.double_oscillator(JuMPBackend(); N=200)
References
- [CLP2018] Coudurier, C., Lepreux, O., & Petit, N. (2018). Optimal bang-bang control of a mechanical double oscillator using averaging methods. IFAC-PapersOnLine, 51(2), 49–54.
OptimalControlProblems.ducted_fan
— Methodducted_fan(
::JuMPBackend,
args...;
grid_size,
parameters,
kwargs...
) -> JuMP.Model
Constructs and returns a JuMP model for the Planar Ducted Fan Optimal Control Problem. The objective is to determine the optimal control inputs for a planar ducted fan to move from a given initial state to a desired final state, minimising a combination of control effort and final time. The system is discretised over N
steps, with collocation constraints enforcing the dynamics.
Arguments
::JuMPBackend
: Specifies the backend for building the JuMP model.grid_size::Int=250
: (Keyword) Number of discretisation steps in the time grid.
Returns
model::JuMP.Model
: A JuMP model representing the planar ducted fan optimal control problem.
Example
julia> using OptimalControlProblems
julia> using JuMP
julia> model = OptimalControlProblems.ducted_fan(JuMPBackend(); N=100)
References
- Graichen, K., & Petit, N. (2009). Incorporating a class of constraints into the dynamics of optimal control problems. Optimal Control Applications and Methods, 30(6), 537–561. [GP2009]
OptimalControlProblems.electric_vehicle
— Methodelectric_vehicle(
::JuMPBackend,
args...;
grid_size,
parameters,
kwargs...
) -> JuMP.Model
Constructs and returns a JuMP model for the Electric Vehicle Optimal Control Problem. The objective is to compute the optimal control trajectory for an electric vehicle to travel a fixed distance while minimising a combination of energy consumption and control effort. The system dynamics are discretised over N
steps, and collocation constraints are used to enforce the vehicle's kinematic and dynamic equations.
Arguments
::JuMPBackend
: Specifies the backend for building the JuMP model.grid_size::Int=500
: (Keyword) Number of discretisation steps in the time grid.
Returns
model::JuMP.Model
: A JuMP model representing the electric vehicle optimal control problem.
Example
julia> using OptimalControlProblems
julia> using JuMP
julia> model = OptimalControlProblems.electric_vehicle(JuMPBackend(); N=100)
References
- Petit, N., & Sciarretta, A. (2011). Optimal drive of electric vehicles using an inversion-based trajectory generation approach. IFAC Proceedings Volumes, 44(1), 14519–14526. [PS2011]
OptimalControlProblems.glider
— Methodglider(
::JuMPBackend,
args...;
grid_size,
parameters,
kwargs...
) -> JuMP.Model
Constructs and returns a JuMP model for the Hang Glider Optimal Control Problem. The objective is to compute the optimal trajectory of a hang glider that maximises the final horizontal position while accounting for aerodynamic forces and a thermal updraft. The system dynamics are discretised over N
steps, and collocation constraints enforce the kinematic and dynamic equations of the glider.
Arguments
::JuMPBackend
: Specifies the backend for building the JuMP model.grid_size::Int=500
: (Keyword) Number of discretisation steps in the time grid.
Returns
model::JuMP.Model
: A JuMP model representing the hang glider optimal control problem.
Example
julia> using OptimalControlProblems
julia> using JuMP
julia> model = OptimalControlProblems.glider(JuMPBackend(); N=100)
References
- Hang Glider Problem formulation as in: https://www.mcs.anl.gov/~more/cops/
OptimalControlProblems.insurance
— Methodinsurance(
::JuMPBackend,
args...;
grid_size,
parameters,
kwargs...
) -> JuMP.Model
Constructs and returns a JuMP model for the Insurance Optimal Control Problem. The model represents a simplified insurance management scenario where the objective is to optimise the utility function U
over time, subject to capital accumulation dynamics and other constraints. The system is discretised using N
steps, and collocation constraints enforce the dynamics of the states I
, m
, and x₃
.
Arguments
::JuMPBackend
: Specifies the backend for building the JuMP model.grid_size::Int=500
: (Keyword) Number of discretisation steps in the time grid.
Returns
model::JuMP.Model
: A JuMP model representing the insurance optimal control problem.
Example
julia> using OptimalControlProblems
julia> using JuMP
julia> model = OptimalControlProblems.insurance(JuMPBackend(); N=100)
References
- Problem formulation available at: https://github.com/control-toolbox/bocop/tree/main/bocop
OptimalControlProblems.jackson
— Methodjackson(
::JuMPBackend,
args...;
grid_size,
parameters,
kwargs...
) -> JuMP.Model
Constructs and returns a JuMP model for the Jackson Optimal Control Problem. The model represents a dynamic system with three state variables a
, b
, and x₃
and a control variable u
. The objective is to maximise the final value of x₃
by optimising the control u
over the time horizon [0, tf]
. The dynamics are discretised using N
steps with trapezoidal collocation.
Arguments
::JuMPBackend
: Specifies the backend for building the JuMP model.grid_size::Int=500
: (Keyword) Number of discretisation steps in the time grid.
Returns
model::JuMP.Model
: A JuMP model representing the Jackson optimal control problem.
Example
julia> using OptimalControlProblems
julia> using JuMP
julia> model = OptimalControlProblems.jackson(JuMPBackend(); N=100)
References
- Problem formulation available at: https://github.com/control-toolbox/bocop/tree/main/bocop
OptimalControlProblems.robbins
— Methodrobbins(
::JuMPBackend,
args...;
grid_size,
parameters,
kwargs...
) -> JuMP.Model
Constructs and returns a JuMP model for the Robbins Optimal Control Problem. The model represents a three-dimensional state system controlled by a single input u
. The objective is to minimise a cost functional that combines linear and quadratic terms of the state and control over a fixed time horizon.
Arguments
::JuMPBackend
: Specifies the backend for building the JuMP model.grid_size::Int=500
: (Keyword) Number of discretisation steps for the time grid.
Returns
model::JuMP.Model
: A JuMP model representing the Robbins optimal control problem.
Example
julia> using OptimalControlProblems
julia> using JuMP
julia> model = OptimalControlProblems.robbins(JuMPBackend(); N=100)
References
- Problem formulation available at: https://github.com/control-toolbox/bocop/tree/main/bocop
OptimalControlProblems.robot
— Methodrobot(
::JuMPBackend,
args...;
grid_size,
parameters,
kwargs...
) -> JuMP.Model
Constructs and returns a JuMP model for the Robot Arm Optimal Control Problem. The model represents a robot arm with three states (ρ, θ, ϕ) controlled by three inputs (uρ, uθ, uϕ). The objective is to minimise the final time required for the robot arm to move between specified initial and final positions while respecting dynamic and boundary constraints.
Arguments
::JuMPBackend
: Specifies the backend for building the JuMP model.grid_size::Int=250
: (Keyword) Number of discretisation steps for the time horizon.
Returns
model::JuMP.Model
: A JuMP model representing the robot arm optimal control problem.
Example
julia> using OptimalControlProblems
julia> using JuMP
julia> model = OptimalControlProblems.robot(JuMPBackend(); N=100)
References
- Problem formulation available at: https://github.com/MadNLP/COPSBenchmark.jl/blob/main/src/robot.jl
OptimalControlProblems.rocket
— Methodrocket(
::JuMPBackend,
args...;
grid_size,
parameters,
kwargs...
) -> JuMP.Model
Constructs and returns a JuMP model for the Goddard Rocket Optimal Control Problem. The model represents the dynamics of a Goddard rocket with three states (altitude h
, velocity v
, and mass m
) and one control input (T
for thrust). The objective is to maximise the final altitude of the rocket while satisfying boundary conditions and dynamic constraints.
Arguments
::JuMPBackend
: Specifies the backend for building the JuMP model.grid_size::Int=500
: (Keyword) Number of discretisation steps for the time horizon.
Returns
model::JuMP.Model
: A JuMP model representing the Goddard rocket optimal control problem.
Example
julia> using OptimalControlProblems
julia> using JuMP
julia> model = OptimalControlProblems.rocket(JuMPBackend(); N=200)
References
- Problem formulation available at: https://github.com/MadNLP/COPSBenchmark.jl/blob/main/src/rocket.jl
OptimalControlProblems.space_shuttle
— Methodspace_shuttle(
::JuMPBackend,
args...;
grid_size,
parameters,
kwargs...
) -> JuMP.Model
Constructs and returns a JuMP model for the Space Shuttle Reentry Trajectory Problem. The model represents the dynamics of a space shuttle reentry with multiple states (altitude h
, longitude ϕ
, latitude θ
, velocity v
, flight path angle γ
, azimuth ψ
) and control inputs (angle of attack α
and bank angle β
). The objective is to maximise the terminal latitude (cross-range) while satisfying boundary conditions and vehicle dynamics. Note: no heating limit path constraint is included in this formulation.
Arguments
::JuMPBackend
: Specifies the backend for building the JuMP model.grid_size::Int=500
: (Keyword) Number of discretisation steps for the time horizon.
Returns
model::JuMP.Model
: A JuMP model representing the space shuttle reentry optimal control problem.
Example
julia> using OptimalControlProblems
julia> using JuMP
julia> model = OptimalControlProblems.space_shuttle(JuMPBackend(); N=200)
References
- Problem formulation and tutorial available at: https://jump.dev/JuMP.jl/stable/tutorials/nonlinear/spaceshuttlereentry_trajectory/
OptimalControlProblems.steering
— Methodsteering(
::JuMPBackend,
args...;
grid_size,
parameters,
kwargs...
) -> JuMP.Model
Constructs and returns a JuMP model for the Particle Steering Problem. The model represents the dynamics of a particle with four state variables (x₁
, x₂
, x₃
, x₄
) and a control input u
. The objective is to minimise the final time required for the particle to reach a specified altitude and terminal velocity while satisfying the system dynamics and boundary conditions.
Arguments
::JuMPBackend
: Specifies the backend for building the JuMP model.grid_size::Int=500
: (Keyword) Number of discretisation steps for the time horizon.
Returns
model::JuMP.Model
: A JuMP model representing the particle steering optimal control problem.
Example
julia> using OptimalControlProblems
julia> using JuMP
julia> model = OptimalControlProblems.steering(JuMPBackend(); N=200)
References
- Problem formulation available at: https://github.com/MadNLP/COPSBenchmark.jl/blob/main/src/steering.jl
OptimalControlProblems.vanderpol
— Methodvanderpol(
::JuMPBackend,
args...;
grid_size,
parameters,
kwargs...
) -> JuMP.Model
Constructs and returns a JuMP model for the Van der Pol Problem, a classic nonlinear oscillator system. The model represents the dynamics of the Van der Pol oscillator with control input u
and seeks to minimise the quadratic cost over the states and control.
Arguments
::JuMPBackend
: Specifies the backend for building the JuMP model.grid_size::Int=500
: (Keyword) Number of discretisation steps for the time horizon.
Returns
model::JuMP.Model
: A JuMP model representing the Van der Pol optimal control problem.
Example
julia> using OptimalControlProblems
julia> using JuMP
julia> model = OptimalControlProblems.vanderpol(JuMPBackend(); N=100)
References
- Problem formulation available at: https://github.com/control-toolbox/bocop/tree/main/bocop