diff --git a/contribs/drt-extensions/src/main/java/org/matsim/contrib/drt/extension/preplanned/optimizer/PreplannedDrtOptimizer.java b/contribs/drt-extensions/src/main/java/org/matsim/contrib/drt/extension/preplanned/optimizer/PreplannedDrtOptimizer.java index fd0f6672826..5e47c385106 100644 --- a/contribs/drt-extensions/src/main/java/org/matsim/contrib/drt/extension/preplanned/optimizer/PreplannedDrtOptimizer.java +++ b/contribs/drt-extensions/src/main/java/org/matsim/contrib/drt/extension/preplanned/optimizer/PreplannedDrtOptimizer.java @@ -77,7 +77,7 @@ public PreplannedDrtOptimizer(DrtConfigGroup drtCfg, PreplannedSchedules preplan TravelTime travelTime, TravelDisutility travelDisutility, MobsimTimer timer, DrtTaskFactory taskFactory, EventsManager eventsManager, Fleet fleet, ScheduleTimingUpdater scheduleTimingUpdater) { Preconditions.checkArgument( - fleet.getVehicles().keySet().equals(preplannedSchedules.vehicleToPreplannedStops.keySet()), + fleet.getVehicles().keySet().containsAll(preplannedSchedules.vehicleToPreplannedStops.keySet()), "Some schedules are preplanned for vehicles outside the fleet"); this.mode = drtCfg.getMode(); diff --git a/contribs/dvrp/src/main/java/org/matsim/contrib/zone/skims/DvrpTravelTimeMatrixParams.java b/contribs/dvrp/src/main/java/org/matsim/contrib/zone/skims/DvrpTravelTimeMatrixParams.java index a12930c5d42..52c3c332f09 100644 --- a/contribs/dvrp/src/main/java/org/matsim/contrib/zone/skims/DvrpTravelTimeMatrixParams.java +++ b/contribs/dvrp/src/main/java/org/matsim/contrib/zone/skims/DvrpTravelTimeMatrixParams.java @@ -20,6 +20,7 @@ package org.matsim.contrib.zone.skims; +import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.PositiveOrZero; import org.matsim.contrib.common.util.ReflectiveConfigGroupWithConfigurableParameterSets; import org.matsim.contrib.common.zones.ZoneSystemParams; @@ -55,6 +56,7 @@ public class DvrpTravelTimeMatrixParams extends ReflectiveConfigGroupWithConfigu + " The unit is seconds. Default value is 0 s (for backward compatibility).") @PositiveOrZero public double maxNeighborTravelTime = 0; //[s] + @NotNull private ZoneSystemParams zoneSystemParams; @@ -101,6 +103,11 @@ public void handleAddUnknownParam(String paramName, String value) { } public ZoneSystemParams getZoneSystemParams() { + if(this.zoneSystemParams == null) { + SquareGridZoneSystemParams squareGridZoneSystemParams = new SquareGridZoneSystemParams(); + squareGridZoneSystemParams.cellSize = 200; + this.zoneSystemParams = squareGridZoneSystemParams; + } return zoneSystemParams; } }