Skip to content

Commit

Permalink
fix un initialized attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
rakow committed Mar 3, 2024
1 parent 2257d30 commit e62ffce
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<String> exclude;
private Set<String> exclude = new HashSet<>();


/**
Expand All @@ -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<String> exclude) {
this.exclude = exclude;
}

public static void main(String[] args) {
new SplitActivityTypesDuration().execute(args);
}
Expand Down

0 comments on commit e62ffce

Please sign in to comment.