Expand description
SolverForge - A Constraint Solver in Rust
SolverForge is a high-performance constraint satisfaction/optimization solver. It helps you optimize planning and scheduling problems.
§Quick Start
use solverforge::prelude::*;
#[problem_fact]
pub struct Employee {
#[planning_id]
pub id: i64,
pub name: String,
}
#[planning_entity]
pub struct Shift {
#[planning_id]
pub id: i64,
#[planning_variable]
pub employee: Option<i64>,
}
#[planning_solution]
pub struct Schedule {
#[problem_fact_collection]
pub employees: Vec<Employee>,
#[planning_entity_collection]
pub shifts: Vec<Shift>,
#[planning_score]
pub score: Option<HardSoftScore>,
}Modules§
Structs§
- Basic
Spec - Problem specification for basic variable problems.
- Bendable
Score - A score with a configurable number of hard and soft levels.
- Constraint
Analysis - Analysis of a single constraint’s contribution to the score.
- Default
Distance Meter - Default distance meter using position difference.
- Hard
Medium Soft Score - A score with hard, medium, and soft constraint levels.
- Hard
Soft Decimal Score - A score with separate hard and soft constraint levels, using i64 with x100000 scaling.
- Hard
Soft Score - A score with separate hard and soft constraint levels.
- Incremental
BiConstraint - Incremental
UniConstraint - List
Spec - Problem specification for list variable problems.
- Score
Analysis - Result of analyzing a solution’s constraints.
- Score
Director - Soft
Score - A simple score with a single integer value.
- Solver
Manager - Manages async solve jobs with channel-based solution streaming.
Enums§
- Solver
Status - Status of a solving job.
Traits§
- Analyzable
- Trait for solutions that can be analyzed for constraint violations.
- Constraint
Set - Cross
Entity Distance Meter - Measures distance between two list positions, potentially across different entities.
- Director
- Incremental
Constraint - Score
- Core trait for all score types in SolverForge.
- Solvable
- Trait for solutions that can be solved with channel-based solution streaming.
Functions§
- analyze
- Analyzes a solution for constraint violations.
- run_
solver - Solves a problem using the given
ProblemSpecfor problem-specific logic.