From b8c0972134c9e85d341433d43844678a90259d54 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Wed, 11 Dec 2024 14:10:29 +0000 Subject: [PATCH] build based on 78cf9b9 --- dev/.documenter-siteinfo.json | 2 +- dev/api-ctbase.html | 4 +-- dev/api.html | 12 ++++---- dev/dev-api.html | 58 +++++++++++++++++------------------ dev/index.html | 2 +- 5 files changed, 39 insertions(+), 39 deletions(-) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index e72edc6..05c96bb 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-12-02T12:38:55","documenter_version":"1.8.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.11.2","generation_timestamp":"2024-12-11T14:10:22","documenter_version":"1.8.0"}} \ No newline at end of file diff --git a/dev/api-ctbase.html b/dev/api-ctbase.html index a08cbb2..8f7f00e 100644 --- a/dev/api-ctbase.html +++ b/dev/api-ctbase.html @@ -1,5 +1,5 @@ -CTBase API · CTDirect.jl

CTBase API

This is just a dump of CTBase API documentation. For more details about CTBase.jl package, see the documentation.

Index

Documentation

CTBase.CTBaseModule

CTBase module.

Lists all the imported modules and packages:

  • Base
  • Core
  • DataStructures
  • DocStringExtensions
  • LinearAlgebra
  • MLStyle
  • Parameters
  • PrettyTables
  • Printf
  • ReplMaker
  • SparseArrays
  • StaticArrays
  • Unicode

List of all the exported names:

source
CTBase.TimesDiscType

Type 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}

See also: Time, Times.

source
CTBase.AmbiguousDescriptionType
struct AmbiguousDescription <: CTException

Exception thrown when the description is ambiguous / incorrect.

Fields

  • var::Tuple{Vararg{Symbol}}
source
CTBase.BoundaryConstraintType
struct 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 · CTDirect.jl

CTBase API

This is just a dump of CTBase API documentation. For more details about CTBase.jl package, see the documentation.

Index

Documentation

CTBase.CTBaseModule

CTBase module.

Lists all the imported modules and packages:

  • Base
  • Core
  • DataStructures
  • DocStringExtensions
  • LinearAlgebra
  • MLStyle
  • Parameters
  • PrettyTables
  • Printf
  • ReplMaker
  • SparseArrays
  • StaticArrays
  • Unicode

List of all the exported names:

source
CTBase.TimesDiscType

Type 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}

See also: Time, Times.

source
CTBase.AmbiguousDescriptionType
struct AmbiguousDescription <: CTException

Exception thrown when the description is ambiguous / incorrect.

Fields

  • var::Tuple{Vararg{Symbol}}
source
CTBase.BoundaryConstraintType
struct 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])
@@ -2053,4 +2053,4 @@
     startOnLoad: true,
     theme: "neutral"
 });
-
+
diff --git a/dev/api.html b/dev/api.html index 0dbfea1..5d8e08b 100644 --- a/dev/api.html +++ b/dev/api.html @@ -2,7 +2,7 @@ API · CTDirect.jl

CTDirect API

Index

Documentation

CTDirect.available_methodsMethod
available_methods(
 
 ) -> Tuple{Tuple{Symbol, Symbol}, Tuple{Symbol, Symbol}}
-

Return the list of available methods to solve the optimal control problem.

source
CTDirect.direct_solveMethod
direct_solve(
     ocp::OptimalControlModel,
     description::Symbol...;
     init,
@@ -11,7 +11,7 @@
     disc_method,
     kwargs...
 ) -> OptimalControlSolution
-

Solve an OCP with a direct method

source
CTDirect.direct_transcriptionMethod
direct_transcription(
     ocp::OptimalControlModel,
     description...;
     init,
@@ -19,11 +19,11 @@
     time_grid,
     disc_method
 ) -> Tuple{CTDirect.DOCP, ADNLPModels.ADNLPModel{Float64, Vector{Float64}, Vector{Int64}}}
-

Discretize an optimal control problem into a nonlinear optimization problem (ie direct transcription)

source
+ diff --git a/dev/dev-api.html b/dev/dev-api.html index ee2e858..d31da8b 100644 --- a/dev/dev-api.html +++ b/dev/dev-api.html @@ -3,7 +3,7 @@ docp::CTDirect.DOCP, docp_solution ) -> OptimalControlSolution -

Build OCP functional solution from DOCP discrete solution (given as a SolverCore.GenericExecutionStats)

source
CTBase.OptimalControlSolutionMethod
OptimalControlSolution(
     docp::CTDirect.DOCP;
     primal,
     dual,
@@ -14,7 +14,7 @@
     mult_LB,
     mult_UB
 ) -> OptimalControlSolution
-

Build OCP functional solution from the DOCP discrete solution, given as a vector. Costate will be retrieved from dual variables (multipliers) if available.

source
CTBase.OptimalControlSolutionMethod
OptimalControlSolution(
+

Build OCP functional solution from the DOCP discrete solution, given as a vector. Costate will be retrieved from dual variables (multipliers) if available.

source
CTBase.OptimalControlSolutionMethod
OptimalControlSolution(
     ocp::OptimalControlModel,
     T,
     X,
@@ -31,52 +31,52 @@
     constraints_mult,
     box_multipliers
 ) -> OptimalControlSolution
-

Build OCP functional solution from DOCP vector solution (given as raw variables and multipliers plus some optional infos)

source
CTDirect.DOCPType

Struct for discretized optimal control problem DOCP

Contains:

  • a copy of the original OCP
  • data required to link the OCP with the discretized DOCP
source
CTDirect.DOCP_constraints!Method
DOCP_constraints!(c, xu, docp::CTDirect.DOCP) -> Any
-

Compute the constraints C for the DOCP problem (modeled as LB <= C(X) <= UB).

source
CTDirect.DOCP_initial_guessFunction
DOCP_initial_guess(docp::CTDirect.DOCP) -> Vector{Float64}
+

Build OCP functional solution from DOCP vector solution (given as raw variables and multipliers plus some optional infos)

source
CTDirect.DOCPType

Struct for discretized optimal control problem DOCP

Contains:

  • a copy of the original OCP
  • data required to link the OCP with the discretized DOCP
source
CTDirect.DOCP_constraints!Method
DOCP_constraints!(c, xu, docp::CTDirect.DOCP) -> Any
+

Compute the constraints C for the DOCP problem (modeled as LB <= C(X) <= UB).

source
CTDirect.DOCP_initial_guessFunction
DOCP_initial_guess(docp::CTDirect.DOCP) -> Vector{Float64}
 DOCP_initial_guess(
     docp::CTDirect.DOCP,
     init::OptimalControlInit
 ) -> Vector{Float64}
-

Build initial guess for discretized problem

source
CTDirect.__disc_methodMethod
__disc_method() -> String
-

Used to set the default discretization method. The default value is trapeze.

source
CTDirect.__ipopt_linear_solverMethod
__ipopt_linear_solver() -> String
-

Used to set the default value of the linear solver of Ipopt for the direct method. The default value is mumps.

source
CTDirect.__ipopt_mu_strategyMethod
__ipopt_mu_strategy() -> String
-

Used to set the default value of the μ strategy of Ipopt for the direct method. The default value is adaptive.

source
CTDirect.__ipopt_print_levelMethod
__ipopt_print_level() -> Int64
-

Used to set the default value of the print level of Ipopt for the direct method. The default value is 5.

source
CTDirect.__madnlp_linear_solverMethod
__madnlp_linear_solver() -> String
-

Used to set the default value of the linear solver of MadNLP for the direct method. The default value is umfpack.

source
CTDirect.__disc_methodMethod
__disc_method() -> String
+

Used to set the default discretization method. The default value is trapeze.

source
CTDirect.__ipopt_linear_solverMethod
__ipopt_linear_solver() -> String
+

Used to set the default value of the linear solver of Ipopt for the direct method. The default value is mumps.

source
CTDirect.__ipopt_mu_strategyMethod
__ipopt_mu_strategy() -> String
+

Used to set the default value of the μ strategy of Ipopt for the direct method. The default value is adaptive.

source
CTDirect.__ipopt_print_levelMethod
__ipopt_print_level() -> Int64
+

Used to set the default value of the print level of Ipopt for the direct method. The default value is 5.

source
CTDirect.__madnlp_linear_solverMethod
__madnlp_linear_solver() -> String
+

Used to set the default value of the linear solver of MadNLP for the direct method. The default value is umfpack.

source
CTDirect.build_boundsMethod
build_bounds(
     dim_var,
     dim_box,
     box_triplet
 ) -> Tuple{Any, Any}
-

Build full, ordered sets of bounds for state, control or optimization variables

source
CTDirect.constraints_bounds!Method
constraints_bounds!(
     docp::CTDirect.DOCP
 ) -> Tuple{Vector{Float64}, Vector{Float64}}
-

Build upper and lower bounds vectors for the DOCP nonlinear constraints.

source
CTDirect.get_OCP_state_at_time_stepMethod
get_OCP_state_at_time_step(
     xu,
     docp::CTDirect.DOCP{CTDirect.Midpoint, CTDirect.ScalVariable},
     i
 ) -> Any
-

Retrieve state and control variables at given time step from the NLP variables. Convention: 1 <= i <= dimNLPsteps+1

source
CTDirect.get_OCP_state_at_time_stepMethod
get_OCP_state_at_time_step(
     xu,
     docp::CTDirect.DOCP{CTDirect.Trapeze, CTDirect.ScalVariable},
     i
 ) -> Any
-

Retrieve state and control variables at given time step from the NLP variables. Convention: 1 <= i <= dimNLPsteps+1

source
CTDirect.parse_DOCP_solution_dualMethod
parse_DOCP_solution_dual(
     docp,
     multipliers,
     constraints
 ) -> Tuple{Any, Tuple{Any, Any, Any, Vector{Float64}, Vector{Float64}}, Tuple{Any, Any, Any, Vector{Float64}, Vector{Float64}}}
-

Recover OCP costate and constraints multipliers from DOCP multipliers

source
CTDirect.setConstraintBlock!Method
setConstraintBlock!(
     docp::CTDirect.DOCP{CTDirect.Midpoint},
     c,
     xu,
@@ -85,7 +85,7 @@
     i,
     work
 ) -> Any
-

Set the constraints corresponding to the state equation Convention: 1 <= i <= dimNLPsteps (+1)

source
CTDirect.setConstraintBlock!Method
setConstraintBlock!(
     docp::CTDirect.DOCP{CTDirect.Trapeze},
     c,
     xu,
@@ -94,26 +94,26 @@
     i,
     work
 ) -> Any
-

Set the constraints corresponding to the state equation Convention: 1 <= i <= dimNLPsteps (+1)

source
CTDirect.setPathBounds!Method
setPathBounds!(
+

Set the constraints corresponding to the state equation Convention: 1 <= i <= dimNLPsteps (+1)

source
CTDirect.setPathBounds!Method
setPathBounds!(
     docp::CTDirect.DOCP,
     index::Int64,
     lb,
     ub
 ) -> Int64
-

Set bounds for the path constraints at given time step

source
CTDirect.setPointBounds!Method
setPointBounds!(
     docp::CTDirect.DOCP,
     index::Int64,
     lb,
     ub
 ) -> Int64
-

Set bounds for the boundary and variable constraints

source
CTDirect.variables_bounds!Method
variables_bounds!(
     docp::CTDirect.DOCP
 ) -> Tuple{Vector{Float64}, Vector{Float64}}
-

Build upper and lower bounds vectors for the DOCP variable box constraints.

source
+ diff --git a/dev/index.html b/dev/index.html index 6a8e915..0b7687d 100644 --- a/dev/index.html +++ b/dev/index.html @@ -34,4 +34,4 @@ startOnLoad: true, theme: "neutral" }); -
  • 1J. T. Betts. Practical methods for optimal control using nonlinear programming. Society for Industrial and Applied Mathematics (SIAM), Philadelphia, PA, 2001.
  • 2J. Nocedal and S.J. Wright. Numerical optimization. Springer-Verlag, New York, 1999.****
+
  • 1J. T. Betts. Practical methods for optimal control using nonlinear programming. Society for Industrial and Applied Mathematics (SIAM), Philadelphia, PA, 2001.
  • 2J. Nocedal and S.J. Wright. Numerical optimization. Springer-Verlag, New York, 1999.****