Skip to content

Non-exclusive termination codes #1220

@devmotion

Description

@devmotion

I think the current design of termination codes is a bit unfortunate as it does not allow multiple termination codes to be active at the same time. While it is not too unlikely, that at convergence (or when optimization is aborted) multiple criteria (gradient norm, relative/absolute tolerances etc. or e.g. non-finite function value, non-finite gradient and non-finite Hessian) are satisfied, this is not represented by the termination code. The returned code purely depends on the order of the if-else branches in the implementation.

Instead of a simple enum type, I think it might be more appropriate to represent termination codes as bit flags (see e.g. https://github.com/jessymilare/FlagSets.jl).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions