Skip to content

Commit 71a2598

Browse files
authored
Merge pull request #413 from control-toolbox/412-doc-up-doc
up doc
2 parents 113c5ac + a58943e commit 71a2598

20 files changed

+240
-52
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "CTDirect"
22
uuid = "790bbbee-bee9-49ee-8912-a9de031322d5"
33
authors = ["Pierre Martinon <pierrecmartinon@gmail.com>"]
4-
version = "0.14.12"
4+
version = "0.14.13"
55

66
[deps]
77
ADNLPModels = "54578032-b7ea-4c30-94aa-7cbd1cce6c9a"

docs/Project.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
[deps]
2-
CTDirect = "790bbbee-bee9-49ee-8912-a9de031322d5"
32
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
43
DocumenterMermaid = "a078cd44-4d9c-4618-b545-3ab9d77f9177"
4+
MadNLP = "2621e9c9-9eb4-46b1-8089-e8c72242dfb6"
5+
NLPModelsIpopt = "f4238b75-b362-5c4c-b852-0801c9a21d71"
6+
NLPModelsKnitro = "bec4dd0d-7755-52d5-9a02-22f0ffc7efcb"
57

68
[compat]
7-
CTDirect = "0.14"
89
Documenter = "1"
910
DocumenterMermaid = "0.2"

docs/make.jl

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,55 @@
11
using Documenter
22
using DocumenterMermaid
3-
43
using CTDirect
4+
using NLPModelsIpopt
5+
using NLPModelsKnitro
6+
using MadNLP
57

68
# to add docstrings from external packages
7-
DocMeta.setdocmeta!(CTDirect, :DocTestSetup, :(using CTDirect); recursive=true)
9+
const CTSolveExtIpopt = Base.get_extension(CTDirect, :CTSolveExtIpopt)
10+
const CTSolveExtKnitro = Base.get_extension(CTDirect, :CTSolveExtKnitro)
11+
const CTSolveExtMadNLP = Base.get_extension(CTDirect, :CTSolveExtMadNLP)
12+
Modules = [
13+
CTSolveExtIpopt,
14+
CTSolveExtKnitro,
15+
CTSolveExtMadNLP,
16+
]
17+
for Module in Modules
18+
isnothing(DocMeta.getdocmeta(Module, :DocTestSetup)) &&
19+
DocMeta.setdocmeta!(Module, :DocTestSetup, :(using $Module); recursive=true)
20+
end
821

922
repo_url = "github.com/control-toolbox/CTDirect.jl"
1023

24+
API_PAGES = [
25+
"common.md",
26+
"ctsolveext_ipopt.md",
27+
"ctsolveext_knitro.md",
28+
"ctsolveext_madnlp.md",
29+
"default.md",
30+
"docp.md",
31+
"euler.md",
32+
"irk.md",
33+
"midpoint.md",
34+
"solution.md",
35+
"solve.md",
36+
"trapeze.md",
37+
]
38+
1139
makedocs(;
1240
warnonly=[:cross_references, :autodocs_block],
1341
sitename="CTDirect.jl",
1442
format=Documenter.HTML(
15-
repolink="https://"*repo_url,
43+
repolink="https://" * repo_url,
1644
prettyurls=false,
1745
assets=[
1846
asset("https://control-toolbox.org/assets/css/documentation.css"),
1947
asset("https://control-toolbox.org/assets/js/documentation.js"),
2048
],
2149
),
22-
pages=["Introduction" => "index.md", "API" => "api.md", "Developers" => "dev-api.md"],
50+
pages=["Introduction" => "index.md", "API" => API_PAGES],
2351
)
2452

2553
deploydocs(;
26-
repo=repo_url*".git", devbranch="main"
54+
repo=repo_url * ".git", devbranch="main"
2755
)

docs/src/assets/diagram.png

-199 KB
Binary file not shown.

docs/src/assets/goddard.png

-136 KB
Binary file not shown.

docs/src/common.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Common
2+
3+
## Index
4+
5+
```@index
6+
Pages = ["common.md"]
7+
Modules = [CTDirect]
8+
Order = [:module, :constant, :type, :function, :macro]
9+
```
10+
11+
## Documentation
12+
13+
```@autodocs
14+
Pages = ["common.jl"]
15+
Modules = [CTDirect]
16+
Order = [:module, :constant, :type, :function, :macro]
17+
```

docs/src/ctsolveext_ipopt.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# CTSolveExtIpopt
2+
3+
## Index
4+
5+
```@index
6+
Pages = ["ctsolveext_ipopt.md"]
7+
Modules = [CTDirect, CTSolveExtIpopt]
8+
Order = [:module, :constant, :type, :function, :macro]
9+
```
10+
11+
## Documentation
12+
13+
```@autodocs
14+
Pages = ["CTSolveExtIpopt.jl"]
15+
Modules = [CTSolveExtIpopt]
16+
Order = [:module, :constant, :type, :function, :macro]
17+
```

docs/src/ctsolveext_knitro.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# CTSolveExtKnitro
2+
3+
## Index
4+
5+
```@index
6+
Pages = ["ctsolveext_knitro.md"]
7+
Modules = [CTDirect, CTSolveExtKnitro]
8+
Order = [:module, :constant, :type, :function, :macro]
9+
```
10+
11+
## Documentation
12+
13+
```@autodocs
14+
Pages = ["CTSolveExtKnitro.jl"]
15+
Modules = [CTSolveExtKnitro]
16+
Order = [:module, :constant, :type, :function, :macro]
17+
```

docs/src/ctsolveext_madnlp.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# CTSolveExtMadNLP
2+
3+
## Index
4+
5+
```@index
6+
Pages = ["ctsolveext_madnlp.md"]
7+
Modules = [CTDirect, CTSolveExtMadNLP]
8+
Order = [:module, :constant, :type, :function, :macro]
9+
```
10+
11+
## Documentation
12+
13+
```@autodocs
14+
Pages = ["CTSolveExtMadNLP.jl"]
15+
Modules = [CTSolveExtMadNLP]
16+
Order = [:module, :constant, :type, :function, :macro]
17+
```

docs/src/default.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Default
2+
3+
## Index
4+
5+
```@index
6+
Pages = ["default.md"]
7+
Modules = [CTDirect]
8+
Order = [:module, :constant, :type, :function, :macro]
9+
```
10+
11+
## Documentation
12+
13+
```@autodocs
14+
Pages = ["default.jl"]
15+
Modules = [CTDirect]
16+
Order = [:module, :constant, :type, :function, :macro]
17+
```

docs/src/dev-api.md

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
# CTDirect API
1+
# DOCP
22

33
## Index
44

55
```@index
6-
Pages = ["api.md"]
6+
Pages = ["docp.md"]
77
Modules = [CTDirect]
88
Order = [:module, :constant, :type, :function, :macro]
99
```
1010

1111
## Documentation
1212

1313
```@autodocs
14+
Pages = ["docp.jl"]
1415
Modules = [CTDirect]
1516
Order = [:module, :constant, :type, :function, :macro]
16-
Private = false
17-
```
17+
```

docs/src/euler.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Euler
2+
3+
## Index
4+
5+
```@index
6+
Pages = ["euler.md"]
7+
Modules = [CTDirect]
8+
Order = [:module, :constant, :type, :function, :macro]
9+
```
10+
11+
## Documentation
12+
13+
```@autodocs
14+
Pages = ["euler.jl"]
15+
Modules = [CTDirect]
16+
Order = [:module, :constant, :type, :function, :macro]
17+
```

docs/src/index.md

Lines changed: 12 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,20 @@
33
```@meta
44
CurrentModule = CTDirect
55
```
6+
The `CTDirect.jl` package is part of the [control-toolbox ecosystem](https://github.com/control-toolbox).
67

7-
The [CTDirect.jl](control-toolbox.org/CTDirect.jl) package is part of the [control-toolbox ecosystem](https://github.com/control-toolbox).
8-
9-
```mermaid
10-
flowchart TD
11-
B(<a href='https://control-toolbox.org/OptimalControl.jl/stable/api-ctbase.html'>CTBase</a>)
12-
M(<a href='https://control-toolbox.org/OptimalControl.jl/stable/api-ctmodels.html'>CTModels</a>)
13-
P(<a href='https://control-toolbox.org/OptimalControl.jl/stable/api-ctparser.html'>CTParser</a>)
14-
O(<a href='https://control-toolbox.org/OptimalControl.jl/stable/api-optimalcontrol.html'>OptimalControl</a>)
15-
D(<a href='https://control-toolbox.org/OptimalControl.jl/stable/api-ctdirect.html'>CTDirect</a>)
16-
F(<a href='https://control-toolbox.org/OptimalControl.jl/stable/api-ctflows.html'>CTFlows</a>)
17-
O --> D
18-
O --> M
19-
O --> F
20-
O --> P
21-
F --> M
22-
O --> B
23-
F --> B
24-
D --> B
25-
D --> M
26-
P --> B
27-
M --> B
28-
style D fill:#FBF275
29-
```
8+
The root package is [OptimalControl.jl](https://github.com/control-toolbox/OptimalControl.jl) which aims to provide tools to model and solve optimal control problems with ordinary differential equations by direct and indirect methods.
9+
10+
To install a package from the control-toolbox ecosystem, please visit the [installation page](https://github.com/control-toolbox#installation).
3011

31-
!!! note "Install"
12+
## API Documentation
13+
14+
```@contents
15+
Pages = Main.API_PAGES
16+
Depth = 1
17+
```
3218

33-
To install a package from the control-toolbox ecosystem,
34-
please visit the [installation page](https://github.com/control-toolbox#installation).
19+
## Brief Overview
3520

3621
An optimal control problem with fixed initial and final times, denoted (OCP), can be described as minimising the cost functional
3722

@@ -94,7 +79,7 @@ LB \le C(X) \le UB
9479

9580
Solving the (NLP) problem is done using packages from [JuliaSmoothOptimizers](https://github.com/JuliaSmoothOptimizers), with Ipopt as the default solver.
9681

97-
On the input side of this package, we use an [`OptimalControlModel`](@ref) structure from CTModels to define the (OCP).
82+
On the input side of this package, we use a `Model` structure from CTModels to define the (OCP).
9883

9984
The direct transcription to build the (NLP) can use discretization schemes such as trapeze (default), midpoint, or Gauss-Legendre collocations.
10085

docs/src/irk.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# IRK
2+
3+
## Index
4+
5+
```@index
6+
Pages = ["irk.md"]
7+
Modules = [CTDirect]
8+
Order = [:module, :constant, :type, :function, :macro]
9+
```
10+
11+
## Documentation
12+
13+
```@autodocs
14+
Pages = ["irk.jl"]
15+
Modules = [CTDirect]
16+
Order = [:module, :constant, :type, :function, :macro]
17+
```

docs/src/midpoint.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Midpoint
2+
3+
## Index
4+
5+
```@index
6+
Pages = ["midpoint.md"]
7+
Modules = [CTDirect]
8+
Order = [:module, :constant, :type, :function, :macro]
9+
```
10+
11+
## Documentation
12+
13+
```@autodocs
14+
Pages = ["midpoint.jl"]
15+
Modules = [CTDirect]
16+
Order = [:module, :constant, :type, :function, :macro]
17+
```

docs/src/solution.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Solution
2+
3+
## Index
4+
5+
```@index
6+
Pages = ["solution.md"]
7+
Modules = [CTDirect]
8+
Order = [:module, :constant, :type, :function, :macro]
9+
```
10+
11+
## Documentation
12+
13+
```@autodocs
14+
Pages = ["solution.jl"]
15+
Modules = [CTDirect]
16+
Order = [:module, :constant, :type, :function, :macro]
17+
```

docs/src/solve.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Solve
2+
3+
## Index
4+
5+
```@index
6+
Pages = ["solve.md"]
7+
Modules = [CTDirect]
8+
Order = [:module, :constant, :type, :function, :macro]
9+
```
10+
11+
## Documentation
12+
13+
```@autodocs
14+
Pages = ["solve.jl"]
15+
Modules = [CTDirect]
16+
Order = [:module, :constant, :type, :function, :macro]
17+
```

docs/src/trapeze.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Trapeze
2+
3+
## Index
4+
5+
```@index
6+
Pages = ["trapeze.md"]
7+
Modules = [CTDirect]
8+
Order = [:module, :constant, :type, :function, :macro]
9+
```
10+
11+
## Documentation
12+
13+
```@autodocs
14+
Pages = ["trapeze.jl"]
15+
Modules = [CTDirect]
16+
Order = [:module, :constant, :type, :function, :macro]
17+
```

src/CTDirect.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
module CTDirect
22

33
import CTModels
4-
54
using ADNLPModels
6-
75
using DocStringExtensions
86
using SparseArrays
97

0 commit comments

Comments
 (0)