CTBase API
This is just a dump of CTBase API documentation. For more details about CTBase.jl
package, see the documentation.
Index
CTBase.CTBase
CTBase.AbstractHamiltonian
CTBase.AmbiguousDescription
CTBase.Autonomous
CTBase.BoundaryConstraint
CTBase.BoundaryConstraint
CTBase.BoundaryConstraint
CTBase.BoundaryConstraint
CTBase.CTCallback
CTBase.CTCallbacks
CTBase.CTException
CTBase.Control
CTBase.ControlConstraint
CTBase.ControlConstraint
CTBase.ControlConstraint
CTBase.ControlConstraint
CTBase.ControlLaw
CTBase.ControlLaw
CTBase.ControlLaw
CTBase.ControlLaw
CTBase.Controls
CTBase.Costate
CTBase.Costates
CTBase.DCostate
CTBase.DState
CTBase.Description
CTBase.Dimension
CTBase.Dynamics
CTBase.Dynamics
CTBase.Dynamics
CTBase.Dynamics
CTBase.FeedbackControl
CTBase.FeedbackControl
CTBase.FeedbackControl
CTBase.FeedbackControl
CTBase.Fixed
CTBase.Hamiltonian
CTBase.Hamiltonian
CTBase.Hamiltonian
CTBase.Hamiltonian
CTBase.HamiltonianLift
CTBase.HamiltonianLift
CTBase.HamiltonianLift
CTBase.HamiltonianLift
CTBase.HamiltonianVectorField
CTBase.HamiltonianVectorField
CTBase.HamiltonianVectorField
CTBase.HamiltonianVectorField
CTBase.IncorrectArgument
CTBase.IncorrectMethod
CTBase.IncorrectOutput
CTBase.Index
CTBase.Lagrange
CTBase.Lagrange
CTBase.Lagrange
CTBase.Lagrange
CTBase.Mayer
CTBase.Mayer
CTBase.Mayer
CTBase.Mayer
CTBase.MixedConstraint
CTBase.MixedConstraint
CTBase.MixedConstraint
CTBase.MixedConstraint
CTBase.Multiplier
CTBase.Multiplier
CTBase.Multiplier
CTBase.Multiplier
CTBase.NonAutonomous
CTBase.NonFixed
CTBase.NotImplemented
CTBase.OptimalControlInit
CTBase.OptimalControlModel
CTBase.OptimalControlSolution
CTBase.ParsingError
CTBase.PrintCallback
CTBase.PrintCallback
CTBase.State
CTBase.StateConstraint
CTBase.StateConstraint
CTBase.StateConstraint
CTBase.StateConstraint
CTBase.States
CTBase.StopCallback
CTBase.StopCallback
CTBase.Time
CTBase.TimeDependence
CTBase.Times
CTBase.TimesDisc
CTBase.UnauthorizedCall
CTBase.Variable
CTBase.VariableConstraint
CTBase.VariableConstraint
CTBase.VariableDependence
CTBase.VectorField
CTBase.VectorField
CTBase.VectorField
CTBase.VectorField
CTBase.ctNumber
CTBase.ctVector
CTBase.:⋅
CTBase.:⋅
CTBase.:⋅
CTBase.Lie
CTBase.Lie
CTBase.Lie
CTBase.Lie
CTBase.Lie
CTBase.Lift
CTBase.Lift
CTBase.Lift
CTBase.Model
CTBase.Model
CTBase.Poisson
CTBase.Poisson
CTBase.Poisson
CTBase.Poisson
CTBase.Poisson
CTBase.Poisson
CTBase.Poisson
CTBase.__OCPModel
CTBase.add
CTBase.add
CTBase.constraint
CTBase.constraint!
CTBase.constraint_type
CTBase.constraints_labels
CTBase.control!
CTBase.ct_repl
CTBase.ct_repl_update_model
CTBase.ctgradient
CTBase.ctgradient
CTBase.ctgradient
CTBase.ctindices
CTBase.ctinterpolate
CTBase.ctjacobian
CTBase.ctjacobian
CTBase.ctjacobian
CTBase.ctupperscripts
CTBase.dim_boundary_constraints
CTBase.dim_control_constraints
CTBase.dim_control_range
CTBase.dim_mixed_constraints
CTBase.dim_path_constraints
CTBase.dim_state_constraints
CTBase.dim_state_range
CTBase.dim_variable_constraints
CTBase.dim_variable_range
CTBase.dynamics!
CTBase.getFullDescription
CTBase.get_priority_print_callbacks
CTBase.get_priority_stop_callbacks
CTBase.has_free_final_time
CTBase.has_free_initial_time
CTBase.has_lagrange_cost
CTBase.has_mayer_cost
CTBase.is_autonomous
CTBase.is_fixed
CTBase.is_max
CTBase.is_min
CTBase.is_time_dependent
CTBase.is_time_independent
CTBase.is_variable_dependent
CTBase.is_variable_independent
CTBase.nlp_constraints!
CTBase.objective!
CTBase.objective!
CTBase.remove_constraint!
CTBase.replace_call
CTBase.replace_call
CTBase.state!
CTBase.time!
CTBase.variable!
CTBase.∂ₜ
CTBase.@Lie
CTBase.@Lie
CTBase.@Lie
CTBase.@def
Documentation
CTBase.CTBase
— ModuleCTBase
module.
Lists all the imported modules and packages:
Base
Core
DataStructures
DocStringExtensions
LinearAlgebra
MLStyle
Parameters
PrettyTables
Printf
ReplMaker
Unicode
List of all the exported names:
AbstractHamiltonian
AmbiguousDescription
Autonomous
BoundaryConstraint
CTCallback
CTCallbacks
CTException
Control
ControlConstraint
ControlLaw
Controls
Costate
Costates
DCostate
DState
Description
Dimension
Dynamics
FeedbackControl
Fixed
Hamiltonian
HamiltonianLift
HamiltonianVectorField
IncorrectArgument
IncorrectMethod
IncorrectOutput
Index
Lagrange
@Lie
Lie
Lift
Mayer
MixedConstraint
Model
Multiplier
NonAutonomous
NonFixed
NotImplemented
OptimalControlInit
OptimalControlModel
OptimalControlSolution
ParsingError
Poisson
PrintCallback
State
StateConstraint
States
StopCallback
Time
TimeDependence
Times
TimesDisc
UnauthorizedCall
Variable
VariableConstraint
VariableDependence
VectorField
__OCPModel
add
constraint
constraint!
constraint_type
constraints_labels
control!
ctNumber
ctVector
ct_repl
ct_repl_update_model
ctgradient
ctindices
ctinterpolate
ctjacobian
ctupperscripts
@def
dim_boundary_constraints
dim_control_constraints
dim_control_range
dim_mixed_constraints
dim_path_constraints
dim_state_constraints
dim_state_range
dim_variable_constraints
dim_variable_range
dynamics!
getFullDescription
get_priority_print_callbacks
get_priority_stop_callbacks
has_free_final_time
has_free_initial_time
has_lagrange_cost
has_mayer_cost
is_autonomous
is_fixed
is_max
is_min
is_time_dependent
is_time_independent
is_variable_dependent
is_variable_independent
nlp_constraints!
objective!
remove_constraint!
replace_call
set_AD_backend
state!
time!
variable!
∂ₜ
⋅
CTBase.Control
— TypeType alias for a control in Rᵐ.
julia> const Control = ctVector
CTBase.Costate
— TypeType alias for a costate in Rⁿ.
julia> const Costate = ctVector
CTBase.DCostate
— TypeType alias for a tangent vector to the costate space.
julia> const DCostate = ctVector
CTBase.DState
— TypeType alias for a tangent vector to the state space.
julia> const DState = ctVector
CTBase.State
— TypeType alias for a state in Rⁿ.
julia> const State = ctVector
CTBase.TimesDisc
— TypeType alias for a grid of times. This is used to define a discretization of time interval given to solvers.
julia> const TimesDisc = Union{Times, StepRangeLen}
CTBase.Variable
— TypeType alias for a variable in Rᵏ.
julia> const Variable = ctVector
CTBase.ctVector
— TypeType alias for a vector of real numbers.
julia> const ctVector = Union{ctNumber, AbstractVector{<:ctNumber}}
CTBase.AbstractHamiltonian
— Typeabstract type AbstractHamiltonian{time_dependence, variable_dependence}
Abstract type for hamiltonians.
CTBase.AmbiguousDescription
— Typestruct AmbiguousDescription <: CTException
Exception thrown when the description is ambiguous / incorrect.
Fields
var::Tuple{Vararg{Symbol}}
CTBase.Autonomous
— Typeabstract type Autonomous <: TimeDependence
CTBase.BoundaryConstraint
— Typestruct BoundaryConstraint{variable_dependence}
Fields
f::Function
The default value for variable_dependence
is Fixed
.
Constructor
The constructor BoundaryConstraint
returns a BoundaryConstraint
of a function. The function must take 2 or 3 arguments (x0, xf)
or (x0, xf, v)
, if the function is variable, it must be specified. Dependencies are specified with a boolean, variable
, false
by default or with a DataType
, NonFixed/Fixed
, Fixed
by default.
Examples
julia> B = BoundaryConstraint((x0, xf) -> [xf[2]-x0[1], 2xf[1]+x0[2]^2])
+CTBase API · OptimalControl.jl CTBase API
This is just a dump of CTBase API documentation. For more details about CTBase.jl
package, see the documentation.
Index
CTBase.CTBase
CTBase.AbstractHamiltonian
CTBase.AmbiguousDescription
CTBase.Autonomous
CTBase.BoundaryConstraint
CTBase.BoundaryConstraint
CTBase.BoundaryConstraint
CTBase.BoundaryConstraint
CTBase.CTCallback
CTBase.CTCallbacks
CTBase.CTException
CTBase.Control
CTBase.ControlConstraint
CTBase.ControlConstraint
CTBase.ControlConstraint
CTBase.ControlConstraint
CTBase.ControlLaw
CTBase.ControlLaw
CTBase.ControlLaw
CTBase.ControlLaw
CTBase.Controls
CTBase.Costate
CTBase.Costates
CTBase.DCostate
CTBase.DState
CTBase.Description
CTBase.Dimension
CTBase.Dynamics
CTBase.Dynamics
CTBase.Dynamics
CTBase.Dynamics
CTBase.FeedbackControl
CTBase.FeedbackControl
CTBase.FeedbackControl
CTBase.FeedbackControl
CTBase.Fixed
CTBase.Hamiltonian
CTBase.Hamiltonian
CTBase.Hamiltonian
CTBase.Hamiltonian
CTBase.HamiltonianLift
CTBase.HamiltonianLift
CTBase.HamiltonianLift
CTBase.HamiltonianLift
CTBase.HamiltonianVectorField
CTBase.HamiltonianVectorField
CTBase.HamiltonianVectorField
CTBase.HamiltonianVectorField
CTBase.IncorrectArgument
CTBase.IncorrectMethod
CTBase.IncorrectOutput
CTBase.Index
CTBase.Lagrange
CTBase.Lagrange
CTBase.Lagrange
CTBase.Lagrange
CTBase.Mayer
CTBase.Mayer
CTBase.Mayer
CTBase.Mayer
CTBase.MixedConstraint
CTBase.MixedConstraint
CTBase.MixedConstraint
CTBase.MixedConstraint
CTBase.Multiplier
CTBase.Multiplier
CTBase.Multiplier
CTBase.Multiplier
CTBase.NonAutonomous
CTBase.NonFixed
CTBase.NotImplemented
CTBase.OptimalControlInit
CTBase.OptimalControlModel
CTBase.OptimalControlSolution
CTBase.ParsingError
CTBase.PrintCallback
CTBase.PrintCallback
CTBase.State
CTBase.StateConstraint
CTBase.StateConstraint
CTBase.StateConstraint
CTBase.StateConstraint
CTBase.States
CTBase.StopCallback
CTBase.StopCallback
CTBase.Time
CTBase.TimeDependence
CTBase.Times
CTBase.TimesDisc
CTBase.UnauthorizedCall
CTBase.Variable
CTBase.VariableConstraint
CTBase.VariableConstraint
CTBase.VariableDependence
CTBase.VectorField
CTBase.VectorField
CTBase.VectorField
CTBase.VectorField
CTBase.ctNumber
CTBase.ctVector
CTBase.:⋅
CTBase.:⋅
CTBase.:⋅
CTBase.Lie
CTBase.Lie
CTBase.Lie
CTBase.Lie
CTBase.Lie
CTBase.Lift
CTBase.Lift
CTBase.Lift
CTBase.Model
CTBase.Model
CTBase.Poisson
CTBase.Poisson
CTBase.Poisson
CTBase.Poisson
CTBase.Poisson
CTBase.Poisson
CTBase.Poisson
CTBase.__OCPModel
CTBase.add
CTBase.add
CTBase.constraint
CTBase.constraint!
CTBase.constraint_type
CTBase.constraints_labels
CTBase.control!
CTBase.ct_repl
CTBase.ct_repl_update_model
CTBase.ctgradient
CTBase.ctgradient
CTBase.ctgradient
CTBase.ctindices
CTBase.ctinterpolate
CTBase.ctjacobian
CTBase.ctjacobian
CTBase.ctjacobian
CTBase.ctupperscripts
CTBase.dim_boundary_constraints
CTBase.dim_control_constraints
CTBase.dim_control_range
CTBase.dim_mixed_constraints
CTBase.dim_path_constraints
CTBase.dim_state_constraints
CTBase.dim_state_range
CTBase.dim_variable_constraints
CTBase.dim_variable_range
CTBase.dynamics!
CTBase.getFullDescription
CTBase.get_priority_print_callbacks
CTBase.get_priority_stop_callbacks
CTBase.has_free_final_time
CTBase.has_free_initial_time
CTBase.has_lagrange_cost
CTBase.has_mayer_cost
CTBase.is_autonomous
CTBase.is_fixed
CTBase.is_max
CTBase.is_min
CTBase.is_time_dependent
CTBase.is_time_independent
CTBase.is_variable_dependent
CTBase.is_variable_independent
CTBase.nlp_constraints!
CTBase.objective!
CTBase.objective!
CTBase.remove_constraint!
CTBase.replace_call
CTBase.replace_call
CTBase.state!
CTBase.time!
CTBase.variable!
CTBase.∂ₜ
CTBase.@Lie
CTBase.@Lie
CTBase.@Lie
CTBase.@def
Documentation
CTBase.CTBase
— ModuleCTBase
module.
Lists all the imported modules and packages:
Base
Core
DataStructures
DocStringExtensions
LinearAlgebra
MLStyle
Parameters
PrettyTables
Printf
ReplMaker
Unicode
List of all the exported names:
AbstractHamiltonian
AmbiguousDescription
Autonomous
BoundaryConstraint
CTCallback
CTCallbacks
CTException
Control
ControlConstraint
ControlLaw
Controls
Costate
Costates
DCostate
DState
Description
Dimension
Dynamics
FeedbackControl
Fixed
Hamiltonian
HamiltonianLift
HamiltonianVectorField
IncorrectArgument
IncorrectMethod
IncorrectOutput
Index
Lagrange
@Lie
Lie
Lift
Mayer
MixedConstraint
Model
Multiplier
NonAutonomous
NonFixed
NotImplemented
OptimalControlInit
OptimalControlModel
OptimalControlSolution
ParsingError
Poisson
PrintCallback
State
StateConstraint
States
StopCallback
Time
TimeDependence
Times
TimesDisc
UnauthorizedCall
Variable
VariableConstraint
VariableDependence
VectorField
__OCPModel
add
constraint
constraint!
constraint_type
constraints_labels
control!
ctNumber
ctVector
ct_repl
ct_repl_update_model
ctgradient
ctindices
ctinterpolate
ctjacobian
ctupperscripts
@def
dim_boundary_constraints
dim_control_constraints
dim_control_range
dim_mixed_constraints
dim_path_constraints
dim_state_constraints
dim_state_range
dim_variable_constraints
dim_variable_range
dynamics!
getFullDescription
get_priority_print_callbacks
get_priority_stop_callbacks
has_free_final_time
has_free_initial_time
has_lagrange_cost
has_mayer_cost
is_autonomous
is_fixed
is_max
is_min
is_time_dependent
is_time_independent
is_variable_dependent
is_variable_independent
nlp_constraints!
objective!
remove_constraint!
replace_call
set_AD_backend
state!
time!
variable!
∂ₜ
⋅
sourceCTBase.Control
— TypeType alias for a control in Rᵐ.
julia> const Control = ctVector
sourceCTBase.Costate
— TypeType alias for a costate in Rⁿ.
julia> const Costate = ctVector
sourceCTBase.DCostate
— TypeType alias for a tangent vector to the costate space.
julia> const DCostate = ctVector
sourceCTBase.DState
— TypeType alias for a tangent vector to the state space.
julia> const DState = ctVector
sourceCTBase.State
— TypeType alias for a state in Rⁿ.
julia> const State = ctVector
sourceCTBase.TimesDisc
— TypeType alias for a grid of times. This is used to define a discretization of time interval given to solvers.
julia> const TimesDisc = Union{Times, StepRangeLen}
sourceCTBase.Variable
— TypeType alias for a variable in Rᵏ.
julia> const Variable = ctVector
sourceCTBase.ctVector
— TypeType alias for a vector of real numbers.
julia> const ctVector = Union{ctNumber, AbstractVector{<:ctNumber}}
sourceCTBase.AbstractHamiltonian
— Typeabstract type AbstractHamiltonian{time_dependence, variable_dependence}
Abstract type for hamiltonians.
sourceCTBase.AmbiguousDescription
— Typestruct AmbiguousDescription <: CTException
Exception thrown when the description is ambiguous / incorrect.
Fields
var::Tuple{Vararg{Symbol}}
sourceCTBase.Autonomous
— Typeabstract type Autonomous <: TimeDependence
sourceCTBase.BoundaryConstraint
— Typestruct BoundaryConstraint{variable_dependence}
Fields
f::Function
The default value for variable_dependence
is Fixed
.
Constructor
The constructor BoundaryConstraint
returns a BoundaryConstraint
of a function. The function must take 2 or 3 arguments (x0, xf)
or (x0, xf, v)
, if the function is variable, it must be specified. Dependencies are specified with a boolean, variable
, false
by default or with a DataType
, NonFixed/Fixed
, Fixed
by default.
Examples
julia> B = BoundaryConstraint((x0, xf) -> [xf[2]-x0[1], 2xf[1]+x0[2]^2])
julia> B = BoundaryConstraint((x0, xf, v) -> [v[3]+xf[2]-x0[1], v[1]-v[2]+2xf[1]+x0[2]^2], variable=true)
julia> B = BoundaryConstraint((x0, xf, v) -> [v[3]+xf[2]-x0[1], v[1]-v[2]+2xf[1]+x0[2]^2], NonFixed)
Warning When the state is of dimension 1, consider x0
and xf
as a scalar. When the constraint is dimension 1, return a scalar.
Call
The call returns the evaluation of the BoundaryConstraint
for given values. If a variable is given for a non variable dependent boundary constraint, it will be ignored.
Examples
julia> B = BoundaryConstraint((x0, xf) -> [xf[2]-x0[1], 2xf[1]+x0[2]^2])
julia> B([0, 0], [1, 1])
@@ -1690,4 +1690,4 @@
-2 ≤ v(t) ≤ 3, (2)
ẋ(t) == [ v(t), u(t) ]
tf → min
-end
sourceSettings
This document was generated with Documenter.jl version 1.5.0 on Thursday 4 July 2024. Using Julia version 1.10.4.
+end