Skip to content

Commit b1ee3cd

Browse files
authored
Merge pull request #66 from control-toolbox/symbolics
Add a tutorial for using Symbolics.jl together with OptimalControl.jl
2 parents b692390 + 7202a60 commit b1ee3cd

10 files changed

Lines changed: 636 additions & 8 deletions

File tree

.github/workflows/CI.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ on:
66
- main
77
tags: '*'
88
pull_request:
9+
types: [labeled, opened, synchronize, reopened]
910

1011
jobs:
1112
call:
12-
if: ${{ ! contains(github.event.pull_request.labels.*.name, 'run ci') }}
13+
if: contains(github.event.pull_request.labels.*.name, 'run ci')
1314
uses: control-toolbox/CTActions/.github/workflows/ci.yml@main
1415
with:
1516
runs_on: '["ubuntu-latest"]'

.github/workflows/Documentation.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ on:
66
- main
77
tags: '*'
88
pull_request:
9+
types: [labeled, opened, synchronize, reopened]
910

1011
jobs:
1112
call:
12-
if: ${{ ! contains(github.event.pull_request.labels.*.name, 'run documentation') }}
13+
if: contains(github.event.pull_request.labels.*.name, 'run documentation')
1314
uses: control-toolbox/CTActions/.github/workflows/documentation.yml@main

.github/workflows/SpellCheck.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ on:
77
jobs:
88
call:
99
uses: control-toolbox/CTActions/.github/workflows/spell-check.yml@main
10+
with:
11+
config-path: '_typos.toml'

_typos.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[default]
2+
locale = "en"
3+
extend-ignore-re = [
4+
"BA",
5+
]
6+
7+
[files]
8+
extend-exclude = [
9+
"*.json",
10+
"*.toml",
11+
"*.svg",
12+
]

docs/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
1616
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
1717
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
1818
Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb"
19+
Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"
1920

2021
[compat]
2122
BenchmarkTools = "1"
@@ -35,4 +36,5 @@ OrdinaryDiffEq = "6"
3536
Plots = "1"
3637
Printf = "1"
3738
Suppressor = "0.2"
39+
Symbolics = "7"
3840
julia = "1.10"

docs/make.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ repo_url = "github.com/control-toolbox/Tutorials.jl"
4848
Draft = false
4949
```
5050
=#
51-
draft = true # Draft mode: if true, @example blocks in markdown are not executed
51+
draft = false # Draft mode: if true, @example blocks in markdown are not executed
5252

5353
# ═══════════════════════════════════════════════════════════════════════════════
5454
# Build documentation
@@ -60,7 +60,10 @@ makedocs(;
6060
format=Documenter.HTML(;
6161
repolink="https://" * repo_url,
6262
prettyurls=false,
63-
size_threshold_ignore=["tutorial-discretisation.md", "tutorial-nlp.md"],
63+
example_size_threshold=1_000_000,
64+
size_threshold_warn=1_000_000,
65+
size_threshold=1_000_000,
66+
# size_threshold_ignore=["tutorial-discretisation.md", "tutorial-nlp.md"],
6467
assets=[
6568
asset("https://control-toolbox.org/assets/css/documentation.css"),
6669
asset("https://control-toolbox.org/assets/js/documentation.js"),
@@ -82,6 +85,7 @@ makedocs(;
8285
"Linear–quadratic regulator" => "tutorial-lqr.md",
8386
"Minimal action" => "tutorial-mam.md",
8487
"Model Predictive Control" => "tutorial-mpc.md",
88+
"Symbolics Mechanics" => "tutorial-symbolics.md",
8589
],
8690
],
8791
plugins=[links],

docs/src/assets/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
1616
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
1717
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
1818
Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb"
19+
Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"
1920

2021
[compat]
2122
BenchmarkTools = "1"
@@ -35,4 +36,5 @@ OrdinaryDiffEq = "6"
3536
Plots = "1"
3637
Printf = "1"
3738
Suppressor = "0.2"
39+
Symbolics = "7"
3840
julia = "1.10"
Lines changed: 206 additions & 0 deletions
Loading

docs/src/tutorial-continuation.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
# [Discrete continuation](@id tutorial-continuation)
22

3-
```@meta
4-
Draft = false
5-
```
6-
73
By using the warm start option, it is easy to implement a basic discrete continuation method, in which a sequence of problems is solved by using each solution as the initial guess for the next problem. This approach typically leads to faster and more reliable convergence than solving each problem with the same initial guess and is particularly useful for problems that require a good initial guess to converge.
84

95
## Continuation on parametric OCP

0 commit comments

Comments
 (0)