Skip to content

Commit

Permalink
Merge pull request #3400 from matsim-org/removeStaticParameterForSmal…
Browse files Browse the repository at this point in the history
…lScaleCommercial

remove static for constructor values
  • Loading branch information
rewertvsp authored Aug 8, 2024
2 parents ea1f72c + cdfe0bc commit 90c72f3
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class CreateDataDistributionOfStructureData implements MATSimAppCommand {

private static final Logger log = LogManager.getLogger(CreateDataDistributionOfStructureData.class);

private static LanduseDataConnectionCreator landuseDataConnectionCreator;
private final LanduseDataConnectionCreator landuseDataConnectionCreator;

private enum LanduseConfiguration {
useOnlyOSMLanduse, useOSMBuildingsAndLanduse
Expand Down Expand Up @@ -78,16 +78,16 @@ private enum LanduseConfiguration {
private final Map<String, Map<String, List<SimpleFeature>>> buildingsPerZone = new HashMap<>();

public CreateDataDistributionOfStructureData(LanduseDataConnectionCreator landuseDataConnectionCreator) {
CreateDataDistributionOfStructureData.landuseDataConnectionCreator = landuseDataConnectionCreator;
this.landuseDataConnectionCreator = landuseDataConnectionCreator;
log.info("Using LanduseDataConnectionCreator {} to connect the types of the landuse data to the categories of the small scale commercial traffic generation", landuseDataConnectionCreator.getClass().getSimpleName());
}
public CreateDataDistributionOfStructureData() {
landuseDataConnectionCreator = new LanduseDataConnectionCreatorForOSM_Data();
this.landuseDataConnectionCreator = new LanduseDataConnectionCreatorForOSM_Data();
log.info("Using default LanduseDataConnectionCreatorForOSM_Data to connect the types of the landuse data to the categories of the small scale commercial traffic generation");
}

public static void main(String[] args) {
System.exit(new CommandLine(new CreateDataDistributionOfStructureData(landuseDataConnectionCreator)).execute(args));
System.exit(new CommandLine(new CreateDataDistributionOfStructureData()).execute(args));
}

@Override
Expand Down

0 comments on commit 90c72f3

Please sign in to comment.