Package com.graphhopper.jsprit.core.util
Class UnassignedJobReasonTracker
java.lang.Object
com.graphhopper.jsprit.core.util.UnassignedJobReasonTracker
- All Implemented Interfaces:
SearchStrategyModuleListener,VehicleRoutingAlgorithmListener,InsertionListener,JobUnassignedListener
Created by schroeder on 06/02/17.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns an unmodifiable map of codes and reason pairs.For each job id, it returns frequency distribution of failed constraints (simple name of constraint) in an unmodifiable map.Returns an unmodifiable map of constraint names (simple name of constraint) and reason code pairs.getHumanReadableReason(int code) getHumanReadableReason(String failedConstraintName) static StringgetMostLikelyFailedConstraintName(org.apache.commons.math3.stat.Frequency failedConstraintNamesFrequency) getMostLikelyReason(String jobId) Returns the most likely reason i.e.intgetMostLikelyReasonCode(String jobId) Returns the most likely reason code i.e.Deprecated.voidvoidinformJobUnassigned(Job unassigned, Collection<String> failedConstraintNames) void
-
Constructor Details
-
UnassignedJobReasonTracker
public UnassignedJobReasonTracker()
-
-
Method Details
-
getMostLikelyFailedConstraintName
public static String getMostLikelyFailedConstraintName(org.apache.commons.math3.stat.Frequency failedConstraintNamesFrequency) -
ignore
-
informJobUnassigned
- Specified by:
informJobUnassignedin interfaceJobUnassignedListener
-
put
-
getReasons
Deprecated.For each job id, it returns frequency distribution of failed constraints (simple name of constraint) in an unmodifiable map.- Returns:
-
getFailedConstraintNamesFrequencyMapping
public Map<String,org.apache.commons.math3.stat.Frequency> getFailedConstraintNamesFrequencyMapping()For each job id, it returns frequency distribution of failed constraints (simple name of constraint) in an unmodifiable map.- Returns:
-
getCodesToReason
Returns an unmodifiable map of codes and reason pairs.- Returns:
-
getFailedConstraintNamesToCode
Returns an unmodifiable map of constraint names (simple name of constraint) and reason code pairs.- Returns:
-
getCode
-
getHumanReadableReason
-
getHumanReadableReason
-
getMostLikelyReasonCode
Returns the most likely reason code i.e. the reason (failed constraint) being observed most often.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"
- Parameters:
jobId-- Returns:
-
getMostLikelyReason
Returns the most likely reason i.e. the reason (failed constraint) being observed most often.- Parameters:
jobId-- Returns:
-