Skip to content

Commit db61d81

Browse files
Merge pull request #86 from harmoniqs/fix/diverging-iterates-tol-default
solver(ipopt): bump diverging_iterates_tol default 1e8 → 1e20
2 parents f32c1a0 + 8937a85 commit db61d81

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "DirectTrajOpt"
22
uuid = "c823fa1f-8872-4af5-b810-2b9b72bbbf56"
3-
version = "0.9.3"
3+
version = "0.9.4"
44
authors = ["Aaron Trowbridge <aaron.j.trowbridge@gmail.com> and contributors"]
55

66
[deps]

src/solvers/ipopt_solver/options.jl

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ Base.@kwdef mutable struct IpoptOptions <: Solvers.AbstractSolverOptions
4444
acceptable_constr_viol_tol::Float64 = 1.0e-2
4545
acceptable_compl_inf_tol::Float64 = 1.0e-2
4646
acceptable_obj_change_tol::Float64 = 1.0e-5
47-
diverging_iterates_tol::Float64 = 1.0e8
47+
# Ipopt's default is 1e20; the previous 1e8 fired false-positive "Iterates
48+
# diverging" exits on smooth-pulse NLPs whose unscaled second derivatives
49+
# legitimately reach O(1e8) (e.g. ddu ≈ u_max / Δt² with Δt in ns).
50+
# Until DTO-level variable scaling lands, defer to Ipopt's default.
51+
diverging_iterates_tol::Float64 = 1.0e20
4852
eval_hessian = true
4953
hessian_approximation = eval_hessian ? "exact" : "limited-memory"
5054
hsllib = nothing
@@ -70,3 +74,10 @@ Base.@kwdef mutable struct IpoptOptions <: Solvers.AbstractSolverOptions
7074
watchdog_shortened_iter_trigger = 0
7175
watchdog_trial_iter_max = 3
7276
end
77+
78+
@testitem "IpoptOptions: diverging_iterates_tol default matches Ipopt" begin
79+
using DirectTrajOpt: IpoptSolverExt
80+
# Locks in the bump from 1e8 (false-positive on smooth-pulse NLPs) to Ipopt's
81+
# native default of 1e20. See hopper/dto-variable-scaling for context.
82+
@test IpoptSolverExt.IpoptOptions().diverging_iterates_tol == 1.0e20
83+
end

0 commit comments

Comments
 (0)