Private API
This page lists non-exported (internal) symbols of CTModels.
From CTModels
boundary_constraints_dual
CTModels.boundary_constraints_dual — Function
boundary_constraints_dual(
model::CTModels.DualModel{<:Union{Nothing, Function}, BC_Dual<:Union{Nothing, AbstractVector{<:Real}}}
) -> Union{Nothing, AbstractVector{<:Real}}
Return the dual vector associated with the boundary constraints.
Arguments
model::DualModel: A model including dual variables for boundary constraints.
Returns
A vector of dual values, or nothing if not set.
boundary_constraints_dual(
sol::CTModels.Solution
) -> Union{Nothing, AbstractVector{<:Real}}
Return the dual of the boundary constraints.
constraints_violation
CTModels.constraints_violation — Function
constraints_violation(sol::CTModels.Solution) -> Float64
Return the constraints violation.
control_components
CTModels.control_components — Function
control_components(ocp::CTModels.Model) -> Vector{String}
Return the names of the components of the control.
control_components(sol::CTModels.Solution) -> Vector{String}
Return the names of the components of the control.
control_constraints_lb_dual
CTModels.control_constraints_lb_dual — Function
control_constraints_lb_dual(
model::CTModels.DualModel{<:Union{Nothing, Function}, <:Union{Nothing, AbstractVector{<:Real}}, <:Union{Nothing, Function}, <:Union{Nothing, Function}, CC_LB_Dual<:Union{Nothing, Function}}
) -> Union{Nothing, Function}
Return the dual function associated with the lower bounds of control constraints.
Arguments
model::DualModel: A model including dual variables for control lower bounds.
Returns
A function mapping time t to a vector of dual values, or nothing if not set.
control_constraints_lb_dual(
sol::CTModels.Solution
) -> Union{Nothing, Function}
Return the lower bound dual of the control constraints.
control_constraints_ub_dual
CTModels.control_constraints_ub_dual — Function
control_constraints_ub_dual(
model::CTModels.DualModel{<:Union{Nothing, Function}, <:Union{Nothing, AbstractVector{<:Real}}, <:Union{Nothing, Function}, <:Union{Nothing, Function}, <:Union{Nothing, Function}, CC_UB_Dual<:Union{Nothing, Function}}
) -> Union{Nothing, Function}
Return the dual function associated with the upper bounds of control constraints.
Arguments
model::DualModel: A model including dual variables for control upper bounds.
Returns
A function mapping time t to a vector of dual values, or nothing if not set.
control_constraints_ub_dual(
sol::CTModels.Solution
) -> Union{Nothing, Function}
Return the upper bound dual of the control constraints.
control_dimension
CTModels.control_dimension — Function
control_dimension(ocp::CTModels.Model) -> Int64
Return the control dimension.
control_dimension(sol::CTModels.Solution) -> Int64
Return the dimension of the control.
control_name
CTModels.control_name — Function
control_name(ocp::CTModels.Model) -> String
Return the name of the control.
control_name(sol::CTModels.Solution) -> String
Return the name of the control.
costate
CTModels.costate — Function
costate(
sol::CTModels.Solution{<:CTModels.AbstractTimeGridModel, <:CTModels.AbstractTimesModel, <:CTModels.AbstractStateModel, <:CTModels.AbstractControlModel, <:CTModels.AbstractVariableModel, Co<:Function}
) -> Function
Return the costate as a function of time.
julia> p = costate(sol)
julia> t0 = time_grid(sol)[1]
julia> p0 = p(t0) # costate at the initial timedual
CTModels.dual — Function
dual(
sol::CTModels.Solution,
model::CTModels.Model,
label::Symbol
) -> Any
Return the dual variable associated with a constraint identified by its label.
Searches through all constraint types (path, boundary, state, control, and variable constraints) defined in the model and returns the corresponding dual value from the solution.
Arguments
sol::Solution: Solution object containing dual variables.model::Model: Model containing constraint definitions.label::Symbol: Symbol corresponding to a constraint label.
Returns
A function of time t for time-dependent constraints, or a scalar/vector for time-invariant duals. If the label is not found, throws an IncorrectArgument exception.
dual_model
CTModels.dual_model — Function
dual_model(
sol::CTModels.Solution{<:CTModels.AbstractTimeGridModel, <:CTModels.AbstractTimesModel, <:CTModels.AbstractStateModel, <:CTModels.AbstractControlModel, <:CTModels.AbstractVariableModel, <:Function, <:Real, DM<:CTModels.AbstractDualModel}
) -> CTModels.AbstractDualModel
Return the dual model containing all constraint multipliers.
infos
CTModels.infos — Function
infos(sol::CTModels.Solution) -> Dict{Symbol, Any}
Return a dictionary of additional infos depending on the solver or nothing.
iterations
CTModels.iterations — Function
iterations(sol::CTModels.Solution) -> Int64
Return the number of iterations (if solved by an iterative method).
message
CTModels.message — Function
message(sol::CTModels.Solution) -> String
Return the message associated to the status criterion.
model
CTModels.model — Function
model(
sol::CTModels.Solution{<:CTModels.AbstractTimeGridModel, <:CTModels.AbstractTimesModel, <:CTModels.AbstractStateModel, <:CTModels.AbstractControlModel, <:CTModels.AbstractVariableModel, <:Function, <:Real, <:CTModels.AbstractDualModel, <:CTModels.AbstractSolverInfos, TM<:CTModels.AbstractModel}
) -> CTModels.AbstractModel
Return the optimal control problem model associated with the solution.
objective
CTModels.objective — Function
objective(
ocp::CTModels.Model{<:CTModels.TimeDependence, <:CTModels.AbstractTimesModel, <:CTModels.AbstractStateModel, <:CTModels.AbstractControlModel, <:CTModels.AbstractVariableModel, <:Function, O<:CTModels.AbstractObjectiveModel}
) -> CTModels.AbstractObjectiveModel
Return the objective struct.
objective(
sol::CTModels.Solution{<:CTModels.AbstractTimeGridModel, <:CTModels.AbstractTimesModel, <:CTModels.AbstractStateModel, <:CTModels.AbstractControlModel, <:CTModels.AbstractVariableModel, <:Function, O<:Real}
) -> Real
Return the objective value.
path_constraints_dual
CTModels.path_constraints_dual — Function
path_constraints_dual(
model::CTModels.DualModel{PC_Dual<:Union{Nothing, Function}}
) -> Union{Nothing, Function}
Return the dual function associated with the nonlinear path constraints.
Arguments
model::DualModel: A model including dual variables for path constraints.
Returns
A function mapping time t to the vector of dual values, or nothing if not set.
path_constraints_dual(
sol::CTModels.Solution
) -> Union{Nothing, Function}
Return the dual of the path constraints.
state_components
CTModels.state_components — Function
state_components(ocp::CTModels.Model) -> Vector{String}
Return the names of the components of the state.
state_components(sol::CTModels.Solution) -> Vector{String}
Return the names of the components of the state.
state_constraints_lb_dual
CTModels.state_constraints_lb_dual — Function
state_constraints_lb_dual(
model::CTModels.DualModel{<:Union{Nothing, Function}, <:Union{Nothing, AbstractVector{<:Real}}, SC_LB_Dual<:Union{Nothing, Function}}
) -> Union{Nothing, Function}
Return the dual function associated with the lower bounds of state constraints.
Arguments
model::DualModel: A model including dual variables for state lower bounds.
Returns
A function mapping time t to a vector of dual values, or nothing if not set.
state_constraints_lb_dual(
sol::CTModels.Solution
) -> Union{Nothing, Function}
Return the lower bound dual of the state constraints.
state_constraints_ub_dual
CTModels.state_constraints_ub_dual — Function
state_constraints_ub_dual(
model::CTModels.DualModel{<:Union{Nothing, Function}, <:Union{Nothing, AbstractVector{<:Real}}, <:Union{Nothing, Function}, SC_UB_Dual<:Union{Nothing, Function}}
) -> Union{Nothing, Function}
Return the dual function associated with the upper bounds of state constraints.
Arguments
model::DualModel: A model including dual variables for state upper bounds.
Returns
A function mapping time t to a vector of dual values, or nothing if not set.
state_constraints_ub_dual(
sol::CTModels.Solution
) -> Union{Nothing, Function}
Return the upper bound dual of the state constraints.
state_name
CTModels.state_name — Function
state_name(ocp::CTModels.Model) -> String
Return the name of the state.
state_name(sol::CTModels.Solution) -> String
Return the name of the state.
status
CTModels.status — Function
status(sol::CTModels.Solution) -> Symbol
Return the status criterion (a Symbol).
successful
CTModels.successful — Function
successful(sol::CTModels.Solution) -> Bool
Return the successful status.
time_grid
CTModels.time_grid — Function
time_grid(
sol::CTModels.Solution{<:CTModels.TimeGridModel{T<:Union{StepRangeLen, AbstractVector{<:Real}}}}
) -> Union{StepRangeLen, AbstractVector{<:Real}}
Return the time grid.
variable_components
CTModels.variable_components — Function
variable_components(ocp::CTModels.Model) -> Vector{String}
Return the names of the components of the variable.
variable_components(
sol::CTModels.Solution
) -> Vector{String}
Return the names of the components of the variable.
variable_constraints_lb_dual
CTModels.variable_constraints_lb_dual — Function
variable_constraints_lb_dual(
model::CTModels.DualModel{<:Union{Nothing, Function}, <:Union{Nothing, AbstractVector{<:Real}}, <:Union{Nothing, Function}, <:Union{Nothing, Function}, <:Union{Nothing, Function}, <:Union{Nothing, Function}, VC_LB_Dual<:Union{Nothing, AbstractVector{<:Real}}}
) -> Union{Nothing, AbstractVector{<:Real}}
Return the dual vector associated with the lower bounds of variable constraints.
Arguments
model::DualModel: A model including dual variables for variable lower bounds.
Returns
A vector of dual values, or nothing if not set.
variable_constraints_lb_dual(
sol::CTModels.Solution
) -> Union{Nothing, AbstractVector{<:Real}}
Return the lower bound dual of the variable constraints.
variable_constraints_ub_dual
CTModels.variable_constraints_ub_dual — Function
variable_constraints_ub_dual(
model::CTModels.DualModel{<:Union{Nothing, Function}, <:Union{Nothing, AbstractVector{<:Real}}, <:Union{Nothing, Function}, <:Union{Nothing, Function}, <:Union{Nothing, Function}, <:Union{Nothing, Function}, <:Union{Nothing, AbstractVector{<:Real}}, VC_UB_Dual<:Union{Nothing, AbstractVector{<:Real}}}
) -> Union{Nothing, AbstractVector{<:Real}}
Return the dual vector associated with the upper bounds of variable constraints.
Arguments
model::DualModel: A model including dual variables for variable upper bounds.
Returns
A vector of dual values, or nothing if not set.
variable_constraints_ub_dual(
sol::CTModels.Solution
) -> Union{Nothing, AbstractVector{<:Real}}
Return the upper bound dual of the variable constraints.
variable_dimension
CTModels.variable_dimension — Function
variable_dimension(ocp::CTModels.Model) -> Int64
Return the variable dimension.
variable_dimension(sol::CTModels.Solution) -> Int64
Return the dimension of the variable.
variable_name
CTModels.variable_name — Function
variable_name(ocp::CTModels.Model) -> String
Return the name of the variable.
variable_name(sol::CTModels.Solution) -> String
Return the name of the variable.