Skip to content

Commit 5e7e015

Browse files
committed
add save
1 parent 6459675 commit 5e7e015

88 files changed

Lines changed: 10985 additions & 1 deletion

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ Manifest.toml
4242
#
4343
.tmp/
4444
.extras/
45-
.save/
45+
#.save/
4646
.windsurf/
4747
.reports/

.save/docs/Project.toml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
[deps]
2+
ADNLPModels = "54578032-b7ea-4c30-94aa-7cbd1cce6c9a"
3+
CTBase = "54762871-cc72-4466-b8e8-f6c8b58076cd"
4+
CTDirect = "790bbbee-bee9-49ee-8912-a9de031322d5"
5+
CTFlows = "1c39547c-7794-42f7-af83-d98194f657c2"
6+
CTModels = "34c4fa32-2049-4079-8329-de33c2a22e2d"
7+
CTParser = "32681960-a1b1-40db-9bff-a1ca817385d1"
8+
CommonSolve = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2"
9+
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
10+
DifferentiationInterface = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63"
11+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
12+
DocumenterInterLinks = "d12716ef-a0f6-4df4-a9f1-a5a34e75c656"
13+
DocumenterMermaid = "a078cd44-4d9c-4618-b545-3ab9d77f9177"
14+
ExaModels = "1037b233-b668-4ce9-9b63-f9f681f55dd2"
15+
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
16+
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
17+
JSON3 = "0f8b85d8-7281-11e9-16c2-39a750bddbf1"
18+
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
19+
MINPACK = "4854310b-de5a-5eb6-a2a5-c1dee2bd17f9"
20+
MadNLP = "2621e9c9-9eb4-46b1-8089-e8c72242dfb6"
21+
MadNLPMumps = "3b83494e-c0a4-4895-918b-9157a7a085a1"
22+
NLPModelsIpopt = "f4238b75-b362-5c4c-b852-0801c9a21d71"
23+
NLPModelsKnitro = "bec4dd0d-7755-52d5-9a02-22f0ffc7efcb"
24+
NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
25+
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
26+
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
27+
Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb"
28+
29+
[compat]
30+
ADNLPModels = "0.8"
31+
CTBase = "0.18"
32+
CTDirect = "1"
33+
CTFlows = "0.8"
34+
CTModels = "0.8"
35+
CTParser = "0.8"
36+
CTSolver = "0.2"
37+
CommonSolve = "0.2"
38+
DataFrames = "1"
39+
DifferentiationInterface = "0.7"
40+
Documenter = "1"
41+
DocumenterInterLinks = "1"
42+
DocumenterMermaid = "0.2"
43+
ExaModels = "0.9"
44+
ForwardDiff = "0.10, 1"
45+
JLD2 = "0.6"
46+
JSON3 = "1"
47+
LinearAlgebra = "1"
48+
MINPACK = "1"
49+
MadNLP = "0.8"
50+
MadNLPMumps = "0.5"
51+
NLPModelsIpopt = "0.11"
52+
NLPModelsKnitro = "0.9"
53+
NonlinearSolve = "4"
54+
OrdinaryDiffEq = "6"
55+
Plots = "1"
56+
Suppressor = "0.2"
57+
julia = "1.10"

.save/docs/make.jl

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
using Documenter
2+
using DocumenterMermaid
3+
using OptimalControl
4+
using CTBase
5+
using CTDirect
6+
using CTFlows
7+
using CTModels
8+
using CTParser
9+
using Plots
10+
using CommonSolve
11+
using OrdinaryDiffEq
12+
using DocumenterInterLinks
13+
using ADNLPModels
14+
using ExaModels
15+
using NLPModelsIpopt
16+
using MadNLP
17+
using MadNLPMumps
18+
using JSON3
19+
using JLD2
20+
using NLPModelsKnitro
21+
22+
#
23+
links = InterLinks(
24+
"CTBase" => (
25+
"https://control-toolbox.org/CTBase.jl/stable/",
26+
"https://control-toolbox.org/CTBase.jl/stable/objects.inv",
27+
joinpath(@__DIR__, "inventories", "CTBase.toml"),
28+
),
29+
"CTDirect" => (
30+
"https://control-toolbox.org/CTDirect.jl/stable/",
31+
"https://control-toolbox.org/CTDirect.jl/stable/objects.inv",
32+
joinpath(@__DIR__, "inventories", "CTDirect.toml"),
33+
),
34+
"CTFlows" => (
35+
"https://control-toolbox.org/CTFlows.jl/stable/",
36+
"https://control-toolbox.org/CTFlows.jl/stable/objects.inv",
37+
joinpath(@__DIR__, "inventories", "CTFlows.toml"),
38+
),
39+
"CTModels" => (
40+
"https://control-toolbox.org/CTModels.jl/stable/",
41+
"https://control-toolbox.org/CTModels.jl/stable/objects.inv",
42+
joinpath(@__DIR__, "inventories", "CTModels.toml"),
43+
),
44+
"CTParser" => (
45+
"https://control-toolbox.org/CTParser.jl/stable/",
46+
"https://control-toolbox.org/CTParser.jl/stable/objects.inv",
47+
joinpath(@__DIR__, "inventories", "CTParser.toml"),
48+
),
49+
"ADNLPModels" => (
50+
"https://jso.dev/ADNLPModels.jl/stable/",
51+
"https://jso.dev/ADNLPModels.jl/stable/objects.inv",
52+
joinpath(@__DIR__, "inventories", "ADNLPModels.toml"),
53+
),
54+
"NLPModelsIpopt" => (
55+
"https://jso.dev/NLPModelsIpopt.jl/stable/",
56+
"https://jso.dev/NLPModelsIpopt.jl/stable/objects.inv",
57+
joinpath(@__DIR__, "inventories", "NLPModelsIpopt.toml"),
58+
),
59+
"ExaModels" => (
60+
"https://exanauts.github.io/ExaModels.jl/stable/",
61+
"https://exanauts.github.io/ExaModels.jl/stable/objects.inv",
62+
joinpath(@__DIR__, "inventories", "ExaModels.toml"),
63+
),
64+
"MadNLP" => (
65+
"https://madnlp.github.io/MadNLP.jl/stable/",
66+
"https://madnlp.github.io/MadNLP.jl/stable/objects.inv",
67+
joinpath(@__DIR__, "inventories", "MadNLP.toml"),
68+
),
69+
"Tutorials" => (
70+
"https://control-toolbox.org/Tutorials.jl/stable/",
71+
"https://control-toolbox.org/Tutorials.jl/stable/objects.inv",
72+
joinpath(@__DIR__, "inventories", "Tutorials.toml"),
73+
),
74+
)
75+
76+
# to add docstrings from external packages
77+
const CTFlowsODE = Base.get_extension(CTFlows, :CTFlowsODE)
78+
const CTModelsPlots = Base.get_extension(CTModels, :CTModelsPlots)
79+
const CTModelsJSON = Base.get_extension(CTModels, :CTModelsJSON)
80+
const CTModelsJLD = Base.get_extension(CTModels, :CTModelsJLD)
81+
const CTDirectExtIpopt = Base.get_extension(CTDirect, :CTDirectExtIpopt)
82+
const CTDirectExtKnitro = Base.get_extension(CTDirect, :CTDirectExtKnitro)
83+
const CTDirectExtMadNLP = Base.get_extension(CTDirect, :CTDirectExtMadNLP)
84+
const CTDirectExtADNLP = Base.get_extension(CTDirect, :CTDirectExtADNLP)
85+
const CTDirectExtExa = Base.get_extension(CTDirect, :CTDirectExtExa)
86+
Modules = [
87+
CTBase,
88+
CTFlows,
89+
CTDirect,
90+
CTModels,
91+
CTParser,
92+
OptimalControl,
93+
CTFlowsODE,
94+
CTModelsPlots,
95+
CTModelsJSON,
96+
CTModelsJLD,
97+
CTDirectExtIpopt,
98+
CTDirectExtKnitro,
99+
CTDirectExtMadNLP,
100+
CTDirectExtADNLP,
101+
CTDirectExtExa,
102+
]
103+
for Module in Modules
104+
isnothing(DocMeta.getdocmeta(Module, :DocTestSetup)) &&
105+
DocMeta.setdocmeta!(Module, :DocTestSetup, :(using $Module); recursive=true)
106+
end
107+
108+
# For reproducibility
109+
mkpath(joinpath(@__DIR__, "src", "assets"))
110+
cp(
111+
joinpath(@__DIR__, "Manifest.toml"),
112+
joinpath(@__DIR__, "src", "assets", "Manifest.toml");
113+
force=true,
114+
)
115+
cp(
116+
joinpath(@__DIR__, "Project.toml"),
117+
joinpath(@__DIR__, "src", "assets", "Project.toml");
118+
force=true,
119+
)
120+
121+
repo_url = "github.com/control-toolbox/OptimalControl.jl"
122+
123+
# if draft is true, then the julia code from .md is not executed
124+
# to disable the draft mode in a specific markdown file, use the following:
125+
#=
126+
```@meta
127+
Draft = false
128+
```
129+
=#
130+
makedocs(;
131+
draft=false, # debug
132+
sitename="OptimalControl.jl",
133+
format=Documenter.HTML(;
134+
repolink="https://" * repo_url,
135+
prettyurls=false,
136+
size_threshold_ignore=[
137+
"api-optimalcontrol-user.md", "example-double-integrator-energy.md"
138+
],
139+
assets=[
140+
asset("https://control-toolbox.org/assets/css/documentation.css"),
141+
asset("https://control-toolbox.org/assets/js/documentation.js"),
142+
"assets/custom.css",
143+
],
144+
),
145+
pages=[
146+
"Getting Started" => "index.md",
147+
"Basic Examples" => [
148+
"Energy minimisation" => "example-double-integrator-energy.md",
149+
"Time mininimisation" => "example-double-integrator-time.md",
150+
],
151+
"Manual" => [
152+
"Define a problem" => "manual-abstract.md",
153+
"Use AI" => "manual-ai-llm.md",
154+
"Problem characteristics" => "manual-model.md",
155+
"Set an initial guess" => "manual-initial-guess.md",
156+
"Solve a problem" => "manual-solve.md",
157+
"Solve on GPU" => "manual-solve-gpu.md",
158+
"Solution characteristics" => "manual-solution.md",
159+
"Plot a solution" => "manual-plot.md",
160+
"Compute flows" => [
161+
"Flow API" => "manual-flow-api.md",
162+
"From optimal control problems" => "manual-flow-ocp.md",
163+
"From Hamiltonians and others" => "manual-flow-others.md",
164+
],
165+
],
166+
"API" => [
167+
"OptimalControl.jl - User" => "api-optimalcontrol-user.md",
168+
"Subpackages - Developers" => [
169+
"CTBase.jl" => "api-ctbase.md",
170+
"CTDirect.jl" => "api-ctdirect.md",
171+
"CTFlows.jl" => "api-ctflows.md",
172+
"CTModels.jl" => "api-ctmodels.md",
173+
"CTParser.jl" => "api-ctparser.md",
174+
"OptimalControl.jl" => "api-optimalcontrol-dev.md",
175+
],
176+
],
177+
"RDNOPA 2025" => "rdnopa-2025.md",
178+
],
179+
plugins=[links],
180+
)
181+
182+
deploydocs(; repo=repo_url * ".git", devbranch="main", push_preview=true)
183+
# push_preview: use https://control-toolbox.org/OptimalControl.jl/previews/PRXXX where XXX is the pull request number

.save/docs/src/api-ctbase.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# CTBase.jl
2+
3+
```@meta
4+
CollapsedDocStrings = false
5+
```
6+
7+
The [CTBase.jl](https://github.com/control-toolbox/CTBase.jl/) package is part of the [control-toolbox ecosystem](https://github.com/control-toolbox).
8+
9+
```mermaid
10+
flowchart TD
11+
B(<a href='api-ctbase.html'>CTBase</a>)
12+
M(<a href='api-ctmodels.html'>CTModels</a>)
13+
P(<a href='api-ctparser.html'>CTParser</a>)
14+
O(<a href='api-optimalcontrol-dev.html'>OptimalControl</a>)
15+
D(<a href='api-ctdirect.html'>CTDirect</a>)
16+
F(<a href='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 --> M
27+
P --> B
28+
M --> B
29+
style B fill:#FBF275
30+
```
31+
32+
OptimalControl heavily relies on CTBase. We refer to [CTBase API](@extref CTBase index) for more details.

.save/docs/src/api-ctdirect.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# CTDirect.jl
2+
3+
```@meta
4+
CollapsedDocStrings = false
5+
```
6+
7+
The [CTDirect.jl](https://github.com/control-toolbox/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='api-ctbase.html'>CTBase</a>)
12+
M(<a href='api-ctmodels.html'>CTModels</a>)
13+
P(<a href='api-ctparser.html'>CTParser</a>)
14+
O(<a href='api-optimalcontrol-dev.html'>OptimalControl</a>)
15+
D(<a href='api-ctdirect.html'>CTDirect</a>)
16+
F(<a href='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 --> M
27+
P --> B
28+
M --> B
29+
style D fill:#FBF275
30+
```
31+
32+
OptimalControl heavily relies on CTDirect. We refer to [CTDirect API](@extref CTDirect index) for more details.

.save/docs/src/api-ctflows.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# CTFlows.jl
2+
3+
```@meta
4+
CollapsedDocStrings = false
5+
```
6+
7+
The [CTFlows.jl](https://github.com/control-toolbox/CTFlows.jl) package is part of the [control-toolbox ecosystem](https://github.com/control-toolbox).
8+
9+
```mermaid
10+
flowchart TD
11+
B(<a href='api-ctbase.html'>CTBase</a>)
12+
M(<a href='api-ctmodels.html'>CTModels</a>)
13+
P(<a href='api-ctparser.html'>CTParser</a>)
14+
O(<a href='api-optimalcontrol-dev.html'>OptimalControl</a>)
15+
D(<a href='api-ctdirect.html'>CTDirect</a>)
16+
F(<a href='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 --> M
27+
P --> B
28+
M --> B
29+
style F fill:#FBF275
30+
```
31+
32+
OptimalControl heavily relies on CTFlows. We refer to [CTFlows API](@extref CTFlows index) for more details.

.save/docs/src/api-ctmodels.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# CTModels.jl
2+
3+
```@meta
4+
CollapsedDocStrings = false
5+
```
6+
7+
The [CTModels.jl](https://github.com/control-toolbox/CTModels.jl) package is part of the [control-toolbox ecosystem](https://github.com/control-toolbox).
8+
9+
```mermaid
10+
flowchart TD
11+
B(<a href='api-ctbase.html'>CTBase</a>)
12+
M(<a href='api-ctmodels.html'>CTModels</a>)
13+
P(<a href='api-ctparser.html'>CTParser</a>)
14+
O(<a href='api-optimalcontrol-dev.html'>OptimalControl</a>)
15+
D(<a href='api-ctdirect.html'>CTDirect</a>)
16+
F(<a href='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 --> M
27+
P --> B
28+
M --> B
29+
style M fill:#FBF275
30+
```
31+
32+
OptimalControl heavily relies on CTModels. We refer to [CTModels API](@extref CTModels index) for more details.

0 commit comments

Comments
 (0)