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.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.add
CTBase.add
CTBase.constraint
CTBase.constraint!
CTBase.constraint!
CTBase.constraint!
CTBase.constraint!
CTBase.constraint!
CTBase.constraint!
CTBase.constraint!
CTBase.constraint_type
CTBase.constraints_labels
CTBase.control!
CTBase.ct_repl
CTBase.ctgradient
CTBase.ctgradient
CTBase.ctgradient
CTBase.ctindices
CTBase.ctinterpolate
CTBase.ctjacobian
CTBase.ctjacobian
CTBase.ctjacobian
CTBase.ctupperscripts
CTBase.dynamics!
CTBase.getFullDescription
CTBase.get_priority_print_callbacks
CTBase.get_priority_stop_callbacks
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.time!
CTBase.time!
CTBase.time!
CTBase.time!
CTBase.variable!
CTBase.∂ₜ
CTBase.@Lie
CTBase.@def
Documentation
CTBase.CTBase
— ModuleCTBase
module.
Lists all the imported modules and packages:
Base
Core
DataStructures
DocStringExtensions
LinearAlgebra
MLStyle
Parameters
Plots
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
OptimalControlModel
OptimalControlSolution
ParsingError
Poisson
PrintCallback
State
StateConstraint
States
StopCallback
Time
TimeDependence
Times
TimesDisc
UnauthorizedCall
Variable
VariableConstraint
VariableDependence
VectorField
add
constraint
constraint!
constraint_type
constraints_labels
control!
ctNumber
ctVector
ct_repl
ctgradient
ctindices
ctinterpolate
ctjacobian
ctupperscripts
@def
dynamics!
getFullDescription
get_priority_print_callbacks
get_priority_stop_callbacks
is_max
is_min
is_time_dependent
is_time_independent
is_variable_dependent
is_variable_independent
nlp_constraints
objective!
plot
plot!
remove_constraint!
replace_call
state!
time!
variable!
∂ₜ
⋅
CTBase.Control
— TypeType alias for a control.
CTBase.Costate
— TypeType alias for an costate.
CTBase.DCostate
— TypeType alias for a tangent vector to the costate space.
CTBase.DState
— TypeType alias for a tangent vector to the state space.
CTBase.State
— TypeType alias for a state.
CTBase.TimesDisc
— TypeType alias for a grid of times.
CTBase.Variable
— TypeType alias for a variable.
CTBase.ctVector
— TypeType alias for a vector of real numbers.
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.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.add
CTBase.add
CTBase.constraint
CTBase.constraint!
CTBase.constraint!
CTBase.constraint!
CTBase.constraint!
CTBase.constraint!
CTBase.constraint!
CTBase.constraint!
CTBase.constraint_type
CTBase.constraints_labels
CTBase.control!
CTBase.ct_repl
CTBase.ctgradient
CTBase.ctgradient
CTBase.ctgradient
CTBase.ctindices
CTBase.ctinterpolate
CTBase.ctjacobian
CTBase.ctjacobian
CTBase.ctjacobian
CTBase.ctupperscripts
CTBase.dynamics!
CTBase.getFullDescription
CTBase.get_priority_print_callbacks
CTBase.get_priority_stop_callbacks
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.time!
CTBase.time!
CTBase.time!
CTBase.time!
CTBase.variable!
CTBase.∂ₜ
CTBase.@Lie
CTBase.@def
Documentation
CTBase.CTBase
— ModuleCTBase
module.
Lists all the imported modules and packages:
Base
Core
DataStructures
DocStringExtensions
LinearAlgebra
MLStyle
Parameters
Plots
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
OptimalControlModel
OptimalControlSolution
ParsingError
Poisson
PrintCallback
State
StateConstraint
States
StopCallback
Time
TimeDependence
Times
TimesDisc
UnauthorizedCall
Variable
VariableConstraint
VariableDependence
VectorField
add
constraint
constraint!
constraint_type
constraints_labels
control!
ctNumber
ctVector
ct_repl
ctgradient
ctindices
ctinterpolate
ctjacobian
ctupperscripts
@def
dynamics!
getFullDescription
get_priority_print_callbacks
get_priority_stop_callbacks
is_max
is_min
is_time_dependent
is_time_independent
is_variable_dependent
is_variable_independent
nlp_constraints
objective!
plot
plot!
remove_constraint!
replace_call
state!
time!
variable!
∂ₜ
⋅
sourceCTBase.Control
— TypeType alias for a control.
sourceCTBase.Costate
— TypeType alias for an costate.
sourceCTBase.DCostate
— TypeType alias for a tangent vector to the costate space.
sourceCTBase.DState
— TypeType alias for a tangent vector to the state space.
sourceCTBase.State
— TypeType alias for a state.
sourceCTBase.TimesDisc
— TypeType alias for a grid of times.
sourceCTBase.Variable
— TypeType alias for a variable.
sourceCTBase.ctVector
— TypeType alias for a vector of real numbers.
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])
@@ -1210,22 +1210,6 @@
((:a,),)
julia> descriptions[1]
(:a,)
sourceCTBase.constraint!
— Functionconstraint!(
- ocp::OptimalControlModel,
- type::Symbol,
- rg::Union{Index, OrdinalRange{<:Integer}},
- val::Union{Real, AbstractVector{<:Real}}
-)
-constraint!(
- ocp::OptimalControlModel,
- type::Symbol,
- rg::Union{Index, OrdinalRange{<:Integer}},
- val::Union{Real, AbstractVector{<:Real}},
- label::Symbol
-)
-
Add an :initial
or :final
value constraint on a range of the state, or a value constraint on a range of the :variable
.
Note - The range of the constraint must be contained in 1:n if the constraint is on the state, or 1:q if the constraint is on the variable.
- The state, control and variable dimensions must be set before. Use state!, control! and variable!.
- The times must be set before. Use time!.
Examples
julia> constraint!(ocp, :initial, 1:2:5, [ 0, 0, 0 ])
-julia> constraint!(ocp, :initial, 2:3, [ 0, 0 ])
-julia> constraint!(ocp, :final, Index(2), 0)
-julia> constraint!(ocp, :variable, 2:3, [ 0, 3 ])
sourceCTBase.constraint!
— Functionconstraint!(
ocp::OptimalControlModel,
type::Symbol,
f::Function,
@@ -1265,34 +1249,50 @@
julia> constraint!(ocp, :mixed, (t, x, u, v) -> x[1]-u*v[1], 0)
sourceCTBase.constraint!
— Functionconstraint!(
ocp::OptimalControlModel,
type::Symbol,
- lb::Union{Real, AbstractVector{<:Real}},
- ub::Union{Real, AbstractVector{<:Real}}
+ val::Union{Real, AbstractVector{<:Real}}
)
constraint!(
ocp::OptimalControlModel,
type::Symbol,
- lb::Union{Real, AbstractVector{<:Real}},
- ub::Union{Real, AbstractVector{<:Real}},
+ val::Union{Real, AbstractVector{<:Real}},
label::Symbol
)
-
Add an :initial
, :final
, :control
, :state
or :variable
box constraint (whole range).
Note - The state, control and variable dimensions must be set before. Use state!, control! and variable!.
- The times must be set before. Use time!.
- When an element is of dimension 1, consider it as a scalar.
Examples
julia> constraint!(ocp, :initial, [ 0, 0, 0 ], [ 1, 2, 1 ])
-julia> constraint!(ocp, :final, [ 0, 0, 0 ], [ 1, 2, 1 ])
-julia> constraint!(ocp, :control, [ 0, 0 ], [ 2, 3 ])
-julia> constraint!(ocp, :state, [ 0, 0, 0 ], [ 1, 2, 1 ])
-julia> constraint!(ocp, :variable, 0, 1) # the variable here is of dimension 1
sourceCTBase.constraint!
— Functionconstraint!(
+
Add an :initial
or :final
value constraint on the state, or a :variable
value. Can also be used with :state
and :control
.
Note - The state, control and variable dimensions must be set before. Use state!, control! and variable!.
- The times must be set before. Use time!.
- When an element is of dimension 1, consider it as a scalar.
Examples
julia> constraint!(ocp, :initial, [ 0, 0 ])
+julia> constraint!(ocp, :final, 2) # if the state is of dimension 1
+julia> constraint!(ocp, :variable, [ 3, 0, 1 ])
sourceCTBase.constraint!
— Functionconstraint!(
ocp::OptimalControlModel,
type::Symbol,
+ rg::Union{Index, OrdinalRange{<:Integer}},
val::Union{Real, AbstractVector{<:Real}}
)
constraint!(
ocp::OptimalControlModel,
type::Symbol,
+ rg::Union{Index, OrdinalRange{<:Integer}},
val::Union{Real, AbstractVector{<:Real}},
label::Symbol
)
-
Add an :initial
or :final
value constraint on the state, or a :variable
value. Can also be used with :state
and :control
.
Note - The state, control and variable dimensions must be set before. Use state!, control! and variable!.
- The times must be set before. Use time!.
- When an element is of dimension 1, consider it as a scalar.
Examples
julia> constraint!(ocp, :initial, [ 0, 0 ])
-julia> constraint!(ocp, :final, 2) # if the state is of dimension 1
-julia> constraint!(ocp, :variable, [ 3, 0, 1 ])
sourceCTBase.constraint!
— Methodconstraint!(
+
Add an :initial
or :final
value constraint on a range of the state, or a value constraint on a range of the :variable
.
Note - The range of the constraint must be contained in 1:n if the constraint is on the state, or 1:q if the constraint is on the variable.
- The state, control and variable dimensions must be set before. Use state!, control! and variable!.
- The times must be set before. Use time!.
Examples
julia> constraint!(ocp, :initial, 1:2:5, [ 0, 0, 0 ])
+julia> constraint!(ocp, :initial, 2:3, [ 0, 0 ])
+julia> constraint!(ocp, :final, Index(2), 0)
+julia> constraint!(ocp, :variable, 2:3, [ 0, 3 ])
sourceCTBase.constraint!
— Functionconstraint!(
+ ocp::OptimalControlModel,
+ type::Symbol,
+ lb::Union{Real, AbstractVector{<:Real}},
+ ub::Union{Real, AbstractVector{<:Real}}
+)
+constraint!(
+ ocp::OptimalControlModel,
+ type::Symbol,
+ lb::Union{Real, AbstractVector{<:Real}},
+ ub::Union{Real, AbstractVector{<:Real}},
+ label::Symbol
+)
+
Add an :initial
, :final
, :control
, :state
or :variable
box constraint (whole range).
Note - The state, control and variable dimensions must be set before. Use state!, control! and variable!.
- The times must be set before. Use time!.
- When an element is of dimension 1, consider it as a scalar.
Examples
julia> constraint!(ocp, :initial, [ 0, 0, 0 ], [ 1, 2, 1 ])
+julia> constraint!(ocp, :final, [ 0, 0, 0 ], [ 1, 2, 1 ])
+julia> constraint!(ocp, :control, [ 0, 0 ], [ 2, 3 ])
+julia> constraint!(ocp, :state, [ 0, 0, 0 ], [ 1, 2, 1 ])
+julia> constraint!(ocp, :variable, 0, 1) # the variable here is of dimension 1
sourceCTBase.constraint!
— Methodconstraint!(
ocp::OptimalControlModel,
type::Symbol;
rg,
@@ -1691,7 +1691,40 @@
julia> ocp.final_time
1
julia> ocp.time_name
-"s"
sourceCTBase.time!
— Functiontime!(ocp::OptimalControlModel, t0::Real, tf::Real)
+"s"
sourceCTBase.time!
— Functiontime!(
+ ocp::OptimalControlModel{<:TimeDependence, NonFixed},
+ ind0::Index,
+ indf::Index
+)
+time!(
+ ocp::OptimalControlModel{<:TimeDependence, NonFixed},
+ ind0::Index,
+ indf::Index,
+ name::String
+)
+
Initial and final times are free and given by the variable at the provided indices.
Examples
julia> time!(ocp, Index(2), Index(3), "t")
sourceCTBase.time!
— Functiontime!(
+ ocp::OptimalControlModel{<:TimeDependence, NonFixed},
+ t0::Real,
+ indf::Index
+)
+time!(
+ ocp::OptimalControlModel{<:TimeDependence, NonFixed},
+ t0::Real,
+ indf::Index,
+ name::String
+)
+
Fix initial time, final time is free and given by the variable at the provided index.
Note You must use time! only once to set either the initial or the final time, or both.
Examples
julia> time!(ocp, 0, Index(2), "t")
sourceCTBase.time!
— Functiontime!(
+ ocp::OptimalControlModel{<:TimeDependence, NonFixed},
+ ind0::Index,
+ tf::Real
+)
+time!(
+ ocp::OptimalControlModel{<:TimeDependence, NonFixed},
+ ind0::Index,
+ tf::Real,
+ name::String
+)
+
Fix final time, initial time is free and given by the variable at the provided index.
Examples
julia> time!(ocp, Index(2), 1, "t")
sourceCTBase.time!
— Functiontime!(ocp::OptimalControlModel, t0::Real, tf::Real)
time!(
ocp::OptimalControlModel,
t0::Real,
@@ -1720,40 +1753,7 @@
julia> ocp.final_time
1
julia> ocp.time_name
-"s"
sourceCTBase.time!
— Functiontime!(
- ocp::OptimalControlModel{<:TimeDependence, NonFixed},
- t0::Real,
- indf::Index
-)
-time!(
- ocp::OptimalControlModel{<:TimeDependence, NonFixed},
- t0::Real,
- indf::Index,
- name::String
-)
-
Fix initial time, final time is free and given by the variable at the provided index.
Note You must use time! only once to set either the initial or the final time, or both.
Examples
julia> time!(ocp, 0, Index(2), "t")
sourceCTBase.time!
— Functiontime!(
- ocp::OptimalControlModel{<:TimeDependence, NonFixed},
- ind0::Index,
- indf::Index
-)
-time!(
- ocp::OptimalControlModel{<:TimeDependence, NonFixed},
- ind0::Index,
- indf::Index,
- name::String
-)
-
Initial and final times are free and given by the variable at the provided indices.
Examples
julia> time!(ocp, Index(2), Index(3), "t")
sourceCTBase.time!
— Functiontime!(
- ocp::OptimalControlModel{<:TimeDependence, NonFixed},
- ind0::Index,
- tf::Real
-)
-time!(
- ocp::OptimalControlModel{<:TimeDependence, NonFixed},
- ind0::Index,
- tf::Real,
- name::String
-)
-
Fix final time, initial time is free and given by the variable at the provided index.
Examples
julia> time!(ocp, Index(2), 1, "t")
sourceCTBase.variable!
— Functionvariable!(ocp::OptimalControlModel, q::Integer)
+"s"
sourceCTBase.variable!
— Functionvariable!(ocp::OptimalControlModel, q::Integer)
variable!(
ocp::OptimalControlModel,
q::Integer,
@@ -1810,4 +1810,4 @@
-2 ≤ v(t) ≤ 3, (2)
ẋ(t) == [ v(t), u(t) ]
tf → min
-end
sourceSettings
This document was generated with Documenter.jl version 1.1.0 on Wednesday 4 October 2023. Using Julia version 1.9.3.
+end