File size: 843 Bytes
2f7b3fb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//! Assembles the constraint set the solver scores every plan against.

use crate::domain::FieldServicePlan;
use solverforge::prelude::*;

/// Collects the full scoring model used by `FieldServicePlan`.
pub fn create_constraints() -> impl ConstraintSet<FieldServicePlan, HardSoftScore> {
    // @solverforge:begin constraint-calls
    (
        super::assigned_visits::constraint(),
        super::balance_workload::constraint(),
        super::minimize_travel::constraint(),
        super::priority_slack::constraint(),
        super::reachable_legs::constraint(),
        super::required_parts::constraint(),
        super::required_skills::constraint(),
        super::shift_capacity::constraint(),
        super::territory_affinity::constraint(),
        super::time_windows::constraint(),
    )
    // @solverforge:end constraint-calls
}