Expand description
Incremental constraint scoring for SolverForge.
Applications use it through the solverforge facade. It provides:
- the constraint stream API (
stream):for_each, joins, filters, grouping and thepenalize/rewardterminals that build constraints; - incremental constraints such as
IncrementalUniConstraint, which update their score from the entities a move changed instead of rescoring the whole solution; ScoreDirector, which owns the working solution and its constraint set and keeps the score current as moves are applied and undone;ConstraintSet, a tuple of constraints evaluated without dynamic dispatch.
Every constraint is monomorphized: closures are generic parameters, and
there is no Box<dyn Trait> on the scoring path.
Re-exports§
pub use constraint::IncrementalUniConstraint;pub use constraint::ListPrecedenceMakespanConstraint;pub use api::constraint_set::ConstraintMetadata;pub use api::constraint_set::ConstraintResult;pub use api::constraint_set::ConstraintSet;pub use api::constraint_set::ConstraintSetSource;pub use api::constraint_set::IncrementalConstraint;pub use api::constraint_set::OrderedConstraintSetChain;pub use api::constraint_set::SingleConstraint;pub use director::score_director::requires_weighted_mode;pub use director::score_director::DirectorDescriptor;pub use director::score_director::ScoreDirector;pub use director::score_director::UnweightedMode;pub use director::score_director::WeightMode;pub use director::score_director::WeightedMode;pub use director::Director;pub use director::DirectorScoreState;pub use director::SolvableSolution;pub use api::analysis::ConstraintAnalysis;pub use api::analysis::ConstraintJustification;pub use api::analysis::DetailedConstraintMatch;pub use api::analysis::EntityRef;pub use stream::fixed_weight;pub use stream::hard_weight;pub use stream::BiConstraintBuilder;pub use stream::BiConstraintStream;pub use stream::ConstraintFactory;pub use stream::ConstraintWeight;pub use stream::FixedWeight;pub use stream::GroupedConstraintBuilder;pub use stream::GroupedConstraintStream;pub use stream::HardWeight;pub use stream::Projection;pub use stream::ProjectionSink;pub use stream::UniConstraintBuilder;pub use stream::UniConstraintStream;
Modules§
- api
- Zero-erasure constraint API.
- constraint
- Zero-erasure monomorphized constraint infrastructure.
- director
- Score director implementations.
- stream
- Fluent constraint stream API for zero-erasure constraint programming.