Skip to main content

solverforge_core/
lib.rs

1//! Core types and traits for SolverForge.
2//!
3//! Applications use them through the `solverforge` facade. This crate
4//! provides:
5//! - Score types for representing solution quality
6//! - Domain traits for defining planning problems
7//! - Descriptor types for runtime metadata
8//! - Constraint types for incremental evaluation
9
10/* PhantomData<(fn() -> T, ...)> is an intentional pattern to avoid inheriting
11trait bounds from phantom type parameters. Clippy's type_complexity lint
12triggers on these tuples but the pattern is architecturally required.
13*/
14#![allow(clippy::type_complexity)]
15#![warn(missing_docs)]
16#![warn(unreachable_pub)]
17
18pub mod constraint;
19pub mod constraint_weights;
20pub mod domain;
21pub mod fast_hash;
22pub mod score;
23
24#[cfg(test)]
25mod constraint_tests;
26
27pub use constraint::{ConstraintRef, ImpactType};
28pub use constraint_weights::{
29    ConstraintWeightError, ConstraintWeights, MAX_CONSTRAINT_WEIGHT_MULTIPLIER,
30};
31pub use domain::{PlanningEntity, PlanningId, PlanningSolution, ProblemFact};
32pub use score::{
33    BendableScore, HardMediumSoftScore, HardSoftDecimalScore, HardSoftScore, ParseableScore, Score,
34    ScoreParseError, SoftScore,
35};