jsprit icon indicating copy to clipboard operation
jsprit copied to clipboard

UnassignedJobReasonTracker improvement

Open toni-rajkovski opened this issue 6 years ago • 3 comments

This PR extends the UnassignedJobReasonTracker.

It is connected to #180 and provides more info about not successful insertions which failed because some hard constraint was not fulfilled.

Additional info about why some constraint has failed for certain insertion:

  1. In which iteration
  2. In which vehicle
  3. At which position there was an attempt for insertion

The change is backward compatible, no breaking changes are introduced to UnassignedJobReasonTracker.

The PR also contains an example about how to use the UnassignedJobReasonTracker and how the results can be displayed.

Example how the additional data looks like:

Constraint 'PickupAndDeliverShipmentLoadActivityLevelConstraint' failed for job insertion of job 'shipment3' on position '2' on route 'vehicle1 [ shipment1-pickupShipment shipment1-deliverShipment ]'
Constraint 'VehicleDependentTimeWindowConstraints' failed for job insertion of job 'shipment3' on position '0' on route 'vehicle2 [ ]'
Constraint 'DummyConstraint' failed for job insertion of job 'shipment4' on position '0' on route 'vehicle2 [ ]'
Constraint 'ServiceLoadRouteLevelConstraint' failed for job insertion of job 'service2' on position '0' on route 'vehicle2 [ shipment2-pickupShipment shipment2-deliverShipment service1-service ]'

Edit

Due to performance degradation the only the vehicle will be tracked and not the activities on the route of that vehicle. The additional data after removing the activities looks like:

Constraint 'VehicleDependentTimeWindowConstraints' failed for job insertion of job 'shipment4' on position '2' in vehicle 'vehicle1'

toni-rajkovski avatar Jul 24 '17 12:07 toni-rajkovski

Nice, thanks, I ll have a look at this asap. In the meantime, would you mind to send us email for a CLA (https://www.graphhopper.com/contact-form/). Thanks.

oblonski avatar Jul 27 '17 07:07 oblonski

Hi @toni-rajkovski, Thanks for your contrib. Would you mind to describe me how you use it? For debugging I guess? I only want to make sure that you do not draw wrong conclusions from the information you have now about failed constraints. For example, if you look at insertion positions, some contraints should fail fast, i.e. if they fail at the very beginning of a route, no other positions will be evaluated anymore.

oblonski avatar Aug 11 '17 08:08 oblonski

Hi @oblonski, Yes it is mostly for debugging purposes. I am aware that some constraints when failed will break the evaluation of additional positions and no other constraints will be checked even for the current position but that is OK with me because the information in UnassignedJobReasonTracker will reflect what actually has happened during the execution. The info in UnassignedJobReasonTracker combined with trace logs give me enough information for analysis why sometimes some job remains unassigned.

toni-rajkovski avatar Aug 24 '17 09:08 toni-rajkovski