C++ Reference: class TypeRegulationsConstraint

This documentation is automatically generated.

The following constraint ensures that incompatibilities and requirements between types are respected.

It verifies both "hard" and "temporal" incompatibilities. Two nodes with hard incompatible types cannot be served by the same vehicle at all, while with a temporal incompatibility they can't be on the same route at the same time.

For example, for three temporally incompatible types T1 T2 and T3, two pickup/delivery pairs p1/d1 and p2/d2 of type T1 and T2 respectively, and a non-pickup/delivery node n of type T3, the configuration p1 --> d1 --> n --> p2 --> d2 is acceptable, whereas any configurations with p1 --> p2 --> d1 --> ..., or p1 --> n --> d1 --> ... is not feasible.

It also verifies same-vehicle and temporal type requirements. In the above example, if T1 is a requirement for T2:
   - For a same-vehicle requirement, p1/d1 must be on the same vehicle as p2/d2.
   - For a temporal requirement, p2 must be visited between p1 and d1.

Return type: void


Return type: void


Return type: explicit

Arguments: const RoutingModel& model