Skip to content

Commit d13147d

Browse files
committed
foo
1 parent d610259 commit d13147d

25 files changed

+146
-44
lines changed

docs/make.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ makedocs(
2727
pages = [
2828
"Introduction" => "index.md",
2929
"Basic examples" => [
30-
"Energy minimisation" => "tutorial-basic-example.md",
31-
"Time mininimisation" => "tutorial-double-integrator.md",
30+
"Energy minimisation" => "tutorial-double-integrator-energy.md",
31+
"Time mininimisation" => "tutorial-double-integrator-time.md",
3232
],
3333
"Manual" => [
3434
"Abstract syntax" => "tutorial-abstract.md",

docs/src/api-ctbase.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,16 @@ style B fill:#FBF275
1818

1919
You may find in this package:
2020

21-
- [Types](@ref api-ctbase-types): the common types and associated methods if any.
2221
- [Description](@ref api-ctbase-description): tools to manipulate tuples.
23-
- [Differential geometry](@ref api-ctbase-diffgeometry): tools to compute [Lie brackets](https://en.wikipedia.org/w/index.php?title=Lie_bracket_of_vector_fields&oldid=1163591634), [Poisson brackets](https://en.wikipedia.org/w/index.php?title=Poisson_manifold&oldid=1163991099#Formal_definition)...
22+
- [Differential geometry](@ref api-ctbase-differential-geometry): tools to compute [Lie brackets](https://en.wikipedia.org/w/index.php?title=Lie_bracket_of_vector_fields&oldid=1163591634), [Poisson brackets](https://en.wikipedia.org/w/index.php?title=Poisson_manifold&oldid=1163991099#Formal_definition)...
2423
- [Exceptions](@ref api-ctbase-exceptions).
24+
- [Initial guess](@ref api-ctbase-init): tools to define an initial guess.
2525
- [Model](@ref api-ctbase-model): tools to modelise an optimal control problem in a functional manner.
2626
- [Parser](@ref api-ctbase-parser): tools to modelise an optimal control problem in an abstract manner.
27-
- [Plot](@ref api-ctbase-plot): the `plot` function extended from Plots.jl and utils.
2827
- [Print](@ref api-ctbase-print): check how an optimal control problem is displayed.
2928
- [Repl](@ref api-ctbase-repl): control-toolbox repl.
29+
- [Solution](@ref api-ctbase-solution): optimal control solution.
30+
- [Types](@ref api-ctbase-types): the common types and associated methods if any.
3031
- [Utils](@ref api-ctbase-utils): auxiliary methods.
3132

3233
Here is the list of imported packages and exported functions.

docs/src/api-ctbase/description.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ CollapsedDocStrings = true
99
```@index
1010
Pages = ["description.md"]
1111
Modules = [CTBase]
12-
Order = [:module, :constant, :function, :macro]
12+
Order = [:type, :module, :constant, :function, :macro]
1313
```
1414

1515
## Documentation
1616

1717
```@autodocs
1818
Modules = [CTBase]
19-
Order = [:module, :constant, :function, :macro]
19+
Order = [:type, :module, :constant, :function, :macro]
2020
Pages = ["description.jl"]
2121
Private = false
2222
```

docs/src/api-ctbase/diffgeometry.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# [Differential geometry](@id api-ctbase-diffegeometry)
1+
# [Differential geometry](@id api-ctbase-differential-geometry)
22

33
```@meta
44
CollapsedDocStrings = true
@@ -9,14 +9,14 @@ CollapsedDocStrings = true
99
```@index
1010
Pages = ["diffgeometry.md"]
1111
Modules = [CTBase]
12-
Order = [:module, :constant, :function, :macro]
12+
Order = [:type, :module, :constant, :function, :macro]
1313
```
1414

1515
## Documentation
1616

1717
```@autodocs
1818
Modules = [CTBase]
19-
Order = [:module, :constant, :function, :macro]
19+
Order = [:type, :module, :constant, :function, :macro]
2020
Pages = ["differential_geometry.jl"]
2121
Private = false
2222
```

docs/src/api-ctbase/exceptions.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ CollapsedDocStrings = true
99
```@index
1010
Pages = ["exceptions.md"]
1111
Modules = [CTBase]
12-
Order = [:module, :constant, :function, :macro]
12+
Order = [:type, :module, :constant, :function, :macro]
1313
```
1414

1515
## Documentation
1616

1717
```@autodocs
1818
Modules = [CTBase]
19-
Order = [:module, :constant, :function, :macro]
19+
Order = [:type, :module, :constant, :function, :macro]
2020
Pages = ["exception.jl"]
2121
Private = false
2222
```

docs/src/api-ctbase/init.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# [Initial guess](@id api-ctbase-init)
2+
3+
```@meta
4+
CollapsedDocStrings = true
5+
```
6+
7+
## Index
8+
9+
```@index
10+
Pages = ["init.md"]
11+
Modules = [CTBase]
12+
Order = [:type, :module, :constant, :function, :macro]
13+
```
14+
15+
## Documentation
16+
17+
```@autodocs
18+
Modules = [CTBase]
19+
Order = [:type, :module, :constant, :function, :macro]
20+
Pages = ["init.jl"]
21+
Private = false
22+
```

docs/src/api-ctbase/model.md

+21-7
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,33 @@
44
CollapsedDocStrings = true
55
```
66

7-
## Index
8-
9-
```@index
7+
```@contents
108
Pages = ["model.md"]
9+
```
10+
11+
## Optimal control model type
12+
13+
```@autodocs
1114
Modules = [CTBase]
12-
Order = [:module, :constant, :function, :macro]
15+
Order = [:type, :module, :constant, :function, :macro]
16+
Pages = ["optimal_control_model-type.jl"]
17+
Private = false
1318
```
1419

15-
## Documentation
20+
## Getters
1621

1722
```@autodocs
1823
Modules = [CTBase]
19-
Order = [:module, :constant, :function, :macro]
20-
Pages = ["model.jl"]
24+
Order = [:type, :module, :constant, :function, :macro]
25+
Pages = ["optimal_control_model-getters.jl"]
2126
Private = false
2227
```
28+
29+
## Constructors and setters
30+
31+
```@autodocs
32+
Modules = [CTBase]
33+
Order = [:type, :module, :constant, :function, :macro]
34+
Pages = ["optimal_control_model-setters.jl"]
35+
Private = false
36+
```

docs/src/api-ctbase/plot.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ CollapsedDocStrings = true
66

77
```@autodocs
88
Modules = [CTBase]
9-
Order = [:module, :constant, :function, :macro]
9+
Order = [:type, :module, :constant, :function, :macro]
1010
Pages = ["plot.jl"]
1111
Private = false
1212
```

docs/src/api-ctbase/print.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ CollapsedDocStrings = true
66

77
```@autodocs
88
Modules = [CTBase]
9-
Order = [:module, :constant, :function, :macro]
9+
Order = [:type, :module, :constant, :function, :macro]
1010
Pages = ["print.jl"]
1111
Private = false
1212
```
@@ -70,7 +70,7 @@ You can also define the optimal control problem in an abstract form:
7070
```@example main2
7171
using OptimalControl
7272
73-
@def ocp begin
73+
ocp = @def begin
7474
t ∈ [ 0, 1 ], time
7575
x ∈ R^2, state
7676
u ∈ R, control

docs/src/api-ctbase/repl.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ CollapsedDocStrings = true
99
```@index
1010
Pages = ["repl.md"]
1111
Modules = [CTBase]
12-
Order = [:module, :constant, :function, :macro]
12+
Order = [:type, :module, :constant, :function, :macro]
1313
```
1414

1515
## Documentation
1616

1717
```@autodocs
1818
Modules = [CTBase]
19-
Order = [:module, :constant, :function, :macro]
19+
Order = [:type, :module, :constant, :function, :macro]
2020
Pages = ["repl.jl"]
2121
Private = false
2222
```

docs/src/api-ctbase/solution.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# [Solution](@id api-ctbase-solution)
2+
3+
```@meta
4+
CollapsedDocStrings = true
5+
```
6+
7+
```@contents
8+
Pages = ["solution.md"]
9+
```
10+
11+
## Optimal control solution type
12+
13+
```@autodocs
14+
Modules = [CTBase]
15+
Order = [:type, :module, :constant, :function, :macro]
16+
Pages = ["optimal_control_solution-type.jl"]
17+
Private = false
18+
```
19+
20+
## Getters
21+
22+
```@autodocs
23+
Modules = [CTBase]
24+
Order = [:type, :module, :constant, :function, :macro]
25+
Pages = ["optimal_control_solution-getters.jl"]
26+
Private = false
27+
```
28+
29+
## Constructors and setters
30+
31+
```@autodocs
32+
Modules = [CTBase]
33+
Order = [:type, :module, :constant, :function, :macro]
34+
Pages = ["optimal_control_solution-setters.jl"]
35+
Private = false
36+
```

docs/src/api-ctbase/types.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ CollapsedDocStrings = true
99
```@index
1010
Pages = ["types.md"]
1111
Modules = [CTBase]
12-
Order = [:type]
12+
Order = [:type, :module, :constant, :function, :macro]
1313
```
1414

1515
## Documentation
1616

1717
```@autodocs
1818
Modules = [CTBase]
19-
Order = [:type]
19+
Order = [:type, :module, :constant, :function, :macro]
20+
Pages = ["types.jl", "functions.jl"]
2021
Private = false
2122
```

docs/src/api-ctbase/utils.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ CollapsedDocStrings = true
99
```@index
1010
Pages = ["utils.md"]
1111
Modules = [CTBase]
12-
Order = [:module, :constant, :function, :macro]
12+
Order = [:type, :module, :constant, :function, :macro]
1313
```
1414

1515
## Documentation
1616

1717
```@autodocs
1818
Modules = [CTBase]
19-
Order = [:module, :constant, :function, :macro]
19+
Order = [:type, :module, :constant, :function, :macro]
2020
Pages = ["utils.jl"]
2121
Private = false
2222
```

docs/src/dev-ctbase.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ CollapsedDocStrings = true
99
```@index
1010
Pages = ["dev-ctbase.md"]
1111
Modules = [CTBase]
12-
Order = [:module, :constant, :type, :function, :macro]
12+
Order = [:type, :module, :constant, :type, :function, :macro]
1313
```
1414

1515
## Documentation
1616

1717
```@autodocs
1818
Modules = [CTBase]
19-
Order = [:module, :constant, :type, :function, :macro]
19+
Order = [:type, :module, :constant, :type, :function, :macro]
2020
Public = false
2121
```

docs/src/dev-ctdirect.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ CollapsedDocStrings = true
99
```@index
1010
Pages = ["dev-ctdirect.md"]
1111
Modules = [CTDirect]
12-
Order = [:module, :constant, :type, :function, :macro]
12+
Order = [:type, :module, :constant, :type, :function, :macro]
1313
```
1414

1515
## Documentation
1616

1717
```@autodocs
1818
Modules = [CTDirect]
19-
Order = [:module, :constant, :type, :function, :macro]
19+
Order = [:type, :module, :constant, :type, :function, :macro]
2020
Public = false
2121
```

docs/src/dev-ctflows.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ CollapsedDocStrings = true
99
```@index
1010
Pages = ["dev-ctflows.md"]
1111
Modules = [CTFlows]
12-
Order = [:module, :constant, :type, :function, :macro]
12+
Order = [:type, :module, :constant, :type, :function, :macro]
1313
```
1414

1515
## Documentation
1616

1717
```@autodocs
1818
Modules = [CTFlows]
19-
Order = [:module, :constant, :type, :function, :macro]
19+
Order = [:type, :module, :constant, :type, :function, :macro]
2020
Public = false
2121
```

docs/src/dev-optimalcontrol.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ CollapsedDocStrings = true
99
```@index
1010
Pages = ["dev-optimalcontrol.md"]
1111
Modules = [OptimalControl]
12-
Order = [:module, :constant, :type, :function, :macro]
12+
Order = [:type, :module, :constant, :type, :function, :macro]
1313
```
1414

1515
## Documentation
1616

1717
```@autodocs
1818
Modules = [OptimalControl]
19-
Order = [:module, :constant, :type, :function, :macro]
19+
Order = [:type, :module, :constant, :type, :function, :macro]
2020
Public = false
2121
```

docs/src/tutorial-basic-example.md renamed to docs/src/tutorial-double-integrator-energy.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ nothing # hide
5151

5252
!!! note "Nota bene"
5353

54-
For a comprehensive introduction to the syntax used above to describe the optimal control problem, check [this tutorial](@ref abstract). In particular, there are non-unicode alternatives for derivatives, integrals, *etc.* There is also a non-standard but more classical functional syntax, check [this tutorial](@ref functional).
54+
For a comprehensive introduction to the syntax used above to describe the optimal control problem, check [this abstract syntax tutorial](@ref abstract). In particular, there are non-unicode alternatives for derivatives, integrals, *etc.* There is also a non-standard but more classical functional syntax, check [this functional syntax tutorial](@ref functional).
5555

5656
## [Solve and plot](@id basic-solve-plot)
5757

docs/src/tutorial-double-integrator.md renamed to docs/src/tutorial-double-integrator-time.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ nothing # hide
7070

7171
!!! note "Nota bene"
7272

73-
For a comprehensive introduction to the syntax used above to describe the optimal control problem, check [this tutorial](@ref abstract). In particular, there are non-unicode alternatives for derivatives, integrals, *etc.* There is also a non-standard but more classical functional syntax, check [this tutorial](@ref functional).
73+
For a comprehensive introduction to the syntax used above to describe the optimal control problem, check [this abstract syntax tutorial](@ref abstract). In particular, there are non-unicode alternatives for derivatives, integrals, *etc.* There is also a non-standard but more classical functional syntax, check [this functional syntax tutorial](@ref functional).
7474

7575
## Solve and plot
7676

docs/src/tutorial-flow.md

+4
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ You can notice from the graph of `v` that the integrator has made very few steps
142142
time_grid(sol)
143143
```
144144

145+
!!! Note "Time grid"
146+
147+
The function [`time_grid`](@ref) returns the discretized time grid returned by the solver. In this case, the solution has been computed by numerical integration with an adaptive step-length Runge-Kutta scheme.
148+
145149
To have a better visualisation (the accuracy won't change), you can provide a fine grid.
146150

147151
```@example main

docs/src/tutorial-goddard.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ bang arc with maximal control, followed by a singular arc, then by a boundary ar
123123
arc is with zero control. Note that the switching function vanishes along the singular and
124124
boundary arcs.
125125

126+
!!! tip "Interactions with an optimal control solution"
127+
128+
Please check [`state`](@ref), [`costate`](@ref), [`control`](@ref) and [`variable`](@ref) to get data from the solution. The functions `state`, `costate` and `control` return functions of time and `variable` returns a vector. The function [`time_grid`](@ref) returns the discretized time grid returned by the solver.
129+
126130
```@example main
127131
t = time_grid(direct_sol)
128132
x = state(direct_sol)
@@ -371,7 +375,7 @@ Let us define the problem to solve.
371375
# auxiliary function with aggregated inputs
372376
nle! = ( s, ξ) -> shoot!(s, ξ[1:3], ξ[4], ξ[5], ξ[6], ξ[7])
373377
374-
# Jacobian of the (auxiliary) shooting function
378+
# Jacobian of the (auxiliary) shooting function
375379
jnle! = (js, ξ) -> jacobian!(nle!, similar(ξ), js, backend, ξ)
376380
nothing # hide
377381
```

0 commit comments

Comments
 (0)