Vehicles and stops can have compatibility attributes. Compatibility attributes are characteristics of the vehicle and requirements of the stop. They determine whether a vehicle is eligible to service a stop and ultimately whether a given solution is feasible.
The compatibility attributes constraint prevents the assignment of stops to vehicles that are not eligible due to specific requirements. For example, a stop with an order that requires refrigeration will not be assigned to a vehicle that does not have refrigeration.
For each vehicle, add the attributes to the compatibility_attributes
array, as needed.
A compatibility constraint is satisfied if one attribute is matched. In the case that multiple attribute constraints must be satisfied, concatenate them as a single string inside the array (e.g. refrigerated-oversized
) for both the relevant vehicles and stops.
For each vehicle and stop, add the relevant attributes to the compatibility_attributes
array. The string must be an exact match for the relevant vehicles and stops; spelling or phrasing errors will prevent correct attribute matching.