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

Added UO-ResStock connection variable to the site properties schema #270

Merged
merged 7 commits into from
Jun 25, 2024
5 changes: 4 additions & 1 deletion lib/urbanopt/geojson/geo_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,10 @@ def merge_site_properties(feature)
{ site: :electricity_emissions_annual_historical_subregion, feature: :electricity_emissions_annual_historical_subregion },
{ site: :electricity_emissions_future_year, feature: :electricity_emissions_future_year },
{ site: :electricity_emissions_hourly_historical_year, feature: :electricity_emissions_hourly_historical_year },
{ site: :electricity_emissions_annual_historical_year, feature: :electricity_emissions_annual_historical_year }
{ site: :electricity_emissions_annual_historical_year, feature: :electricity_emissions_annual_historical_year },
{ site: :characterize_residential_buildings_from_buildstock_csv, feature: :characterize_residential_buildings_from_buildstock_csv },
{ site: :resstock_buildstock_csv_path, feature: :resstock_buildstock_csv_path },
{ site: :uo_buildstock_mapping_csv_path, feature: :uo_buildstock_mapping_csv_path }
]

add_props.each do |prop|
Expand Down
12 changes: 12 additions & 0 deletions lib/urbanopt/geojson/schema/building_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,18 @@
"ev_curtailment_frac": {
"description": "Fraction between 0 and 1 that denotes curtailment of EV charging load to better align EV charging with expected energy production from a solar PV system",
"type": "number"
},
"characterize_residential_buildings_from_buildstock_csv":{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't the existence of a populated resstock_buildstock_csv_path field serve as the boolean here?

"description" : "Enable UO and ResStock connection to characterize residential buildings by matching them (and their properties) with building from the BuildStock CSV.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For other residential -related field descriptions, we use "Optional for residential buildings" or "Required for residential buildings". For consistency, should we do something similar here?

"type": "boolean"
},
"resstock_buildstock_csv_path":{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't remember if we removed conditional requirements from the schema and replaced them with logic in the mapper, but do we somehow want to handle that? For example, if characterize_residential_buildings_from_buildstock_csv is true, then resstock_buildstock_csv_path must be populated.

"description" : "Path to the buildstock CSV that the users want to sample from to find the closest match to their UO residential buildings features.",
"type": "string"
},
"uo_buildstock_mapping_csv_path":{
"description" : "Path to the uo_buildstock mapping CSV. IN this CSV users can set a match of the UO features with a buildstock building and its characteristics and the feature will run with the assigned buildstock characteristics",
"type": "string"
}
},
"required": [
Expand Down
12 changes: 12 additions & 0 deletions lib/urbanopt/geojson/schema/site_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,18 @@
"2018",
"2019"
]
},
"characterize_residential_buildings_from_buildstock_csv":{
"description" : "Enable UO and ResStock connection to characterize residential buildings by matching them (and their properties) with building from the BuildStock CSV.",
"type": "boolean"
},
"resstock_buildstock_csv_path":{
"description" : "Path to the buildstock CSV that the users want to sample from to find the closest match to their UO residential buildings features.",
"type": "string"
},
"uo_buildstock_mapping_csv_path":{
"description" : "Path to the uo_buildstock mapping CSV. IN this CSV users can set a match of the UO features with a buildstock building and its characteristics and the feature will run with the assigned buildstock characteristics",
"type": "string"
}
},
"required": [
Expand Down