Skip to content

Commit 2cf647d

Browse files
authored
Merge pull request #163 from control-toolbox/88-dev-adding-models-for-exa
Minor fixes
2 parents 763c3e5 + d237576 commit 2cf647d

File tree

5 files changed

+33
-5
lines changed

5 files changed

+33
-5
lines changed

.markdownlint.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"default": true,
3+
"MD001": false,
4+
"MD003": { "style": "atx" },
5+
"MD004": { "style": "dash" },
6+
"MD007": { "indent": 4 },
7+
"MD012": false,
8+
"MD013": false,
9+
"MD022": false,
10+
"MD024": false,
11+
"MD025": false,
12+
"MD026": false,
13+
"MD029": { "style": "one_or_ordered" },
14+
"MD030": { "ul_single": 1, "ol_single": 1, "ul_multi": 1, "ol_multi": 1 },
15+
"MD033": false,
16+
"MD034": false,
17+
"MD035": { "style": "---" },
18+
"MD036": false,
19+
"MD040": false,
20+
"MD041": false,
21+
"MD046": false,
22+
"MD049": false,
23+
"MD050": false
24+
}

docs/src/assets/Manifest.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1067,7 +1067,7 @@ version = "1.1.2"
10671067
deps = ["ADNLPModels", "CTBase", "CTDirect", "CTModels", "DocStringExtensions", "ExaModels", "OrderedCollections", "SolverCore"]
10681068
path = "/Users/ocots/Research/logiciels/dev/control-toolbox/OptimalControlProblems"
10691069
uuid = "59046045-fb9c-4c23-964f-ff0a25704f96"
1070-
version = "1.0.0"
1070+
version = "0.3.0"
10711071
weakdeps = ["JuMP", "OptimalControl"]
10721072

10731073
[deps.OptimalControlProblems.extensions]

docs/src/dev-add.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ function OptimalControlProblems.new_problem(
3232
::OptimalControlBackend,
3333
description::Symbol...;
3434
grid_size::Int=grid_size_data(:new_problem),
35+
parameters::Union{Nothing, NamedTuple}=nothing,
3536
kwargs...,
3637
)
3738

@@ -80,7 +81,7 @@ by
8081

8182
!!! warning
8283

83-
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.
84+
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.
8485

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

@@ -89,7 +90,10 @@ by
8990
Documentation of the method
9091
"""
9192
function OptimalControlProblems.new_problem(
92-
::JuMPBackend, args...; grid_size::Int=grid_size_data(:new_problem), kwargs...
93+
::JuMPBackend, args...;
94+
grid_size::Int=grid_size_data(:new_problem),
95+
parameters::Union{Nothing, NamedTuple}=nothing,
96+
kwargs...
9397
)
9498

9599
# parameters

docs/src/tutorial-solve.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ x = state(ocp_sol) # function of time
5656
u = control(ocp_sol) # function of time
5757
p = costate(ocp_sol) # function of time
5858
o = objective(ocp_sol) # scalar objective value
59-
i = iterations(ocp_sol) # number of iteration
59+
i = iterations(ocp_sol) # number of iterations
6060
6161
tf = t[end]
6262
println("tf = ", tf)

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const VERBOSE = true # print or not details during tests
5656
:OptimalControl_s, # convergence tests for OptimalControl models
5757
:init, # comparison between OptimalControl and JuMP: init
5858
# :solution, # comparison between OptimalControl and JuMP: solution
59-
:quick, # quick comparison: objective rel error only
59+
# :quick, # quick comparison: objective rel error only
6060
:parameters, # tests with different parameters values, does no depend on `list_of_problems`
6161
)
6262
@testset "$(name)" verbose=VERBOSE begin

0 commit comments

Comments
 (0)