Samyama Optimization Engine (Rust)
A high-performance library implementing metaphor-less and nature-inspired metaheuristic optimization algorithms.
This engine allows you to solve complex resource allocation, scheduling, and engineering problems by defining an objective function and constraints.
Algorithms Supported
We support 15+ algorithms across various families:
Metaphor-less
- Jaya: Parameter-less optimization (Toward best, away from worst).
- Rao (1, 2, 3): Algorithms using best, worst, and mean solutions with varying interaction levels.
- TLBO: Teaching-Learning-Based Optimization.
- ITLBO: Improved TLBO with Elitism.
- BMR / BWR: Best-Mean-Random and Best-Worst-Random strategies.
- QOJaya: Quasi-Oppositional Jaya (using Opposition-Based Learning).
Nature-Inspired
- GWO: Grey Wolf Optimizer (Alpha, Beta, Delta hierarchy).
- PSO: Particle Swarm Optimization.
- DE: Differential Evolution.
- Firefly: Firefly Algorithm (Light intensity based attraction).
- Cuckoo: Cuckoo Search (Levy flights and nest abandonment).
- Bat: Bat Algorithm (Echolocation).
- ABC: Artificial Bee Colony.
- FPA: Flower Pollination Algorithm.
- GA: Genetic Algorithm (Tournament selection, Uniform crossover).
Stochastic / Physics
- SA: Simulated Annealing.
- HS: Harmony Search.
- GSA: Gravitational Search Algorithm.
Multi-Objective (Pareto)
- NSGA-II: Non-dominated Sorting Genetic Algorithm II.
- MOTLBO: Multi-Objective TLBO.
Features
- Parallel Evaluation: Automatic multi-threaded fitness calculation via
rayon. - Zero-Copy: Minimal overhead when operating on large vectors.
- Constraints: Support for penalty-based constraint handling (
min_total,budget). - History Tracking: Solvers yield convergence history for visualization.
Usage
Single-Objective (Rust)
use *;
use *;
use array;
let problem = SimpleProblem ;
// Use Grey Wolf Optimizer
let config = SolverConfig ;
let solver = new;
let result = solver.solve;
println!;
println!;
Multi-Objective (Rust)
use NSGA2Solver;
// Define a struct impl MultiObjectiveProblem...
// Then:
let solver = new;
let result = solver.solve;
for ind in result.pareto_front
Integration with Samyama DB
You can access these solvers via Cypher!
CALL algo.or.solve({
algorithm: 'GWO',
label: 'Factory',
property: 'production',
min: 0.0, max: 100.0,
cost_property: 'cost',
budget: 50000.0
})
License
Apache-2.0