Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove static for constructor values #3400

Merged
merged 1 commit into from
Aug 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading