solverforge 0.4.0

SolverForge - A constraint solver in Rust
Documentation

SolverForge - A Constraint Solver in Rust

SolverForge is a constraint satisfaction/optimization solver inspired by Timefold. It helps you optimize planning and scheduling problems.

Architecture

SolverForge uses zero-erasure constraint evaluation - all scoring code is fully monomorphized with no Box<dyn Trait> in hot paths.

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>,
}

Crate Organization

  • solverforge-core: Core types (Score, domain traits)
  • solverforge-macros: Attribute macros
  • solverforge-scoring: Zero-erasure typed constraint infrastructure
  • solverforge-solver: Solver implementation
  • solverforge-config: Configuration system