Skip to main content

Module da

Module da 

Source
Expand description

Dual Annealing with optional bounded local search.

The global phase is generalized simulated annealing: a distorted Cauchy-Lorentz visiting distribution, a Markov strategy chain with generalized accept/reject, re-annealing, and an optional local search. The local phase is a self-contained projected limited-memory quasi-Newton search on the normalized box, using finite-difference gradients.

§Reference

Y. Xiang, D. Y. Sun, W. Fan, and X. G. Gong, “Generalized Simulated Annealing Algorithm and Its Application to the Thomson Model”, Physics Letters A 233, 216–220 (1997).

§Example

use fcmaes_core::{DaParams, optimize_da};

let sphere = |x: &[f64]| x.iter().map(|v| v * v).sum::<f64>();
let params = DaParams {
    max_evaluations: 1_000,
    seed: 5,
    ..Default::default()
};
let result = optimize_da(
    &sphere,
    &[1.0; 3],
    vec![-5.0; 3],
    vec![5.0; 3],
    &params,
);
assert!(result.y.is_finite());

Structs§

DaParams
Tunable inputs for optimize_da.
DaResult
Outcome of a Dual Annealing run.

Functions§

optimize_da
Run Dual Annealing. lower/upper empty ⇒ unbounded.