1
0
Fork 0
mirror of https://github.com/graphhopper/jsprit.git synced 2020-01-24 07:45:05 +01:00

doc codes - related to #180

This commit is contained in:
oblonski 2017-02-06 21:54:59 +01:00
parent 0a8061845d
commit 9e9436e1ab
No known key found for this signature in database
GPG key ID: 179DE487285680D1

View file

@ -73,6 +73,15 @@ public class UnassignedJobReasonTracker implements JobUnassignedListener {
} else failedConstraintNamesToCode.put(simpleNameOfFailedConstraint, code); } else failedConstraintNamesToCode.put(simpleNameOfFailedConstraint, code);
} }
/**
* 1 --> "cannot serve required skill
* 2 --> "cannot be visited within time window"
* 3 --> "does not fit into any vehicle due to capacity"
* 4 --> "cannot be assigned due to max distance constraint of vehicle"
*
* @param jobId
* @return
*/
public int getCode(String jobId) { public int getCode(String jobId) {
Multiset<String> reasons = this.reasons.get(jobId); Multiset<String> reasons = this.reasons.get(jobId);
String mostLikelyReason = getMostLikely(reasons); String mostLikelyReason = getMostLikely(reasons);