File size: 961 Bytes
f6213fc | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | //! Constraint assembly for delivery routing.
//!
//! Each sibling file contributes one named rule. `create_constraints()` lists
//! them in the order we want beginners to see in score analysis output.
use crate::domain::Plan;
use solverforge::prelude::*;
pub use self::assemble::create_constraints;
// @solverforge:begin constraint-modules
mod all_deliveries_assigned;
mod delivery_time_windows;
mod total_travel_time;
mod vehicle_capacity;
// @solverforge:end constraint-modules
mod assemble {
use super::*;
/// Collects the full scoring model used by `Plan`.
pub fn create_constraints() -> impl ConstraintSet<Plan, HardSoftScore> {
// @solverforge:begin constraint-calls
(
all_deliveries_assigned::constraint(),
vehicle_capacity::constraint(),
delivery_time_windows::constraint(),
total_travel_time::constraint(),
)
// @solverforge:end constraint-calls
}
}
|