Skip to content

305 solve documentation #580

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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** |
:-------------------|:------------------|
Expand Down
5 changes: 3 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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" => [
Expand All @@ -163,4 +164,4 @@ makedocs(;
plugins=[links],
)

deploydocs(; repo=repo_url * ".git", devbranch="main")
deploydocs(; repo = repo_url * ".git", devbranch = "main", push_preview = true)
2 changes: 1 addition & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/src/manual-abstract.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
13 changes: 13 additions & 0 deletions docs/src/manual-solve-gpu.md
Original file line number Diff line number Diff line change
@@ -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
Loading