openstudio-standards 0.8.3 → 0.8.5.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/data/geometry/ASHRAECollege.osm +30 -30
- data/data/geometry/ASHRAECourthouse.osm +22 -22
- data/data/geometry/ASHRAESmallOfficeDetailed.osm +2 -2
- data/data/geometry/DEER_Asm.osm +1 -1
- data/data/geometry/DEER_ECC.osm +1 -1
- data/data/geometry/DEER_EPr.osm +1 -1
- data/data/geometry/DEER_ERC.osm +1 -1
- data/data/geometry/DEER_ESe.osm +1 -1
- data/data/geometry/DEER_EUn.osm +1 -1
- data/data/geometry/DEER_Hsp.osm +1 -1
- data/data/geometry/DEER_Htl.osm +1 -1
- data/data/geometry/DEER_MBT.osm +1 -1
- data/data/geometry/DEER_MFm.osm +1 -1
- data/data/geometry/DEER_Nrs.osm +1 -1
- data/data/geometry/DEER_OfL.osm +1 -1
- data/data/geometry/DEER_OfS.osm +1 -1
- data/data/geometry/DEER_RFF.osm +1 -1
- data/data/geometry/DEER_RSD.osm +1 -1
- data/data/geometry/DEER_Rt3.osm +1 -1
- data/data/geometry/DEER_RtS.osm +1 -1
- data/data/standards/export_OpenStudio_libraries.rb +2 -3
- data/data/standards/test_performance_expected_dd_results.csv +42 -42
- data/lib/openstudio-standards/btap/NECB_building_types.csv +35 -0
- data/lib/openstudio-standards/btap/NECB_space_types.csv +109 -0
- data/lib/openstudio-standards/btap/activity.rb +480 -0
- data/lib/openstudio-standards/btap/attributes.rb +166 -0
- data/lib/openstudio-standards/btap/bridging.rb +561 -1402
- data/lib/openstudio-standards/btap/btap.rb +4 -2
- data/lib/openstudio-standards/btap/btap_test_helper.rb +86 -0
- data/lib/openstudio-standards/btap/carbon/btap_carbon.rb +177 -0
- data/lib/openstudio-standards/btap/common_paths.rb +81 -0
- data/lib/openstudio-standards/btap/common_resources/ConstructionProperties.csv +52 -0
- data/lib/openstudio-standards/btap/common_resources/Constructions.csv +37 -0
- data/lib/openstudio-standards/btap/common_resources/carbon_frame.csv +35 -0
- data/lib/openstudio-standards/btap/common_resources/carbon_glazing.csv +35 -0
- data/lib/openstudio-standards/btap/common_resources/carbon_opaque.csv +164 -0
- data/lib/openstudio-standards/btap/common_resources/construction_sets.csv +1270 -0
- data/lib/openstudio-standards/btap/common_resources/constructions_glazing.csv +121 -0
- data/lib/openstudio-standards/btap/common_resources/constructions_opaque.csv +2256 -0
- data/lib/openstudio-standards/btap/common_resources/costs.csv +1897 -0
- data/lib/openstudio-standards/btap/common_resources/costs_local_factors.csv +2315 -0
- data/lib/openstudio-standards/btap/common_resources/hvac_vent_ahu.csv +925 -0
- data/lib/openstudio-standards/btap/common_resources/lighting.csv +364 -0
- data/lib/openstudio-standards/btap/common_resources/lighting_sets.csv +2667 -0
- data/lib/openstudio-standards/btap/common_resources/locations.csv +75 -0
- data/lib/openstudio-standards/btap/common_resources/materials_glazing.csv +35 -0
- data/lib/openstudio-standards/btap/common_resources/materials_hvac.csv +1686 -0
- data/lib/openstudio-standards/btap/common_resources/materials_lighting.csv +267 -0
- data/lib/openstudio-standards/btap/common_resources/materials_opaque.csv +164 -0
- data/lib/openstudio-standards/btap/costing/README.md +502 -0
- data/lib/openstudio-standards/btap/costing/btap_costing.rb +469 -0
- data/lib/openstudio-standards/btap/costing/btap_measure_helper.rb +359 -0
- data/lib/openstudio-standards/btap/costing/btap_workflow.rb +117 -0
- data/lib/openstudio-standards/btap/costing/copy_test_results_files_to_expected_results.rb +11 -0
- data/lib/openstudio-standards/btap/costing/cost_building_from_file.rb +136 -0
- data/lib/openstudio-standards/btap/costing/costing_database_wrapper.rb +173 -0
- data/lib/openstudio-standards/btap/costing/daylighting_sensor_control_costing.rb +354 -0
- data/lib/openstudio-standards/btap/costing/dcv_costing.rb +314 -0
- data/lib/openstudio-standards/btap/costing/dummy.epw +8768 -0
- data/lib/openstudio-standards/btap/costing/dummy.osm +5320 -0
- data/lib/openstudio-standards/btap/costing/envelope_costing.rb +215 -0
- data/lib/openstudio-standards/btap/costing/heating_cooling_costing.rb +2584 -0
- data/lib/openstudio-standards/btap/costing/led_lighting_costing.rb +156 -0
- data/lib/openstudio-standards/btap/costing/lighting_costing.rb +209 -0
- data/lib/openstudio-standards/btap/costing/mech_sizing.json +502 -0
- data/lib/openstudio-standards/btap/costing/neb_end_use_prices.csv +42 -0
- data/lib/openstudio-standards/btap/costing/necb_2011_spacetype_info.csv +225 -0
- data/lib/openstudio-standards/btap/costing/necb_reference_runs.csv +28705 -0
- data/lib/openstudio-standards/btap/costing/nv_costing.rb +547 -0
- data/lib/openstudio-standards/btap/costing/parallel_tests.rb +92 -0
- data/lib/openstudio-standards/btap/costing/pv_ground_costing.rb +687 -0
- data/lib/openstudio-standards/btap/costing/shw_costing.rb +705 -0
- data/lib/openstudio-standards/btap/costing/test_list.txt +15 -0
- data/lib/openstudio-standards/btap/costing/test_run_all_test_locally.rb +27 -0
- data/lib/openstudio-standards/btap/costing/test_run_costing_tests.rb +80 -0
- data/lib/openstudio-standards/btap/costing/ventilation_costing.rb +2616 -0
- data/lib/openstudio-standards/btap/geometry.rb +86 -6
- data/lib/openstudio-standards/btap/structure.rb +657 -0
- data/lib/openstudio-standards/constructions/modify.rb +2 -1
- data/lib/openstudio-standards/create_typical/create_typical.rb +17 -33
- data/lib/openstudio-standards/create_typical/space_type_ratios.rb +36 -36
- data/lib/openstudio-standards/equipment/create_transformer.rb +104 -0
- data/lib/openstudio-standards/equipment/create_typical_equipment.rb +117 -0
- data/lib/openstudio-standards/equipment/data/electric_equipment_space_types.json +1514 -0
- data/lib/openstudio-standards/equipment/data/gas_equipment_space_types.json +227 -0
- data/lib/openstudio-standards/exterior_lighting/create.rb +22 -22
- data/lib/openstudio-standards/exterior_lighting/information.rb +3 -2
- data/lib/openstudio-standards/hvac/components/air_conditioner_vrf.rb +482 -0
- data/lib/openstudio-standards/hvac/components/air_terminal.rb +31 -0
- data/lib/openstudio-standards/hvac/components/boiler_hot_water.rb +163 -0
- data/lib/openstudio-standards/hvac/components/central_air_source_heat_pump.rb +220 -0
- data/lib/openstudio-standards/hvac/components/chiller.rb +25 -0
- data/lib/openstudio-standards/hvac/components/coil.rb +276 -0
- data/lib/openstudio-standards/hvac/components/coil_cooling_dx_multi_speed.rb +40 -0
- data/lib/openstudio-standards/hvac/components/coil_cooling_dx_single_speed.rb +300 -0
- data/lib/openstudio-standards/hvac/components/coil_cooling_dx_two_speed.rb +187 -0
- data/lib/openstudio-standards/hvac/components/coil_cooling_water.rb +80 -0
- data/lib/openstudio-standards/hvac/components/coil_cooling_water_to_air_heat_pump_equation_fit.rb +182 -0
- data/lib/openstudio-standards/hvac/components/coil_heating_dx_single_speed.rb +220 -0
- data/lib/openstudio-standards/hvac/components/coil_heating_electric.rb +56 -0
- data/lib/openstudio-standards/hvac/components/coil_heating_gas.rb +90 -0
- data/lib/openstudio-standards/hvac/components/coil_heating_gas_multi_stage.rb +33 -0
- data/lib/openstudio-standards/hvac/components/coil_heating_water.rb +98 -0
- data/lib/openstudio-standards/hvac/components/coil_heating_water_to_air_heat_pump_equation_fit.rb +147 -0
- data/lib/openstudio-standards/hvac/components/component.rb +39 -0
- data/lib/openstudio-standards/{standards/ashrae_90_1/data/ashrae_90_1.fans.json → hvac/components/data/fans.json} +6 -6
- data/lib/openstudio-standards/hvac/components/fan.rb +363 -0
- data/lib/openstudio-standards/hvac/components/heat_exchanger_air_to_air.rb +203 -0
- data/lib/openstudio-standards/hvac/components/pump.rb +181 -0
- data/lib/openstudio-standards/hvac/controls/radiant_system_controls.rb +594 -0
- data/lib/openstudio-standards/hvac/conversions.rb +222 -0
- data/lib/openstudio-standards/hvac/curves.rb +192 -0
- data/lib/openstudio-standards/hvac/helpers.rb +357 -0
- data/lib/openstudio-standards/hvac/setpoint_managers/information.rb +4 -4
- data/lib/openstudio-standards/interior_lighting/create_lights.rb +52 -0
- data/lib/openstudio-standards/interior_lighting/create_typical_interior_lighting.rb +254 -0
- data/lib/openstudio-standards/interior_lighting/data/convert_lighting_data.rb +249 -0
- data/lib/openstudio-standards/interior_lighting/data/lighting_space_types.csv +96 -0
- data/lib/openstudio-standards/interior_lighting/data/lighting_space_types.json +1429 -0
- data/lib/openstudio-standards/interior_lighting/data/lighting_technology.csv +46 -0
- data/lib/openstudio-standards/interior_lighting/data/lighting_technology.json +859 -0
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.Model.rb +4 -4
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Model.rb +4 -4
- data/lib/openstudio-standards/prototypes/ashrae_90_1/nrel_nze_ready_2017/nrel_zne_ready_2017.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.HighRiseApartment.rb +6 -7
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Hospital.rb +15 -15
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeHotel.rb +4 -4
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeOffice.rb +5 -5
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.MediumOffice.rb +6 -6
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Outpatient.rb +7 -7
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.PrimarySchool.rb +4 -4
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SecondarySchool.rb +6 -6
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SmallOfficeDetailed.rb +5 -1
- data/lib/openstudio-standards/prototypes/common/data/prototype_space_type_map.json +2594 -0
- data/lib/openstudio-standards/prototypes/common/data/thermostat_schedule_lookup.json +2108 -0
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.AirTerminalSingleDuctVAVReheat.rb +33 -0
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Fan.rb +0 -140
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanConstantVolume.rb +1 -73
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanOnOff.rb +1 -69
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanVariableVolume.rb +0 -116
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanZoneExhaust.rb +0 -61
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.hvac.rb +2 -2
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.rb +128 -13
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.hvac_systems.rb +606 -607
- data/lib/openstudio-standards/prototypes/common/prototype_space_type_map.rb +41 -0
- data/lib/openstudio-standards/prototypes/common/space_type_equipment_map.rb +184 -0
- data/lib/openstudio-standards/prototypes/common/space_type_thermostat_schedule_map.rb +116 -0
- data/lib/openstudio-standards/qaqc/hvac.rb +12 -12
- data/lib/openstudio-standards/refrigeration/create_compressor.rb +2 -5
- data/lib/openstudio-standards/refrigeration/data/refrigeration_compressors.csv +4 -4
- data/lib/openstudio-standards/service_water_heating/create_water_heater.rb +1 -2
- data/lib/openstudio-standards/service_water_heating/create_water_use.rb +5 -5
- data/lib/openstudio-standards/space_type/data/level_1_space_types.json +612 -0
- data/lib/openstudio-standards/space_type/standards_space_type.rb +53 -0
- data/lib/openstudio-standards/standards/Standards.AirConditionerVariableRefrigerantFlow.rb +8 -26
- data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +13 -13
- data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctVAVReheat.rb +0 -24
- data/lib/openstudio-standards/standards/Standards.BoilerHotWater.rb +6 -43
- data/lib/openstudio-standards/standards/Standards.ChillerElectricEIR.rb +7 -24
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXMultiSpeed.rb +19 -44
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb +25 -50
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXTwoSpeed.rb +25 -33
- data/lib/openstudio-standards/standards/Standards.CoilCoolingWaterToAirHeatPumpEquationFit.rb +9 -22
- data/lib/openstudio-standards/standards/Standards.CoilDX.rb +15 -157
- data/lib/openstudio-standards/standards/Standards.CoilHeatingDXMultiSpeed.rb +2 -2
- data/lib/openstudio-standards/standards/Standards.CoilHeatingDXSingleSpeed.rb +18 -105
- data/lib/openstudio-standards/standards/Standards.CoilHeatingGas.rb +3 -23
- data/lib/openstudio-standards/standards/Standards.CoilHeatingGasMultiStage.rb +0 -24
- data/lib/openstudio-standards/standards/Standards.CoilHeatingWaterToAirHeatPumpEquationFit.rb +2 -86
- data/lib/openstudio-standards/standards/Standards.FanVariableVolume.rb +0 -107
- data/lib/openstudio-standards/standards/Standards.Model.rb +45 -20
- data/lib/openstudio-standards/standards/Standards.People.rb +113 -0
- data/lib/openstudio-standards/standards/Standards.PlantLoop.rb +11 -11
- data/lib/openstudio-standards/standards/Standards.Pump.rb +2 -147
- data/lib/openstudio-standards/standards/Standards.PumpVariableSpeed.rb +57 -41
- data/lib/openstudio-standards/standards/Standards.SpaceType.rb +30 -153
- data/lib/openstudio-standards/standards/Standards.Ventilation.rb +74 -0
- data/lib/openstudio-standards/standards/Standards.ZoneHVACComponent.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.PlantLoop.rb +4 -4
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.heat_pumps_heating.json +3 -3
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.spc_typ.json +37 -112
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/comstock_ashrae_90_1_2007/data/comstock_ashrae_90_1_2007.spc_typ.json +37 -102
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.heat_pumps_heating.json +3 -3
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.spc_typ.json +37 -112
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/comstock_ashrae_90_1_2010/data/comstock_ashrae_90_1_2010.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.heat_pumps_heating.json +6 -6
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.BoilerHotWater.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/comstock_ashrae_90_1_2013/data/comstock_ashrae_90_1_2013.spc_typ.json +37 -102
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.heat_pumps_heating.json +6 -6
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.BoilerHotWater.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/comstock_ashrae_90_1_2016/data/comstock_ashrae_90_1_2016.spc_typ.json +45 -109
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.heat_pumps_heating.json +6 -6
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirLoopHVAC.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.BoilerHotWater.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.CoilHeatingGas.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/comstock_ashrae_90_1_2019/data/comstock_ashrae_90_1_2019.spc_typ.json +45 -109
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.heat_pumps_heating.json +6 -6
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.curves.json +0 -200
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/comstock_doe_ref_1980_2004/data/comstock_doe_ref_1980_2004.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/data/doe_ref_1980_2004.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/comstock_doe_ref_pre_1980/data/comstock_doe_ref_pre_1980.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/data/doe_ref_pre_1980.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.PlantLoop.rb +5 -5
- data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.PlantLoop.rb +5 -5
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.AirLoopHVAC.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.ChillerElectricEIR.rb +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilCoolingDXSingleSpeed.rb +2 -68
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilCoolingDXTwoSpeed.rb +2 -35
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilDX.rb +42 -0
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilHeatingDXSingleSpeed.rb +5 -2
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilHeatingGas.rb +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.Model.rb +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.PlantLoop.rb +3 -3
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.SpaceType.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/ashrae_90_1_prm_2019.Model.rb +1 -0
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/ashrae_90_1_prm_2019_WaterHeaterMixed.rb +2 -4
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/data/ashrae_90_1_prm.curves.json +0 -200
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/data/ashrae_90_1_prm.fans.json +5 -5
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/ashrae_90_1_prm.UserData.rb +7 -1
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_enums.rb +0 -1
- data/lib/openstudio-standards/standards/cbes/data/cbes.curves.json +0 -200
- data/lib/openstudio-standards/standards/deer/data/deer.curves.json +0 -200
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/btap_pre1980.rb +21 -37
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/building_envelope.rb +12 -11
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_3_and_8_single_speed.rb +68 -27
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_4.rb +64 -25
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_6.rb +9 -14
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_systems.rb +4 -4
- data/lib/openstudio-standards/standards/necb/ECMS/ecms.rb +1 -1
- data/lib/openstudio-standards/standards/necb/ECMS/hvac_systems.rb +115 -112
- data/lib/openstudio-standards/standards/necb/NECB2011/autozone.rb +637 -249
- data/lib/openstudio-standards/standards/necb/NECB2011/beps_compliance_path.rb +16 -12
- data/lib/openstudio-standards/standards/necb/NECB2011/building_envelope.rb +799 -46
- data/lib/openstudio-standards/standards/necb/NECB2011/data/chillers.json +33 -51
- data/lib/openstudio-standards/standards/necb/NECB2011/data/constants.json +75 -7
- data/lib/openstudio-standards/standards/necb/NECB2011/data/fuel_type_sets.json +25 -1
- data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/HighriseApartmentMult.osm +14272 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/data/heat_pumps_heating.json +21 -15
- data/lib/openstudio-standards/standards/necb/NECB2011/data/necb_2015_table_c1.json +1 -1
- data/lib/openstudio-standards/standards/necb/NECB2011/data/space_types.json +437 -437
- data/lib/openstudio-standards/standards/necb/NECB2011/data/systems.json +516 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/data/systems_including_sys5.json +588 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_namer.rb +489 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_1_single_speed.rb +18 -6
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_2_and_5.rb +48 -5
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_multi_speed.rb +2 -2
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_single_speed.rb +35 -27
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_4.rb +34 -23
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_6.rb +8 -6
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb +68 -150
- data/lib/openstudio-standards/standards/necb/NECB2011/necb_2011.rb +444 -134
- data/lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb +61 -1
- data/lib/openstudio-standards/standards/necb/NECB2015/data/heat_pumps_heating.json +10 -2
- data/lib/openstudio-standards/standards/necb/NECB2015/data/space_types.json +636 -636
- data/lib/openstudio-standards/standards/necb/NECB2015/data/unitary_acs.json +38 -38
- data/lib/openstudio-standards/standards/necb/NECB2015/hvac_systems.rb +17 -8
- data/lib/openstudio-standards/standards/necb/NECB2017/data/space_types.json +636 -636
- data/lib/openstudio-standards/standards/necb/NECB2020/data/chillers.json +71 -71
- data/lib/openstudio-standards/standards/necb/NECB2020/data/heat_pumps_heating.json +16 -6
- data/lib/openstudio-standards/standards/necb/NECB2020/data/unitary_acs.json +60 -61
- data/lib/openstudio-standards/standards/necb/NECB2020/service_water_heating.rb +30 -30
- data/lib/openstudio-standards/standards/necb/README.md +343 -0
- data/lib/openstudio-standards/standards/necb/common/btap_analysis.rb +79 -0
- data/lib/openstudio-standards/standards/necb/common/btap_data.rb +206 -32
- data/lib/openstudio-standards/standards/necb/common/btap_datapoint.rb +75 -43
- data/lib/openstudio-standards/standards/necb/common/eccc_electric_grid_intensity_20250311.csv +14 -0
- data/lib/openstudio-standards/standards/necb/common/nir_gas_grid_intensity_20250311.csv +14 -0
- data/lib/openstudio-standards/standards/necb/common/system_types.yaml +0 -0
- data/lib/openstudio-standards/thermal_zone/{thermal_zone.rb → information.rb} +12 -45
- data/lib/openstudio-standards/thermal_zone/thermostat_schedules.rb +152 -0
- data/lib/openstudio-standards/utilities/logging.rb +18 -14
- data/lib/openstudio-standards/version.rb +1 -1
- data/lib/openstudio-standards/weather/modify.rb +2 -2
- data/lib/openstudio-standards/weather/stat_file.rb +2 -2
- data/lib/openstudio-standards.rb +67 -38
- metadata +141 -50
- data/lib/openstudio-standards/hvac/components/create.rb +0 -169
- data/lib/openstudio-standards/hvac/components/modify.rb +0 -42
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.AirConditionerVariableRefrigerantFlow.rb +0 -438
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.BoilerHotWater.rb +0 -123
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CentralAirSourceHeatPump.rb +0 -216
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilCoolingDXSingleSpeed.rb +0 -273
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilCoolingDXTwoSpeed.rb +0 -159
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilCoolingWater.rb +0 -77
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilCoolingWaterToAirHeatPumpEquationFit.rb +0 -154
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingDXSingleSpeed.rb +0 -214
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingElectric.rb +0 -53
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingGas.rb +0 -72
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingWater.rb +0 -95
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingWaterToAirHeatPumpEquationFit.rb +0 -125
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.ControllerWaterCoil.rb +0 -17
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.transformers.rb +0 -90
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Pump.rb +0 -4
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.PumpVariableSpeed.rb +0 -70
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.radiant_system_controls.rb +0 -590
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.utilities.rb +0 -901
- data/lib/openstudio-standards/standards/Standards.FanConstantVolume.rb +0 -5
- data/lib/openstudio-standards/standards/Standards.FanOnOff.rb +0 -5
- data/lib/openstudio-standards/standards/Standards.FanZoneExhaust.rb +0 -5
- data/lib/openstudio-standards/standards/Standards.HeaderedPumpsConstantSpeed.rb +0 -5
- data/lib/openstudio-standards/standards/Standards.HeaderedPumpsVariableSpeed.rb +0 -55
- data/lib/openstudio-standards/standards/Standards.PumpConstantSpeed.rb +0 -5
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanConstantVolume.rb +0 -5
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanOnOff.rb +0 -5
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanZoneExhaust.rb +0 -5
- data/lib/openstudio-standards/standards/cbes/data/cbes.fans.json +0 -328
- data/lib/openstudio-standards/standards/deer/data/deer.fans.json +0 -328
- /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.PumpVariableSpeed.rb +0 -0
- /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2007/ashrae_90_1_2007.PumpVariableSpeed.rb +0 -0
- /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.PumpVariableSpeed.rb +0 -0
- /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.PumpVariableSpeed.rb +0 -0
- /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.PumpVariableSpeed.rb +0 -0
- /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Pump.rb +0 -0
- /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.PumpVariableSpeed.rb +0 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
require 'singleton'
|
|
2
|
+
require 'json'
|
|
3
|
+
require 'csv'
|
|
4
|
+
|
|
5
|
+
# Singleton class to centralize all database operations
|
|
6
|
+
class CostingDatabase
|
|
7
|
+
include Singleton
|
|
8
|
+
|
|
9
|
+
def initialize
|
|
10
|
+
@cp = CommonPaths.instance # Stores paths
|
|
11
|
+
@db = Hash.new # Stores the costing database
|
|
12
|
+
|
|
13
|
+
# Load the database from the individual CSV files
|
|
14
|
+
# Load costing data
|
|
15
|
+
@db['costs'] = [] # Costing data
|
|
16
|
+
@db['localization_factors'] = [] # Local costing factors
|
|
17
|
+
@db['raw'] = {} # Raw data
|
|
18
|
+
@db['db_errors'] = []
|
|
19
|
+
|
|
20
|
+
data_costs = CSV.read(@cp.costs_path)
|
|
21
|
+
|
|
22
|
+
1.upto data_costs.length - 1 do |i|
|
|
23
|
+
row = data_costs[i]
|
|
24
|
+
index = row.each
|
|
25
|
+
item = Hash.new
|
|
26
|
+
item["baseCosts"] = Hash.new
|
|
27
|
+
costs = item["baseCosts"]
|
|
28
|
+
|
|
29
|
+
item["id"] = index.next
|
|
30
|
+
item["sheet"] = index.next
|
|
31
|
+
item["source"] = index.next
|
|
32
|
+
item["description"] = index.next
|
|
33
|
+
item["city"] = index.next
|
|
34
|
+
item["province_state"] = index.next
|
|
35
|
+
costs["materialOpCost"] = index.next.to_f
|
|
36
|
+
costs["laborOpCost"] = index.next.to_f
|
|
37
|
+
costs["equipmentOpCost"] = index.next.to_f
|
|
38
|
+
|
|
39
|
+
@db["costs"] << item
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Load the localization factors
|
|
43
|
+
data_factors = CSV.read(@cp.costs_local_factors_path)
|
|
44
|
+
|
|
45
|
+
1.upto data_factors.length - 1 do |i|
|
|
46
|
+
row = data_factors[i]
|
|
47
|
+
index = row.each
|
|
48
|
+
item = Hash.new
|
|
49
|
+
|
|
50
|
+
item["province_state"] = index.next
|
|
51
|
+
item["city"] = index.next
|
|
52
|
+
item["division"] = index.next
|
|
53
|
+
item["code_prefix"] = index.next
|
|
54
|
+
item["material"] = index.next.to_f
|
|
55
|
+
item["installation"] = index.next.to_f
|
|
56
|
+
item["total"] = index.next.to_f
|
|
57
|
+
|
|
58
|
+
@db["localization_factors"] << item
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Load the raw data
|
|
62
|
+
raw_data_names = [
|
|
63
|
+
'locations',
|
|
64
|
+
'construction_sets',
|
|
65
|
+
'constructions_opaque',
|
|
66
|
+
'materials_opaque',
|
|
67
|
+
'constructions_glazing',
|
|
68
|
+
'materials_glazing',
|
|
69
|
+
'Constructions',
|
|
70
|
+
'ConstructionProperties',
|
|
71
|
+
'lighting_sets',
|
|
72
|
+
'lighting',
|
|
73
|
+
'materials_lighting',
|
|
74
|
+
'hvac_vent_ahu',
|
|
75
|
+
'materials_hvac'
|
|
76
|
+
]
|
|
77
|
+
|
|
78
|
+
0.upto(raw_data_names.length - 1) do |i|
|
|
79
|
+
data_path = @cp.raw_paths[i]
|
|
80
|
+
unless File.exist?(data_path)
|
|
81
|
+
raise("Error: Could not find #{data_path}")
|
|
82
|
+
end
|
|
83
|
+
@db['raw'][raw_data_names[i]] = CSV.read(data_path, headers: true).map { |row| row.to_hash}
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Validate the construction sets and the AHU items.
|
|
88
|
+
def validate_database()
|
|
89
|
+
validate_constructions_sets()
|
|
90
|
+
validate_ahu_items_and_quantities()
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
def validate_constructions_sets()
|
|
94
|
+
construction_sets = @db['raw']['construction_sets']
|
|
95
|
+
failed = false
|
|
96
|
+
templates = ["NECB2011", "NECB2015", "NECB2017", "NECB2020", "BTAPPRE1980", "BTAP1980TO2010"]
|
|
97
|
+
bad_records = {}
|
|
98
|
+
bad_records[:invalid_space_type_names] = []
|
|
99
|
+
bad_records[:min_max_floor_range_errors] = []
|
|
100
|
+
# CHECK if spacetype names are valid in costing database
|
|
101
|
+
valid_space_types = []
|
|
102
|
+
templates.each do |template|
|
|
103
|
+
valid_space_types += Standard.build(template.gsub(/\s+/, "")).get_all_spacetype_names.map { |spacetype| (template + '-' + spacetype[0].to_s + '-' + spacetype[1].to_s).strip }
|
|
104
|
+
end
|
|
105
|
+
# construction_sets
|
|
106
|
+
|
|
107
|
+
construction_sets.each do |row|
|
|
108
|
+
target_space_type = "#{row['template'].gsub(/\s+/, "") + '-' + row['building_type']}-#{row['space_type']}".strip
|
|
109
|
+
unless valid_space_types.include?(target_space_type.to_s)
|
|
110
|
+
bad_records[:invalid_space_type_names] << {template: row['template'].gsub(/\s+/, ""), space_type: target_space_type}
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
# Check if # of floors contains 1 to 999
|
|
116
|
+
#Get Unique spacetypes.
|
|
117
|
+
bad_evelope_story_ranges = []
|
|
118
|
+
space_types = construction_sets.map { |row| {template: row["template"], building_type: row["building_type"], space_type: row["space_type"]} }.uniq
|
|
119
|
+
space_types.each do |space_type|
|
|
120
|
+
range = Array.new
|
|
121
|
+
instances = construction_sets.select { |row| row['template'] == space_type[:template] && row['building_type'] == space_type[:building_type] && row['space_type'] == space_type[:space_type] }
|
|
122
|
+
instances.each do |instance|
|
|
123
|
+
min_val = instance['min_stories'].to_i
|
|
124
|
+
min_val = 0 if min_val == 1
|
|
125
|
+
max_val = instance['max_stories'].to_i
|
|
126
|
+
range << min_val
|
|
127
|
+
range << max_val
|
|
128
|
+
failed = true
|
|
129
|
+
end
|
|
130
|
+
range.sort!
|
|
131
|
+
incomplete_range = (range.first != 0 or range.last < 999)
|
|
132
|
+
possible_duplicate = (range.uniq.size != range.size)
|
|
133
|
+
if incomplete_range or possible_duplicate
|
|
134
|
+
space_type[:range] = range
|
|
135
|
+
space_type[:error] = {incomplete_range: incomplete_range, possible_duplicate: possible_duplicate}
|
|
136
|
+
bad_records[:min_max_floor_range_errors] << space_type
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
if bad_records[:min_max_floor_range_errors].size > 0 or bad_records[:invalid_space_type_names].size > 0
|
|
140
|
+
puts "Errors in ConstructionSets Costing Table."
|
|
141
|
+
puts JSON.pretty_generate(bad_records)
|
|
142
|
+
raise("costing spreadsheet validation failed")
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
# This method verifies that, for a given row the number of items listed in the 'id_layers' column is the same as the
|
|
148
|
+
# number of quantities listed in the 'Id_layers_quantity_multipliers' column in the 'hvac_vent_ahu' sheet in the
|
|
149
|
+
# costing spreadsheet. If there is a difference in the number of items and number of quantities in a row then that
|
|
150
|
+
# row needs to be investigated and fixed.
|
|
151
|
+
def validate_ahu_items_and_quantities()
|
|
152
|
+
# Find out if there are a different number of items and number oof quantities in any row of the 'hvac_vent_ahu'
|
|
153
|
+
# sheet.
|
|
154
|
+
diff_id_quantities = @db['raw']['hvac_vent_ahu'].select{|data| data['id_layers'].to_s.split(',').size != data['Id_layers_quantity_multipliers'].to_s.split(',').size}
|
|
155
|
+
# If there is a difference (that is the diff_id_quantities has something in it) then raise an error.
|
|
156
|
+
unless diff_id_quantities.empty?
|
|
157
|
+
puts "Errors in the hvac_vent_ahu Costing Table. The number of id_layers does not match the number of"
|
|
158
|
+
puts "Id_layers_quantity_multipliers for the following item(s):"
|
|
159
|
+
puts JSON.pretty_generate(diff_id_quantities)
|
|
160
|
+
raise("costing spreadsheet validation failed")
|
|
161
|
+
end
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# Overload the element of operator for database accesses
|
|
165
|
+
def [](element)
|
|
166
|
+
@db[element]
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Overload the element assignment operator for inputting additional data
|
|
170
|
+
def []=(element, value)
|
|
171
|
+
@db[element] = value
|
|
172
|
+
end
|
|
173
|
+
end
|
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
class BTAPCosting
|
|
2
|
+
|
|
3
|
+
def cost_audit_daylighting_sensor_control(model:, prototype_creator:)
|
|
4
|
+
@costing_report["lighting"]["daylighting_sensor_control"] = []
|
|
5
|
+
# NOTE: Number of daylighting sensors is based on how many a daylighted space needs sensors as per Mike Lubun's costing spec, rather than daylighting sensor control measure.
|
|
6
|
+
standards_template = model.building.get.standardsTemplate.to_s
|
|
7
|
+
if standards_template.include?('NECB')
|
|
8
|
+
# insert a space between NECB and 2011/2015/2017
|
|
9
|
+
standards_template = standards_template.gsub(/NECB(\d)/, 'NECB \1')
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
#-------------------------------------------------------------------------------------------------------------------
|
|
13
|
+
dsc_cost_total = 0.0
|
|
14
|
+
all_tz_primary_sidelighted_quatity = 0.0
|
|
15
|
+
all_tz_skylight_quatity = 0.0
|
|
16
|
+
#-------------------------------------------------------------------------------------------------------------------
|
|
17
|
+
model.getThermalZonesSorted.each do |tz|
|
|
18
|
+
if tz.primaryDaylightingControl.is_initialized
|
|
19
|
+
tz_cost_primary_sidelighted = 0.0
|
|
20
|
+
tz_cost_skylight = 0.0
|
|
21
|
+
tz_multiplier = tz.multiplier()
|
|
22
|
+
daylight_spaces = []
|
|
23
|
+
primary_sidelighted_area_hash = {}
|
|
24
|
+
daylighted_area_under_skylights_hash = {}
|
|
25
|
+
primary_sidelighted_area = 0.0
|
|
26
|
+
daylighted_under_skylight_area = 0.0
|
|
27
|
+
tz_area = 0.0
|
|
28
|
+
tz_number_fixtures = 0.0
|
|
29
|
+
tz_primary_sidelighted_ratio_daylight_area = 0.0
|
|
30
|
+
tz_primary_sidelighted_number_fixtures = 0.0
|
|
31
|
+
tz_primary_sidelighted_number_sensors = 0.0
|
|
32
|
+
tz_skylights_ratio_daylight_area = 0.0
|
|
33
|
+
tz_skylights_number_fixtures = 0.0
|
|
34
|
+
tz_skylights_number_sensors = 0.0
|
|
35
|
+
if !tz.primaryDaylightingControl.get.name().empty? && tz.fractionofZoneControlledbyPrimaryDaylightingControl() > 0.00
|
|
36
|
+
tz.spaces().sort.each do |space|
|
|
37
|
+
daylight_spaces << space
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
#-------------------------------------------------------------------------------------------------------------------
|
|
42
|
+
##### Calculate tz_primary_sidelighted_area AND tz_daylighted_area_under_skylights.
|
|
43
|
+
##### The above two area values are required for the calculation of tz_primary_sidelighted_number_fixtures AND tz_skylights_number_fixtures
|
|
44
|
+
daylight_spaces.sort.each do |daylight_space|
|
|
45
|
+
# Go to the next space if the current space's space type is undefined.
|
|
46
|
+
next if daylight_space.spaceType.get.name.to_s.downcase.include? "undefined"
|
|
47
|
+
|
|
48
|
+
area_weighted_vt_handle = 0.0
|
|
49
|
+
window_area_sum = 0.0
|
|
50
|
+
skylight_area_weighted_vt_handle = 0.0
|
|
51
|
+
skylight_area_sum = 0.0
|
|
52
|
+
|
|
53
|
+
##### Find lights_type in each daylight_space
|
|
54
|
+
led_lights = 0
|
|
55
|
+
daylight_space_type = daylight_space.spaceType()
|
|
56
|
+
daylight_space_type.get.lights.sort.each do |inst|
|
|
57
|
+
daylight_space_lights_definition = inst.lightsDefinition
|
|
58
|
+
daylight_space_lights_definition_name = daylight_space_lights_definition.name
|
|
59
|
+
if daylight_space_lights_definition_name.to_s.include?('LED lighting')
|
|
60
|
+
led_lights += 1
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
if (led_lights > 0) or (standards_template == 'NECB 2020')
|
|
64
|
+
lights_type = 'LED'
|
|
65
|
+
else
|
|
66
|
+
lights_type = 'CFL'
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
##### Find height of daylight_space
|
|
70
|
+
max_space_height_m = 0.0
|
|
71
|
+
daylight_space.surfaces.sort.select { |surface| surface.surfaceType == 'Wall' }.each do |wall_surface|
|
|
72
|
+
# Find the vertex with the max z value.
|
|
73
|
+
vertex_with_max_height = wall_surface.vertices.max_by(&:z)
|
|
74
|
+
# Replace max if this surface has something bigger.
|
|
75
|
+
max_space_height_m = vertex_with_max_height.z if vertex_with_max_height.z > max_space_height_m
|
|
76
|
+
end
|
|
77
|
+
max_space_height_ft = (OpenStudio.convert(max_space_height_m, 'm', 'ft').get) #Convert height to ft
|
|
78
|
+
|
|
79
|
+
##### Find area, floor_surface, and floor_vertices of daylight_space
|
|
80
|
+
floor_surface = nil
|
|
81
|
+
floor_area = 0.0
|
|
82
|
+
floor_vertices = []
|
|
83
|
+
daylight_space.surfaces.sort.each do |surface|
|
|
84
|
+
if surface.surfaceType == 'Floor'
|
|
85
|
+
floor_surface = surface
|
|
86
|
+
floor_area += surface.netArea
|
|
87
|
+
floor_vertices << surface.vertices
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
##### COSTING-related step: Find fixture type that should be used in the daylight_space based on space_type, template, and lights_type
|
|
92
|
+
search_fixture_type = {
|
|
93
|
+
row_id_1: daylight_space.spaceType.get.standardsSpaceType.to_s, #space_type
|
|
94
|
+
row_id_2: standards_template,
|
|
95
|
+
row_id_3: lights_type
|
|
96
|
+
}
|
|
97
|
+
sheet_name = 'lighting_sets'
|
|
98
|
+
if max_space_height_ft < 7.88
|
|
99
|
+
column_search = 'Fixture_type_less_than_7.88ft_ht'
|
|
100
|
+
elsif max_space_height_ft >= 7.88 && max_space_height_ft < 15.75
|
|
101
|
+
column_search = 'Fixture_type_7.88_to_15.75ft_ht'
|
|
102
|
+
else #i.e. max_space_height_ft >= 15.75ft_ht
|
|
103
|
+
column_search = 'Fixture_type_greater_than_>15.75ft_ht'
|
|
104
|
+
end
|
|
105
|
+
row_search_1 = 'space_type'
|
|
106
|
+
row_search_2 = 'template'
|
|
107
|
+
row_search_3 = 'Type'
|
|
108
|
+
fixture_type = get_fixture_type_id(fixture_info: search_fixture_type, sheet_name: sheet_name, row_name_1: row_search_1, row_name_2: row_search_2, row_name_3: row_search_3, column_search: column_search)
|
|
109
|
+
|
|
110
|
+
##### COSTING-related step: Find number_fixtures_per_1000_ft2 that should be considered in the daylight_space based on fixture_type
|
|
111
|
+
search_fixtures_per_1000_ft2 = @costing_database['raw']['lighting'].select { |data|
|
|
112
|
+
data['lighting_type_id'].to_f.round(1) == fixture_type.to_f.round(1)
|
|
113
|
+
}.first
|
|
114
|
+
if search_fixtures_per_1000_ft2.nil?
|
|
115
|
+
puts("No data found for #{search_fixtures_per_1000_ft2}!")
|
|
116
|
+
raise
|
|
117
|
+
end
|
|
118
|
+
number_fixtures_per_1000_ft2 = search_fixtures_per_1000_ft2['Fix_1000ft'].to_i
|
|
119
|
+
|
|
120
|
+
##### COSTING-related step: Calculate number_fixtures_space that should be considered in the daylight_space based on number_fixtures_per_1000_ft2 and area of daylight_space
|
|
121
|
+
floor_area_ft2 = (OpenStudio.convert(floor_area, 'm^2', 'ft^2').get) #convert floor_area to ft2
|
|
122
|
+
number_fixtures_space = (floor_area_ft2 / 1000) * number_fixtures_per_1000_ft2
|
|
123
|
+
number_fixtures_space = number_fixtures_space.ceil
|
|
124
|
+
tz_number_fixtures += number_fixtures_space
|
|
125
|
+
|
|
126
|
+
#-----------------------------------------------------------------------------------------------------------------
|
|
127
|
+
############################## Calculate 'primary_sidelighted_area' of the thermal zone ##########################
|
|
128
|
+
primary_sidelighted_area, area_weighted_vt_handle, window_area_sum =
|
|
129
|
+
prototype_creator.get_parameters_sidelighting(daylight_space: daylight_space,
|
|
130
|
+
floor_surface: floor_surface,
|
|
131
|
+
floor_vertices: floor_vertices,
|
|
132
|
+
floor_area: floor_area,
|
|
133
|
+
primary_sidelighted_area: primary_sidelighted_area,
|
|
134
|
+
area_weighted_vt_handle: area_weighted_vt_handle,
|
|
135
|
+
window_area_sum: window_area_sum)
|
|
136
|
+
|
|
137
|
+
primary_sidelighted_area_hash[daylight_space.name.to_s] = primary_sidelighted_area
|
|
138
|
+
#-----------------------------------------------------------------------------------------------------------------
|
|
139
|
+
########################### Calculate 'daylighted_under_skylight_area' of the thermal zone #########################
|
|
140
|
+
##### Loop through the surfaces of each daylight_space to calculate daylighted_area_under_skylights and skylight_effective_aperture for each daylight_space
|
|
141
|
+
daylighted_under_skylight_area, skylight_area_weighted_vt_handle, skylight_area_sum =
|
|
142
|
+
prototype_creator.get_parameters_skylight(daylight_space: daylight_space,
|
|
143
|
+
skylight_area_weighted_vt_handle: skylight_area_weighted_vt_handle,
|
|
144
|
+
skylight_area_sum: skylight_area_sum,
|
|
145
|
+
daylighted_under_skylight_area: daylighted_under_skylight_area)
|
|
146
|
+
|
|
147
|
+
daylighted_area_under_skylights_hash[daylight_space.name.to_s] = daylighted_under_skylight_area
|
|
148
|
+
#-----------------------------------------------------------------------------------------------------------------
|
|
149
|
+
|
|
150
|
+
tz_area += floor_area
|
|
151
|
+
|
|
152
|
+
end #daylight_spaces.sort.each do |daylight_space|
|
|
153
|
+
|
|
154
|
+
#-------------------------------------------------------------------------------------------------------------------
|
|
155
|
+
# If no fixtures or daylighting is defined then go to the next thermal zone
|
|
156
|
+
next if tz_number_fixtures.to_f == 0.0 || tz_primary_sidelighted_ratio_daylight_area.to_f.nan?
|
|
157
|
+
##### COSTING-related step: Calculate number of fixtures in thermal zones with window(s)-------------------------------------------------
|
|
158
|
+
tz_primary_sidelighted_ratio_daylight_area = primary_sidelighted_area / tz_area
|
|
159
|
+
tz_primary_sidelighted_number_fixtures = (tz_number_fixtures * tz_primary_sidelighted_ratio_daylight_area).ceil
|
|
160
|
+
tz_primary_sidelighted_number_sensors = (tz_primary_sidelighted_number_fixtures / 4.0).ceil
|
|
161
|
+
all_tz_primary_sidelighted_quatity += tz_primary_sidelighted_number_sensors * tz_multiplier
|
|
162
|
+
|
|
163
|
+
if tz_primary_sidelighted_number_sensors > 0.0
|
|
164
|
+
tags = ['lighting', 'daylighting_sensor_control']
|
|
165
|
+
# cost of daylighting sensor
|
|
166
|
+
quantity_tz_primary_sidelighted_daylighting_sensor = 1.0 * tz_primary_sidelighted_number_sensors * tz_multiplier
|
|
167
|
+
search_tz_primary_sidelighted_daylighting_sensor = {
|
|
168
|
+
row_id_1: 'Ea',
|
|
169
|
+
row_id_2: 407
|
|
170
|
+
}
|
|
171
|
+
sheet_name = 'materials_lighting'
|
|
172
|
+
column_1 = 'unit'
|
|
173
|
+
column_2 = 'lighting_type_id'
|
|
174
|
+
cost_tz_primary_sidelighted_daylighting_sensor = assembly_cost(cost_info:search_tz_primary_sidelighted_daylighting_sensor,
|
|
175
|
+
sheet_name:sheet_name,
|
|
176
|
+
column_1:column_1,
|
|
177
|
+
column_2:column_2,
|
|
178
|
+
quantity:quantity_tz_primary_sidelighted_daylighting_sensor,
|
|
179
|
+
tags: tags)
|
|
180
|
+
# cost of wiring
|
|
181
|
+
quantity_tz_primary_sidelighted_wiring = (30.0 / 100.0) * tz_primary_sidelighted_number_sensors * tz_multiplier
|
|
182
|
+
search_tz_primary_sidelighted_wiring = {
|
|
183
|
+
row_id_1: 'CLF',
|
|
184
|
+
row_id_2: 10
|
|
185
|
+
}
|
|
186
|
+
sheet_name = 'materials_lighting'
|
|
187
|
+
column_1 = 'unit'
|
|
188
|
+
column_2 = 'lighting_type_id'
|
|
189
|
+
cost_tz_primary_sidelighted_wiring = assembly_cost(cost_info:search_tz_primary_sidelighted_wiring,
|
|
190
|
+
sheet_name:sheet_name,
|
|
191
|
+
column_1:column_1,
|
|
192
|
+
column_2:column_2,
|
|
193
|
+
quantity:quantity_tz_primary_sidelighted_wiring,
|
|
194
|
+
tags: tags)
|
|
195
|
+
# cost of pvc conduit
|
|
196
|
+
quantity_tz_primary_sidelighted_pvc_conduit = 30.0 * tz_primary_sidelighted_number_sensors * tz_multiplier
|
|
197
|
+
search_tz_primary_sidelighted_pvc_conduit = {
|
|
198
|
+
row_id_1: 'LF',
|
|
199
|
+
row_id_2: 17
|
|
200
|
+
}
|
|
201
|
+
sheet_name = 'materials_lighting'
|
|
202
|
+
column_1 = 'unit'
|
|
203
|
+
column_2 = 'lighting_type_id'
|
|
204
|
+
cost_tz_primary_sidelighted_pvc_conduit = assembly_cost(cost_info:search_tz_primary_sidelighted_pvc_conduit,
|
|
205
|
+
sheet_name:sheet_name,
|
|
206
|
+
column_1:column_1,
|
|
207
|
+
column_2:column_2,
|
|
208
|
+
quantity:quantity_tz_primary_sidelighted_pvc_conduit,
|
|
209
|
+
tags: tags)
|
|
210
|
+
# cost of box
|
|
211
|
+
quantity_tz_primary_sidelighted_box = 1.0 * tz_primary_sidelighted_number_sensors * tz_multiplier
|
|
212
|
+
search_tz_primary_sidelighted_box = {
|
|
213
|
+
row_id_1: 'Ea',
|
|
214
|
+
row_id_2: 14
|
|
215
|
+
}
|
|
216
|
+
sheet_name = 'materials_lighting'
|
|
217
|
+
column_1 = 'unit'
|
|
218
|
+
column_2 = 'lighting_type_id'
|
|
219
|
+
cost_tz_primary_sidelighted_box = assembly_cost(cost_info:search_tz_primary_sidelighted_box,
|
|
220
|
+
sheet_name:sheet_name,
|
|
221
|
+
column_1:column_1,
|
|
222
|
+
column_2:column_2,
|
|
223
|
+
quantity:quantity_tz_primary_sidelighted_box,
|
|
224
|
+
tags: tags)
|
|
225
|
+
# total cost for this zone
|
|
226
|
+
tz_cost_primary_sidelighted = cost_tz_primary_sidelighted_daylighting_sensor +
|
|
227
|
+
cost_tz_primary_sidelighted_wiring +
|
|
228
|
+
cost_tz_primary_sidelighted_pvc_conduit +
|
|
229
|
+
cost_tz_primary_sidelighted_box
|
|
230
|
+
dsc_cost_total += tz_cost_primary_sidelighted
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
##### COSTING-related step: Calculate number of fixtures in thermal zones with skylight(s)-------------------------------------------------
|
|
234
|
+
tz_skylights_ratio_daylight_area = daylighted_under_skylight_area / tz_area
|
|
235
|
+
tz_skylights_number_fixtures = (tz_number_fixtures * tz_skylights_ratio_daylight_area).ceil
|
|
236
|
+
tz_skylights_number_sensors = (tz_skylights_number_fixtures / 4.0).ceil
|
|
237
|
+
all_tz_skylight_quatity += tz_skylights_number_sensors * tz_multiplier
|
|
238
|
+
|
|
239
|
+
if tz_skylights_number_sensors > 0.0
|
|
240
|
+
tags = ['lighting', 'daylighting_sensor_control']
|
|
241
|
+
# cost of daylighting sensor
|
|
242
|
+
quantity_tz_skylights_daylighting_sensor = 1.0 * tz_skylights_number_sensors * tz_multiplier
|
|
243
|
+
search_tz_skylights_daylighting_sensor = {
|
|
244
|
+
row_id_1: 'Ea',
|
|
245
|
+
row_id_2: 407
|
|
246
|
+
}
|
|
247
|
+
sheet_name = 'materials_lighting'
|
|
248
|
+
column_1 = 'unit'
|
|
249
|
+
column_2 = 'lighting_type_id'
|
|
250
|
+
cost_tz_skylights_daylighting_sensor = assembly_cost(cost_info:search_tz_skylights_daylighting_sensor,
|
|
251
|
+
sheet_name:sheet_name,
|
|
252
|
+
column_1:column_1,
|
|
253
|
+
column_2:column_2,
|
|
254
|
+
quantity:quantity_tz_skylights_daylighting_sensor,
|
|
255
|
+
tags: tags)
|
|
256
|
+
|
|
257
|
+
# cost of wiring
|
|
258
|
+
quantity_tz_skylights_wiring = (30.0 / 100.0) * tz_skylights_number_sensors * tz_multiplier
|
|
259
|
+
search_tz_skylights_wiring = {
|
|
260
|
+
row_id_1: 'CLF',
|
|
261
|
+
row_id_2: 10
|
|
262
|
+
}
|
|
263
|
+
sheet_name = 'materials_lighting'
|
|
264
|
+
column_1 = 'unit'
|
|
265
|
+
column_2 = 'lighting_type_id'
|
|
266
|
+
cost_tz_skylights_wiring = assembly_cost(cost_info:search_tz_skylights_wiring,
|
|
267
|
+
sheet_name:sheet_name,
|
|
268
|
+
column_1:column_1,
|
|
269
|
+
column_2:column_2,
|
|
270
|
+
quantity:quantity_tz_skylights_wiring,
|
|
271
|
+
tags: tags)
|
|
272
|
+
|
|
273
|
+
# cost of pvc conduit
|
|
274
|
+
quantity_tz_skylights_pvc_conduit = 30.0 * tz_skylights_number_sensors * tz_multiplier
|
|
275
|
+
search_tz_skylights_pvc_conduit = {
|
|
276
|
+
row_id_1: 'LF',
|
|
277
|
+
row_id_2: 17
|
|
278
|
+
}
|
|
279
|
+
sheet_name = 'materials_lighting'
|
|
280
|
+
column_1 = 'unit'
|
|
281
|
+
column_2 = 'lighting_type_id'
|
|
282
|
+
cost_tz_skylights_pvc_conduit = assembly_cost(cost_info:search_tz_skylights_pvc_conduit,
|
|
283
|
+
sheet_name:sheet_name,
|
|
284
|
+
column_1:column_1,
|
|
285
|
+
column_2:column_2,
|
|
286
|
+
quantity:quantity_tz_skylights_pvc_conduit,
|
|
287
|
+
tags: tags)
|
|
288
|
+
|
|
289
|
+
# cost of box
|
|
290
|
+
quantity_tz_skylights_box = 1.0 * tz_skylights_number_sensors * tz_multiplier
|
|
291
|
+
search_tz_skylights_box = {
|
|
292
|
+
row_id_1: 'Ea',
|
|
293
|
+
row_id_2: 14
|
|
294
|
+
}
|
|
295
|
+
sheet_name = 'materials_lighting'
|
|
296
|
+
column_1 = 'unit'
|
|
297
|
+
column_2 = 'lighting_type_id'
|
|
298
|
+
cost_tz_skylights_box = assembly_cost(cost_info:search_tz_skylights_box,
|
|
299
|
+
sheet_name:sheet_name,
|
|
300
|
+
column_1:column_1,
|
|
301
|
+
column_2:column_2,
|
|
302
|
+
quantity:quantity_tz_skylights_box,
|
|
303
|
+
tags: tags)
|
|
304
|
+
|
|
305
|
+
# total cost for this zone
|
|
306
|
+
tz_cost_skylight = cost_tz_skylights_daylighting_sensor +
|
|
307
|
+
cost_tz_skylights_wiring +
|
|
308
|
+
cost_tz_skylights_pvc_conduit +
|
|
309
|
+
cost_tz_skylights_box
|
|
310
|
+
|
|
311
|
+
dsc_cost_total += tz_cost_skylight
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
##### Gather information for reporting
|
|
315
|
+
@costing_report["lighting"]["daylighting_sensor_control"] << {
|
|
316
|
+
'zone' => tz.name.to_s,
|
|
317
|
+
'zone_area' => tz_area,
|
|
318
|
+
'zone_multiplier' => tz_multiplier,
|
|
319
|
+
'number_of_fixtures_required_without_considering_daylighted_area_under_sidelighting_and_skylights' => tz_number_fixtures,
|
|
320
|
+
'primary_sidelighted_area' => primary_sidelighted_area,
|
|
321
|
+
'primary_sidelighted_number_fixtures' => tz_primary_sidelighted_number_fixtures,
|
|
322
|
+
'primary_sidelighted_number_sensors' => tz_primary_sidelighted_number_sensors,
|
|
323
|
+
'skylights_daylighted_area' => daylighted_under_skylight_area,
|
|
324
|
+
'skylights_number_fixtures' => tz_skylights_number_fixtures,
|
|
325
|
+
'skylights_number_sensors' => tz_skylights_number_sensors,
|
|
326
|
+
'daylighting_sensor_control_cost_for_this_zone' => tz_cost_primary_sidelighted + tz_cost_skylight
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
end #tz.primaryDaylightingControl.is_initialized
|
|
330
|
+
end #model.getThermalZonesSorted.each do |tz|
|
|
331
|
+
#-------------------------------------------------------------------------------------------------------------------
|
|
332
|
+
|
|
333
|
+
puts "\nDaylighting sensor controls costing data successfully generated. Total DSC costs: $#{dsc_cost_total.round(2)}"
|
|
334
|
+
|
|
335
|
+
return dsc_cost_total
|
|
336
|
+
|
|
337
|
+
end #cost_audit_daylighting_sensor_control(model, prototype_creator)
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
def get_fixture_type_id(fixture_info:, sheet_name:, row_name_1:, row_name_2:, row_name_3:, column_search:)
|
|
341
|
+
fixture_type = nil
|
|
342
|
+
fixture_type = @costing_database['raw'][sheet_name].select { |data|
|
|
343
|
+
data[row_name_1].to_s.upcase == fixture_info[:row_id_1].to_s.upcase and
|
|
344
|
+
data[row_name_2].to_s.upcase == fixture_info[:row_id_2].to_s.upcase and
|
|
345
|
+
data[row_name_3].to_s.upcase == fixture_info[:row_id_3].to_s.upcase
|
|
346
|
+
}.first
|
|
347
|
+
if fixture_type.nil?
|
|
348
|
+
puts("No data found for #{fixture_type}!")
|
|
349
|
+
raise
|
|
350
|
+
end
|
|
351
|
+
return fixture_type[column_search]
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
end
|