Spaces:
Sleeping
Sleeping
File size: 542 Bytes
2574e86 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | use crate::constraints::route_metrics::{reachable_match_count, reachable_score, RouteConstraint};
use crate::domain::FieldServicePlan;
use solverforge::prelude::*;
use solverforge::IncrementalConstraint;
/// HARD: every depot-to-visit, visit-to-visit, and visit-to-depot leg must be routable.
pub fn constraint() -> impl IncrementalConstraint<FieldServicePlan, HardSoftScore> {
RouteConstraint::new(
"Reachable Legs",
true,
HardSoftScore::of(1, 0),
reachable_score,
reachable_match_count,
)
}
|