Skip to content
Merged
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
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "OptimalControl"
uuid = "5f98b655-cc9a-415a-b60e-744165666948"
authors = ["Olivier Cots <olivier.cots@toulouse-inp.fr>"]
version = "1.1.1"
version = "1.1.2"

[deps]
ADNLPModels = "54578032-b7ea-4c30-94aa-7cbd1cce6c9a"
Expand All @@ -17,10 +17,10 @@ ExaModels = "1037b233-b668-4ce9-9b63-f9f681f55dd2"
[compat]
ADNLPModels = "0.8"
CTBase = "0.16"
CTDirect = "0.16"
CTDirect = "0.17"
CTFlows = "0.8"
CTModels = "0.6"
CTParser = "0.6"
CTParser = "0.7"
CommonSolve = "0.2"
DocStringExtensions = "0.9"
ExaModels = "0.9"
Expand Down
4 changes: 3 additions & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ JSON3 = "0f8b85d8-7281-11e9-16c2-39a750bddbf1"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MINPACK = "4854310b-de5a-5eb6-a2a5-c1dee2bd17f9"
MadNLP = "2621e9c9-9eb4-46b1-8089-e8c72242dfb6"
MadNLPMumps = "3b83494e-c0a4-4895-918b-9157a7a085a1"
NLPModelsIpopt = "f4238b75-b362-5c4c-b852-0801c9a21d71"
NLPModelsKnitro = "bec4dd0d-7755-52d5-9a02-22f0ffc7efcb"
NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
Expand All @@ -28,7 +29,7 @@ Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb"
[compat]
ADNLPModels = "0.8"
CTBase = "0.16"
CTDirect = "0.16"
CTDirect = "0.17"
CTFlows = "0.8"
CTModels = "0.6"
CTParser = "0.6"
Expand All @@ -45,6 +46,7 @@ JSON3 = "1"
LinearAlgebra = "1"
MINPACK = "1"
MadNLP = "0.8"
MadNLPMumps = "0.5"
NLPModelsIpopt = "0.10"
NLPModelsKnitro = "0.9"
NonlinearSolve = "4"
Expand Down
1 change: 1 addition & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ using ADNLPModels
using ExaModels
using NLPModelsIpopt
using MadNLP
using MadNLPMumps
using JSON3
using JLD2
using NLPModelsKnitro
Expand Down
3 changes: 2 additions & 1 deletion docs/src/api-optimalcontrol-user.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,10 @@ iterations
lagrange
mayer
message
model
nlp_model
objective(::Model)
objective(::Solution)
ocp_model
plot(::Solution, ::Symbol...)
plot!(::Plots.Plot, ::Solution, ::Symbol...)
set_initial_guess
Expand Down
141 changes: 70 additions & 71 deletions docs/src/assets/Manifest.toml

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion docs/src/assets/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ JSON3 = "0f8b85d8-7281-11e9-16c2-39a750bddbf1"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MINPACK = "4854310b-de5a-5eb6-a2a5-c1dee2bd17f9"
MadNLP = "2621e9c9-9eb4-46b1-8089-e8c72242dfb6"
MadNLPMumps = "3b83494e-c0a4-4895-918b-9157a7a085a1"
NLPModelsIpopt = "f4238b75-b362-5c4c-b852-0801c9a21d71"
NLPModelsKnitro = "bec4dd0d-7755-52d5-9a02-22f0ffc7efcb"
NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
Expand All @@ -29,7 +30,7 @@ Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb"
[compat]
ADNLPModels = "0.8"
CTBase = "0.16"
CTDirect = "0.16"
CTDirect = "0.17"
CTFlows = "0.8"
CTModels = "0.6"
CTParser = "0.6"
Expand All @@ -46,6 +47,7 @@ JSON3 = "1"
LinearAlgebra = "1"
MINPACK = "1"
MadNLP = "0.8"
MadNLPMumps = "0.5"
NLPModelsIpopt = "0.10"
NLPModelsKnitro = "0.9"
NonlinearSolve = "4"
Expand Down
4 changes: 2 additions & 2 deletions docs/src/manual-solve.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ ocp = @def begin
0.5∫( u(t)^2 ) → min
end

solve(ocp, :exa, :madnlp)
solve(ocp, :exa, :madnlp; disc_method=:trapeze)
nothing # hide
```

Expand All @@ -133,7 +133,7 @@ The main options for the direct method, with their [default] values, are:
More precisely, if `N = grid_size` and the initial and final times are `t0` and `tf`, then the step length `Δt = (tf - t0) / N`.
- `time_grid` ([`nothing`]): explicit time grid (can be non-uniform).
If `time_grid = nothing`, a uniform grid of length `grid_size` is used.
- `disc_method` ([`:trapeze`], `:midpoint`, `:euler`, `:euler_implicit`, `:gauss_legendre_2`, `:gauss_legendre_3`): the discretisation scheme to transform the dynamics into nonlinear equations. See the [discretization method tutorial](https://control-toolbox.org/Tutorials.jl/stable/tutorial-discretisation.html) for more details.
- `disc_method` (`:trapeze`, [`:midpoint`], `:euler`, `:euler_implicit`, `:gauss_legendre_2`, `:gauss_legendre_3`): the discretisation scheme to transform the dynamics into nonlinear equations. See the [discretization method tutorial](https://control-toolbox.org/Tutorials.jl/stable/tutorial-discretisation.html) for more details.
- `adnlp_backend` ([`:optimized`], `:manual`, `:default`): backend used for automatic differentiation to create the [`ADNLPModels.ADNLPModel`](@extref).

For advanced usage, see:
Expand Down
4 changes: 2 additions & 2 deletions src/OptimalControl.jl
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ export constraints,

# CTDirect
import CTDirect:
CTDirect, direct_transcription, set_initial_guess, build_OCP_solution, model
export direct_transcription, set_initial_guess, build_OCP_solution, model
CTDirect, direct_transcription, set_initial_guess, build_OCP_solution, nlp_model, ocp_model
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @ocots

export direct_transcription, set_initial_guess, build_OCP_solution, nlp_model, ocp_model

# CTFlows
import CTFlows:
Expand Down
2 changes: 2 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MINPACK = "4854310b-de5a-5eb6-a2a5-c1dee2bd17f9"
MadNLP = "2621e9c9-9eb4-46b1-8089-e8c72242dfb6"
MadNLPMumps = "3b83494e-c0a4-4895-918b-9157a7a085a1"
NLPModelsIpopt = "f4238b75-b362-5c4c-b852-0801c9a21d71"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
SplitApplyCombine = "03a91e81-4c3e-53e1-a0a4-9c0c8f19dd66"
Expand All @@ -17,6 +18,7 @@ ForwardDiff = "0.10, 1.0"
LinearAlgebra = "1"
MINPACK = "1"
MadNLP = "0.8"
MadNLPMumps = "0.5"
NLPModelsIpopt = "0.10"
OrdinaryDiffEq = "6"
SplitApplyCombine = "1"
Expand Down
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ using Test
using OptimalControl
using NLPModelsIpopt
using MadNLP
using MadNLPMumps
using LinearAlgebra
using OrdinaryDiffEq
using MINPACK
Expand Down
Loading