Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnassignedJobReasonTracker improvement #364

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

toni-rajkovski
Copy link

@toni-rajkovski toni-rajkovski commented Jul 24, 2017

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'

The iteration number and the insertion data are sent to UnassignedJobReasonTracker
when informing about unassigned job.
With those information we can have better understanding when and why the job was rejected.
…failed constraint

FailedConstraintInfo contains the info which constraint has failed for which job and which vehicle route.
This info is reported to UnassignedJobResonTracker.
Due to performance degradation saving of the activities in the route is removed from FailedConstraintInfo
@oblonski
Copy link
Member

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
Copy link
Member

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.

@toni-rajkovski
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants