openstudio-standards 0.8.4 → 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/{costing/common_paths.rb → common_paths.rb} +14 -11
- 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/constructions_glazing.csv +121 -0
- data/lib/openstudio-standards/btap/common_resources/costs.csv +1897 -0
- data/lib/openstudio-standards/btap/{costing/common_resources → common_resources}/lighting.csv +59 -59
- data/lib/openstudio-standards/btap/{costing/common_resources → common_resources}/materials_hvac.csv +1019 -1032
- data/lib/openstudio-standards/btap/costing/btap_costing.rb +3 -7
- data/lib/openstudio-standards/btap/costing/costing_database_wrapper.rb +1 -5
- data/lib/openstudio-standards/btap/costing/daylighting_sensor_control_costing.rb +5 -4
- data/lib/openstudio-standards/btap/costing/dcv_costing.rb +1 -1
- data/lib/openstudio-standards/btap/costing/envelope_costing.rb +112 -181
- data/lib/openstudio-standards/btap/costing/heating_cooling_costing.rb +4 -4
- data/lib/openstudio-standards/btap/costing/led_lighting_costing.rb +2 -1
- data/lib/openstudio-standards/btap/costing/lighting_costing.rb +3 -3
- data/lib/openstudio-standards/btap/costing/test_list.txt +15 -17
- data/lib/openstudio-standards/btap/costing/test_run_all_test_locally.rb +10 -9
- data/lib/openstudio-standards/btap/geometry.rb +86 -6
- data/lib/openstudio-standards/btap/structure.rb +657 -0
- 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 +6 -11
- 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.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 +1 -0
- 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 +19 -10
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/building_envelope.rb +12 -11
- 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 +69 -92
- data/lib/openstudio-standards/standards/necb/NECB2011/autozone.rb +2 -1
- 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 +32 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/data/fuel_type_sets.json +18 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/data/heat_pumps_heating.json +21 -15
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_namer.rb +5 -5
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_1_single_speed.rb +2 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb +30 -141
- data/lib/openstudio-standards/standards/necb/NECB2011/necb_2011.rb +233 -112
- data/lib/openstudio-standards/standards/necb/NECB2015/data/heat_pumps_heating.json +10 -2
- data/lib/openstudio-standards/standards/necb/NECB2015/hvac_systems.rb +2 -2
- 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/common/btap_analysis.rb +79 -0
- data/lib/openstudio-standards/standards/necb/common/btap_data.rb +16 -4
- data/lib/openstudio-standards/standards/necb/common/btap_datapoint.rb +65 -42
- 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/version.rb +1 -1
- data/lib/openstudio-standards/weather/stat_file.rb +2 -2
- data/lib/openstudio-standards.rb +55 -38
- metadata +106 -66
- data/lib/openstudio-standards/btap/costing/common_resources/constructions_glazing.csv +0 -61
- data/lib/openstudio-standards/btap/costing/common_resources/costs.csv +0 -1904
- 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/btap/{costing/common_resources → common_resources}/ConstructionProperties.csv +0 -0
- /data/lib/openstudio-standards/btap/{costing/common_resources → common_resources}/Constructions.csv +0 -0
- /data/lib/openstudio-standards/btap/{costing/common_resources → common_resources}/construction_sets.csv +0 -0
- /data/lib/openstudio-standards/btap/{costing/common_resources → common_resources}/constructions_opaque.csv +0 -0
- /data/lib/openstudio-standards/btap/{costing/common_resources → common_resources}/costs_local_factors.csv +0 -0
- /data/lib/openstudio-standards/btap/{costing/common_resources → common_resources}/hvac_vent_ahu.csv +0 -0
- /data/lib/openstudio-standards/btap/{costing/common_resources → common_resources}/lighting_sets.csv +0 -0
- /data/lib/openstudio-standards/btap/{costing/common_resources → common_resources}/locations.csv +0 -0
- /data/lib/openstudio-standards/btap/{costing/common_resources → common_resources}/materials_glazing.csv +0 -0
- /data/lib/openstudio-standards/btap/{costing/common_resources → common_resources}/materials_lighting.csv +0 -0
- /data/lib/openstudio-standards/btap/{costing/common_resources → common_resources}/materials_opaque.csv +0 -0
- /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
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
require 'json'
|
|
2
|
-
require_relative 'costing_database_wrapper
|
|
3
|
-
require_relative 'common_paths.rb'
|
|
2
|
+
require_relative 'costing_database_wrapper'
|
|
4
3
|
|
|
5
4
|
class SimpleLinearRegression
|
|
6
5
|
#https://gist.github.com/rweald/3516193#file-full-slr-class-snippet-rb
|
|
@@ -41,9 +40,10 @@ class BTAPCosting
|
|
|
41
40
|
# May be initialized with custom databases:
|
|
42
41
|
# costs_csv: Path to custom costing
|
|
43
42
|
# factors_csv: Path to custom localization factors
|
|
44
|
-
def initialize(costs_csv: nil, factors_csv: nil)
|
|
43
|
+
def initialize(costs_csv: nil, factors_csv: nil, attributes:)
|
|
45
44
|
@cp = CommonPaths.instance
|
|
46
45
|
@costing_database = CostingDatabase.instance
|
|
46
|
+
@attributes = attributes
|
|
47
47
|
|
|
48
48
|
# If the path for custom costing is defined, use custom costing.
|
|
49
49
|
if (not costs_csv.nil?) and File.exist?(costs_csv)
|
|
@@ -56,10 +56,6 @@ class BTAPCosting
|
|
|
56
56
|
end
|
|
57
57
|
end
|
|
58
58
|
|
|
59
|
-
def load_database()
|
|
60
|
-
@costing_database.load_database
|
|
61
|
-
end
|
|
62
|
-
|
|
63
59
|
def validate_database()
|
|
64
60
|
@costing_database.validate_database
|
|
65
61
|
end
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
require 'singleton'
|
|
2
2
|
require 'json'
|
|
3
3
|
require 'csv'
|
|
4
|
-
require_relative 'common_paths.rb'
|
|
5
4
|
|
|
6
5
|
# Singleton class to centralize all database operations
|
|
7
6
|
class CostingDatabase
|
|
@@ -10,11 +9,8 @@ class CostingDatabase
|
|
|
10
9
|
def initialize
|
|
11
10
|
@cp = CommonPaths.instance # Stores paths
|
|
12
11
|
@db = Hash.new # Stores the costing database
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
# Load the database from the individual CSV files
|
|
16
|
-
def load_database
|
|
17
12
|
|
|
13
|
+
# Load the database from the individual CSV files
|
|
18
14
|
# Load costing data
|
|
19
15
|
@db['costs'] = [] # Costing data
|
|
20
16
|
@db['localization_factors'] = [] # Local costing factors
|
|
@@ -5,7 +5,8 @@ class BTAPCosting
|
|
|
5
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
6
|
standards_template = model.building.get.standardsTemplate.to_s
|
|
7
7
|
if standards_template.include?('NECB')
|
|
8
|
-
|
|
8
|
+
# insert a space between NECB and 2011/2015/2017
|
|
9
|
+
standards_template = standards_template.gsub(/NECB(\d)/, 'NECB \1')
|
|
9
10
|
end
|
|
10
11
|
|
|
11
12
|
#-------------------------------------------------------------------------------------------------------------------
|
|
@@ -13,7 +14,7 @@ class BTAPCosting
|
|
|
13
14
|
all_tz_primary_sidelighted_quatity = 0.0
|
|
14
15
|
all_tz_skylight_quatity = 0.0
|
|
15
16
|
#-------------------------------------------------------------------------------------------------------------------
|
|
16
|
-
model.
|
|
17
|
+
model.getThermalZonesSorted.each do |tz|
|
|
17
18
|
if tz.primaryDaylightingControl.is_initialized
|
|
18
19
|
tz_cost_primary_sidelighted = 0.0
|
|
19
20
|
tz_cost_skylight = 0.0
|
|
@@ -326,7 +327,7 @@ class BTAPCosting
|
|
|
326
327
|
}
|
|
327
328
|
|
|
328
329
|
end #tz.primaryDaylightingControl.is_initialized
|
|
329
|
-
end #model.
|
|
330
|
+
end #model.getThermalZonesSorted.each do |tz|
|
|
330
331
|
#-------------------------------------------------------------------------------------------------------------------
|
|
331
332
|
|
|
332
333
|
puts "\nDaylighting sensor controls costing data successfully generated. Total DSC costs: $#{dsc_cost_total.round(2)}"
|
|
@@ -350,4 +351,4 @@ class BTAPCosting
|
|
|
350
351
|
return fixture_type[column_search]
|
|
351
352
|
end
|
|
352
353
|
|
|
353
|
-
end
|
|
354
|
+
end
|
|
@@ -10,24 +10,7 @@ end
|
|
|
10
10
|
|
|
11
11
|
class BTAPCosting
|
|
12
12
|
def cost_audit_envelope(model, prototype_creator)
|
|
13
|
-
|
|
14
|
-
costed_surfaces = [
|
|
15
|
-
"ExteriorWall",
|
|
16
|
-
"ExteriorRoof",
|
|
17
|
-
"ExteriorFloor",
|
|
18
|
-
"ExteriorFixedWindow",
|
|
19
|
-
"ExteriorOperableWindow",
|
|
20
|
-
"ExteriorSkylight",
|
|
21
|
-
"ExteriorTubularDaylightDiffuser",
|
|
22
|
-
"ExteriorTubularDaylightDome",
|
|
23
|
-
"ExteriorDoor",
|
|
24
|
-
"ExteriorGlassDoor",
|
|
25
|
-
"ExteriorOverheadDoor",
|
|
26
|
-
"GroundContactWall",
|
|
27
|
-
"GroundContactRoof",
|
|
28
|
-
"GroundContactFloor"
|
|
29
|
-
]
|
|
30
|
-
costed_surfaces.each do |surface_type|
|
|
13
|
+
@attributes.surface_types.each do |surface_type|
|
|
31
14
|
@costing_report["envelope"]["#{surface_type.underscore}_cost"] = 0.00
|
|
32
15
|
@costing_report["envelope"]["#{surface_type.underscore}_area_m2"] = 0.0
|
|
33
16
|
@costing_report["envelope"]["#{surface_type.underscore}_cost_per_m2"] = 0.00
|
|
@@ -35,192 +18,140 @@ class BTAPCosting
|
|
|
35
18
|
|
|
36
19
|
@costing_report["envelope"]["construction_costs"] = []
|
|
37
20
|
|
|
38
|
-
# Store number of stories. Required for envelope costing logic.
|
|
39
|
-
num_of_above_ground_stories = model.getBuilding.standardsNumberOfAboveGroundStories.to_i
|
|
40
|
-
|
|
41
|
-
template_type = prototype_creator.template
|
|
42
|
-
|
|
43
|
-
closest_loc = get_closest_cost_location(model.getWeatherFile.latitude, model.getWeatherFile.longitude)
|
|
44
21
|
generate_construction_cost_database_for_city(@costing_report["city"], @costing_report["province_state"])
|
|
45
22
|
|
|
46
23
|
totEnvCost = 0
|
|
47
24
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
25
|
+
@attributes.spaces.each do |space|
|
|
26
|
+
# Get SpaceType defined for space.. if not defined it will skip the spacetype. May have to deal with Attic spaces.
|
|
27
|
+
if space.spaceType.empty? or space.spaceType.get.standardsSpaceType.empty? or space.spaceType.get.standardsBuildingType.empty?
|
|
28
|
+
raise ("standards Space type and building type is not defined for space:#{space.name.get}. Skipping this space for costing.")
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
@attributes.surface_types.each do |surface_type|
|
|
32
|
+
# Get Costs for this construction type. This will get the cost for the particular construction type
|
|
33
|
+
# for all rsi levels for this location. This has been collected by the API costs data. Note that a space_type
|
|
34
|
+
# of "- undefined -" will create a nil construction_set!
|
|
35
|
+
|
|
36
|
+
if space.construction_set.nil?
|
|
37
|
+
cost_range_hash = {}
|
|
38
|
+
else
|
|
39
|
+
cost_range_hash = @costing_database['constructions_costs'].select { |construction|
|
|
40
|
+
construction['construction_type_name'] == space.construction_set[surface_type] &&
|
|
41
|
+
construction['province_state'] == @costing_report["province_state"] &&
|
|
42
|
+
construction['city'] == @costing_report["city"]
|
|
43
|
+
}
|
|
55
44
|
end
|
|
56
45
|
|
|
57
|
-
#
|
|
58
|
-
|
|
59
|
-
|
|
46
|
+
# We don't need all the information, just the rsi and cost. However, for windows rsi = 1/u_w_per_m2_k
|
|
47
|
+
surfaceIsGlazing = (
|
|
48
|
+
surface_type == 'ExteriorFixedWindow' || surface_type == 'ExteriorOperableWindow' ||
|
|
49
|
+
surface_type == 'ExteriorSkylight' || surface_type == 'ExteriorTubularDaylightDiffuser' ||
|
|
50
|
+
surface_type == 'ExteriorTubularDaylightDome' || surface_type == 'ExteriorGlassDoor')
|
|
51
|
+
if surfaceIsGlazing
|
|
52
|
+
cost_range_array = cost_range_hash.map { |cost|
|
|
53
|
+
[
|
|
54
|
+
(1.0 / cost['u_w_per_m2_k'].to_f),
|
|
55
|
+
cost['total_cost_with_op']
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
else
|
|
59
|
+
cost_range_array = cost_range_hash.map { |cost|
|
|
60
|
+
[
|
|
61
|
+
cost['rsi_k_m2_per_w'],
|
|
62
|
+
cost['total_cost_with_op']
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
end
|
|
66
|
+
# Sorted based on rsi.
|
|
67
|
+
cost_range_array.sort! { |a, b| a[0] <=> b[0] }
|
|
60
68
|
|
|
61
|
-
#
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
data['building_type'].to_s.downcase == building_type.to_s.downcase and
|
|
66
|
-
data['space_type'].to_s.downcase == space_type.to_s.downcase and
|
|
67
|
-
data['min_stories'].to_i <= num_of_above_ground_stories and
|
|
68
|
-
data['max_stories'].to_i >= num_of_above_ground_stories
|
|
69
|
-
}.first
|
|
69
|
+
# Iterate through actual surfaces in the model of surface_type.
|
|
70
|
+
numSurfType = 0
|
|
71
|
+
space.surfaces_hash[surface_type].each do |surface|
|
|
72
|
+
numSurfType = numSurfType + 1
|
|
70
73
|
|
|
74
|
+
# Get RSI of existing model surface (actually returns rsi for glazings too!).
|
|
75
|
+
# Make an array of constructions to use with surfaces_get_conductance method which replaces the get_rsi
|
|
76
|
+
# method
|
|
77
|
+
rsi = 1 / (OpenstudioStandards::Constructions.construction_get_conductance(OpenStudio::Model::getConstructionByName(surface.model, surface.construction.get.name.to_s).get))
|
|
71
78
|
|
|
72
|
-
# Create Hash to store surfaces for this space by surface type
|
|
73
|
-
surfaces = {}
|
|
74
|
-
#Exterior
|
|
75
|
-
exterior_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition(space.surfaces, "Outdoors")
|
|
76
|
-
surfaces["ExteriorWall"] = BTAP::Geometry::Surfaces::filter_by_surface_types(exterior_surfaces, "Wall")
|
|
77
|
-
surfaces["ExteriorRoof"] = BTAP::Geometry::Surfaces::filter_by_surface_types(exterior_surfaces, "RoofCeiling")
|
|
78
|
-
surfaces["ExteriorFloor"] = BTAP::Geometry::Surfaces::filter_by_surface_types(exterior_surfaces, "Floor")
|
|
79
|
-
# Exterior Subsurface
|
|
80
|
-
exterior_subsurfaces = exterior_surfaces.flat_map(&:subSurfaces)
|
|
81
|
-
surfaces["ExteriorFixedWindow"] = BTAP::Geometry::Surfaces::filter_subsurfaces_by_types(exterior_subsurfaces, ["FixedWindow"])
|
|
82
|
-
surfaces["ExteriorOperableWindow"] = BTAP::Geometry::Surfaces::filter_subsurfaces_by_types(exterior_subsurfaces, ["OperableWindow"])
|
|
83
|
-
surfaces["ExteriorSkylight"] = BTAP::Geometry::Surfaces::filter_subsurfaces_by_types(exterior_subsurfaces, ["Skylight"])
|
|
84
|
-
surfaces["ExteriorTubularDaylightDiffuser"] = BTAP::Geometry::Surfaces::filter_subsurfaces_by_types(exterior_subsurfaces, ["TubularDaylightDiffuser"])
|
|
85
|
-
surfaces["ExteriorTubularDaylightDome"] = BTAP::Geometry::Surfaces::filter_subsurfaces_by_types(exterior_subsurfaces, ["TubularDaylightDome"])
|
|
86
|
-
surfaces["ExteriorDoor"] = BTAP::Geometry::Surfaces::filter_subsurfaces_by_types(exterior_subsurfaces, ["Door"])
|
|
87
|
-
surfaces["ExteriorGlassDoor"] = BTAP::Geometry::Surfaces::filter_subsurfaces_by_types(exterior_subsurfaces, ["GlassDoor"])
|
|
88
|
-
surfaces["ExteriorOverheadDoor"] = BTAP::Geometry::Surfaces::filter_subsurfaces_by_types(exterior_subsurfaces, ["OverheadDoor"])
|
|
89
79
|
|
|
90
|
-
|
|
91
|
-
ground_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition(space.surfaces, "Ground")
|
|
92
|
-
ground_surfaces += BTAP::Geometry::Surfaces::filter_by_boundary_condition(space.surfaces, "Foundation")
|
|
93
|
-
surfaces["GroundContactWall"] = BTAP::Geometry::Surfaces::filter_by_surface_types(ground_surfaces, "Wall")
|
|
94
|
-
surfaces["GroundContactRoof"] = BTAP::Geometry::Surfaces::filter_by_surface_types(ground_surfaces, "RoofCeiling")
|
|
95
|
-
surfaces["GroundContactFloor"] = BTAP::Geometry::Surfaces::filter_by_surface_types(ground_surfaces, "Floor")
|
|
80
|
+
#Check to see if it is in range
|
|
96
81
|
|
|
97
82
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
# of "- undefined -" will create a nil construction_set!
|
|
83
|
+
# Use the cost_range_array to interpolate the estimated cost for the given rsi.
|
|
84
|
+
# Note that window costs in the API data use U-value, which was converted to rsi for cost_range_array above
|
|
85
|
+
exterpolate_percentage_range = 30.0
|
|
86
|
+
cost = interpolate(x_y_array: cost_range_array, x2: rsi, exterpolate_percentage_range: exterpolate_percentage_range)
|
|
103
87
|
|
|
104
88
|
|
|
105
|
-
|
|
106
|
-
|
|
89
|
+
# If the cost is nil, that means the rsi is out of range. Flag in the report.
|
|
90
|
+
if cost.nil?
|
|
91
|
+
if !cost_range_array.empty?
|
|
92
|
+
notes = "Warning! RSI out of the range (#{'%.2f' % rsi}) or cost is 0!. Range for #{space.construction_set[surface_type]} is #{'%.2f' % cost_range_array.first[0]}-#{'%.2f' % cost_range_array.last[0]}."
|
|
93
|
+
cost = 0.0
|
|
94
|
+
else
|
|
95
|
+
notes = "No cost found for this! So Cost is set to 0.0!"
|
|
96
|
+
cost = 0.0
|
|
97
|
+
end
|
|
98
|
+
elsif cost.nan?
|
|
99
|
+
raise("the values for cost and conductance for #{space.construction_set[surface_type]} cannot be interpolated...cannot create an equation of a line from #{cost_range_array.sort.uniq}. Check construction database and either eliminate the errant row, or set the x value to an appropriate number. ")
|
|
107
100
|
else
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
101
|
+
#Tell user if we are extrapolating outside of library.
|
|
102
|
+
array = cost_range_array.sort { |a, b| a[0] <=> b[0] }
|
|
103
|
+
if rsi < (array.first[0].to_f) || rsi > (array.last[0].to_f)
|
|
104
|
+
notes = "RSI out of the range (#{'%.2f' % rsi}). Range for #{space.construction_set[surface_type]} is #{'%.2f' % cost_range_array.first[0]}-#{'%.2f' % cost_range_array.last[0]}.Using extrapolation up to +/-30% of library boundaries. "
|
|
105
|
+
else
|
|
106
|
+
notes = "OK"
|
|
107
|
+
end
|
|
113
108
|
end
|
|
114
109
|
|
|
115
|
-
#
|
|
116
|
-
|
|
117
|
-
surface_type == 'ExteriorSkylight' || surface_type == 'ExteriorTubularDaylightDiffuser' ||
|
|
118
|
-
surface_type == 'ExteriorTubularDaylightDome' || surface_type == 'ExteriorGlassDoor')
|
|
110
|
+
# Calculate SHGC/film cost
|
|
111
|
+
film_cost = 0.0
|
|
119
112
|
if surfaceIsGlazing
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
[
|
|
129
|
-
cost['rsi_k_m2_per_w'],
|
|
130
|
-
cost['total_cost_with_op']
|
|
131
|
-
]
|
|
132
|
-
}
|
|
113
|
+
#Get SHGC from surface.
|
|
114
|
+
shgc = OpenstudioStandards::Constructions.construction_get_solar_transmittance(surface.construction.get.to_Construction.get)
|
|
115
|
+
# Get the closest value in materials_glazing sheet of SolarFilms.
|
|
116
|
+
material_row = @costing_database["raw"]["materials_glazing"].select{ |row| row['material_type'] == 'Solarfilms' }.min_by {|row| (shgc.to_f - row['solar_heat_gain_coefficient'].to_f).abs}
|
|
117
|
+
standard_film_cost = getCost(material_row['description'], material_row, 1.0)
|
|
118
|
+
regional_factors = get_regional_cost_factors(@costing_report['province_state'], @costing_report['city'], material_row)
|
|
119
|
+
# mult regional cost and sum costs. Zip adds the arrays together, map multiplies each row and divides by 100.0 since the regional factor is in percents.
|
|
120
|
+
film_cost = standard_film_cost.zip(regional_factors).map{|cost,region_factor| cost * region_factor / 100.0}.inject(0, :+)
|
|
133
121
|
end
|
|
134
|
-
# Sorted based on rsi.
|
|
135
|
-
cost_range_array.sort! { |a, b| a[0] <=> b[0] }
|
|
136
|
-
|
|
137
|
-
# Iterate through actual surfaces in the model of surface_type.
|
|
138
|
-
numSurfType = 0
|
|
139
|
-
surfaces[surface_type].sort.each do |surface|
|
|
140
|
-
numSurfType = numSurfType + 1
|
|
141
|
-
|
|
142
|
-
# Get RSI of existing model surface (actually returns rsi for glazings too!).
|
|
143
|
-
# Make an array of constructions to use with surfaces_get_conductance method which replaces the get_rsi
|
|
144
|
-
# method
|
|
145
|
-
rsi = 1 / (OpenstudioStandards::Constructions.construction_get_conductance(OpenStudio::Model::getConstructionByName(surface.model, surface.construction.get.name.to_s).get))
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
#Check to see if it is in range
|
|
149
122
|
|
|
150
123
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
124
|
+
testSurfName = surface.name.to_s
|
|
125
|
+
testSpaceName = space.name.to_s
|
|
126
|
+
surfArea = surface.netArea * space.thermalZone.get.multiplier
|
|
127
|
+
surfAreaft = (OpenStudio.convert(surfArea, "m^2", "ft^2").get).to_f
|
|
128
|
+
surfCost = (cost + film_cost) * surfAreaft
|
|
129
|
+
totEnvCost = totEnvCost + surfCost
|
|
130
|
+
name = ""
|
|
155
131
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
elsif cost.nan?
|
|
167
|
-
raise("the values for cost and conductance for #{construction_set[surface_type]} cannot be interpolated...cannot create an equation of a line from #{cost_range_array.sort.uniq}. Check construction database and either eliminate the errant row, or set the x value to an appropriate number. ")
|
|
168
|
-
else
|
|
169
|
-
#Tell user if we are extrapolating outside of library.
|
|
170
|
-
array = cost_range_array.sort { |a, b| a[0] <=> b[0] }
|
|
171
|
-
if rsi < (array.first[0].to_f) || rsi > (array.last[0].to_f)
|
|
172
|
-
notes = "RSI out of the range (#{'%.2f' % rsi}). Range for #{construction_set[surface_type]} is #{'%.2f' % cost_range_array.first[0]}-#{'%.2f' % cost_range_array.last[0]}.Using extrapolation up to +/-30% of library boundaries. "
|
|
173
|
-
else
|
|
174
|
-
notes = "OK"
|
|
175
|
-
end
|
|
176
|
-
end
|
|
177
|
-
|
|
178
|
-
# Calculate SHGC/film cost
|
|
179
|
-
film_cost = 0.0
|
|
180
|
-
if surfaceIsGlazing
|
|
181
|
-
#Get SHGC from surface.
|
|
182
|
-
shgc = OpenstudioStandards::Constructions.construction_get_solar_transmittance(surface.construction.get.to_Construction.get)
|
|
183
|
-
# Get the closest value in materials_glazing sheet of SolarFilms.
|
|
184
|
-
material_row = @costing_database["raw"]["materials_glazing"].select{ |row| row['material_type'] == 'Solarfilms' }.min_by {|row| (shgc.to_f - row['solar_heat_gain_coefficient'].to_f).abs}
|
|
185
|
-
standard_film_cost = getCost(material_row['description'], material_row, 1.0)
|
|
186
|
-
regional_factors = get_regional_cost_factors(@costing_report['province_state'], @costing_report['city'], material_row)
|
|
187
|
-
# mult regional cost and sum costs. Zip adds the arrays together, map multiplies each row and divides by 100.0 since the regional factor is in percents.
|
|
188
|
-
film_cost = standard_film_cost.zip(regional_factors).map{|cost,region_factor| cost * region_factor / 100.0}.inject(0, :+)
|
|
189
|
-
end
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
testSurfName = surface.name.to_s
|
|
193
|
-
testSpaceName = space.name.to_s
|
|
194
|
-
surfArea = surface.netArea * zone.multiplier
|
|
195
|
-
surfAreaft = (OpenStudio.convert(surfArea, "m^2", "ft^2").get).to_f
|
|
196
|
-
surfCost = (cost + film_cost) * surfAreaft
|
|
197
|
-
totEnvCost = totEnvCost + surfCost
|
|
198
|
-
name = ""
|
|
199
|
-
|
|
200
|
-
# Bin the costing by construction standard type and rsi
|
|
201
|
-
if construction_set.nil?
|
|
202
|
-
name = "undefined space type_#{(1.0 / rsi).round(3)}"
|
|
203
|
-
else
|
|
204
|
-
name = "#{construction_set[surface_type]}"
|
|
205
|
-
end
|
|
206
|
-
row = @costing_report["envelope"]["construction_costs"].detect { |row| (row['name'] == name) && (row['conductance'].round(3) == ((1.0 / rsi).round(3))) }
|
|
207
|
-
if row.nil?
|
|
208
|
-
@costing_report["envelope"]["construction_costs"] << {'name' => name, 'conductance' => ((1.0 / rsi).round(3)), 'area' => (surfArea.round(2)), 'cost' => (surfCost.round(2)), 'cost_per_area' => (surfCost / surfArea).round(2), 'note' => "Surf ##{numSurfType}: #{notes}"}
|
|
209
|
-
else
|
|
210
|
-
# Not using += for @costing_report additions so that output can be properly rounded
|
|
211
|
-
row['area'] = (row['area'] + surfArea).round(2)
|
|
212
|
-
row['cost'] = (row['cost'] + surfCost).round(2)
|
|
213
|
-
row['cost_per_area'] = ((row['cost'] / row['area']).to_f.round(2))
|
|
214
|
-
row['note'] += " / #{numSurfType}: #{notes}"
|
|
215
|
-
end
|
|
132
|
+
# Bin the costing by construction standard type and rsi
|
|
133
|
+
if space.construction_set.nil?
|
|
134
|
+
name = "undefined space type_#{(1.0 / rsi).round(3)}"
|
|
135
|
+
else
|
|
136
|
+
name = "#{space.construction_set[surface_type]}"
|
|
137
|
+
end
|
|
138
|
+
row = @costing_report["envelope"]["construction_costs"].detect { |row| (row['name'] == name) && (row['conductance'].round(3) == ((1.0 / rsi).round(3))) }
|
|
139
|
+
if row.nil?
|
|
140
|
+
@costing_report["envelope"]["construction_costs"] << {'name' => name, 'conductance' => ((1.0 / rsi).round(3)), 'area' => (surfArea.round(2)), 'cost' => (surfCost.round(2)), 'cost_per_area' => (surfCost / surfArea).round(2), 'note' => "Surf ##{numSurfType}: #{notes}"}
|
|
141
|
+
else
|
|
216
142
|
# Not using += for @costing_report additions so that output can be properly rounded
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
143
|
+
row['area'] = (row['area'] + surfArea).round(2)
|
|
144
|
+
row['cost'] = (row['cost'] + surfCost).round(2)
|
|
145
|
+
row['cost_per_area'] = ((row['cost'] / row['area']).to_f.round(2))
|
|
146
|
+
row['note'] += " / #{numSurfType}: #{notes}"
|
|
147
|
+
end
|
|
148
|
+
# Not using += for @costing_report additions so that output can be properly rounded
|
|
149
|
+
@costing_report["envelope"]["#{surface_type.underscore}_cost"] = (@costing_report["envelope"]["#{surface_type.underscore}_cost"] + surfCost).round(2)
|
|
150
|
+
@costing_report["envelope"]["#{surface_type.underscore}_area_m2"] = (@costing_report["envelope"]["#{surface_type.underscore}_area_m2"] + surfArea).round(2)
|
|
151
|
+
@costing_report["envelope"]["#{surface_type.underscore}_cost_per_m2"] = (@costing_report["envelope"]["#{surface_type.underscore}_cost"] / @costing_report["envelope"]["#{surface_type.underscore}_area_m2"]).round(2)
|
|
152
|
+
end # surfaces of surface type
|
|
153
|
+
end # surface_type
|
|
154
|
+
end # spaces
|
|
224
155
|
|
|
225
156
|
@costing_report["envelope"]['total_envelope_cost'] = totEnvCost.to_f.round(2)
|
|
226
157
|
puts "\nEnvelope costing data successfully generated. Total envelope cost is $#{totEnvCost.to_f.round(2)}"
|
|
@@ -1147,7 +1147,7 @@ class BTAPCosting
|
|
|
1147
1147
|
volume = model.building.get.airVolume()
|
|
1148
1148
|
flrArea = 0.0
|
|
1149
1149
|
if model.building.get.conditionedFloorArea.empty?
|
|
1150
|
-
model.
|
|
1150
|
+
model.getThermalZonesSorted.each do |tz|
|
|
1151
1151
|
tz.spaces.sort.each do |tz_space|
|
|
1152
1152
|
flrArea += tz_space.floorArea.to_f if ( (space_mod.space_cooled?(tz_space)) || (space_mod.space_heated?(tz_space)) )
|
|
1153
1153
|
end
|
|
@@ -1244,7 +1244,7 @@ class BTAPCosting
|
|
|
1244
1244
|
vrfFloors: []
|
|
1245
1245
|
}
|
|
1246
1246
|
|
|
1247
|
-
model.
|
|
1247
|
+
model.getThermalZonesSorted.each do |zone|
|
|
1248
1248
|
numZones += 1
|
|
1249
1249
|
zone.equipment.each do |equipment|
|
|
1250
1250
|
obj_type = equipment.iddObjectType.valueName.to_s
|
|
@@ -1810,7 +1810,7 @@ class BTAPCosting
|
|
|
1810
1810
|
# Get perimeter distribution piping cost
|
|
1811
1811
|
extWallArea = 0.0
|
|
1812
1812
|
perimPipingCost = 0.0
|
|
1813
|
-
zone.
|
|
1813
|
+
zone.getSpacesSorted.each do |space|
|
|
1814
1814
|
if space.spaceType.empty? or space.spaceType.get.standardsSpaceType.empty? or space.spaceType.get.standardsBuildingType.empty?
|
|
1815
1815
|
raise ("standards Space type and building type is not defined for space:#{space.name.get}. Skipping this space for costing.")
|
|
1816
1816
|
end
|
|
@@ -1833,7 +1833,7 @@ class BTAPCosting
|
|
|
1833
1833
|
# Get perimeter distribution wiring cost
|
|
1834
1834
|
extWallArea = 0.0
|
|
1835
1835
|
perimWiringCost = 0.0
|
|
1836
|
-
zone.
|
|
1836
|
+
zone.getSpacesSorted.each do |space|
|
|
1837
1837
|
if space.spaceType.empty? or space.spaceType.get.standardsSpaceType.empty? or space.spaceType.get.standardsBuildingType.empty?
|
|
1838
1838
|
raise ("standards Space type and building type is not defined for space:#{space.name.get}. Skipping this space for costing.")
|
|
1839
1839
|
end
|
|
@@ -4,7 +4,8 @@ class BTAPCosting
|
|
|
4
4
|
a = 0 # This is for reporting purposes.
|
|
5
5
|
standards_template = model.building.get.standardsTemplate.to_s
|
|
6
6
|
if standards_template.include?('NECB')
|
|
7
|
-
|
|
7
|
+
# insert a space between NECB and 2011/2015/2017
|
|
8
|
+
standards_template = standards_template.gsub(/NECB(\d)/, 'NECB \1')
|
|
8
9
|
end
|
|
9
10
|
# puts standards_template
|
|
10
11
|
|
|
@@ -24,11 +24,11 @@ class BTAPCosting
|
|
|
24
24
|
#Create Zonal report.
|
|
25
25
|
@costing_report["lighting"]["fixture_report"] = []
|
|
26
26
|
@costing_report["lighting"]["space_report"] = []
|
|
27
|
-
model.
|
|
27
|
+
model.getThermalZonesSorted.each do |zone|
|
|
28
28
|
# Iterate through spaces.
|
|
29
29
|
spaceNum = 0 # Counting number of spaces for reporting
|
|
30
30
|
total_with_region = 0
|
|
31
|
-
zone.
|
|
31
|
+
zone.getSpacesSorted.each do |space|
|
|
32
32
|
spaceNum += 1 # Counting number of spaces for reporting
|
|
33
33
|
# Get SpaceType defined for space.. if not defined it will skip the spacetype. May have to deal with Attic spaces.
|
|
34
34
|
if space.spaceType.empty? or space.spaceType.get.standardsSpaceType.empty? or space.spaceType.get.standardsBuildingType.empty?
|
|
@@ -206,4 +206,4 @@ class BTAPCosting
|
|
|
206
206
|
|
|
207
207
|
return totLgtCost
|
|
208
208
|
end
|
|
209
|
-
end
|
|
209
|
+
end
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
lib/openstudio-standards/btap/costing/btap_results/tests/BtapResults_HS09_CCASHP_Baseboard_Test.rb
|
|
17
|
-
lib/openstudio-standards/btap/costing/btap_results/tests/BtapResults_HS14_CGSHP_FanCoils_Test.rb
|
|
1
|
+
test/btap_costing/tests/BtapResults_daylighting_sensor_control_Test.rb
|
|
2
|
+
test/btap_costing/tests/BtapResults_dcv_Test.rb
|
|
3
|
+
test/btap_costing/tests/BtapResults_DX_Adv_Test.rb
|
|
4
|
+
test/btap_costing/tests/BtapResults_HS08_CCASHP_VRF_Test.rb
|
|
5
|
+
test/btap_costing/tests/BtapResults_HS09_CCASHP_Baseboard_Test.rb
|
|
6
|
+
test/btap_costing/tests/BtapResults_HS14_CGSHP_FanCoils_Test.rb
|
|
7
|
+
test/btap_costing/tests/BtapResults_insuite_central_doas_Test.rb
|
|
8
|
+
test/btap_costing/tests/BtapResults_led_lighting_Test.rb
|
|
9
|
+
test/btap_costing/tests/BtapResults_nv_Test.rb
|
|
10
|
+
test/btap_costing/tests/BtapResults_pv_ground_Test.rb
|
|
11
|
+
test/btap_costing/tests/BtapResults_shw_scaling_Test.rb
|
|
12
|
+
test/btap_costing/tests/BtapResults_SHW_Test.rb
|
|
13
|
+
test/btap_costing/tests/BtapResults_Test.rb
|
|
14
|
+
test/btap_costing/tests/BtapResultsVintage_Test.rb
|
|
15
|
+
test/btap_costing/tests/BtapResults_vsd_chiller_Test.rb
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
|
|
2
1
|
require 'fileutils'
|
|
3
2
|
require 'parallel'
|
|
4
3
|
require 'open3'
|
|
5
4
|
require 'minitest/autorun'
|
|
6
5
|
require 'json'
|
|
7
6
|
require_relative './parallel_tests'
|
|
8
|
-
|
|
7
|
+
require_relative '../btap_test_helper' # Required for the cached switch
|
|
9
8
|
|
|
10
9
|
class RunAllTests < Minitest::Test
|
|
11
10
|
def test_all()
|
|
12
11
|
full_file_list = nil
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
test_list_file = File.expand_path(File.join(__dir__, 'test_list.txt'))
|
|
13
|
+
root_dir = File.expand_path("../../../../", __dir__)
|
|
14
|
+
if File.exist?(test_list_file)
|
|
15
|
+
puts test_list_file
|
|
15
16
|
# load test files from file.
|
|
16
|
-
full_file_list = File.readlines(
|
|
17
|
+
full_file_list = File.readlines(test_list_file).shuffle
|
|
18
|
+
full_file_list.map! {|file| "#{root_dir}/#{file.strip}"}
|
|
17
19
|
# Select only .rb files that exist
|
|
18
|
-
full_file_list.select! {|
|
|
19
|
-
full_file_list.map! {|item| File.absolute_path("#{item.strip}")}
|
|
20
|
+
full_file_list.select! {|file| file.include?('rb') && File.exist?(file)}
|
|
20
21
|
else
|
|
21
|
-
puts "Could not find list of files to test at #{
|
|
22
|
+
puts "Could not find list of files to test at #{test_list_file}"
|
|
22
23
|
return false
|
|
23
24
|
end
|
|
24
25
|
assert(ParallelTests.new.run(full_file_list), "Some tests failed please ensure all test pass and tests have been updated to reflect the changes you expect before issuing a pull request")
|
|
25
26
|
end
|
|
26
|
-
end
|
|
27
|
+
end
|