Changelog
All notable Changes to the Julia package AlgorithmsInterface.jl are documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.1.1 (unreleased)
Added
is_active(stopping_criterion, stopping_criterion_state), the machine-readable counterpart ofget_reason, reporting whether a criterion became active during the current run. It defaults to reading the state'sat_iterationand is what the generic convergence reporting is now built on, rather than!isnothing(get_reason(...)).get_active_stopping_criteria, reporting which criteria became active. It recurses through nested combinations, so it separates stopping on a collapsed step size from stopping on an exhausted iteration budget — a distinctionindicates_convergenceis too coarse for.- Convenience two-argument
get_reason(algorithm, state), and likewise foris_active,indicates_convergenceandget_active_stopping_criteria, extracting the criterion and its state the wayis_finishedalready did. StopReasonAction, aLoggingActionthat reportsget_reasonat the:Stopcontext.- Defaults for
get_reason(nothing) and for the type-domainindicates_convergence(false), so a criterion that implements neither no longer hits aMethodErrorfrom the derived convergence reporting. - Exports for
DefaultStoppingCriterionState,StopAfterTimePeriodStateandGroupStoppingCriterionState, which a downstream criterion is expected to reuse.
Changed
indicates_convergencewithout a state moved to the type domain: a new criterion implementsindicates_convergence(::Type{YourCriterion}), andindicates_convergence(criterion)forwards to it.StopWhenAllandStopWhenAnycombine their children in the type domain as well, so a criterion that only implements the variant taking an instance is no longer accounted for in a group.
Fixed
indicates_convergence(::StoppingCriterion, ::StoppingCriterionState)had its condition inverted, claiming convergence exactly when the criterion had not indicated to stop.indicates_convergenceforStopWhenAllandStopWhenAnynow consults the children that actually indicated to stop. Previously aStopWhenAnypairing a convergence criterion with a fallback such asStopAfterIterationcould never report convergence, since the criteria-only variant isall(indicates_convergence, criteria).is_finished!forStopWhenAllandStopWhenAnyshort-circuited, skipping the children after the deciding one. Stateful criteria were starved of the current iterate and theirat_iterationleft unset even when they did indicate to stop; every child is now updated once per iteration.get_reasonforStopWhenAllandStopWhenAnyrendered children that had not indicated to stop as the literal text"nothing", and returned""when no child had a message at all. It now reports only the children that triggered, andnothingwhen there is nothing to report.- The non-mutating
is_finishedforStopWhenAllandStopWhenAnyresetat_iterationat iteration0, contradicting its contract and silently clearing a group's recorded stop. - The non-mutating
is_finishedforStopAfterreported the elapsed time recorded by the lastis_finished!rather than reading the clock, so it could answer "not finished" for a run long past its threshold. get_reasonforStopAfterIterationwas gated onat_iteration >= max_iterationswhile itsBase.summarywas gated onat_iteration >= 0, so the two could disagree.
0.1.0 (2026-05-01)
Initial release.