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

improve error message when throwing IllegalStateException

in BestInsertion
This commit is contained in:
Stefan Schroeder 2013-06-18 14:15:44 +02:00
parent c55af1ce59
commit caef965315

View file

@ -137,7 +137,12 @@ final class BestInsertion extends AbstractInsertionStrategy{
System.out.println("reason="+s); System.out.println("reason="+s);
} }
throw new IllegalStateException("given the vehicles, could not insert job\n" + throw new IllegalStateException("given the vehicles, could not insert job\n" +
"\t" + unassignedJob + "\n\t"); "\t" + unassignedJob +
"\n\tthis might have the following reasons:\n" +
"\t- no vehicle has the capacity to transport the job [check whether there is at least one vehicle that is capable to transport the job]\n" +
"\t- the time-window cannot be met, even in a commuter tour the time-window is missed [check whether it is possible to reach the time-window on the shortest path or make hard time-windows soft]\n" +
"\t- if you deal with finite vehicles, and the available vehicles are already fully employed, no vehicle can be found anymore to transport the job [add penalty-vehicles]"
);
} }
} }
else{ else{