Public API
This page lists exported symbols of CTModels.Components.
From CTModels.Components
AbstractConstraintsModel [Abstract Type]
CTModels.Components.AbstractConstraintsModel — Type
abstract type AbstractConstraintsModelAbstract base type for constraint models in optimal control problems.
See also: CTModels.Components.ConstraintsModel, CTModels.Components.path_constraints_nl, CTModels.Components.state_constraints_box.
AbstractControlModel [Abstract Type]
CTModels.Components.AbstractControlModel — Type
abstract type AbstractControlModelAbstract base type for control variable models in optimal control problems.
See also: CTModels.Components.ControlModel, CTModels.Components.ControlModelSolution, CTModels.Components.EmptyControlModel, CTModels.Components.name, CTModels.Components.dimension.
AbstractDefinition [Abstract Type]
CTModels.Components.AbstractDefinition — Type
abstract type AbstractDefinitionAbstract base type for the symbolic definition attached to an optimal control problem.
See also: CTModels.Components.Definition, CTModels.Components.EmptyDefinition, CTModels.Components.expression.
AbstractObjectiveModel [Abstract Type]
CTModels.Components.AbstractObjectiveModel — Type
abstract type AbstractObjectiveModelAbstract base type for objective function models in optimal control problems.
See also: CTModels.Components.MayerObjectiveModel, CTModels.Components.LagrangeObjectiveModel, CTModels.Components.BolzaObjectiveModel, CTModels.Components.criterion, CTModels.Components.mayer, CTModels.Components.lagrange.
AbstractStateModel [Abstract Type]
CTModels.Components.AbstractStateModel — Type
abstract type AbstractStateModelAbstract base type for state variable models in optimal control problems.
Subtypes describe the state space structure including dimension, naming, and optionally the state trajectory itself.
See also: CTModels.Components.StateModel, CTModels.Components.StateModelSolution, CTModels.Components.name, CTModels.Components.dimension.
AbstractTimeModel [Abstract Type]
CTModels.Components.AbstractTimeModel — Type
abstract type AbstractTimeModelAbstract base type for time boundary models (initial or final time).
See also: CTModels.Components.FixedTimeModel, CTModels.Components.FreeTimeModel, CTModels.Components.TimesModel, CTModels.Components.time_name.
AbstractTimesModel [Abstract Type]
CTModels.Components.AbstractTimesModel — Type
abstract type AbstractTimesModelAbstract base type for combined initial and final time models.
See also: CTModels.Components.TimesModel, CTModels.Components.FixedTimeModel, CTModels.Components.FreeTimeModel.
AbstractVariableModel [Abstract Type]
CTModels.Components.AbstractVariableModel — Type
abstract type AbstractVariableModelAbstract base type for optimisation variable models in optimal control problems.
See also: CTModels.Components.VariableModel, CTModels.Components.EmptyVariableModel, CTModels.Components.VariableModelSolution, CTModels.Components.name, CTModels.Components.dimension.
Autonomous [Abstract Type]
CTModels.Components.Autonomous — Type
abstract type Autonomous <: CTModels.Components.TimeDependenceType tag indicating that the dynamics and other functions of an optimal control problem do not explicitly depend on time.
For autonomous systems, the dynamics have the form ẋ = f(x, u) rather than ẋ = f(t, x, u).
See also: CTModels.Components.TimeDependence, CTModels.Components.NonAutonomous, CTModels.Components.TimesModel.
BolzaObjectiveModel [Struct]
CTModels.Components.BolzaObjectiveModel — Type
struct BolzaObjectiveModel{TM<:Function, TL<:Function} <: CTModels.Components.AbstractObjectiveModelObjective model with both Mayer and Lagrange costs (Bolza form): g(x(t₀), x(tf), v) + ∫ f⁰(t, x, u, v) dt.
Fields
mayer::TM: The Mayer cost function.lagrange::TL: The Lagrange integrand.criterion::Symbol: Optimisation direction, either:minor:max.
See also: CTModels.Components.AbstractObjectiveModel, CTModels.Components.MayerObjectiveModel, CTModels.Components.LagrangeObjectiveModel, CTModels.Components.mayer, CTModels.Components.lagrange.
ConstraintsDictType [Struct]
CTModels.Components.ConstraintsDictType — Type
Type alias for a dictionary of constraints, used to store constraints before building the model.
const ConstraintsDictType = OrderedCollections.OrderedDict{
Symbol,Tuple{Symbol,Union{Function,OrdinalRange{<:Int}},ctVector,ctVector}
}See also: CTModels.Components.ConstraintsModel.
ConstraintsModel [Struct]
CTModels.Components.ConstraintsModel — Type
struct ConstraintsModel{TP<:Tuple, TB<:Tuple, TS<:Tuple, TC<:Tuple, TV<:Tuple} <: CTModels.Components.AbstractConstraintsModelContainer for all constraints in an optimal control problem.
Fields
path_nl::TP: Tuple of nonlinear path constraints(lb, f!, ub, labels).boundary_nl::TB: Tuple of nonlinear boundary constraints(lb, f!, ub, labels).state_box::TS: Tuple of box constraints on state variables(lb, ind, ub, labels, aliases).control_box::TC: Tuple of box constraints on control variables (same structure).variable_box::TV: Tuple of box constraints on optimisation variables (same structure).
See also: CTModels.Components.AbstractConstraintsModel, CTModels.Components.path_constraints_nl, CTModels.Components.state_constraints_box, CTModels.Components.control_constraints_box.
ControlModel [Struct]
CTModels.Components.ControlModel — Type
struct ControlModel <: CTModels.Components.AbstractControlModelControl model describing the structure of the control variable in an optimal control problem definition.
Fields
name::String: Display name for the control variable (e.g.,"u").components::Vector{String}: Names of individual control components (e.g.,["u₁", "u₂"]).
See also: CTModels.Components.AbstractControlModel, CTModels.Components.ControlModelSolution, CTModels.Components.name, CTModels.Components.components, CTModels.Components.dimension.
ControlModelSolution [Struct]
CTModels.Components.ControlModelSolution — Type
struct ControlModelSolution{TS<:Function} <: CTModels.Components.AbstractControlModelRepresents the control trajectory in a solution.
Fields
name::String: Name of the control variable (e.g.,"u").components::Vector{String}: Names of individual control components.value::TS: A functiont -> u(t)returning the control vector at timet.interpolation::Symbol: Interpolation type (:constantor:linear).
See also: CTModels.Components.AbstractControlModel, CTModels.Components.ControlModel, CTModels.Components.value, CTModels.Components.interpolation.
Definition [Struct]
CTModels.Components.Definition — Type
struct Definition <: CTModels.Components.AbstractDefinitionWrapper around a Julia Expr holding the original symbolic definition of an optimal control problem (typically produced by the @def DSL).
Fields
expr::Expr: The symbolic expression defining the problem.
See also: CTModels.Components.AbstractDefinition, CTModels.Components.EmptyDefinition, CTModels.Components.expression.
Dimension [Struct]
CTModels.Components.Dimension — Type
Type alias for a dimension, used for the state, costate, control and variable spaces.
const Dimension = IntSee also: CTModels.Components.ctNumber.
EmptyControlModel [Struct]
CTModels.Components.EmptyControlModel — Type
struct EmptyControlModel <: CTModels.Components.AbstractControlModelSentinel type representing the absence of a control input in an optimal control problem.
See also: CTModels.Components.ControlModel, CTModels.Components.AbstractControlModel.
EmptyDefinition [Struct]
CTModels.Components.EmptyDefinition — Type
struct EmptyDefinition <: CTModels.Components.AbstractDefinitionSentinel type representing the absence of a symbolic definition.
See also: CTModels.Components.AbstractDefinition, CTModels.Components.Definition, CTModels.Components.expression.
EmptyVariableModel [Struct]
CTModels.Components.EmptyVariableModel — Type
struct EmptyVariableModel <: CTModels.Components.AbstractVariableModelSentinel type representing the absence of optimisation variables.
See also: CTModels.Components.AbstractVariableModel, CTModels.Components.VariableModel.
FixedTimeModel [Struct]
CTModels.Components.FixedTimeModel — Type
struct FixedTimeModel{T<:Real} <: CTModels.Components.AbstractTimeModelTime model representing a fixed (known) time boundary.
Fields
time::T: The fixed time value.name::String: Display name for this time (e.g.,"t₀"or"tf").
See also: CTModels.Components.AbstractTimeModel, CTModels.Components.FreeTimeModel, CTModels.Components.initial_time, CTModels.Components.final_time.
FreeTimeModel [Struct]
CTModels.Components.FreeTimeModel — Type
struct FreeTimeModel <: CTModels.Components.AbstractTimeModelTime model representing a free (optimised) time boundary.
The actual time value is stored in the optimisation variable at the given index.
Fields
index::Int: Index into the optimisation variable where this time is stored.name::String: Display name for this time (e.g.,"tf").
See also: CTModels.Components.AbstractTimeModel, CTModels.Components.FixedTimeModel, CTModels.Components.initial_time, CTModels.Components.final_time.
LagrangeObjectiveModel [Struct]
CTModels.Components.LagrangeObjectiveModel — Type
struct LagrangeObjectiveModel{TL<:Function} <: CTModels.Components.AbstractObjectiveModelObjective model with only a Lagrange (integral) cost: ∫ f⁰(t, x, u, v) dt.
Fields
lagrange::TL: The Lagrange integrand(t, x, u, v) -> f⁰(t, x, u, v).criterion::Symbol: Optimisation direction, either:minor:max.
See also: CTModels.Components.AbstractObjectiveModel, CTModels.Components.MayerObjectiveModel, CTModels.Components.BolzaObjectiveModel, CTModels.Components.lagrange.
MayerObjectiveModel [Struct]
CTModels.Components.MayerObjectiveModel — Type
struct MayerObjectiveModel{TM<:Function} <: CTModels.Components.AbstractObjectiveModelObjective model with only a Mayer (terminal) cost: g(x(t₀), x(tf), v).
Fields
mayer::TM: The Mayer cost function(x0, xf, v) -> g(x0, xf, v).criterion::Symbol: Optimisation direction, either:minor:max.
See also: CTModels.Components.AbstractObjectiveModel, CTModels.Components.LagrangeObjectiveModel, CTModels.Components.BolzaObjectiveModel, CTModels.Components.mayer.
NonAutonomous [Abstract Type]
CTModels.Components.NonAutonomous — Type
abstract type NonAutonomous <: CTModels.Components.TimeDependenceType tag indicating that the dynamics and other functions of an optimal control problem explicitly depend on time.
For non-autonomous systems, the dynamics have the form ẋ = f(t, x, u).
See also: CTModels.Components.TimeDependence, CTModels.Components.Autonomous, CTModels.Components.TimesModel.
StateModel [Struct]
CTModels.Components.StateModel — Type
struct StateModel <: CTModels.Components.AbstractStateModelState model describing the structure of the state variable in an optimal control problem definition.
Fields
name::String: Display name for the state variable (e.g.,"x").components::Vector{String}: Names of individual state components (e.g.,["x₁", "x₂"]).
See also: CTModels.Components.AbstractStateModel, CTModels.Components.StateModelSolution, CTModels.Components.name, CTModels.Components.components, CTModels.Components.dimension.
StateModelSolution [Struct]
CTModels.Components.StateModelSolution — Type
struct StateModelSolution{TS<:Function} <: CTModels.Components.AbstractStateModelState model for a solved optimal control problem, including the state trajectory.
Fields
name::String: Display name for the state variable.components::Vector{String}: Names of individual state components.value::TS: A functiont -> x(t)returning the state vector at timet.
See also: CTModels.Components.AbstractStateModel, CTModels.Components.StateModel, CTModels.Components.value.
Time [Abstract Type]
CTModels.Components.Time — Type
Type alias for a (continuous) time.
const Time = ctNumberSee also: CTModels.Components.ctNumber, CTModels.Components.Times, CTModels.Components.TimesDisc.
TimeDependence [Abstract Type]
CTModels.Components.TimeDependence — Type
abstract type TimeDependenceAbstract base type representing time dependence of an optimal control problem.
Used as a type parameter to distinguish between autonomous and non-autonomous systems at the type level, enabling dispatch and compile-time optimisations.
See also: CTModels.Components.Autonomous, CTModels.Components.NonAutonomous, CTModels.Components.TimesModel.
Times [Abstract Type]
CTModels.Components.Times — Type
Type alias for a vector of times.
const Times = AbstractVector{<:Time}See also: CTModels.Components.Time, CTModels.Components.TimesDisc.
TimesDisc [Struct]
CTModels.Components.TimesDisc — Type
Type alias for a grid of times, used to discretize the time interval given to solvers.
const TimesDisc = Union{Times,StepRangeLen}See also: CTModels.Components.Time, CTModels.Components.Times.
TimesModel [Struct]
CTModels.Components.TimesModel — Type
struct TimesModel{TI<:CTModels.Components.AbstractTimeModel, TF<:CTModels.Components.AbstractTimeModel} <: CTModels.Components.AbstractTimesModelCombined model for initial and final times in an optimal control problem.
Fields
initial::TI: The initial time model (fixed or free).final::TF: The final time model (fixed or free).time_name::String: Display name for the time variable (e.g.,"t").
See also: CTModels.Components.AbstractTimesModel, CTModels.Components.FixedTimeModel, CTModels.Components.FreeTimeModel, CTModels.Components.initial, CTModels.Components.final.
VariableModel [Struct]
CTModels.Components.VariableModel — Type
struct VariableModel <: CTModels.Components.AbstractVariableModelVariable model describing the structure of the optimisation variable.
Fields
name::String: Display name for the variable (e.g.,"v").components::Vector{String}: Names of individual variable components.
See also: CTModels.Components.AbstractVariableModel, CTModels.Components.VariableModelSolution, CTModels.Components.name, CTModels.Components.components, CTModels.Components.dimension.
VariableModelSolution [Struct]
CTModels.Components.VariableModelSolution — Type
struct VariableModelSolution{TS<:Union{Real, AbstractVector{<:Real}}} <: CTModels.Components.AbstractVariableModelVariable model for a solved optimal control problem, including the variable value.
Fields
name::String: Display name for the variable.components::Vector{String}: Names of individual variable components.value::TS: The optimisation variable value (scalar or vector).
See also: CTModels.Components.AbstractVariableModel, CTModels.Components.VariableModel, CTModels.Components.value.
boundary_constraints_nl [Function]
CTModels.Components.boundary_constraints_nl — Function
boundary_constraints_nl(
model::CTModels.Components.ConstraintsModel{<:Tuple, TB}
) -> Any
Get the nonlinear boundary constraints from the model.
Returns
TB: Tuple of nonlinear boundary constraints(lb, f!, ub, labels).
See also: CTModels.Components.path_constraints_nl, CTModels.Components.dim_boundary_constraints_nl.
boundary_constraints_nl(ocp::CTModels.Models.Model) -> Any
Return the nonlinear boundary constraints.
Arguments
ocp::Model: The optimal control problem.
Returns
Function: The nonlinear boundary constraints function.
See also: CTModels.Models.constraints, CTModels.Components.path_constraints_nl.
components [Function]
CTModels.Components.components — Function
components(
model::CTModels.Components.StateModel
) -> Vector{String}
Get the component names of the state from the state model.
Returns
Vector{String}: The state component names.
See also: CTModels.Components.name, CTModels.Components.dimension.
components(
model::CTModels.Components.StateModelSolution
) -> Vector{String}
Get the component names of the state from the state model solution.
Returns
Vector{String}: The state component names.
See also: CTModels.Components.name, CTModels.Components.dimension, CTModels.Components.value.
components(
model::CTModels.Components.ControlModel
) -> Vector{String}
Get the names of the control components.
Returns
Vector{String}: The control component names.
See also: CTModels.Components.name, CTModels.Components.dimension.
components(
model::CTModels.Components.ControlModelSolution
) -> Vector{String}
Get the names of the control components from the solution.
Returns
Vector{String}: The control component names.
See also: CTModels.Components.name, CTModels.Components.dimension, CTModels.Components.value, CTModels.Components.interpolation.
components(
_::CTModels.Components.EmptyControlModel
) -> Vector{String}
Return an empty vector since there are no control components defined.
Returns
Vector{String}: An empty vector.
components(
model::CTModels.Components.VariableModel
) -> Vector{String}
Return the names of the components of the variable.
Returns
Vector{String}: The variable component names.
See also: CTModels.Components.name, CTModels.Components.dimension.
components(
model::CTModels.Components.VariableModelSolution
) -> Vector{String}
Return the names of the components from the variable solution.
Returns
Vector{String}: The variable component names.
See also: CTModels.Components.name, CTModels.Components.dimension, CTModels.Components.value.
components(
_::CTModels.Components.EmptyVariableModel
) -> Vector{String}
Return an empty vector since there are no variable components defined.
Returns
Vector{String}: An empty vector.
control_constraints_box [Function]
CTModels.Components.control_constraints_box — Function
control_constraints_box(
model::CTModels.Components.ConstraintsModel{<:Tuple, <:Tuple, <:Tuple, TC}
) -> Any
Get the control box constraints from the model.
Returns
TC: Tuple of control box constraints(lb, ind, ub, labels, aliases).
See also: CTModels.Components.state_constraints_box, CTModels.Components.dim_control_constraints_box.
control_constraints_box(ocp::CTModels.Models.Model) -> Any
Return the box constraints on control.
Arguments
ocp::Model: The optimal control problem.
Returns
BoxConstraints: The box constraints on control.
See also: CTModels.Models.constraints, CTModels.Components.state_constraints_box.
criterion [Function]
CTModels.Components.criterion — Function
criterion(
model::CTModels.Components.MayerObjectiveModel
) -> Symbol
Return the criterion (:min or :max).
Returns
Symbol: The optimisation criterion (:minor:max).
See also: CTModels.Components.mayer, CTModels.Components.has_mayer_cost.
criterion(
model::CTModels.Components.LagrangeObjectiveModel
) -> Symbol
Return the criterion (:min or :max).
Returns
Symbol: The optimisation criterion (:minor:max).
See also: CTModels.Components.lagrange, CTModels.Components.has_lagrange_cost.
criterion(
model::CTModels.Components.BolzaObjectiveModel
) -> Symbol
Return the criterion (:min or :max).
Returns
Symbol: The optimisation criterion (:minor:max).
See also: CTModels.Components.mayer, CTModels.Components.lagrange, CTModels.Components.has_mayer_cost.
criterion(ocp::CTModels.Models.Model) -> Symbol
Return the type of criterion (:min or :max).
Arguments
ocp::Model: The optimal control problem.
Returns
Symbol: The criterion type (:minor:max).
See also: CTModels.Models.objective, CTModels.Components.mayer, CTModels.Components.lagrange.
ctNumber [Abstract Type]
CTModels.Components.ctNumber — Type
Type alias for a real number.
const ctNumber = RealSee also: CTModels.Components.Dimension, CTModels.Components.Time, CTModels.Components.ctVector.
ctVector [Abstract Type]
CTModels.Components.ctVector — Type
Type alias for a vector of real numbers.
const ctVector = AbstractVector{<:ctNumber}See also: CTModels.Components.ctNumber, CTModels.Components.Dimension.
dim_boundary_constraints_nl [Function]
CTModels.Components.dim_boundary_constraints_nl — Function
dim_boundary_constraints_nl(
model::CTModels.Components.ConstraintsModel
) -> Int64
Return the dimension of nonlinear boundary constraints.
Returns
Dimension: The number of nonlinear boundary constraints.
See also: CTModels.Components.boundary_constraints_nl, CTModels.Components.dim_path_constraints_nl.
dim_boundary_constraints_nl(
ocp::CTModels.Models.Model
) -> Int64
Return the dimension of the boundary constraints.
Arguments
ocp::Model: The optimal control problem.
Returns
Dimension: The dimension of boundary constraints.
See also: CTModels.Components.boundary_constraints_nl, CTModels.Components.dim_path_constraints_nl.
dim_boundary_constraints_nl(
sol::CTModels.Solutions.Solution
) -> Int64
Return the dimension of the boundary constraints.
Arguments
sol::Solution: The optimal control solution.
Returns
Dimension: The boundary constraints dimension.
See also: CTModels.Components.boundary_constraints_nl, CTModels.Components.dim_path_constraints_nl.
dim_control_constraints_box [Function]
CTModels.Components.dim_control_constraints_box — Function
dim_control_constraints_box(
model::CTModels.Components.ConstraintsModel
) -> Int64
Return the dimension of control box constraints.
Returns
Dimension: The number of control box constraints.
See also: CTModels.Components.control_constraints_box, CTModels.Components.dim_state_constraints_box.
dim_control_constraints_box(
ocp::CTModels.Models.Model
) -> Int64
Return the dimension of box constraints on control.
Arguments
ocp::Model: The optimal control problem.
Returns
Dimension: The dimension of box constraints on control.
See also: CTModels.Components.control_constraints_box, CTModels.Components.dim_state_constraints_box.
dim_path_constraints_nl [Function]
CTModels.Components.dim_path_constraints_nl — Function
dim_path_constraints_nl(
model::CTModels.Components.ConstraintsModel
) -> Int64
Return the dimension of nonlinear path constraints.
Returns
Dimension: The number of nonlinear path constraints.
See also: CTModels.Components.path_constraints_nl, CTModels.Components.dim_boundary_constraints_nl.
dim_path_constraints_nl(ocp::CTModels.Models.Model) -> Int64
Return the dimension of nonlinear path constraints.
Arguments
ocp::Model: The optimal control problem.
Returns
Dimension: The dimension of nonlinear path constraints.
See also: CTModels.Components.path_constraints_nl, CTModels.Components.dim_boundary_constraints_nl.
dim_path_constraints_nl(
sol::CTModels.Solutions.Solution
) -> Int64
Return the dimension of the path constraints.
Arguments
sol::Solution: The optimal control solution.
Returns
Dimension: The path constraints dimension.
See also: CTModels.Components.path_constraints_nl, CTModels.Components.dim_boundary_constraints_nl.
dim_state_constraints_box [Function]
CTModels.Components.dim_state_constraints_box — Function
dim_state_constraints_box(
model::CTModels.Components.ConstraintsModel
) -> Int64
Return the dimension of state box constraints.
Returns
Dimension: The number of state box constraints.
See also: CTModels.Components.state_constraints_box, CTModels.Components.dim_control_constraints_box.
dim_state_constraints_box(
ocp::CTModels.Models.Model
) -> Int64
Return the dimension of box constraints on state.
Arguments
ocp::Model: The optimal control problem.
Returns
Dimension: The dimension of box constraints on state.
See also: CTModels.Components.state_constraints_box, CTModels.Components.dim_control_constraints_box.
dim_variable_constraints_box [Function]
CTModels.Components.dim_variable_constraints_box — Function
dim_variable_constraints_box(
model::CTModels.Components.ConstraintsModel
) -> Int64
Return the dimension of variable box constraints.
Returns
Dimension: The number of variable box constraints.
See also: CTModels.Components.variable_constraints_box, CTModels.Components.dim_state_constraints_box.
dim_variable_constraints_box(
ocp::CTModels.Models.Model
) -> Int64
Return the dimension of box constraints on variable.
Arguments
ocp::Model: The optimal control problem.
Returns
Dimension: The dimension of box constraints on variable.
See also: CTModels.Components.variable_constraints_box, CTModels.Components.dim_state_constraints_box.
dimension [Function]
CTModels.Components.dimension — Function
dimension(model::CTModels.Components.StateModel) -> Int64
Get the dimension of the state from the state model.
Returns
Dimension: The state dimension (number of components).
See also: CTModels.Components.name, CTModels.Components.components.
dimension(
model::CTModels.Components.StateModelSolution
) -> Int64
Get the dimension of the state from the state model solution.
Returns
Dimension: The state dimension (number of components).
See also: CTModels.Components.name, CTModels.Components.components, CTModels.Components.value.
dimension(model::CTModels.Components.ControlModel) -> Int64
Get the control input dimension.
Returns
Dimension: The control dimension (number of components).
See also: CTModels.Components.name, CTModels.Components.components.
dimension(
model::CTModels.Components.ControlModelSolution
) -> Int64
Get the control input dimension from the solution.
Returns
Dimension: The control dimension (number of components).
See also: CTModels.Components.name, CTModels.Components.components, CTModels.Components.value, CTModels.Components.interpolation.
dimension(_::CTModels.Components.EmptyControlModel) -> Int64
Return 0 since no control is defined.
Returns
Dimension: Zero.
dimension(model::CTModels.Components.VariableModel) -> Int64
Return the dimension (number of components) of the variable.
Returns
Dimension: The variable dimension.
See also: CTModels.Components.name, CTModels.Components.components.
dimension(
model::CTModels.Components.VariableModelSolution
) -> Int64
Return the number of components in the variable solution.
Returns
Dimension: The variable dimension.
See also: CTModels.Components.name, CTModels.Components.components, CTModels.Components.value.
dimension(
_::CTModels.Components.EmptyVariableModel
) -> Int64
Return 0 since no variable is defined.
Returns
Dimension: Zero.
expression [Function]
CTModels.Components.expression — Function
expression(_::CTModels.Components.EmptyDefinition) -> Expr
Return an empty block expression for an CTModels.Components.EmptyDefinition.
Returns
Expr: An empty block expression:(begin end).
See also: CTModels.Components.expression.
expression(d::CTModels.Components.Definition) -> Expr
Return the symbolic expression wrapped by a CTModels.Components.Definition.
Returns
Expr: The symbolic expression defining the problem.
See also: CTModels.Components.expression.
expression(ocp::CTModels.Models.Model) -> Expr
Return the symbolic expression of the model definition.
Arguments
ocp::Model: The optimal control problem.
Returns
Expr: The symbolic expression of the model definition.
See also: CTModels.Models.definition.
final [Function]
CTModels.Components.final — Function
final(
model::CTModels.Components.TimesModel{<:CTModels.Components.AbstractTimeModel, TF<:CTModels.Components.AbstractTimeModel}
) -> CTModels.Components.AbstractTimeModel
Get the final time from the times model.
Returns
TF: The final time model (fixed or free).
See also: CTModels.Components.initial, CTModels.Components.final_time.
final_time [Function]
CTModels.Components.final_time — Function
final_time(
model::CTModels.Components.TimesModel{<:CTModels.Components.AbstractTimeModel, <:CTModels.Components.FixedTimeModel{T<:Real}}
) -> Real
Get the final time from the times model, from a fixed final time model.
Returns
T: The fixed final time value.
See also: CTModels.Components.initial_time, CTModels.Components.has_fixed_final_time.
final_time(
model::CTModels.Components.TimesModel{<:CTModels.Components.AbstractTimeModel, CTModels.Components.FreeTimeModel},
variable::AbstractArray{T<:Real, 1}
) -> Any
Get the final time from the times model, from a free final time model.
Arguments
model::TimesModel{<:AbstractTimeModel,FreeTimeModel}: The times model with free final time.variable::AbstractVector{T}: The optimisation variable vector.
Returns
T: The final time value from the variable.
See also: CTModels.Components.initial_time, CTModels.Components.has_free_final_time.
final_time(_::CTModels.Models.AbstractModel) -> Any
Throw an error for unsupported final time access.
final_time(
_::CTModels.Models.AbstractModel,
_::AbstractVector
) -> Any
Throw an error for unsupported final time access with variable.
final_time(
ocp::CTModels.Models.Model{<:CTModels.Components.TimeDependence, <:CTModels.Components.TimesModel{<:CTModels.Components.AbstractTimeModel, CTModels.Components.FixedTimeModel{T<:Real}}}
) -> Any
Return the final time, for a fixed final time.
Arguments
ocp::Model: The optimal control problem with fixed final time.
Returns
T: The final time value.
See also: CTModels.Components.initial_time, CTModels.Components.has_fixed_final_time.
final_time(
ocp::CTModels.Models.Model{<:CTModels.Components.TimeDependence, <:CTModels.Components.TimesModel{<:CTModels.Components.AbstractTimeModel, CTModels.Components.FreeTimeModel}},
variable::AbstractArray{T<:Real, 1}
) -> Any
Return the final time, for a free final time.
Arguments
ocp::Model: The optimal control problem with free final time.variable::AbstractVector{T}: The variable vector.
Returns
T: The final time value.
See also: CTModels.Components.initial_time, CTModels.Components.has_free_final_time.
final_time(
ocp::CTModels.Models.Model{<:CTModels.Components.TimeDependence, <:CTModels.Components.TimesModel{<:CTModels.Components.AbstractTimeModel, CTModels.Components.FreeTimeModel}},
variable::Real
) -> Real
Return the final time, for a free final time (scalar variable).
Arguments
ocp::Model: The optimal control problem with free final time.variable::T: The variable scalar.
Returns
T: The final time value.
See also: CTModels.Components.initial_time, CTModels.Components.has_free_final_time.
final_time(sol::CTModels.Solutions.Solution) -> Real
Return the final time of the solution.
Arguments
sol::Solution: The optimal control solution.
Returns
Real: The final time.
See also: CTModels.Components.initial_time, CTModels.Components.final_time_name.
final_time_name [Function]
CTModels.Components.final_time_name — Function
final_time_name(
model::CTModels.Components.TimesModel
) -> String
Get the name of the final time from the times model.
Returns
String: The final time name.
See also: CTModels.Components.time_name, CTModels.Components.initial_time_name.
final_time_name(ocp::CTModels.Models.Model) -> String
Return the name of the final time.
Arguments
ocp::Model: The optimal control problem.
Returns
String: The final time name.
See also: CTModels.Models.times, CTModels.Components.initial_time, CTModels.Components.final_time.
final_time_name(sol::CTModels.Solutions.Solution) -> String
Return the name of the final time.
Arguments
sol::Solution: The optimal control solution.
Returns
String: The final time name.
See also: CTModels.Components.initial_time_name, CTModels.Components.time_name.
has_fixed_final_time [Function]
CTModels.Components.has_fixed_final_time — Function
has_fixed_final_time(
_::CTModels.Components.TimesModel{<:CTModels.Components.AbstractTimeModel, <:CTModels.Components.FixedTimeModel{T<:Real}}
) -> Bool
Check if the final time is fixed. Return true.
Returns
Bool:trueif the final time is fixed.
See also: CTModels.Components.has_free_final_time, CTModels.Components.final_time.
has_fixed_final_time(
_::CTModels.Components.TimesModel{<:CTModels.Components.AbstractTimeModel, CTModels.Components.FreeTimeModel}
) -> Bool
Check if the final time is free. Return false.
Returns
Bool:false(final time is not fixed).
See also: CTModels.Components.has_free_final_time, CTModels.Components.final_time.
has_fixed_final_time(ocp::CTModels.Models.Model) -> Bool
Check if the final time is fixed.
Arguments
ocp::Model: The optimal control problem.
Returns
Bool:trueif the final time is fixed,falseotherwise.
See also: CTModels.Components.has_free_final_time, CTModels.Components.final_time.
has_fixed_final_time(
sol::CTModels.Solutions.Solution
) -> Bool
Check if the final time is fixed.
Arguments
sol::Solution: The optimal control solution.
Returns
Bool:trueif the final time is fixed,falseotherwise.
See also: CTModels.Components.has_free_final_time, CTModels.Components.final_time.
has_fixed_initial_time [Function]
CTModels.Components.has_fixed_initial_time — Function
has_fixed_initial_time(
_::CTModels.Components.TimesModel{<:CTModels.Components.FixedTimeModel{T<:Real}}
) -> Bool
Check if the initial time is fixed. Return true.
Returns
Bool:trueif the initial time is fixed.
See also: CTModels.Components.has_free_initial_time, CTModels.Components.initial_time.
has_fixed_initial_time(
_::CTModels.Components.TimesModel{CTModels.Components.FreeTimeModel}
) -> Bool
Check if the initial time is free. Return false.
Returns
Bool:false(initial time is not fixed).
See also: CTModels.Components.has_free_initial_time, CTModels.Components.initial_time.
has_fixed_initial_time(ocp::CTModels.Models.Model) -> Bool
Check if the initial time is fixed.
Arguments
ocp::Model: The optimal control problem.
Returns
Bool:trueif the initial time is fixed,falseotherwise.
See also: CTModels.Components.has_free_initial_time, CTModels.Components.initial_time.
has_fixed_initial_time(
sol::CTModels.Solutions.Solution
) -> Bool
Check if the initial time is fixed.
Arguments
sol::Solution: The optimal control solution.
Returns
Bool:trueif the initial time is fixed,falseotherwise.
See also: CTModels.Components.has_free_initial_time, CTModels.Components.initial_time.
has_free_final_time [Function]
CTModels.Components.has_free_final_time — Function
has_free_final_time(
times::CTModels.Components.TimesModel
) -> Bool
Check if the final time is free.
Returns
Bool:trueif the final time is free.
See also: CTModels.Components.has_fixed_final_time, CTModels.Components.final_time.
has_free_final_time(ocp::CTModels.Models.Model) -> Bool
Check if the final time is free.
Arguments
ocp::Model: The optimal control problem.
Returns
Bool:trueif the final time is free,falseotherwise.
See also: CTModels.Components.has_fixed_final_time, CTModels.Components.final_time.
has_free_final_time(
sol::CTModels.Solutions.Solution
) -> Bool
Check if the final time is free.
Arguments
sol::Solution: The optimal control solution.
Returns
Bool:trueif the final time is free,falseotherwise.
See also: CTModels.Components.has_fixed_final_time, CTModels.Components.final_time.
has_free_initial_time [Function]
CTModels.Components.has_free_initial_time — Function
has_free_initial_time(
times::CTModels.Components.TimesModel
) -> Bool
Check if the initial time is free.
Returns
Bool:trueif the initial time is free.
See also: CTModels.Components.has_fixed_initial_time, CTModels.Components.initial_time.
has_free_initial_time(ocp::CTModels.Models.Model) -> Bool
Check if the initial time is free.
Arguments
ocp::Model: The optimal control problem.
Returns
Bool:trueif the initial time is free,falseotherwise.
See also: CTModels.Components.has_fixed_initial_time, CTModels.Components.initial_time.
has_free_initial_time(
sol::CTModels.Solutions.Solution
) -> Bool
Check if the initial time is free.
Arguments
sol::Solution: The optimal control solution.
Returns
Bool:trueif the initial time is free,falseotherwise.
See also: CTModels.Components.has_fixed_initial_time, CTModels.Components.initial_time.
has_lagrange_cost [Function]
CTModels.Components.has_lagrange_cost — Function
has_lagrange_cost(
_::CTModels.Components.MayerObjectiveModel
) -> Bool
Return false.
Returns
Bool:false(Lagrange cost is not defined).
See also: CTModels.Components.has_mayer_cost, CTModels.Components.lagrange.
has_lagrange_cost(
_::CTModels.Components.LagrangeObjectiveModel
) -> Bool
Return true.
Returns
Bool:true(Lagrange cost is defined).
See also: CTModels.Components.has_mayer_cost, CTModels.Components.lagrange.
has_lagrange_cost(
_::CTModels.Components.BolzaObjectiveModel
) -> Bool
Return true.
Returns
Bool:true(Lagrange cost is defined).
See also: CTModels.Components.has_mayer_cost, CTModels.Components.lagrange.
has_lagrange_cost(ocp::CTModels.Models.Model) -> Bool
Check if the model has a Lagrange cost.
Arguments
ocp::Model: The optimal control problem.
Returns
Bool:trueif the model has a Lagrange cost,falseotherwise.
See also: CTModels.Components.lagrange, CTModels.Components.has_mayer_cost.
has_mayer_cost [Function]
CTModels.Components.has_mayer_cost — Function
has_mayer_cost(
_::CTModels.Components.MayerObjectiveModel
) -> Bool
Return true.
Returns
Bool:true(Mayer cost is defined).
See also: CTModels.Components.has_lagrange_cost, CTModels.Components.mayer.
has_mayer_cost(
_::CTModels.Components.LagrangeObjectiveModel
) -> Bool
Return false.
Returns
Bool:false(Mayer cost is not defined).
See also: CTModels.Components.has_lagrange_cost, CTModels.Components.mayer.
has_mayer_cost(
_::CTModels.Components.BolzaObjectiveModel
) -> Bool
Return true.
Returns
Bool:true(Mayer cost is defined).
See also: CTModels.Components.has_lagrange_cost, CTModels.Components.mayer.
has_mayer_cost(ocp::CTModels.Models.Model) -> Bool
Check if the model has a Mayer cost.
Arguments
ocp::Model: The optimal control problem.
Returns
Bool:trueif the model has a Mayer cost,falseotherwise.
See also: CTModels.Components.mayer, CTModels.Components.has_lagrange_cost.
index [Function]
CTModels.Components.index — Function
index(model::CTModels.Components.FreeTimeModel) -> Int64
Get the index of the time variable from the free time model.
Returns
Int: The index into the optimisation variable.
See also: CTModels.Components.name, CTModels.Components.initial_time.
initial [Function]
CTModels.Components.initial — Function
initial(
model::CTModels.Components.TimesModel{TI<:CTModels.Components.AbstractTimeModel}
) -> CTModels.Components.AbstractTimeModel
Get the initial time from the times model.
Returns
TI: The initial time model (fixed or free).
See also: CTModels.Components.final, CTModels.Components.initial_time.
initial_time [Function]
CTModels.Components.initial_time — Function
initial_time(
model::CTModels.Components.TimesModel{<:CTModels.Components.FixedTimeModel{T<:Real}}
) -> Real
Get the initial time from the times model, from a fixed initial time model.
Returns
T: The fixed initial time value.
See also: CTModels.Components.final_time, CTModels.Components.has_fixed_initial_time.
initial_time(
model::CTModels.Components.TimesModel{CTModels.Components.FreeTimeModel},
variable::AbstractArray{T<:Real, 1}
) -> Any
Get the initial time from the times model, from a free initial time model.
Arguments
model::TimesModel{FreeTimeModel,<:AbstractTimeModel}: The times model with free initial time.variable::AbstractVector{T}: The optimisation variable vector.
Returns
T: The initial time value from the variable.
See also: CTModels.Components.final_time, CTModels.Components.has_free_initial_time.
initial_time(_::CTModels.Models.AbstractModel) -> Any
Throw an error for unsupported initial time access.
initial_time(
_::CTModels.Models.AbstractModel,
_::AbstractVector
) -> Any
Throw an error for unsupported initial time access with variable.
initial_time(
ocp::CTModels.Models.Model{<:CTModels.Components.TimeDependence, <:CTModels.Components.TimesModel{CTModels.Components.FixedTimeModel{T<:Real}}}
) -> Any
Return the initial time, for a fixed initial time.
Arguments
ocp::Model: The optimal control problem with fixed initial time.
Returns
T: The initial time value.
See also: CTModels.Components.final_time, CTModels.Components.has_fixed_initial_time.
initial_time(
ocp::CTModels.Models.Model{<:CTModels.Components.TimeDependence, <:CTModels.Components.TimesModel{CTModels.Components.FreeTimeModel}},
variable::AbstractArray{T<:Real, 1}
) -> Any
Return the initial time, for a free initial time.
Arguments
ocp::Model: The optimal control problem with free initial time.variable::AbstractVector{T}: The variable vector.
Returns
T: The initial time value.
See also: CTModels.Components.final_time, CTModels.Components.has_free_initial_time.
initial_time(
ocp::CTModels.Models.Model{<:CTModels.Components.TimeDependence, <:CTModels.Components.TimesModel{CTModels.Components.FreeTimeModel}},
variable::Real
) -> Real
Return the initial time, for a free initial time (scalar variable).
Arguments
ocp::Model: The optimal control problem with free initial time.variable::T: The variable scalar.
Returns
T: The initial time value.
See also: CTModels.Components.final_time, CTModels.Components.has_free_initial_time.
initial_time(sol::CTModels.Solutions.Solution) -> Real
Return the initial time of the solution.
Arguments
sol::Solution: The optimal control solution.
Returns
Real: The initial time.
See also: CTModels.Components.final_time, CTModels.Components.initial_time_name.
initial_time_name [Function]
CTModels.Components.initial_time_name — Function
initial_time_name(
model::CTModels.Components.TimesModel
) -> String
Get the name of the initial time from the times model.
Returns
String: The initial time name.
See also: CTModels.Components.time_name, CTModels.Components.final_time_name.
initial_time_name(ocp::CTModels.Models.Model) -> String
Return the name of the initial time.
Arguments
ocp::Model: The optimal control problem.
Returns
String: The initial time name.
See also: CTModels.Models.times, CTModels.Components.initial_time, CTModels.Components.final_time.
initial_time_name(
sol::CTModels.Solutions.Solution
) -> String
Return the name of the initial time.
Arguments
sol::Solution: The optimal control solution.
Returns
String: The initial time name.
See also: CTModels.Components.final_time_name, CTModels.Components.time_name.
interpolation [Function]
CTModels.Components.interpolation — Function
interpolation(
model::CTModels.Components.ControlModelSolution
) -> Symbol
Get the interpolation type for the control.
Returns
Symbol: The interpolation type (:constantor:linear).
See also: CTModels.Components.name, CTModels.Components.value.
is_final_time_fixed [Function]
CTModels.Components.is_final_time_fixed — Function
Alias for has_fixed_final_time.
See also: CTModels.Components.has_fixed_final_time.
is_final_time_free [Function]
CTModels.Components.is_final_time_free — Function
Alias for has_free_final_time.
See also: CTModels.Components.has_free_final_time.
is_initial_time_fixed [Function]
CTModels.Components.is_initial_time_fixed — Function
Alias for has_fixed_initial_time.
See also: CTModels.Components.has_fixed_initial_time.
is_initial_time_free [Function]
CTModels.Components.is_initial_time_free — Function
Alias for has_free_initial_time.
See also: CTModels.Components.has_free_initial_time.
is_lagrange_cost_defined [Function]
CTModels.Components.is_lagrange_cost_defined — Function
Alias for has_lagrange_cost.
See also: CTModels.Components.has_lagrange_cost.
is_mayer_cost_defined [Function]
CTModels.Components.is_mayer_cost_defined — Function
Alias for has_mayer_cost.
See also: CTModels.Components.has_mayer_cost.
lagrange [Function]
CTModels.Components.lagrange — Function
lagrange(
model::CTModels.Components.LagrangeObjectiveModel{L<:Function}
) -> Function
Return the Lagrange function.
Returns
L: The Lagrange integrand(t, x, u, v) -> f⁰(t, x, u, v).
See also: CTModels.Components.criterion, CTModels.Components.has_lagrange_cost.
lagrange(
model::CTModels.Components.BolzaObjectiveModel{<:Function, L<:Function}
) -> Function
Return the Lagrange function.
Returns
L: The Lagrange integrand.
See also: CTModels.Components.criterion, CTModels.Components.mayer, CTModels.Components.has_lagrange_cost.
lagrange(_::CTModels.Models.AbstractModel) -> Function
Throw an error when accessing Lagrange cost on a model without one.
lagrange(
ocp::CTModels.Models.Model{<:CTModels.Components.TimeDependence, <:CTModels.Components.AbstractTimesModel, <:CTModels.Components.AbstractStateModel, <:CTModels.Components.AbstractControlModel, <:CTModels.Components.AbstractVariableModel, <:Function, CTModels.Components.LagrangeObjectiveModel{L<:Function}}
) -> Function
Return the Lagrange cost.
Arguments
ocp::Model: The optimal control problem with Lagrange objective.
Returns
L: The Lagrange cost function.
See also: CTModels.Models.objective, CTModels.Components.mayer, CTModels.Components.has_lagrange_cost.
lagrange(
ocp::CTModels.Models.Model{<:CTModels.Components.TimeDependence, <:CTModels.Components.AbstractTimesModel, <:CTModels.Components.AbstractStateModel, <:CTModels.Components.AbstractControlModel, <:CTModels.Components.AbstractVariableModel, <:Function, <:CTModels.Components.BolzaObjectiveModel{<:Function, L<:Function}}
) -> Any
Return the Lagrange cost.
Arguments
ocp::Model: The optimal control problem with Bolza objective (Mayer + Lagrange).
Returns
L: The Lagrange cost function.
See also: CTModels.Models.objective, CTModels.Components.mayer, CTModels.Components.has_lagrange_cost.
mayer [Function]
CTModels.Components.mayer — Function
mayer(
model::CTModels.Components.MayerObjectiveModel{M<:Function}
) -> Function
Return the Mayer function.
Returns
M: The Mayer cost function(x0, xf, v) -> g(x0, xf, v).
See also: CTModels.Components.criterion, CTModels.Components.has_mayer_cost.
mayer(
model::CTModels.Components.BolzaObjectiveModel{M<:Function}
) -> Function
Return the Mayer function.
Returns
M: The Mayer cost function.
See also: CTModels.Components.criterion, CTModels.Components.lagrange, CTModels.Components.has_mayer_cost.
mayer(_::CTModels.Models.AbstractModel) -> Any
Throw an error when accessing Mayer cost on a model without one.
mayer(
ocp::CTModels.Models.Model{<:CTModels.Components.TimeDependence, <:CTModels.Components.AbstractTimesModel, <:CTModels.Components.AbstractStateModel, <:CTModels.Components.AbstractControlModel, <:CTModels.Components.AbstractVariableModel, <:Function, <:CTModels.Components.MayerObjectiveModel{M<:Function}}
) -> Any
Return the Mayer cost.
Arguments
ocp::Model: The optimal control problem with Mayer objective.
Returns
M: The Mayer cost function.
See also: CTModels.Models.objective, CTModels.Components.lagrange, CTModels.Components.has_mayer_cost.
mayer(
ocp::CTModels.Models.Model{<:CTModels.Components.TimeDependence, <:CTModels.Components.AbstractTimesModel, <:CTModels.Components.AbstractStateModel, <:CTModels.Components.AbstractControlModel, <:CTModels.Components.AbstractVariableModel, <:Function, <:CTModels.Components.BolzaObjectiveModel{M<:Function}}
) -> Any
Return the Mayer cost.
Arguments
ocp::Model: The optimal control problem with Bolza objective (Mayer + Lagrange).
Returns
M: The Mayer cost function.
See also: CTModels.Models.objective, CTModels.Components.lagrange, CTModels.Components.has_mayer_cost.
name [Function]
CTModels.Components.name — Function
name(model::CTModels.Components.StateModel) -> String
Get the name of the state from the state model.
Returns
String: The state name.
See also: CTModels.Components.components, CTModels.Components.dimension.
name(
model::CTModels.Components.StateModelSolution
) -> String
Get the name of the state from the state model solution.
Returns
String: The state name.
See also: CTModels.Components.components, CTModels.Components.dimension, CTModels.Components.value.
name(model::CTModels.Components.ControlModel) -> String
Get the name of the control variable.
Returns
String: The control name.
See also: CTModels.Components.components, CTModels.Components.dimension.
name(
model::CTModels.Components.ControlModelSolution
) -> String
Get the name of the control variable from the solution.
Returns
String: The control name.
See also: CTModels.Components.components, CTModels.Components.dimension, CTModels.Components.value, CTModels.Components.interpolation.
name(_::CTModels.Components.EmptyControlModel) -> String
Return an empty string, since no control is defined.
Returns
String: An empty string.
name(model::CTModels.Components.VariableModel) -> String
Return the name of the variable stored in the model.
Returns
String: The variable name.
See also: CTModels.Components.components, CTModels.Components.dimension.
name(
model::CTModels.Components.VariableModelSolution
) -> String
Return the name of the variable stored in the model solution.
Returns
String: The variable name.
See also: CTModels.Components.components, CTModels.Components.dimension, CTModels.Components.value.
name(_::CTModels.Components.EmptyVariableModel) -> String
Return an empty string, since no variable is defined.
Returns
String: An empty string.
name(model::CTModels.Components.FixedTimeModel) -> String
Get the name of the time from the fixed time model.
Returns
String: The time name.
See also: CTModels.Components.initial_time.
name(model::CTModels.Components.FreeTimeModel) -> String
Get the name of the time from the free time model.
Returns
String: The time name.
See also: CTModels.Components.index, CTModels.Components.initial_time.
path_constraints_nl [Function]
CTModels.Components.path_constraints_nl — Function
path_constraints_nl(
model::CTModels.Components.ConstraintsModel{TP}
) -> Any
Get the nonlinear path constraints from the model.
Returns
TP: Tuple of nonlinear path constraints(lb, f!, ub, labels).
See also: CTModels.Components.boundary_constraints_nl, CTModels.Components.dim_path_constraints_nl.
path_constraints_nl(ocp::CTModels.Models.Model) -> Any
Return the nonlinear path constraints.
Arguments
ocp::Model: The optimal control problem.
Returns
Function: The nonlinear path constraints function.
See also: CTModels.Models.constraints, CTModels.Components.boundary_constraints_nl.
state_constraints_box [Function]
CTModels.Components.state_constraints_box — Function
state_constraints_box(
model::CTModels.Components.ConstraintsModel{<:Tuple, <:Tuple, TS}
) -> Any
Get the state box constraints from the model.
Returns
TS: Tuple of state box constraints(lb, ind, ub, labels, aliases).
See also: CTModels.Components.control_constraints_box, CTModels.Components.dim_state_constraints_box.
state_constraints_box(ocp::CTModels.Models.Model) -> Any
Return the box constraints on state.
Arguments
ocp::Model: The optimal control problem.
Returns
BoxConstraints: The box constraints on state.
See also: CTModels.Models.constraints, CTModels.Components.control_constraints_box.
time_name [Function]
CTModels.Components.time_name — Function
time_name(model::CTModels.Components.TimesModel) -> String
Get the name of the time variable from the times model.
Returns
String: The time variable name.
See also: CTModels.Components.initial_time_name, CTModels.Components.final_time_name.
time_name(ocp::CTModels.Models.Model) -> String
Return the name of the time.
Arguments
ocp::Model: The optimal control problem.
Returns
String: The time name.
See also: CTModels.Models.times, CTModels.Components.initial_time, CTModels.Components.final_time.
time_name(sol::CTModels.Solutions.Solution) -> String
Return the name of the time component.
Arguments
sol::Solution: The optimal control solution.
Returns
String: The time component name.
See also: CTModels.Components.initial_time_name, CTModels.Components.final_time_name.
value [Function]
CTModels.Components.value — Function
value(
model::CTModels.Components.StateModelSolution{TS<:Function}
) -> Function
Get the state function from the state model solution.
Returns
TS: A functiont -> x(t)returning the state vector at timet.
See also: CTModels.Components.name, CTModels.Components.components.
value(
model::CTModels.Components.ControlModelSolution{TS<:Function}
) -> Function
Get the control function associated with the solution.
Returns
TS: A functiont -> u(t)returning the control vector at timet.
See also: CTModels.Components.name, CTModels.Components.components, CTModels.Components.interpolation.
value(
model::CTModels.Components.VariableModelSolution{TS<:Union{Real, AbstractVector{<:Real}}}
) -> Union{Real, AbstractVector{<:Real}}
Return the value stored in the variable solution model.
Returns
TS: The optimisation variable value (scalar or vector).
See also: CTModels.Components.name, CTModels.Components.components.
variable_constraints_box [Function]
CTModels.Components.variable_constraints_box — Function
variable_constraints_box(
model::CTModels.Components.ConstraintsModel{<:Tuple, <:Tuple, <:Tuple, <:Tuple, TV}
) -> Any
Get the variable box constraints from the model.
Returns
TV: Tuple of variable box constraints(lb, ind, ub, labels, aliases).
See also: CTModels.Components.state_constraints_box, CTModels.Components.dim_variable_constraints_box.
variable_constraints_box(ocp::CTModels.Models.Model) -> Any
Return the box constraints on variable.
Arguments
ocp::Model: The optimal control problem.
Returns
BoxConstraints: The box constraints on variable.
See also: CTModels.Models.constraints, CTModels.Components.state_constraints_box.