Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ public InsertionData getInsertionData(final VehicleRoute currentRoute, final Job
bestKnownCost_ = iData.getInsertionCost();
}
}
if (relevantVehicles.isEmpty()) {
bestIData.getFailedConstraintNames().add("HasNoEnoughVehicle");
}
return bestIData;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import com.graphhopper.jsprit.core.algorithm.recreate.listener.JobUnassignedListener;
import com.graphhopper.jsprit.core.problem.job.Job;

import org.apache.commons.math3.stat.Frequency;

import java.util.*;
Expand Down Expand Up @@ -62,13 +63,15 @@ public UnassignedJobReasonTracker() {
codesToHumanReadableReason.put(2, "cannot be visited within time window");
codesToHumanReadableReason.put(3, "does not fit into any vehicle due to capacity");
codesToHumanReadableReason.put(4, "cannot be assigned due to max distance constraint of vehicle");
codesToHumanReadableReason.put(5, "cannot be assigned due to less vehicle");

failedConstraintNamesToCode.put("HardSkillConstraint", 1);
failedConstraintNamesToCode.put("VehicleDependentTimeWindowConstraints", 2);
failedConstraintNamesToCode.put("ServiceLoadRouteLevelConstraint", 3);
failedConstraintNamesToCode.put("PickupAndDeliverShipmentLoadActivityLevelConstraint", 3);
failedConstraintNamesToCode.put("ServiceLoadActivityLevelConstraint", 3);
failedConstraintNamesToCode.put("MaxDistanceConstraint", 4);
failedConstraintNamesToCode.put("HasNoEnoughVehicle", 5);
}

public void ignore(String simpleNameOfConstraint) {
Expand Down