diff --git a/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/BestInsertion.java b/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/BestInsertion.java index 10cea48e..a37a52aa 100644 --- a/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/BestInsertion.java +++ b/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/BestInsertion.java @@ -132,7 +132,7 @@ final class BestInsertion implements InsertionStrategy{ VehicleRoute newRoute = VehicleRoute.emptyRoute(); InsertionData bestI = bestInsertionCostCalculator.getInsertionData(newRoute, unassignedJob, NO_NEW_VEHICLE_YET, NO_NEW_DEPARTURE_TIME_YET, NO_NEW_DRIVER_YET, Double.MAX_VALUE); if(bestI instanceof InsertionData.NoInsertionFound){ - throw new IllegalStateException(getErrorMsg(unassignedJob)); + throw new NoSolutionFoundException(getErrorMsg(unassignedJob)); } else{ bestInsertion = new Insertion(newRoute,bestI); diff --git a/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/NoSolutionFoundException.java b/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/NoSolutionFoundException.java new file mode 100644 index 00000000..5acb2936 --- /dev/null +++ b/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/NoSolutionFoundException.java @@ -0,0 +1,14 @@ +package jsprit.core.algorithm.recreate; + +public class NoSolutionFoundException extends IllegalStateException{ + + public NoSolutionFoundException(String errorMsg) { + super(errorMsg); + } + + /** + * + */ + private static final long serialVersionUID = 1L; + +}