1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// SPDX-FileCopyrightText: 2026 Arnaldo Mendes Pires Junior
// SPDX-License-Identifier: MIT
//! # GIVP — GRASP-ILS-VND with Path Relinking
//!
//! A metaheuristic optimizer for continuous and mixed-integer black-box
//! optimization problems.
//!
//! ## Quick start
//!
//! ```rust
//! use givp::{givp, GivpConfig, Direction};
//!
//! let sphere = |x: &[f64]| -> f64 { x.iter().map(|v| v * v).sum() };
//! let bounds: Vec<(f64, f64)> = vec![(-5.12, 5.12); 5];
//!
//! let result = givp(sphere, &bounds, GivpConfig::default()).unwrap();
//! println!("Best: {:.6} at {:?}", result.fun, result.x);
//! ```
pub use ;
pub use ;
pub use ;
pub use ;
/// Run the GRASP-ILS-VND with Path Relinking optimizer.
///
/// # Arguments
///
/// * `func` — Objective function `&[f64] -> f64`.
/// * `bounds` — Variable bounds as `&[(lower, upper)]`.
/// * `config` — Algorithm configuration.
///
/// # Returns
///
/// An [`OptimizeResult`] containing the best solution found.