Skip to content

Commit

Permalink
Merge branch 'master' into counts-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
rakow authored Oct 25, 2023
2 parents 4c8e47b + 37cba78 commit 366a212
Showing 1 changed file with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,20 +257,22 @@ private void loadHouseholds() {
else {
log.info("no households file set in config, not loading households");
}
final String fn = this.config.households().getInputHouseholdAttributesFile();
if ((this.config.households() != null) && ( fn != null)) {
if (!this.config.households().isInsistingOnUsingDeprecatedHouseholdsAttributeFile()) {
throw new RuntimeException(HouseholdsConfigGroup.HOUSEHOLD_ATTRIBUTES_DEPRECATION_MESSAGE);
if ((this.config.households() != null)) {
final String fn = this.config.households().getInputHouseholdAttributesFile();
if(( fn != null)) {
if (!this.config.households().isInsistingOnUsingDeprecatedHouseholdsAttributeFile()) {
throw new RuntimeException(HouseholdsConfigGroup.HOUSEHOLD_ATTRIBUTES_DEPRECATION_MESSAGE);
}

URL householdAttributesFileName = ConfigGroup.getInputFileURL(this.config.getContext(), fn ) ;
log.info("loading household attributes from " + householdAttributesFileName);
parseObjectAttributesToAttributable(
householdAttributesFileName,
this.scenario.getHouseholds().getHouseholds().values(),
"householdAttributes not empty after going through all households, meaning that it contains material for householdIDs that " +
"are not in the container. This is not necessarily a bug so we will continue, but note that such material " +
"will no longer be contained in the output_* files.");
}

URL householdAttributesFileName = ConfigGroup.getInputFileURL(this.config.getContext(), fn ) ;
log.info("loading household attributes from " + householdAttributesFileName);
parseObjectAttributesToAttributable(
householdAttributesFileName,
this.scenario.getHouseholds().getHouseholds().values(),
"householdAttributes not empty after going through all households, meaning that it contains material for householdIDs that " +
"are not in the container. This is not necessarily a bug so we will continue, but note that such material " +
"will no longer be contained in the output_* files.");
}
else {
log.info("no household-attributes file set in config, not loading any household attributes");
Expand Down

0 comments on commit 366a212

Please sign in to comment.