Skip to content

Commit e9d31a9

Browse files
authored
Merge pull request #200 from control-toolbox/compathelper/new_version/2025-09-10-00-05-20-470-03523083598
CompatHelper: bump compat for NLPModelsIpopt to 0.11 for package test, (drop existing compat)
2 parents a5ad899 + 8178dd3 commit e9d31a9

File tree

9 files changed

+14
-14
lines changed

9 files changed

+14
-14
lines changed

src/constraints.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ function __constraint!(
6262
codim_f::Union{Dimension,Nothing}=nothing,
6363
)
6464

65-
# checkings: the constraint must not be set before
65+
# checks: the constraint must not be set before
6666
@ensure(
6767
!(label keys(ocp_constraints)),
6868
CTBase.UnauthorizedCall(
6969
"the constraint named " * String(label) * " already exists."
7070
),
7171
)
7272

73-
# checkings: lb and ub cannot be both nothing
73+
# checks: lb and ub cannot be both nothing
7474
@ensure(
7575
!(isnothing(lb) && isnothing(ub)),
7676
CTBase.UnauthorizedCall(
@@ -217,7 +217,7 @@ function constraint!(
217217
codim_f::Union{Dimension,Nothing}=nothing,
218218
)
219219

220-
# checkings: times, state and control must be set before adding constraints
220+
# checks: times, state and control must be set before adding constraints
221221
@ensure __is_state_set(ocp) CTBase.UnauthorizedCall(
222222
"the state must be set before adding constraints."
223223
)
@@ -228,7 +228,7 @@ function constraint!(
228228
"the times must be set before adding constraints."
229229
)
230230

231-
# checkings: variable must be set if using type=:variable
231+
# checks: variable must be set if using type=:variable
232232
@ensure (type != :variable || __is_variable_set(ocp)) CTBase.UnauthorizedCall(
233233
"the ocp has no variable, you cannot use constraint! function with type=:variable. If it is a mistake, please set the variable first.",
234234
)

src/control.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function control!(
4646
components_names::Vector{T2}=__control_components(m, string(name)),
4747
)::Nothing where {T1<:Union{String,Symbol},T2<:Union{String,Symbol}}
4848

49-
# checkings using @ensure
49+
# checks using @ensure
5050
@ensure !__is_control_set(ocp) CTBase.UnauthorizedCall(
5151
"the control has already been set."
5252
)

src/objective.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function objective!(
3535
lagrange::Union{Function,Nothing}=nothing,
3636
)::Nothing
3737

38-
# checkings: times, state, and control must be set before the objective
38+
# checks: times, state, and control must be set before the objective
3939
@ensure __is_state_set(ocp) CTBase.UnauthorizedCall(
4040
"the state must be set before the objective."
4141
)
@@ -46,12 +46,12 @@ function objective!(
4646
"the times must be set before the objective."
4747
)
4848

49-
# checkings: the objective must not already be set
49+
# checks: the objective must not already be set
5050
@ensure !__is_objective_set(ocp) CTBase.UnauthorizedCall(
5151
"the objective has already been set."
5252
)
5353

54-
# checkings: at least one of the two functions must be given
54+
# checks: at least one of the two functions must be given
5555
@ensure !(isnothing(mayer) && isnothing(lagrange)) CTBase.IncorrectArgument(
5656
"at least one of the two functions must be given. Please provide a Mayer or a Lagrange function.",
5757
)

src/state.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function state!(
6060
components_names::Vector{T2}=__state_components(n, string(name)),
6161
)::Nothing where {T1<:Union{String,Symbol},T2<:Union{String,Symbol}}
6262

63-
# checkings
63+
# checks
6464
@ensure !__is_state_set(ocp) CTBase.UnauthorizedCall("the state has already been set.")
6565
@ensure n > 0 CTBase.IncorrectArgument("the state dimension must be greater than 0")
6666
@ensure size(components_names, 1) == n CTBase.IncorrectArgument(

test/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ CTDirect = "0.17"
1818
CTParser = "0.7"
1919
JLD2 = "0.6"
2020
JSON3 = "1"
21-
NLPModelsIpopt = "0.10"
21+
NLPModelsIpopt = "0.11"
2222
Plots = "1"
2323
Test = "1"
2424
julia = "1.10"

test/test_control.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function test_control()
99
@test CTModels.name(control) == "u"
1010
@test CTModels.components(control) == ["u₁", "u₂"]
1111

12-
# some checkings
12+
# some checks
1313
ocp = CTModels.PreModel()
1414
@test isnothing(ocp.control)
1515
@test !CTModels.__is_control_set(ocp)

test/test_state.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function test_state()
99
@test CTModels.name(state) == "y"
1010
@test CTModels.components(state) == ["u", "v"]
1111

12-
# some checkings
12+
# some checks
1313
ocp = CTModels.PreModel()
1414
@test isnothing(ocp.state)
1515
@test !CTModels.__is_state_set(ocp)

test/test_times.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function test_times()
1515
@test CTModels.name(time) == "s"
1616
@test_throws CTBase.IncorrectArgument CTModels.time(time, Float64[])
1717

18-
# some checkings
18+
# some checks
1919
ocp = CTModels.PreModel()
2020
@test isnothing(ocp.times)
2121
@test !CTModels.__is_times_set(ocp)

test/test_variable.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function test_variable()
99
@test CTModels.name(variable) == "v"
1010
@test CTModels.components(variable) == ["v₁", "v₂"]
1111

12-
# some checkings
12+
# some checks
1313
ocp = CTModels.PreModel()
1414
@test ocp.variable isa CTModels.EmptyVariableModel
1515
@test !CTModels.__is_variable_set(ocp)

0 commit comments

Comments
 (0)