Skip to content

Commit 2e73a80

Browse files
authored
Merge pull request #559 from control-toolbox/536-doc-interaction-with-a-model-and-a-solution
Documentation: OCP and SOL
2 parents a691cda + 5d60c00 commit 2e73a80

15 files changed

Lines changed: 694 additions & 77 deletions

docs/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ CTFlows = "1c39547c-7794-42f7-af83-d98194f657c2"
66
CTModels = "34c4fa32-2049-4079-8329-de33c2a22e2d"
77
CTParser = "32681960-a1b1-40db-9bff-a1ca817385d1"
88
CommonSolve = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2"
9+
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
910
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
1011
DocumenterInterLinks = "d12716ef-a0f6-4df4-a9f1-a5a34e75c656"
1112
DocumenterMermaid = "a078cd44-4d9c-4618-b545-3ab9d77f9177"

docs/make.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ cp("./docs/Project.toml", "./docs/src/assets/Project.toml"; force=true)
101101
repo_url = "github.com/control-toolbox/OptimalControl.jl"
102102

103103
makedocs(;
104-
draft=false, # if draft is true, then the julia code from .md is not executed
104+
draft=true, # if draft is true, then the julia code from .md is not executed
105105
# to disable the draft mode in a specific markdown file, use the following:
106106
# ```@meta
107107
# Draft = false
@@ -125,11 +125,13 @@ makedocs(;
125125
],
126126
"Manual" => [
127127
"Define a problem" => "manual-abstract.md",
128+
"Problem characteristics" => "manual-model.md",
128129
"Set an initial guess" => "manual-initial-guess.md",
129130
"Solve a problem" => "manual-solve.md",
131+
"Solution characteristics" => "manual-solution.md",
130132
"Plot a solution" => "manual-plot.md",
131133
"Compute flows" => [
132-
"Getting started" => "manual-flow-api.md",
134+
"Flow API" => "manual-flow-api.md",
133135
"From optimal control problems" => "manual-flow-ocp.md",
134136
"From Hamiltonian and others" => "manual-flow-others.md",
135137
],

docs/src/api-ctbase.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ M --> B
2929
style B fill:#FBF275
3030
```
3131

32-
OptimalControl heavily relies on CTBase. Refer to the [CTBase API documentation](@extref CTBase index) for more details.
32+
OptimalControl heavily relies on CTBase. We refer to [CTBase API](@extref CTBase index) for more details.

docs/src/api-ctdirect.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ M --> B
2929
style D fill:#FBF275
3030
```
3131

32-
OptimalControl heavily relies on CTDirect. Refer to the [CTDirect API documentation](@extref CTDirect index) for more details.
32+
OptimalControl heavily relies on CTDirect. We refer to [CTDirect API](@extref CTDirect index) for more details.

docs/src/api-ctflows.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ M --> B
2929
style F fill:#FBF275
3030
```
3131

32-
OptimalControl heavily relies on CTFlows. Refer to the [CTFlows API documentation](@extref CTFlows index) for more details.
32+
OptimalControl heavily relies on CTFlows. We refer to [CTFlows API](@extref CTFlows index) for more details.

docs/src/api-ctmodels.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ M --> B
2929
style M fill:#FBF275
3030
```
3131

32-
OptimalControl heavily relies on CTModels. Refer to the [CTModels API documentation](@extref CTModels index) for more details.
32+
OptimalControl heavily relies on CTModels. We refer to [CTModels API](@extref CTModels index) for more details.

docs/src/api-ctparser.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ M --> B
2929
style P fill:#FBF275
3030
```
3131

32-
OptimalControl heavily relies on CTParser. Refer to the [CTParser API documentation](@extref CTParser index) for more details.
32+
OptimalControl heavily relies on CTParser. We refer to [CTParser API](@extref CTParser index) for more details.

docs/src/api-optimalcontrol-user.md

Lines changed: 3 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,6 @@ Order = [:module]
2828
Private = false
2929
```
3030

31-
## Index
32-
33-
```@index
34-
Pages = ["api-optimalcontrol-user.md"]
35-
Modules = [
36-
OptimalControl,
37-
CommonSolve,
38-
RecipesBase,
39-
CTBase,
40-
CTDirect,
41-
CTFlows,
42-
CTModels,
43-
CTParser,
44-
CTFlowsODE,
45-
CTModelsPlots,
46-
CTModelsJSON,
47-
CTModelsJLD,
48-
CTSolveExtIpopt,
49-
CTSolveExtKnitro,
50-
CTSolveExtMadNLP,
51-
]
52-
53-
Order = [:module, :constant, :type, :function, :macro]
54-
```
55-
5631
## Documentation
5732

5833
```@docs; canonical=true
@@ -70,15 +45,12 @@ Poisson
7045
Solution
7146
VectorField
7247
available_methods
73-
boundary_constraints_dual
7448
build_OCP_solution
7549
constraint
50+
constraints
7651
constraints_violation
7752
control
7853
control_components
79-
control_constraints_box
80-
control_constraints_lb_dual
81-
control_constraints_ub_dual
8254
control_dimension
8355
control_name
8456
costate
@@ -91,6 +63,7 @@ dynamics
9163
export_ocp_solution
9264
final_time
9365
final_time_name
66+
get_build_examodel
9467
has_fixed_final_time
9568
has_fixed_initial_time
9669
has_free_final_time
@@ -107,26 +80,20 @@ lagrange
10780
mayer
10881
message
10982
objective
110-
path_constraints_dual
11183
plot(::Solution, ::Symbol...)
11284
plot!(::Plots.Plot, ::Solution, ::Symbol...)
11385
set_initial_guess
11486
solve(::Model, ::Symbol...)
11587
state
11688
state_components
117-
state_constraints_box
118-
state_constraints_lb_dual
119-
state_constraints_ub_dual
12089
state_dimension
12190
state_name
12291
stopping
12392
time_grid
12493
time_name
94+
times
12595
variable
12696
variable_components
127-
variable_constraints_box
128-
variable_constraints_lb_dual
129-
variable_constraints_ub_dual
13097
variable_dimension
13198
variable_name
13299

docs/src/assets/Manifest.toml

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
julia_version = "1.11.5"
44
manifest_format = "2.0"
5-
project_hash = "619f0fb19f859094e1399a5b2427138fe211e67a"
5+
project_hash = "aedb19159ec43d1fc78401e06abaeeb58fd73c61"
66

77
[[deps.ADNLPModels]]
88
deps = ["ADTypes", "ForwardDiff", "LinearAlgebra", "NLPModels", "Requires", "ReverseDiff", "SparseArrays", "SparseConnectivityTracer", "SparseMatrixColorings"]
@@ -180,9 +180,9 @@ version = "0.2.6"
180180

181181
[[deps.CTBase]]
182182
deps = ["DocStringExtensions"]
183-
git-tree-sha1 = "1e0fb19f883cda373412fd40f2ccad71758cb876"
183+
git-tree-sha1 = "ebc7d07d0bf4db7a841c5e7d51b4271bcf1e921c"
184184
uuid = "54762871-cc72-4466-b8e8-f6c8b58076cd"
185-
version = "0.16.1"
185+
version = "0.16.2"
186186

187187
[[deps.CTDirect]]
188188
deps = ["ADNLPModels", "CTBase", "CTModels", "CTParser", "DocStringExtensions", "HSL", "MKL", "NLPModelsIpopt", "SparseArrays"]
@@ -208,9 +208,9 @@ weakdeps = ["OrdinaryDiffEq"]
208208

209209
[[deps.CTModels]]
210210
deps = ["CTBase", "DocStringExtensions", "Interpolations", "LinearAlgebra", "MLStyle", "MacroTools", "OrderedCollections", "Parameters", "PrettyTables", "RecipesBase"]
211-
git-tree-sha1 = "dec8ae920442bbb4deedb9ca40619c58702b94a5"
211+
git-tree-sha1 = "73b95a01af8369b5b08d1ecf3edf6b0bb79ce2c3"
212212
uuid = "34c4fa32-2049-4079-8329-de33c2a22e2d"
213-
version = "0.5.3"
213+
version = "0.5.4"
214214
weakdeps = ["JLD2", "JSON3", "Plots"]
215215

216216
[deps.CTModels.extensions]
@@ -371,6 +371,12 @@ git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe"
371371
uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
372372
version = "1.16.0"
373373

374+
[[deps.DataFrames]]
375+
deps = ["Compat", "DataAPI", "DataStructures", "Future", "InlineStrings", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrecompileTools", "PrettyTables", "Printf", "Random", "Reexport", "SentinelArrays", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"]
376+
git-tree-sha1 = "fb61b4812c49343d7ef0b533ba982c46021938a6"
377+
uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
378+
version = "1.7.0"
379+
374380
[[deps.DataStructures]]
375381
deps = ["Compat", "InteractiveUtils", "OrderedCollections"]
376382
git-tree-sha1 = "4e1fe97fdaed23e9dc21d4d664bea76b65fc50a0"
@@ -857,6 +863,19 @@ git-tree-sha1 = "debdd00ffef04665ccbb3e150747a77560e8fad1"
857863
uuid = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173"
858864
version = "0.1.1"
859865

866+
[[deps.InlineStrings]]
867+
git-tree-sha1 = "8594fac023c5ce1ef78260f24d1ad18b4327b420"
868+
uuid = "842dd82b-1e85-43dc-bf29-5d0ee9dffc48"
869+
version = "1.4.4"
870+
871+
[deps.InlineStrings.extensions]
872+
ArrowTypesExt = "ArrowTypes"
873+
ParsersExt = "Parsers"
874+
875+
[deps.InlineStrings.weakdeps]
876+
ArrowTypes = "31f734f8-188a-4ce0-8406-c8a06bd891cd"
877+
Parsers = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
878+
860879
[[deps.IntelOpenMP_jll]]
861880
deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl"]
862881
git-tree-sha1 = "0f14a5456bdc6b9731a5682f439a672750a09e48"
@@ -889,6 +908,11 @@ weakdeps = ["Dates", "Test"]
889908
InverseFunctionsDatesExt = "Dates"
890909
InverseFunctionsTestExt = "Test"
891910

911+
[[deps.InvertedIndices]]
912+
git-tree-sha1 = "6da3c4316095de0f5ee2ebd875df8721e7e0bdbe"
913+
uuid = "41ab1584-1d38-5bbf-9106-f11c6c58b48f"
914+
version = "1.3.1"
915+
892916
[[deps.Ipopt]]
893917
deps = ["Ipopt_jll", "LinearAlgebra", "OpenBLAS32_jll", "PrecompileTools"]
894918
git-tree-sha1 = "4ad0d2dea51e5d49866b40a2d2521da6a1be7097"
@@ -1799,9 +1823,9 @@ version = "1.4.3"
17991823

18001824
[[deps.Plots]]
18011825
deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "JLFzf", "JSON", "LaTeXStrings", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "Pkg", "PlotThemes", "PlotUtils", "PrecompileTools", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "RelocatableFolders", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "TOML", "UUIDs", "UnicodeFun", "UnitfulLatexify", "Unzip"]
1802-
git-tree-sha1 = "809ba625a00c605f8d00cd2a9ae19ce34fc24d68"
1826+
git-tree-sha1 = "28ea788b78009c695eb0d637587c81d26bdf0e36"
18031827
uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
1804-
version = "1.40.13"
1828+
version = "1.40.14"
18051829

18061830
[deps.Plots.extensions]
18071831
FileIOExt = "FileIO"
@@ -1829,6 +1853,12 @@ git-tree-sha1 = "645bed98cd47f72f67316fd42fc47dee771aefcd"
18291853
uuid = "1d0040c9-8b98-4ee7-8388-3f51789ca0ad"
18301854
version = "0.2.2"
18311855

1856+
[[deps.PooledArrays]]
1857+
deps = ["DataAPI", "Future"]
1858+
git-tree-sha1 = "36d8b4b899628fb92c2749eb488d884a926614d3"
1859+
uuid = "2dfb63ee-cc39-5dd5-95bd-886bf059d720"
1860+
version = "1.4.3"
1861+
18321862
[[deps.PreallocationTools]]
18331863
deps = ["Adapt", "ArrayInterface", "ForwardDiff"]
18341864
git-tree-sha1 = "6d98eace73d82e47f5b16c393de198836d9f790a"
@@ -2064,6 +2094,12 @@ git-tree-sha1 = "3bac05bc7e74a75fd9cba4295cde4045d9fe2386"
20642094
uuid = "6c6a2e73-6563-6170-7368-637461726353"
20652095
version = "1.2.1"
20662096

2097+
[[deps.SentinelArrays]]
2098+
deps = ["Dates", "Random"]
2099+
git-tree-sha1 = "712fb0231ee6f9120e005ccd56297abbc053e7e0"
2100+
uuid = "91c51154-3ec4-41a3-a24f-3f23e20d615c"
2101+
version = "1.4.8"
2102+
20672103
[[deps.Serialization]]
20682104
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
20692105
version = "1.11.0"

docs/src/assets/Project.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ CTFlows = "1c39547c-7794-42f7-af83-d98194f657c2"
66
CTModels = "34c4fa32-2049-4079-8329-de33c2a22e2d"
77
CTParser = "32681960-a1b1-40db-9bff-a1ca817385d1"
88
CommonSolve = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2"
9+
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
910
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
1011
DocumenterInterLinks = "d12716ef-a0f6-4df4-a9f1-a5a34e75c656"
1112
DocumenterMermaid = "a078cd44-4d9c-4618-b545-3ab9d77f9177"
@@ -21,19 +22,22 @@ Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
2122
Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb"
2223

2324
[compat]
25+
ADNLPModels = "0.8"
2426
CTBase = "0.16"
2527
CTDirect = "0.14"
2628
CTFlows = "0.8"
2729
CTModels = "0.5"
2830
CTParser = "0.4"
2931
CommonSolve = "0.2"
3032
Documenter = "1.8"
33+
DocumenterInterLinks = "1"
3134
DocumenterMermaid = "0.2"
3235
JLD2 = "0.5"
3336
JSON3 = "1.14"
3437
LinearAlgebra = "1"
3538
MadNLP = "0.8"
3639
NLPModelsIpopt = "0.10"
40+
NLPModelsKnitro = "0.9"
3741
OrdinaryDiffEq = "6.93"
3842
Plots = "1.40"
3943
Suppressor = "0.2"

0 commit comments

Comments
 (0)