diff --git a/contribs/application/src/main/java/org/matsim/application/prepare/population/SplitActivityTypesDuration.java b/contribs/application/src/main/java/org/matsim/application/prepare/population/SplitActivityTypesDuration.java index b49a1d5b2c4..9bf459cdc19 100644 --- a/contribs/application/src/main/java/org/matsim/application/prepare/population/SplitActivityTypesDuration.java +++ b/contribs/application/src/main/java/org/matsim/application/prepare/population/SplitActivityTypesDuration.java @@ -13,6 +13,7 @@ import picocli.CommandLine; import java.nio.file.Path; +import java.util.HashSet; import java.util.List; import java.util.Objects; import java.util.Set; @@ -47,7 +48,7 @@ public class SplitActivityTypesDuration implements MATSimAppCommand, PersonAlgor private String subpopulation; @CommandLine.Option(names = "--exclude", description = "Activity types that won't be split", split = ",", defaultValue = "") - private Set exclude; + private Set exclude = new HashSet<>(); /** @@ -65,6 +66,13 @@ public SplitActivityTypesDuration(int activityBinSize, int maxTypicalDuration, i this.endTimeToDuration = endTimeToDuration; } + /** + * Set activity types to be excluded from splitting. + */ + public void setExclude(Set exclude) { + this.exclude = exclude; + } + public static void main(String[] args) { new SplitActivityTypesDuration().execute(args); }