Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
80e363f
Sketch a fix for show/repr
mateuszbaran Jan 26, 2026
799cce8
delete debug info
mateuszbaran Jan 26, 2026
b418aa3
A bit of code structuring and test the new scheme with GradientDescen…
kellertuer Jan 27, 2026
087481e
intrdoduce multiline (especially for stopping criteria).
kellertuer Jan 28, 2026
91c2ca9
work on further SC repr
kellertuer Jan 29, 2026
7877a2e
further SC
kellertuer Jan 29, 2026
a4116a5
remove a few duplicates.
kellertuer Jan 29, 2026
09c6178
Work on further unifications.
kellertuer Jan 31, 2026
7660b7d
fix test.
kellertuer Jan 31, 2026
b34367b
continuation of the refactor
kellertuer Feb 2, 2026
90c6e67
Refactor ManifoldCountObjective
kellertuer Feb 2, 2026
93bfe0f
Start with the generic part on actions.
kellertuer Feb 3, 2026
afb930f
avoid half-camelCase in struct field
kellertuer Feb 3, 2026
04722d1
Work on the abstract and default problem.
kellertuer Feb 6, 2026
250cb88
Refactor sahow/repr for DefaultManoptProblem and the SimpleCacheObjec…
kellertuer Feb 6, 2026
9df40b3
introduce a default for direction update rules.
kellertuer Feb 6, 2026
77c4d15
refactor all former state-show methods rotingin human readable status…
kellertuer Feb 6, 2026
9effb31
Adapt a few more tests of all the statusses that now moved.
kellertuer Feb 6, 2026
7f2ecbc
Fix typos.
kellertuer Feb 6, 2026
a9e39ec
In small steps: Constrained objective, Constrained Problem Z(and a bi…
kellertuer Feb 9, 2026
342daa1
a small refactor to reduce number of lines.
kellertuer Feb 9, 2026
355eb17
TwoManifoldProblem and PDObjective.
kellertuer Feb 10, 2026
1ce4edc
unify format and replces.
kellertuer Feb 10, 2026
5ed57c5
Refactor inline = true | false to a context = symbol keyword
kellertuer Feb 11, 2026
c07ec8f
Fix a few tests.
kellertuer Feb 11, 2026
cd0316d
fix a few more inlines.
kellertuer Feb 11, 2026
3fb4ba8
Introduce short forms of most stopping criteria and use it in a first…
kellertuer Feb 12, 2026
f038245
adapt CRS and GDS to display the nicer stop in their repr as well.
kellertuer Feb 12, 2026
86f38cf
Merge branch 'master' into mbaran/fix-show-repr
kellertuer Feb 12, 2026
960ff5e
Fix a typo.
kellertuer Feb 12, 2026
554fa08
Fix one test.
kellertuer Feb 12, 2026
b87645d
being more rigorous on :short summaries in stopping criteria
kellertuer Feb 13, 2026
c88825f
Refactor a few more stopping criteria.
kellertuer Feb 13, 2026
7dbadbb
Refactor two further stopping criteria.
kellertuer Feb 15, 2026
2788dfa
Start with a few debugs.
kellertuer Feb 15, 2026
2048d6e
Embedded and Hessian Objective … unify indent.
kellertuer Feb 17, 2026
912ad3b
refactor all methods in plans/debug.jl
kellertuer Feb 18, 2026
b5504e2
Finish all debugs that are currently in the plan/debug.jl file and ad…
kellertuer Feb 18, 2026
7441276
rename a variable.
kellertuer Feb 18, 2026
6646341
Fix two further objectives and fix a few tests.
kellertuer Feb 22, 2026
4bacb0b
Merge branch 'master' into mbaran/fix-show-repr
kellertuer Feb 22, 2026
c58d6f6
Refactor IPNewton state construcor.
kellertuer Feb 23, 2026
d347296
Refactor code slightly.
kellertuer Feb 23, 2026
d87b771
typos.
kellertuer Feb 23, 2026
642d2b2
Fix another typo in the docs.
kellertuer Feb 23, 2026
3867614
Work through all KKT related IPNewton show/status_summaries
kellertuer Feb 24, 2026
f50a3ee
Continue work on proximal objective.
kellertuer Feb 24, 2026
59d915e
Sync tests and current code state.
kellertuer Feb 24, 2026
9d6ffd9
Fix two more objectives, remove a default.
kellertuer Feb 27, 2026
68e5a4d
Fix the SimpleCachObjective and verify that ManifoldCostObjective is …
kellertuer Mar 3, 2026
f13f769
Unify print and extract a function for indentation (both in character…
kellertuer Mar 4, 2026
a9457b9
A status summary a day...
kellertuer Mar 6, 2026
9292903
show & status_summary gor the trust region subproblem objective.
kellertuer Mar 6, 2026
efba615
Merge branch 'master' into mbaran/fix-show-repr
kellertuer Mar 6, 2026
baca975
status_summary & Base.sow for the alternating gradient descent objective
kellertuer Mar 12, 2026
73377e6
Finish the DC objectives.
kellertuer Mar 12, 2026
047739f
Rename NonlinearLeastSquaresObjective to ManifoldNonlinearLeastSquare…
kellertuer Mar 13, 2026
d43fcfb
show/repr for the manifold nonlin lsq.
kellertuer Mar 13, 2026
5e2fd10
Improve display for VGF.
kellertuer Mar 13, 2026
18524cf
Finish the last objective \o/
kellertuer Mar 13, 2026
d5da0a3
Fix `typos`
kellertuer Mar 13, 2026
1dbf04b
add another state.
kellertuer Mar 15, 2026
6352c93
Unify State status summary and continue with two more show methods.
kellertuer Mar 16, 2026
1b887af
Fix typos.
kellertuer Mar 16, 2026
5288d73
Refactor 3 more states.
kellertuer Mar 17, 2026
d50ad02
Transfer QNState, reduce line breaks in show for stepsizes
kellertuer Mar 17, 2026
8e7b038
Fix tests.
kellertuer Mar 17, 2026
fb17e6c
adapt StochasticGradientDescentState
kellertuer Mar 19, 2026
540d703
Adapt ARCState
kellertuer Mar 19, 2026
1ed6856
After an hour of debugging: Soimething still wrong with the new const…
kellertuer Mar 23, 2026
acc6dd8
partially fix the new convex bundle constructor
mateuszbaran Mar 23, 2026
6dc27a2
slightly tighter bound
mateuszbaran Mar 23, 2026
4697a56
unify real type coirrectly for CBM state,
kellertuer Mar 26, 2026
b3708eb
adapt CPPS
kellertuer Mar 26, 2026
51b2d33
Refactor DRState and LanczosState
kellertuer Mar 26, 2026
c4949b3
Merge branch 'master' into mbaran/fix-show-repr
kellertuer Mar 26, 2026
d4c077b
Fix an ambiguity and extend readme.
kellertuer Mar 26, 2026
0a3db03
Finish both Difference of Convex States and the AffineCovariantStepsize.
kellertuer Mar 26, 2026
491e7e6
Refactor EMP State
kellertuer Mar 27, 2026
8974bca
Finish two further small states.
kellertuer Mar 27, 2026
dcd213d
fix a small bug.
kellertuer Mar 27, 2026
a765107
Adapt the Trust RegionsState, start with MADS.
kellertuer Mar 28, 2026
9213863
Fix a few typos.
kellertuer Mar 28, 2026
d17d03b
adapt MADS
kellertuer Mar 30, 2026
b96d95d
Adapt Nelder Mead
kellertuer Mar 30, 2026
2e7741e
Adapt Particle Swarm state.
kellertuer Mar 30, 2026
5db304d
Finish more states.
kellertuer Mar 30, 2026
10d3de1
Finish the last state.
kellertuer Mar 30, 2026
178fd91
prepare for nicer printing of direction and finish the Average one.
kellertuer Mar 30, 2026
4e7e307
Fix a few typos.
kellertuer Mar 30, 2026
1efa5a2
Fix another small bug.
kellertuer Mar 30, 2026
cde916d
Fix the tutorial on how to implement a solver and expandf the explana…
kellertuer Mar 30, 2026
7655475
Check a first few further debugs.
kellertuer Mar 30, 2026
8e1790c
Unify all DebugActions.
kellertuer Mar 31, 2026
53dd9d9
Start working on RecordActions status_summary
kellertuer Apr 2, 2026
9dce89f
Finish further Record Actions
kellertuer Apr 2, 2026
737ce28
Finish RecordAction refactor and aløready add a bit of testing,
kellertuer Apr 2, 2026
66bfff5
Finish Momentum and Nesterov.
kellertuer Apr 2, 2026
7bd3109
Finish the last gradient processors.
kellertuer Apr 3, 2026
430546f
Unify stopping criterion and stepsize prints
kellertuer Apr 3, 2026
14294ce
finish the first stepsize.
kellertuer Apr 3, 2026
39a89b1
Refactor Armijo
kellertuer Apr 3, 2026
6509360
Refactor DecreasingStepsize
kellertuer Apr 3, 2026
743c3ee
Fix a few minor bugs to get tests back up running
kellertuer Apr 3, 2026
53d0b6d
Finish WNGrad, DistanceOverGradients and Polyak step size.
kellertuer Apr 3, 2026
6f7b796
finish the remaining status summaries.
kellertuer Apr 4, 2026
42919cb
Codecov ++
kellertuer Apr 6, 2026
d5762c6
Codecov ++
kellertuer Apr 6, 2026
50eb48a
Codecov ++
kellertuer Apr 6, 2026
c9d623d
Fix a typo.
kellertuer Apr 6, 2026
da5349e
StoppingCriteria / codecov ++
kellertuer Apr 6, 2026
b15fc42
Debug / Codecov++
kellertuer Apr 6, 2026
7182d81
Constrained Objectives / Codecov ++
kellertuer Apr 6, 2026
5b9a28b
Merge branch 'master' into mbaran/fix-show-repr
kellertuer Apr 6, 2026
09dc5ca
Codecov ++
kellertuer Apr 6, 2026
d84b19c
fix a typo.
kellertuer Apr 6, 2026
f05d2eb
Fix two typos.
kellertuer Apr 6, 2026
73e9a6d
plan / codecov ++
kellertuer Apr 6, 2026
dad7df2
Fix logic for empty sets and fast any.
kellertuer Apr 6, 2026
04bdc09
plan / state / codecov++
kellertuer Apr 6, 2026
6fcdf99
plan / codecov ++
kellertuer Apr 7, 2026
d718170
solvers / codecov++
kellertuer Apr 7, 2026
cf0d2d0
solvers / codecov ++
kellertuer Apr 7, 2026
a908781
Merge branch 'master' into mbaran/fix-show-repr
kellertuer Apr 7, 2026
3438a63
solvers / codecov ++
kellertuer Apr 7, 2026
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
17 changes: 16 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,25 @@ The file was started with Version `0.4`.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.5.35] April 3, 2026
## [0.6.0] unreleased

### Changed

This is a breaking release in order to move a few parts to a unified naming and since weæ
discontinue the `JuMP` extension. It will at some point return as a separate package, see (#532)
for the last of the discussions around that.

### Fixed

* Fixed `show` methods of various state and stopping criteria to properly handle both `repr` and multiline printing (#569)
* Unified all `show` methods and their human readable analoga `status_summary` throughout the package (#569)
* Fixed some text descriptions of a few stopping criteria.
* unify naming of fields, `debugDictionary` of the debug state is now called `debug_dictionary`
* the `NesterovRule` now also stores an actual `AbstractRetractionMethod` instead of implicitly always using the default one.

### Changes

* `NonlinearLeastSquaresObjective` is now called `ManifoldNonlinearLeastSquaresObjective` (#569).
* Improved formatting of the references in the Readme.md (#586)
* Bump compat for RecursiveArrayTools.jl to include version 4
* deactivate CompatHelper Action and solely use dependabot
Expand Down
2 changes: 1 addition & 1 deletion _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ methodes = "methodes" # french
Serie = "Serie" # french
sur = "sur" # french
cmo = "cmo" # often used abbreviation for constrained manifold objective

nd = "nd" # like in 2nd
[files]
extend-exclude = [
"tutorials/*.html",
Expand Down
2 changes: 1 addition & 1 deletion docs/src/plans/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The following symbols are used.
| `:Activity` | [`DebugWhenActive`](@ref) | activity of the debug action stored within |
| `:Basepoint` | [`TangentSpace`](@extref ManifoldsBase `ManifoldsBase.TangentSpace`) | the point the tangent space is at |
| `:Cost` | generic |the cost function (within an objective, as pass down) |
| `:Debug` | [`DebugSolverState`](@ref) | the stored `debugDictionary` |
| `:Debug` | [`DebugSolverState`](@ref) | the stored `debug_dictionary` |
| `:Gradient` | generic | the gradient function (within an objective, as pass down) |
| `:Iterate` | generic | the (current) iterate, similar to [`set_iterate!`](@ref), within a state |
| `:Manifold` | generic |the manifold (within a problem, as pass down) |
Expand Down
2 changes: 1 addition & 1 deletion docs/src/plans/objective.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ AbstractManifoldFirstOrderObjective
ManifoldFirstOrderObjective
ManifoldAlternatingGradientObjective
ManifoldStochasticGradientObjective
NonlinearLeastSquaresObjective
ManifoldNonlinearLeastSquaresObjective
```

While the [`ManifoldFirstOrderObjective`](@ref) allows to provide different
Expand Down
8 changes: 6 additions & 2 deletions src/Manopt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"""
module Manopt

# When indenting something in print, use two spaces (or maybe \t later?)
_MANOPT_INDENT = " "

import Base: &, copy, getindex, identity, length, setindex!, show, |
import LinearAlgebra: reflect!
import ManifoldsBase: embed!, plot_slope, prepare_check_result, find_best_slope_window
Expand Down Expand Up @@ -286,7 +289,7 @@ export AbstractDecoratedManifoldObjective,
EmbeddedManifoldObjective,
ScaledManifoldObjective,
ManifoldCountObjective,
NonlinearLeastSquaresObjective,
ManifoldNonlinearLeastSquaresObjective,
ManifoldAlternatingGradientObjective,
ManifoldCostGradientObjective,
ManifoldCostObjective,
Expand Down Expand Up @@ -341,6 +344,7 @@ export AbstractGradientSolverState,
ProjectedGradientMethodState,
ProximalBundleMethodState,
ProximalGradientMethodState,
ProximalPointState,
RecordSolverState,
StepsizeState,
StochasticGradientDescentState,
Expand Down Expand Up @@ -595,7 +599,7 @@ export render_asymptote
#
# Debugs
export DebugSolverState, DebugAction, DebugGroup, DebugEntry, DebugEntryChange, DebugEvery
export DebugChange, DebugGradientChange
export DebugCallback, DebugChange, DebugGradientChange
export DebugIterate, DebugIteration, DebugDivider, DebugTime
export DebugFeasibility
export DebugCost, DebugStoppingCriterion
Expand Down
35 changes: 21 additions & 14 deletions src/helpers/LineSearchesTypes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ Wrapper for line searches available in the `LineSearches.jl` library.

LineSearchesStepsize(M::AbstractManifold, linesearch; kwargs...
LineSearchesStepsize(
linesearch;
retraction_method=ExponentialRetraction(),
vector_transport_method=ParallelTransport(),
linesearch; retraction_method=ExponentialRetraction(), vector_transport_method=ParallelTransport(),
)

Wrap `linesearch` (for example [`HagerZhang`](https://julianlsolvers.github.io/LineSearches.jl/latest/reference/linesearch.html#LineSearches.HagerZhang)
Expand All @@ -34,9 +32,7 @@ function LineSearchesStepsize(
linesearch;
initial_guess::AbstractInitialLinesearchGuess = ConstantInitialGuess(),
retraction_method::AbstractRetractionMethod = default_retraction_method(M),
vector_transport_method::AbstractVectorTransportMethod = default_vector_transport_method(
M
),
vector_transport_method::AbstractVectorTransportMethod = default_vector_transport_method(M),
last_stepsize::Real = NaN,
)
return LineSearchesStepsize(
Expand All @@ -49,21 +45,32 @@ function LineSearchesStepsize(
end
function LineSearchesStepsize(
linesearch;
initial_guess::AbstractInitialLinesearchGuess = ConstantInitialGuess(),
retraction_method::AbstractRetractionMethod = ExponentialRetraction(),
vector_transport_method::AbstractVectorTransportMethod = ParallelTransport(),
initial_guess::ILG = ConstantInitialGuess(),
retraction_method::RM = ExponentialRetraction(),
vector_transport_method::VTM = ParallelTransport(),
last_stepsize::Real = NaN,
)
return LineSearchesStepsize{
typeof(linesearch), typeof(initial_guess), typeof(retraction_method), typeof(vector_transport_method), typeof(last_stepsize),
}(
) where {ILG <: AbstractInitialLinesearchGuess, RM <: AbstractRetractionMethod, VTM <: AbstractVectorTransportMethod}
return LineSearchesStepsize{typeof(linesearch), ILG, RM, VTM, typeof(last_stepsize)}(
linesearch, initial_guess, retraction_method, vector_transport_method, last_stepsize
)
end

function Base.show(io::IO, cs::LineSearchesStepsize)
return print(
io,
"LineSearchesStepsize($(cs.linesearch); initial_guess=$(cs.initial_guess), retraction_method=$(cs.retraction_method), vector_transport_method=$(cs.vector_transport_method), last_stepsize=$(cs.last_stepsize))",
)
end
function status_summary(cs::LineSearchesStepsize; context::Symbol = :default)
(context === :short) && return repr(cs)
(context === :inline) && return "A linesearch stepsize wrapper for LineSearches.jl (last step size $(cs.last_stepsize))"
return """
A step size wrapper for LineSearches.jl
(last step size: $(cs.last_stepsize))

## Parameters
* line search: $(_MANOPT_INDENT)$(cs.linesearch)
* initial guess: $(_MANOPT_INDENT)$(cs.initial_guess)
* retraction method: $(_MANOPT_INDENT)$(cs.retraction_method)
* vector transport method:$(_MANOPT_INDENT)$(cs.vector_transport_method)
"""
end
25 changes: 20 additions & 5 deletions src/helpers/test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,28 @@ using ManifoldDiff
# Dummy types
struct DummyManifold <: AbstractManifold{ManifoldsBase.ℝ} end

struct DummyDecoratedObjective{E, O <: AbstractManifoldObjective} <:
Manopt.AbstractDecoratedManifoldObjective{E, O}
struct DummyDecoratedObjective{E, O <: AbstractManifoldObjective} <: Manopt.AbstractDecoratedManifoldObjective{E, O}
objective::O
end
function DummyDecoratedObjective(
o::O
) where {E <: AbstractEvaluationType, O <: AbstractManifoldObjective{E}}
function DummyDecoratedObjective(o::O) where {E <: AbstractEvaluationType, O <: AbstractManifoldObjective{E}}
return DummyDecoratedObjective{E, O}(o)
end
function Manopt.status_summary(
ddo::DummyDecoratedObjective; kwargs...
)
return "A dummy decorator for " * Manopt.status_summary(ddo.objective; kwargs...)
end
function Base.show(io::IO, ddo::DummyDecoratedObjective)
print(io, "DummyDecoratedObjective(")
print(io, ddo.objective)
return print(io, ")")
end
struct DummyEmptyDecoratedObjective{E, O <: AbstractManifoldObjective} <: Manopt.AbstractDecoratedManifoldObjective{E, O}
objective::O
function DummyEmptyDecoratedObjective(o::O) where {E <: AbstractEvaluationType, O <: AbstractManifoldObjective{E}}
return new{E, O}(o)
end
end

struct DummyProblem{M <: AbstractManifold} <: AbstractManoptProblem{M} end
struct DummyStoppingCriteriaSet <: StoppingCriterionSet end
Expand All @@ -43,6 +56,8 @@ mutable struct DummyState <: AbstractManoptSolverState
storage::Vector{Float64}
end
DummyState() = DummyState([])
Manopt.status_summary(ds::DummyState; context = :Default) = "A Manopt Test state with storage $(ds.storage)"
Base.show(io::IO, ds::DummyState) = print(io, "Manopt.Test.DummyState($(ds.storage))")
Manopt.get_iterate(::DummyState) = NaN
Manopt.set_parameter!(s::DummyState, ::Val, v) = s
Manopt.set_parameter!(s::DummyState, ::Val{:StoppingCriterion}, v) = s
Expand Down
18 changes: 18 additions & 0 deletions src/plans/adaptive_regularization_with_cubics_plan.jl
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,21 @@ end
function get_gradient_function(arcmo::AdaptiveRegularizationWithCubicsModelObjective)
return (TpM, X) -> get_gradient(TpM, arcmo, X)
end
function Base.show(io::IO, arcmo::AdaptiveRegularizationWithCubicsModelObjective)
print(io, "AdaptiveRegularizationWithCubicsModelObjective(")
print(io, arcmo.objective); print(io, ", ")
print(io, arcmo.σ)
return print(io, ")")
end
function status_summary(arcmo::AdaptiveRegularizationWithCubicsModelObjective; context::Symbol = :default)
(context === :short) && return repr(arcmo)
(context === :inline) && return "The (tangent space) model for the adaptive regularization with cubics sub problem with parameter σ=$(arcmo.σ) for the objective $(status_summary(arcmo.objective; context = context))"
return """
The cubic polynomial based model for the sub problem of the Adaptive Regularization with cubics solver

## Regularization parameter
σ = $(arcmo.σ)

## Objective
$(_in_str(status_summary(arcmo.objective)))"""
end
17 changes: 17 additions & 0 deletions src/plans/alternating_gradient_plan.jl
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,20 @@ function get_gradient!(
mago.gradient!![k](M, X, p)
return X
end

function Base.show(io::IO, mago::ManifoldAlternatingGradientObjective{E}) where {E}
print(io, "ManifoldAlternatingGradientObjective(")
print(io, mago.cost); print(io, ", "); print(io, mago.gradient!!); print(io, "; ")
print(io, _to_kw(E))
return print(io, ")")
end
function status_summary(mago::ManifoldAlternatingGradientObjective; context::Symbol = :default)
(context === :short) && (return repr(mago))
(context === :inline) && (return "An alternating gradient objective on a manifold.")
return """
An alternating gradient objective providing the gradient as components with which to alternate

## Functions
* cost: $(_MANOPT_INDENT)$(mago.cost)
* gradient:$(_MANOPT_INDENT)$(mago.gradient!!)"""
end
16 changes: 11 additions & 5 deletions src/plans/bundle_plan.jl
Original file line number Diff line number Diff line change
Expand Up @@ -140,20 +140,20 @@ function get_reason(sc::StopWhenLagrangeMultiplierLess)
return ""
end

function status_summary(sc::StopWhenLagrangeMultiplierLess)
function status_summary(sc::StopWhenLagrangeMultiplierLess; context::Symbol = :default)
s = (sc.at_iteration >= 0) ? "reached" : "not reached"
msg = "Lagrange multipliers"
isnothing(sc.names) && (msg *= " with tolerances $(sc.tolerances)")
if !isnothing(sc.names)
msg *= join(["$si < $bi" for (si, bi) in zip(sc.names, sc.tolerances)], ", ")
end
return "$(msg) :\t$(s)"
return (_is_inline(context) ? "" : "A stopping criterion to stop when the Lagrange multipliers are less than $(sc.tolerances).\n$(_MANOPT_INDENT)") * "$(msg):$(_MANOPT_INDENT)$(s)"
end
function show(io::IO, sc::StopWhenLagrangeMultiplierLess)
n = isnothing(sc.names) ? "" : ", $(names)"
return print(
io,
"StopWhenLagrangeMultiplierLess($(sc.tolerances); mode=:$(sc.mode)$n)\n $(status_summary(sc))",
"StopWhenLagrangeMultiplierLess($(sc.tolerances); mode=:$(sc.mode)$n)",
)
end

Expand Down Expand Up @@ -181,6 +181,12 @@ mutable struct DebugWarnIfLagrangeMultiplierIncreases <: DebugAction
return new(warn, Float64(Inf), tol)
end
end
function show(io::IO, di::DebugWarnIfLagrangeMultiplierIncreases)
return print(io, "DebugWarnIfLagrangeMultiplierIncreases(; tol=\"$(di.tol)\")")
function show(io::IO, d::DebugWarnIfLagrangeMultiplierIncreases)
m = (d.status === :No ? "" : ":$(d.status)")
return print(io, "DebugWarnIfLagrangeMultiplierIncreases($(m); tol=\"$(d.tol)\")")
end
function status_summary(d::DebugWarnIfLagrangeMultiplierIncreases; context::Symbol = :default)
(context === :short) && return repr(d)
m = (d.status === :Once) ? "once" : (d.status === :No ? "(inactive)" : "")
return "a DebugAction warning if the lagange multiplier increases in an iteration $m."
end
Loading
Loading