Metaheuristic API
API reference for the 14 classes of opt.metaheuristic. This page is generated from the source; see the algorithm pages for formulations and references.
Imports
python
from opt.metaheuristic import (
ArithmeticOptimizationAlgorithm,
CollidingBodiesOptimization,
CrossEntropyMethod,
EagleStrategy,
ForensicBasedInvestigationOptimizer,
HarmonySearch,
ParticleFilter,
ShuffledFrogLeapingAlgorithm,
SineCosineAlgorithm,
StochasticDiffusionSearch,
StochasticFractalSearch,
VariableDepthSearch,
VariableNeighborhoodSearch,
VeryLargeScaleNeighborhood,
)1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Common interface
Every class takes the objective func, the search-space lower_bound, upper_bound and dim, usually max_iter and seed, and implements search() -> tuple[np.ndarray, float]. See AbstractOptimizer.
Classes
| Class | Algorithm | Additional parameters |
|---|---|---|
ArithmeticOptimizationAlgorithm | Arithmetic Optimization Algorithm | - |
CollidingBodiesOptimization | Colliding Bodies Optimization | - |
CrossEntropyMethod | Cross-Entropy Method | elite_frac=0.2, noise_decay=0.99 |
EagleStrategy | Eagle Strategy | - |
ForensicBasedInvestigationOptimizer | Forensic-Based Investigation Optimizer | - |
HarmonySearch | Harmony Search | harmony_memory_accepting_rate=0.95, pitch_adjusting_rate=0.7, bandwidth=0.01 |
ParticleFilter | Sequential Monte Carlo Particle Filter | inertia=0.7, cognitive=1.5, social=1.5 |
ShuffledFrogLeapingAlgorithm | Shuffled Frog Leaping Algorithm | cut=2 |
SineCosineAlgorithm | Sine Cosine Algorithm | r1_cut=0.5, r2_cut=0.5 |
StochasticDiffusionSearch | Stochastic Diffusion Search | - |
StochasticFractalSearch | Stochastic Fractal Search | diffusion_parameter=0.5 |
VariableDepthSearch | Variable Depth Search | max_depth=20 |
VariableNeighborhoodSearch | Variable Neighborhood Search | neighborhood_size=10 |
VeryLargeScaleNeighborhood | Very Large Scale Neighborhood Search | neighborhood_size=10 |