Skip to content

Univariate optimization does not stop when callback returns true #822

@fredcallaway

Description

@fredcallaway

Minimal example:

julia> optimize(x->x^2, -5, 5, callback=_->true)

Results of Optimization Algorithm
 * Algorithm: Brent's Method
 * Search Interval: [-5.000000, 5.000000]
 * Minimizer: 0.000000e+00
 * Minimum: 0.000000e+00
 * Iterations: 5
 * Convergence: max(|x - x_upper|, |x - x_lower|) <= 2*(1.5e-08*|x|+2.2e-16): true
 * Objective Function Calls: 6

It should stop after the first iteration, but it goes for 5

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