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
24 changes: 24 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"default": true,
"MD001": false,
"MD003": { "style": "atx" },
"MD004": { "style": "dash" },
"MD007": { "indent": 4 },
"MD012": false,
"MD013": false,
"MD022": false,
"MD024": false,
"MD025": false,
"MD026": false,
"MD029": { "style": "one_or_ordered" },
"MD030": { "ul_single": 1, "ol_single": 1, "ul_multi": 1, "ol_multi": 1 },
"MD033": false,
"MD034": false,
"MD035": { "style": "---" },
"MD036": false,
"MD040": false,
"MD041": false,
"MD046": false,
"MD049": false,
"MD050": false
}
2 changes: 1 addition & 1 deletion docs/src/assets/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ version = "1.1.2"
deps = ["ADNLPModels", "CTBase", "CTDirect", "CTModels", "DocStringExtensions", "ExaModels", "OrderedCollections", "SolverCore"]
path = "/Users/ocots/Research/logiciels/dev/control-toolbox/OptimalControlProblems"
uuid = "59046045-fb9c-4c23-964f-ff0a25704f96"
version = "1.0.0"
version = "0.3.0"
weakdeps = ["JuMP", "OptimalControl"]

[deps.OptimalControlProblems.extensions]
Expand Down
8 changes: 6 additions & 2 deletions docs/src/dev-add.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ function OptimalControlProblems.new_problem(
::OptimalControlBackend,
description::Symbol...;
grid_size::Int=grid_size_data(:new_problem),
parameters::Union{Nothing, NamedTuple}=nothing,
kwargs...,
)

Expand Down Expand Up @@ -80,7 +81,7 @@ by

!!! warning

The dynamics and the nonlinear constraints must be in scalar form. See the section [Dynamics (coordinatewise)](@ref OptimalControl manual-abstract-dynamics-coord) and the following section for more details.
The dynamics and the nonlinear constraints must be in scalar form. See the section [Dynamics (coordinatewise)](@extref OptimalControl manual-abstract-dynamics-coord) and the following section for more details.

**4.** Define the **JuMP** model of the problem in a file named `new_problem.jl` in the `ext/JuMPModels` directory, following the template:

Expand All @@ -89,7 +90,10 @@ by
Documentation of the method
"""
function OptimalControlProblems.new_problem(
::JuMPBackend, args...; grid_size::Int=grid_size_data(:new_problem), kwargs...
::JuMPBackend, args...;
grid_size::Int=grid_size_data(:new_problem),
parameters::Union{Nothing, NamedTuple}=nothing,
kwargs...
)

# parameters
Expand Down
2 changes: 1 addition & 1 deletion docs/src/tutorial-solve.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ x = state(ocp_sol) # function of time
u = control(ocp_sol) # function of time
p = costate(ocp_sol) # function of time
o = objective(ocp_sol) # scalar objective value
i = iterations(ocp_sol) # number of iteration
i = iterations(ocp_sol) # number of iterations

tf = t[end]
println("tf = ", tf)
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const VERBOSE = true # print or not details during tests
:OptimalControl_s, # convergence tests for OptimalControl models
:init, # comparison between OptimalControl and JuMP: init
# :solution, # comparison between OptimalControl and JuMP: solution
:quick, # quick comparison: objective rel error only
# :quick, # quick comparison: objective rel error only
:parameters, # tests with different parameters values, does no depend on `list_of_problems`
)
@testset "$(name)" verbose=VERBOSE begin
Expand Down
Loading