Skip to content

Commit

Permalink
Latest measures.
Browse files Browse the repository at this point in the history
  • Loading branch information
shorowit committed Jul 27, 2017
1 parent 247c75f commit fee33d6
Show file tree
Hide file tree
Showing 312 changed files with 4,061 additions and 3,025 deletions.
18 changes: 16 additions & 2 deletions measures/BuildingCharacteristicsReport/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<schema_version>3.0</schema_version>
<name>building_characteristics_report</name>
<uid>90eecbe2-d8e2-47db-9079-5d9029fb3e67</uid>
<version_id>eb372dee-e719-4aca-8ad2-bc15a2dfa091</version_id>
<version_modified>20170512T180422Z</version_modified>
<version_id>96ed058f-12e1-4f75-bbc1-752a8266607d</version_id>
<version_modified>20170717T184839Z</version_modified>
<xml_checksum>2EA103AF</xml_checksum>
<class_name>BuildingCharacteristicsReport</class_name>
<display_name>Building Characteristics Report</display_name>
Expand Down Expand Up @@ -326,6 +326,13 @@
<type>String</type>
<model_dependent>false</model_dependent>
</output>
<output>
<name>solar_hot_water</name>
<display_name>solar_hot_water</display_name>
<short_name>solar_hot_water</short_name>
<type>String</type>
<model_dependent>false</model_dependent>
</output>
<output>
<name>hvac_system_is_combined</name>
<display_name>hvac_system_is_combined</display_name>
Expand Down Expand Up @@ -424,6 +431,13 @@
<type>String</type>
<model_dependent>false</model_dependent>
</output>
<output>
<name>dehumidifier</name>
<display_name>dehumidifier</display_name>
<short_name>dehumidifier</short_name>
<type>String</type>
<model_dependent>false</model_dependent>
</output>
<output>
<name>refrigerator</name>
<display_name>refrigerator</display_name>
Expand Down
36 changes: 6 additions & 30 deletions measures/SimulationOutputReport/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,30 +97,6 @@ def run(runner, user_arguments)
gas_site_units = "therm"
other_fuel_site_units = "MBtu"

# FIXME: Temporary fix to handle % conditioned for Room AC and MSHP (https://github.com/NREL/OpenStudio-ResStock/issues/41)
percent_cooling = 1.0
percent_heating = 1.0
(1..9).each do |i|
percent = i*10
runner.workflow.workflowSteps.each do |step|
next if not step.result.is_initialized
step_result = step.result.get
next if !step_result.measureName.is_initialized or step_result.measureName.get != "build_existing_model"
step_result.stepValues.each do |step_value|
if step_value.name == "hvac_system_cooling"
next if not step_value.valueAsString.include?("#{percent}% Conditioned")
percent_cooling = percent.to_f/100.0
runner.registerWarning("Cooling system with % conditioned detected. #{percent_cooling.to_s} will be applied to cooling results.")
elsif step_value.name == "hvac_system_combined"
next if not step_value.valueAsString.include?("#{percent}% Conditioned")
percent_cooling = percent.to_f/100.0
percent_heating = percent_cooling
runner.registerWarning("Combined system with % conditioned detected. #{percent_cooling.to_s} will be applied to cooling and heating results.")
end
end
end
end

# Get PV electricity produced
pv_query = "SELECT -1*Value FROM TabularDataWithStrings WHERE ReportName='AnnualBuildingUtilityPerformanceSummary' AND ReportForString='Entire Facility' AND TableName='Electric Loads Satisfied' AND RowName='Total On-Site Electric Sources' AND ColumnName='Electricity' AND Units='GJ'"
pv_val = sqlFile.execAndReturnFirstDouble(pv_query)
Expand All @@ -134,8 +110,8 @@ def run(runner, user_arguments)

report_sim_output(runner, "total_site_electricity_kwh", [sqlFile.electricityTotalEndUses], "GJ", elec_site_units)
report_sim_output(runner, "net_site_electricity_kwh", [sqlFile.electricityTotalEndUses, pv_val], "GJ", elec_site_units)
report_sim_output(runner, "electricity_heating_kwh", [sqlFile.electricityHeating], "GJ", elec_site_units, percent_heating)
report_sim_output(runner, "electricity_cooling_kwh", [sqlFile.electricityCooling], "GJ", elec_site_units, percent_cooling)
report_sim_output(runner, "electricity_heating_kwh", [sqlFile.electricityHeating], "GJ", elec_site_units)
report_sim_output(runner, "electricity_cooling_kwh", [sqlFile.electricityCooling], "GJ", elec_site_units)
report_sim_output(runner, "electricity_interior_lighting_kwh", [sqlFile.electricityInteriorLighting], "GJ", elec_site_units)
report_sim_output(runner, "electricity_exterior_lighting_kwh", [sqlFile.electricityExteriorLighting], "GJ", elec_site_units)
report_sim_output(runner, "electricity_interior_equipment_kwh", [sqlFile.electricityInteriorEquipment], "GJ", elec_site_units)
Expand All @@ -147,14 +123,14 @@ def run(runner, user_arguments)
# NATURAL GAS

report_sim_output(runner, "total_site_natural_gas_therm", [sqlFile.naturalGasTotalEndUses], "GJ", gas_site_units)
report_sim_output(runner, "natural_gas_heating_therm", [sqlFile.naturalGasHeating], "GJ", gas_site_units, percent_heating)
report_sim_output(runner, "natural_gas_heating_therm", [sqlFile.naturalGasHeating], "GJ", gas_site_units)
report_sim_output(runner, "natural_gas_interior_equipment_therm", [sqlFile.naturalGasInteriorEquipment], "GJ", gas_site_units)
report_sim_output(runner, "natural_gas_water_systems_therm", [sqlFile.naturalGasWaterSystems], "GJ", gas_site_units)

# OTHER FUEL

report_sim_output(runner, "total_site_other_fuel_mbtu", [sqlFile.otherFuelTotalEndUses], "GJ", other_fuel_site_units)
report_sim_output(runner, "other_fuel_heating_mbtu", [sqlFile.otherFuelHeating], "GJ", other_fuel_site_units, percent_heating)
report_sim_output(runner, "other_fuel_heating_mbtu", [sqlFile.otherFuelHeating], "GJ", other_fuel_site_units)
report_sim_output(runner, "other_fuel_interior_equipment_mbtu", [sqlFile.otherFuelInteriorEquipment], "GJ", other_fuel_site_units)
report_sim_output(runner, "other_fuel_water_systems_mbtu", [sqlFile.otherFuelWaterSystems], "GJ", other_fuel_site_units)

Expand Down Expand Up @@ -183,7 +159,7 @@ def run(runner, user_arguments)
cooling_capacity_w = sqlFile.execAndReturnFirstDouble(cooling_capacity_query)
break if cooling_capacity_w.is_initialized and cooling_capacity_w.get > 0
end
report_sim_output(runner, "hvac_cooling_capacity_w", [cooling_capacity_w], "W", "W", percent_cooling)
report_sim_output(runner, "hvac_cooling_capacity_w", [cooling_capacity_w], "W", "W")

heating_coils = [
'coil:heating:fuel',
Expand Down Expand Up @@ -213,7 +189,7 @@ def run(runner, user_arguments)
heating_capacity_w = sqlFile.execAndReturnFirstDouble(heating_capacity_query)
break if heating_capacity_w.is_initialized and heating_capacity_w.get > 0
end
report_sim_output(runner, "hvac_heating_capacity_w", [heating_capacity_w], "W", "W", percent_heating)
report_sim_output(runner, "hvac_heating_capacity_w", [heating_capacity_w], "W", "W")

# WEIGHT

Expand Down
6 changes: 3 additions & 3 deletions measures/SimulationOutputReport/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<schema_version>3.0</schema_version>
<name>simulation_output_report</name>
<uid>fc337100-8634-404e-8966-01243d292a79</uid>
<version_id>11a786a3-c568-40e3-8491-de6e9dc76ef0</version_id>
<version_modified>20170627T154757Z</version_modified>
<version_id>b374e233-42ce-4c5f-9571-b68a1401fdc7</version_id>
<version_modified>20170630T224753Z</version_modified>
<xml_checksum>2C8A3EEF</xml_checksum>
<class_name>SimulationOutputReport</class_name>
<display_name>Simulation Output Report</display_name>
Expand Down Expand Up @@ -227,7 +227,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>B2CEA422</checksum>
<checksum>824193A9</checksum>
</file>
</files>
</measure>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Option=None
1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Dependency=Location Region Dependency=Vintage Dependency=Heating Fuel Dependency=HVAC System Is Combined Option=None "Option=AC, SEER 8" "Option=AC, SEER 10" "Option=AC, SEER 13" "Option=AC, SEER 15" "Option=Room AC, EER 8.5, 20% Conditioned" "Option=Room AC, EER 10.7, 20% Conditioned"
Dependency=Location Region Dependency=Vintage Dependency=Heating Fuel Dependency=HVAC System Is Combined Option=None "Option=AC, SEER 8" "Option=AC, SEER 10" "Option=AC, SEER 13" "Option=AC, SEER 15" "Option=FIXME Room AC, EER 8.5, 20% Conditioned" "Option=FIXME Room AC, EER 10.7, 20% Conditioned"
CR02 1950s Electricity No 0.207140067 0.05171226 0.305757168 0.188186221 0.030733031 0.072157085 0.14431417
CR02 1960s Electricity No 0.166652488 0.063252596 0.374993465 0.243490364 0.043182056 0.03614301 0.07228602
CR02 1970s Electricity No 0.144392608 0.072685941 0.337020991 0.21517903 0.038195579 0.064175284 0.128350567
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Option=None
1
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<schema_version>3.0</schema_version>
<name>building_characteristics_report</name>
<uid>90eecbe2-d8e2-47db-9079-5d9029fb3e67</uid>
<version_id>eb372dee-e719-4aca-8ad2-bc15a2dfa091</version_id>
<version_modified>20170512T180422Z</version_modified>
<version_id>96ed058f-12e1-4f75-bbc1-752a8266607d</version_id>
<version_modified>20170717T184839Z</version_modified>
<xml_checksum>2EA103AF</xml_checksum>
<class_name>BuildingCharacteristicsReport</class_name>
<display_name>Building Characteristics Report</display_name>
Expand Down Expand Up @@ -326,6 +326,13 @@
<type>String</type>
<model_dependent>false</model_dependent>
</output>
<output>
<name>solar_hot_water</name>
<display_name>solar_hot_water</display_name>
<short_name>solar_hot_water</short_name>
<type>String</type>
<model_dependent>false</model_dependent>
</output>
<output>
<name>hvac_system_is_combined</name>
<display_name>hvac_system_is_combined</display_name>
Expand Down Expand Up @@ -424,6 +431,13 @@
<type>String</type>
<model_dependent>false</model_dependent>
</output>
<output>
<name>dehumidifier</name>
<display_name>dehumidifier</display_name>
<short_name>dehumidifier</short_name>
<type>String</type>
<model_dependent>false</model_dependent>
</output>
<output>
<name>refrigerator</name>
<display_name>refrigerator</display_name>
Expand Down
36 changes: 6 additions & 30 deletions project_resstock_dsgrid/measures/SimulationOutputReport/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,30 +97,6 @@ def run(runner, user_arguments)
gas_site_units = "therm"
other_fuel_site_units = "MBtu"

# FIXME: Temporary fix to handle % conditioned for Room AC and MSHP (https://github.com/NREL/OpenStudio-ResStock/issues/41)
percent_cooling = 1.0
percent_heating = 1.0
(1..9).each do |i|
percent = i*10
runner.workflow.workflowSteps.each do |step|
next if not step.result.is_initialized
step_result = step.result.get
next if !step_result.measureName.is_initialized or step_result.measureName.get != "build_existing_model"
step_result.stepValues.each do |step_value|
if step_value.name == "hvac_system_cooling"
next if not step_value.valueAsString.include?("#{percent}% Conditioned")
percent_cooling = percent.to_f/100.0
runner.registerWarning("Cooling system with % conditioned detected. #{percent_cooling.to_s} will be applied to cooling results.")
elsif step_value.name == "hvac_system_combined"
next if not step_value.valueAsString.include?("#{percent}% Conditioned")
percent_cooling = percent.to_f/100.0
percent_heating = percent_cooling
runner.registerWarning("Combined system with % conditioned detected. #{percent_cooling.to_s} will be applied to cooling and heating results.")
end
end
end
end

# Get PV electricity produced
pv_query = "SELECT -1*Value FROM TabularDataWithStrings WHERE ReportName='AnnualBuildingUtilityPerformanceSummary' AND ReportForString='Entire Facility' AND TableName='Electric Loads Satisfied' AND RowName='Total On-Site Electric Sources' AND ColumnName='Electricity' AND Units='GJ'"
pv_val = sqlFile.execAndReturnFirstDouble(pv_query)
Expand All @@ -134,8 +110,8 @@ def run(runner, user_arguments)

report_sim_output(runner, "total_site_electricity_kwh", [sqlFile.electricityTotalEndUses], "GJ", elec_site_units)
report_sim_output(runner, "net_site_electricity_kwh", [sqlFile.electricityTotalEndUses, pv_val], "GJ", elec_site_units)
report_sim_output(runner, "electricity_heating_kwh", [sqlFile.electricityHeating], "GJ", elec_site_units, percent_heating)
report_sim_output(runner, "electricity_cooling_kwh", [sqlFile.electricityCooling], "GJ", elec_site_units, percent_cooling)
report_sim_output(runner, "electricity_heating_kwh", [sqlFile.electricityHeating], "GJ", elec_site_units)
report_sim_output(runner, "electricity_cooling_kwh", [sqlFile.electricityCooling], "GJ", elec_site_units)
report_sim_output(runner, "electricity_interior_lighting_kwh", [sqlFile.electricityInteriorLighting], "GJ", elec_site_units)
report_sim_output(runner, "electricity_exterior_lighting_kwh", [sqlFile.electricityExteriorLighting], "GJ", elec_site_units)
report_sim_output(runner, "electricity_interior_equipment_kwh", [sqlFile.electricityInteriorEquipment], "GJ", elec_site_units)
Expand All @@ -147,14 +123,14 @@ def run(runner, user_arguments)
# NATURAL GAS

report_sim_output(runner, "total_site_natural_gas_therm", [sqlFile.naturalGasTotalEndUses], "GJ", gas_site_units)
report_sim_output(runner, "natural_gas_heating_therm", [sqlFile.naturalGasHeating], "GJ", gas_site_units, percent_heating)
report_sim_output(runner, "natural_gas_heating_therm", [sqlFile.naturalGasHeating], "GJ", gas_site_units)
report_sim_output(runner, "natural_gas_interior_equipment_therm", [sqlFile.naturalGasInteriorEquipment], "GJ", gas_site_units)
report_sim_output(runner, "natural_gas_water_systems_therm", [sqlFile.naturalGasWaterSystems], "GJ", gas_site_units)

# OTHER FUEL

report_sim_output(runner, "total_site_other_fuel_mbtu", [sqlFile.otherFuelTotalEndUses], "GJ", other_fuel_site_units)
report_sim_output(runner, "other_fuel_heating_mbtu", [sqlFile.otherFuelHeating], "GJ", other_fuel_site_units, percent_heating)
report_sim_output(runner, "other_fuel_heating_mbtu", [sqlFile.otherFuelHeating], "GJ", other_fuel_site_units)
report_sim_output(runner, "other_fuel_interior_equipment_mbtu", [sqlFile.otherFuelInteriorEquipment], "GJ", other_fuel_site_units)
report_sim_output(runner, "other_fuel_water_systems_mbtu", [sqlFile.otherFuelWaterSystems], "GJ", other_fuel_site_units)

Expand Down Expand Up @@ -183,7 +159,7 @@ def run(runner, user_arguments)
cooling_capacity_w = sqlFile.execAndReturnFirstDouble(cooling_capacity_query)
break if cooling_capacity_w.is_initialized and cooling_capacity_w.get > 0
end
report_sim_output(runner, "hvac_cooling_capacity_w", [cooling_capacity_w], "W", "W", percent_cooling)
report_sim_output(runner, "hvac_cooling_capacity_w", [cooling_capacity_w], "W", "W")

heating_coils = [
'coil:heating:fuel',
Expand Down Expand Up @@ -213,7 +189,7 @@ def run(runner, user_arguments)
heating_capacity_w = sqlFile.execAndReturnFirstDouble(heating_capacity_query)
break if heating_capacity_w.is_initialized and heating_capacity_w.get > 0
end
report_sim_output(runner, "hvac_heating_capacity_w", [heating_capacity_w], "W", "W", percent_heating)
report_sim_output(runner, "hvac_heating_capacity_w", [heating_capacity_w], "W", "W")

# WEIGHT

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<schema_version>3.0</schema_version>
<name>simulation_output_report</name>
<uid>fc337100-8634-404e-8966-01243d292a79</uid>
<version_id>11a786a3-c568-40e3-8491-de6e9dc76ef0</version_id>
<version_modified>20170627T154757Z</version_modified>
<version_id>b374e233-42ce-4c5f-9571-b68a1401fdc7</version_id>
<version_modified>20170630T224753Z</version_modified>
<xml_checksum>2C8A3EEF</xml_checksum>
<class_name>SimulationOutputReport</class_name>
<display_name>Simulation Output Report</display_name>
Expand Down Expand Up @@ -227,7 +227,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>B2CEA422</checksum>
<checksum>824193A9</checksum>
</file>
</files>
</measure>

0 comments on commit fee33d6

Please sign in to comment.