From d521c00a58f36f4d12f608c68c5ecca3bfc9244b Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Caillau Date: Sat, 5 Jul 2025 20:31:05 +0200 Subject: [PATCH 1/4] first commit --- docs/src/manual-abstract.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/manual-abstract.md b/docs/src/manual-abstract.md index 19a473fd..2ab6d2fa 100644 --- a/docs/src/manual-abstract.md +++ b/docs/src/manual-abstract.md @@ -4,7 +4,7 @@ The full grammar of [OptimalControl.jl](https://control-toolbox.org/OptimalContr - pure Julia (and, as such, effortlessly analysed by the standard Julia parser), - as close as possible to the mathematical description of an optimal control problem. -While the syntax will be transparent to those users familiar with Julia expressions (`Expr`'s), we provide examples for every case that should be widely understandable. We rely heavily on [MLStyle.jl](https://thautwarm.github.io/MLStyle.jl) and its pattern matching abilities 👍🏽 for the semantic pass. Abstract definitions use the macro [`@def`](@ref). +While the syntax will be transparent to those users familiar with Julia expressions (`Expr`'s), we provide examples for every case that should be widely understandable. We rely heavily on [MLStyle.jl](https://thautwarm.github.io/MLStyle.jl) and its pattern matching abilities 👍🏽 both for the syntactic and semantic pass. Abstract definitions use the macro [`@def`](@ref). ## [Variable](@id manual-abstract-variable) From cf20bdacad619d47820b3c0153135f995e4a3458 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Caillau Date: Sat, 5 Jul 2025 20:55:45 +0200 Subject: [PATCH 2/4] added solve on gpu section --- README.md | 2 +- docs/make.jl | 3 ++- docs/src/index.md | 2 +- docs/src/manual-solve-gpu.md | 13 +++++++++++++ 4 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 docs/src/manual-solve-gpu.md diff --git a/README.md b/README.md index 665e3914..feafa9f6 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ [downloads-total-url]: https://juliapkgstats.com/pkg/OptimalControl The OptimalControl.jl package is the root package of the [control-toolbox ecosystem](https://github.com/control-toolbox). -The control-toolbox ecosystem gathers Julia packages for mathematical control and applications. It aims to provide tools to model and solve optimal control problems with ordinary differential equations by direct and indirect methods. +The control-toolbox ecosystem gathers Julia packages for mathematical control and applications. It aims to provide tools to model and solve optimal control problems with ordinary differential equations by direct and indirect methods, both on CPU and GPU. | **Name** | **Badge** | :-------------------|:------------------| diff --git a/docs/make.jl b/docs/make.jl index d5dc2962..fe101b66 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -111,7 +111,7 @@ cp("./docs/Project.toml", "./docs/src/assets/Project.toml"; force=true) repo_url = "github.com/control-toolbox/OptimalControl.jl" makedocs(; - draft=false, # if draft is true, then the julia code from .md is not executed + draft=true, # if draft is true, then the julia code from .md is not executed # to disable the draft mode in a specific markdown file, use the following: # ```@meta # Draft = false @@ -138,6 +138,7 @@ makedocs(; "Problem characteristics" => "manual-model.md", "Set an initial guess" => "manual-initial-guess.md", "Solve a problem" => "manual-solve.md", + "Solve on GPU" => "manual-solve-gpu.md", "Solution characteristics" => "manual-solution.md", "Plot a solution" => "manual-plot.md", "Compute flows" => [ diff --git a/docs/src/index.md b/docs/src/index.md index 962b7613..1b59d22f 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -1,6 +1,6 @@ # OptimalControl.jl -The OptimalControl.jl package is the root package of the [control-toolbox ecosystem](https://github.com/control-toolbox). The control-toolbox ecosystem gathers Julia packages for mathematical control and applications. It aims to provide tools to model and solve optimal control problems with ordinary differential equations by direct and indirect methods. +The OptimalControl.jl package is the root package of the [control-toolbox ecosystem](https://github.com/control-toolbox). The control-toolbox ecosystem gathers Julia packages for mathematical control and applications. It aims to provide tools to model and solve optimal control problems with ordinary differential equations by direct and indirect methods, both on CPU and GPU. ## Installation diff --git a/docs/src/manual-solve-gpu.md b/docs/src/manual-solve-gpu.md new file mode 100644 index 00000000..95f93a5d --- /dev/null +++ b/docs/src/manual-solve-gpu.md @@ -0,0 +1,13 @@ +# [Solve on GPU](@id manual-solve) + +```@meta +CollapsedDocStrings = false +``` + +In this manual, we explain how to use the [`solve`](@ref) function from [OptimalControl.jl](https://control-toolbox.org/OptimalControl.jl) on GPU. We rely on [MadNLP](https://github.com/MadNLP/MadNLP.jl) and currently only provide support for NVIDIA thanks to [CUDA.jl](https://github.com/JuliaGPU/CUDA.jl). + +```@docs; canonical=false +solve(::CTModels.Model, ::Symbol...) +``` + +TBC \ No newline at end of file From 45a685faa71c206921c7498f1edf35de16990296 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Caillau Date: Sat, 5 Jul 2025 21:19:26 +0200 Subject: [PATCH 3/4] added push preview in deploydocs --- docs/make.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/make.jl b/docs/make.jl index fe101b66..d0230e35 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -164,4 +164,4 @@ makedocs(; plugins=[links], ) -deploydocs(; repo=repo_url * ".git", devbranch="main") +deploydocs(; repo = repo_url * ".git", devbranch = "main", push_preview = true) From a351e48da38cbd664e4e6aa952a7836861d831b1 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Caillau Date: Fri, 11 Jul 2025 18:32:52 +0200 Subject: [PATCH 4/4] Update manual-solve-gpu.md --- docs/src/manual-solve-gpu.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/manual-solve-gpu.md b/docs/src/manual-solve-gpu.md index 95f93a5d..456a3db1 100644 --- a/docs/src/manual-solve-gpu.md +++ b/docs/src/manual-solve-gpu.md @@ -1,4 +1,4 @@ -# [Solve on GPU](@id manual-solve) +# [Solve on GPU](@id manual-solve-gpu) ```@meta CollapsedDocStrings = false @@ -10,4 +10,4 @@ In this manual, we explain how to use the [`solve`](@ref) function from [Optimal solve(::CTModels.Model, ::Symbol...) ``` -TBC \ No newline at end of file +TBC