Skip to content

Commit

Permalink
Merge pull request #3483 from tkchouaki/dvrp_travel_times_default_zoning
Browse files Browse the repository at this point in the history
chore: default zoning params in DvrpTravelTimeMatrixParams
  • Loading branch information
jfbischoff authored Sep 16, 2024
2 parents 50b7015 + 36e296f commit 22d8b7e
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;


Expand Down Expand Up @@ -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;
}
}

0 comments on commit 22d8b7e

Please sign in to comment.