You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: jsprit-core/src/main/java/com/graphhopper/jsprit/core/problem/VehicleRoutingProblem.java
+10-9Lines changed: 10 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -232,9 +232,9 @@ public Builder addJob(Job job) {
232
232
*/
233
233
publicBuilderaddJob(AbstractJobjob) {
234
234
if (tentativeJobs.containsKey(job.getId()))
235
-
thrownewIllegalArgumentException("vehicle routing problem already contains a service or shipment with id " + job.getId() + ". make sure you use unique ids for all services and shipments");
235
+
thrownewIllegalArgumentException("The vehicle routing problem already contains a service or shipment with id " + job.getId() + ". Please make sure you use unique ids for all services and shipments.");
236
236
if (!(jobinstanceofService || jobinstanceofShipment))
237
-
thrownewIllegalArgumentException("job must be either a service or a shipment");
237
+
thrownewIllegalArgumentException("Job must be either a service or a shipment.");
thrownewIllegalArgumentException("problem already contains a vehicle break with id " + v.getBreak().getId() + ". choose unique ids for each vehicle break.");
288
+
thrownewIllegalArgumentException("The vehicle routing roblem already contains a vehicle break with id " + v.getBreak().getId() + ". Please choose unique ids for each vehicle break.");
thrownewIllegalArgumentException("vehicle must be an AbstractVehicle");
371
+
thrownewIllegalArgumentException("A vehicle must be an AbstractVehicle.");
371
372
returnaddVehicle((AbstractVehicle) vehicle);
372
373
}
373
374
@@ -379,7 +380,7 @@ public Builder addVehicle(Vehicle vehicle) {
379
380
*/
380
381
publicBuilderaddVehicle(AbstractVehiclevehicle) {
381
382
if(addedVehicleIds.contains(vehicle.getId())){
382
-
thrownewIllegalArgumentException("problem already contains a vehicle with id " + vehicle.getId() + ". choose unique ids for each vehicle.");
383
+
thrownewIllegalArgumentException("The vehicle routing problem already contains a vehicle with id " + vehicle.getId() + ". Please choose unique ids for each vehicle.");
383
384
}
384
385
elseaddedVehicleIds.add(vehicle.getId());
385
386
if (!uniqueVehicles.contains(vehicle)) {
@@ -443,7 +444,7 @@ public VehicleRoutingProblem build() {
443
444
}
444
445
booleanhasBreaks = addBreaksToActivityMap();
445
446
if (hasBreaks && fleetSize.equals(FleetSize.INFINITE))
446
-
thrownewUnsupportedOperationException("breaks are not yet supported when dealing with infinite fleet. either set it to finite or omit breaks.");
447
+
thrownewUnsupportedOperationException("Breaks are not yet supported when dealing with infinite fleet. Either set it to finite or omit breaks.");
thrownewUnsupportedOperationException("maxTimeInVehicle is not yet supported for Pickups and Services (only for Deliveries and Shipments)");
255
+
thrownewUnsupportedOperationException("The maximum time in vehicle is not yet supported for Pickups and Services (only for Deliveries and Shipments).");
256
256
// if(maxTimeInVehicle < 0) throw new IllegalArgumentException("maxTimeInVehicle should be positive");
0 commit comments