openstudio-standards 0.8.5 → 0.8.7
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/standards/test_performance_expected_dd_results.csv +90 -90
- data/lib/openstudio-standards/btap/activity.rb +858 -61
- data/lib/openstudio-standards/btap/attributes.rb +297 -103
- data/lib/openstudio-standards/btap/bridging.rb +1335 -593
- data/lib/openstudio-standards/btap/btap.rb +60 -181
- data/lib/openstudio-standards/btap/carbon/btap_carbon.rb +199 -142
- data/lib/openstudio-standards/btap/common/constructions.json +1275 -0
- data/lib/openstudio-standards/btap/common/costs.csv +1969 -0
- data/lib/openstudio-standards/btap/common/costs_local_factors.csv +2315 -0
- data/lib/openstudio-standards/btap/common/materials_glazing.csv +61 -0
- data/lib/openstudio-standards/btap/{common_resources → common}/materials_hvac.csv +1685 -1685
- data/lib/openstudio-standards/btap/{common_resources → common}/materials_lighting.csv +266 -266
- data/lib/openstudio-standards/btap/common/materials_opaque.csv +214 -0
- data/lib/openstudio-standards/btap/common/necb_building_types.csv +35 -0
- data/lib/openstudio-standards/btap/common/necb_space_types.csv +110 -0
- data/lib/openstudio-standards/btap/common/thermal_bridging.csv +73 -0
- data/lib/openstudio-standards/btap/costing/btap_costing.rb +346 -429
- data/lib/openstudio-standards/btap/costing/database.rb +104 -0
- data/lib/openstudio-standards/btap/costing/daylighting_sensor_control_costing.rb +356 -344
- data/lib/openstudio-standards/btap/costing/dcv_costing.rb +282 -296
- data/lib/openstudio-standards/btap/costing/envelope_costing.rb +179 -192
- data/lib/openstudio-standards/btap/costing/heating_cooling_costing.rb +2477 -2316
- data/lib/openstudio-standards/btap/costing/led_lighting_costing.rb +127 -142
- data/lib/openstudio-standards/btap/costing/lighting_costing.rb +216 -198
- data/lib/openstudio-standards/btap/costing/nv_costing.rb +522 -523
- data/lib/openstudio-standards/btap/costing/pv_ground_costing.rb +649 -649
- data/lib/openstudio-standards/btap/costing/shw_costing.rb +626 -625
- data/lib/openstudio-standards/btap/costing/thermal_bridging_costing.rb +72 -0
- data/lib/openstudio-standards/btap/costing/ventilation_costing.rb +2363 -2361
- data/lib/openstudio-standards/btap/deprecated.rb +1033 -0
- data/lib/openstudio-standards/btap/envelope.rb +313 -572
- data/lib/openstudio-standards/btap/fileio.rb +152 -1070
- data/lib/openstudio-standards/btap/geometry.rb +486 -766
- data/lib/openstudio-standards/btap/linear_regression.rb +130 -0
- data/lib/openstudio-standards/btap/paths.rb +46 -0
- data/lib/openstudio-standards/btap/qaqc/analysis.rb +163 -0
- data/lib/openstudio-standards/btap/qaqc/data.rb +2293 -0
- data/lib/openstudio-standards/btap/qaqc/datapoint.rb +641 -0
- data/lib/openstudio-standards/btap/schedules.rb +11 -611
- data/lib/openstudio-standards/btap/structure.rb +574 -189
- data/lib/openstudio-standards/constructions/materials/information.rb +1 -1
- data/lib/openstudio-standards/create_typical/create_typical.rb +1 -1
- data/lib/openstudio-standards/exterior_lighting/create.rb +135 -85
- data/lib/openstudio-standards/exterior_lighting/data/typical_exterior_lighting.json +20 -0
- data/lib/openstudio-standards/exterior_lighting/information.rb +23 -2
- data/lib/openstudio-standards/geometry/create.rb +7 -3
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.Model.rb +3 -2
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Model.rb +3 -2
- data/lib/openstudio-standards/prototypes/common/data/thermostat_schedule_lookup.json +84 -84
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.hvac_systems.rb +4 -4
- data/lib/openstudio-standards/refrigeration/create_walkin.rb +45 -5
- data/lib/openstudio-standards/refrigeration/data/refrigerated_walkins.csv +75 -75
- data/lib/openstudio-standards/schedules/parametric.rb +6 -0
- data/lib/openstudio-standards/service_water_heating/create_typical.rb +10 -3
- data/lib/openstudio-standards/service_water_heating/create_water_heating_loop.rb +30 -14
- data/lib/openstudio-standards/service_water_heating/information.rb +4 -1
- data/lib/openstudio-standards/sql_file/unmet_hours.rb +2 -1
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb +3 -1
- data/lib/openstudio-standards/standards/Standards.CoilHeatingDXSingleSpeed.rb +3 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.boilers.json +12 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.construction_properties.json +18432 -3072
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.boilers.json +26 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.construction_properties.json +8532 -1422
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.boilers.json +26 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.construction_properties.json +8532 -1422
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.boilers.json +16 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.computer_room_acs.json +30 -30
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.construction_properties.json +7560 -1260
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.PumpVariableSpeed.rb +1 -2
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.boilers.json +16 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.construction_properties.json +7560 -1260
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirLoopHVAC.rb +3 -3
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.PumpVariableSpeed.rb +1 -2
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.boilers.json +22 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.construction_properties.json +7236 -1206
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.furnaces.json +223 -19
- data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.schedules.json +37 -1
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.boilers.json +3 -0
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.construction_properties.json +6900 -1150
- data/lib/openstudio-standards/standards/cbes/data/cbes.schedules.json +1 -1
- data/lib/openstudio-standards/standards/deer/data/deer.schedules.json +1 -1
- data/lib/openstudio-standards/standards/necb/BTAP1980TO2010/data/surface_thermal_transmittance.json +76 -40
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/data/surface_thermal_transmittance.json +76 -40
- data/lib/openstudio-standards/standards/necb/ECMS/hvac_systems.rb +6 -4
- data/lib/openstudio-standards/standards/necb/NECB2011/NECB2011_QAQC.json +2988 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/autozone.rb +25 -3
- data/lib/openstudio-standards/standards/necb/NECB2011/building_envelope.rb +672 -534
- data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/Hospital.osm +1791 -1792
- data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/LEEPMultiTower.osm +7 -1
- data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/LEEPTownHouse.osm +7 -1
- data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/LargeHotel.osm +5 -6
- data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/LargeOffice.osm +8 -9
- data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/NorthernEducation.osm +10 -4
- data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/NorthernHealthCare.osm +14 -15
- data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/Outpatient.osm +7 -1
- data/lib/openstudio-standards/standards/necb/NECB2011/data/surface_thermal_transmittance.json +76 -40
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb +14 -6
- data/lib/openstudio-standards/standards/necb/NECB2011/necb_2011.rb +542 -130
- data/lib/openstudio-standards/standards/necb/NECB2011/qaqc/necb_qaqc.rb +30 -63
- data/lib/openstudio-standards/standards/necb/NECB2011/service_water_heating.rb +7 -2
- data/lib/openstudio-standards/standards/necb/NECB2015/data/surface_thermal_transmittance.json +90 -0
- data/lib/openstudio-standards/standards/necb/NECB2015/necb_2015.rb +8 -6
- data/lib/openstudio-standards/standards/necb/NECB2017/data/surface_thermal_transmittance.json +76 -40
- data/lib/openstudio-standards/standards/necb/NECB2017/necb_2017.rb +2 -1
- data/lib/openstudio-standards/standards/necb/NECB2020/building_envelope.rb +0 -117
- data/lib/openstudio-standards/standards/necb/NECB2020/data/surface_thermal_transmittance.json +76 -45
- data/lib/openstudio-standards/standards/necb/NECB2020/necb_2020.rb +218 -0
- data/lib/openstudio-standards/standards/necb/common/construction_defaults.osm +12 -7
- data/lib/openstudio-standards/standards/standard.rb +1 -1
- data/lib/openstudio-standards/version.rb +1 -1
- data/lib/openstudio-standards.rb +9 -4
- metadata +59 -66
- data/data/inventory/thermal_bridging.csv +0 -90
- data/data/standards/OpenStudio_Standards-ashrae_90_1-ALL-comstock(space_types).xlsx +0 -0
- data/data/standards/openstudio_standards_duplicates_log.csv +0 -7962
- data/lib/openstudio-standards/btap/NECB_building_types.csv +0 -35
- data/lib/openstudio-standards/btap/NECB_space_types.csv +0 -109
- data/lib/openstudio-standards/btap/WeatherData1.json +0 -2110
- data/lib/openstudio-standards/btap/WeatherData1.xlsx +0 -0
- data/lib/openstudio-standards/btap/btap_result.rb +0 -1144
- data/lib/openstudio-standards/btap/btap_test_helper.rb +0 -86
- data/lib/openstudio-standards/btap/common_paths.rb +0 -81
- data/lib/openstudio-standards/btap/common_resources/ConstructionProperties.csv +0 -52
- data/lib/openstudio-standards/btap/common_resources/Constructions.csv +0 -37
- data/lib/openstudio-standards/btap/common_resources/construction_sets.csv +0 -1270
- data/lib/openstudio-standards/btap/common_resources/constructions_glazing.csv +0 -121
- data/lib/openstudio-standards/btap/common_resources/constructions_opaque.csv +0 -2256
- data/lib/openstudio-standards/btap/common_resources/costs.csv +0 -1897
- data/lib/openstudio-standards/btap/common_resources/costs_local_factors.csv +0 -2315
- data/lib/openstudio-standards/btap/common_resources/materials_glazing.csv +0 -35
- data/lib/openstudio-standards/btap/common_resources/materials_opaque.csv +0 -164
- data/lib/openstudio-standards/btap/costing/btap_measure_helper.rb +0 -359
- data/lib/openstudio-standards/btap/costing/btap_workflow.rb +0 -117
- data/lib/openstudio-standards/btap/costing/copy_test_results_files_to_expected_results.rb +0 -11
- data/lib/openstudio-standards/btap/costing/cost_building_from_file.rb +0 -136
- data/lib/openstudio-standards/btap/costing/costing_database_wrapper.rb +0 -173
- data/lib/openstudio-standards/btap/costing/dummy.epw +0 -8768
- data/lib/openstudio-standards/btap/costing/dummy.osm +0 -5320
- data/lib/openstudio-standards/btap/costing/neb_end_use_prices.csv +0 -42
- data/lib/openstudio-standards/btap/costing/necb_2011_spacetype_info.csv +0 -225
- data/lib/openstudio-standards/btap/costing/necb_reference_runs.csv +0 -28705
- data/lib/openstudio-standards/btap/costing/parallel_tests.rb +0 -92
- data/lib/openstudio-standards/btap/costing/test_list.txt +0 -15
- data/lib/openstudio-standards/btap/costing/test_run_all_test_locally.rb +0 -27
- data/lib/openstudio-standards/btap/costing/test_run_costing_tests.rb +0 -80
- data/lib/openstudio-standards/btap/necb_2011_spacetype_info.csv +0 -225
- data/lib/openstudio-standards/btap/utilities/Add_template_field_to_json.rb +0 -22
- data/lib/openstudio-standards/btap/utilities/convert_surfaces_to_adiabatic_necb_8426.rb +0 -204
- data/lib/openstudio-standards/btap/utilities/generate_space_types.rb +0 -8
- data/lib/openstudio-standards/btap/utilities/necb_to_epw_map.rb +0 -50
- data/lib/openstudio-standards/btap/utilities/os_sim_extract.rb +0 -48
- data/lib/openstudio-standards/btap/utilities/rename_surfaces.rb +0 -24
- data/lib/openstudio-standards/btap/utilities/round_surf_coords.rb +0 -32
- data/lib/openstudio-standards/btap/utilities/sched_create.rb +0 -145
- data/lib/openstudio-standards/btap/utilities/set_mult_to_adiabatic.rb +0 -53
- data/lib/openstudio-standards/btap/utilities/space_type.rb +0 -78
- data/lib/openstudio-standards/btap/utilities/weatherData1_xlsx_to_json.rb +0 -56
- data/lib/openstudio-standards/btap/vintagizer.rb +0 -161
- data/lib/openstudio-standards/btap/visualization.rb +0 -72
- data/lib/openstudio-standards/standards/necb/NECB2011/data/necb_2011_spacetype_info.csv +0 -225
- data/lib/openstudio-standards/standards/necb/common/btap_analysis.rb +0 -79
- data/lib/openstudio-standards/standards/necb/common/btap_data.rb +0 -2656
- data/lib/openstudio-standards/standards/necb/common/btap_datapoint.rb +0 -653
- data/lib/openstudio-standards/standards/necb/common/necb_reference_runs.csv +0 -28705
- data/lib/openstudio-standards/standards/necb/common/utility_pricing_2025-02-20.csv +0 -92
- /data/lib/openstudio-standards/btap/{common_resources → common}/carbon_frame.csv +0 -0
- /data/lib/openstudio-standards/btap/{common_resources → common}/carbon_glazing.csv +0 -0
- /data/lib/openstudio-standards/btap/{common_resources → common}/carbon_opaque.csv +0 -0
- /data/lib/openstudio-standards/btap/{common_resources → common}/hvac_vent_ahu.csv +0 -0
- /data/lib/openstudio-standards/btap/{common_resources → common}/lighting.csv +0 -0
- /data/lib/openstudio-standards/btap/{common_resources → common}/lighting_sets.csv +0 -0
- /data/lib/openstudio-standards/btap/{common_resources → common}/locations.csv +0 -0
- /data/lib/openstudio-standards/btap/{costing → common}/mech_sizing.json +0 -0
|
@@ -1,354 +1,366 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
#
|
|
9
|
-
standards_template =
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
|
1
|
+
module BTAP
|
|
2
|
+
class Costing
|
|
3
|
+
def cost_audit_daylighting_sensor_control(model:, prototype_creator:)
|
|
4
|
+
@costing_report["lighting"]["daylighting_sensor_control"] = []
|
|
5
|
+
|
|
6
|
+
# NOTE: Number of daylighting sensors is based on how many a daylighted
|
|
7
|
+
# space needs sensors as per Mike Lubun's costing spec, rather than
|
|
8
|
+
# daylighting sensor control measure.
|
|
9
|
+
standards_template = model.building.get.standardsTemplate.to_s
|
|
10
|
+
if standards_template.include?('NECB')
|
|
11
|
+
# insert a space between NECB and 2011/2015/2017
|
|
12
|
+
standards_template = standards_template.gsub(/NECB(\d)/, 'NECB \1')
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
dsc_cost_total = 0.0
|
|
16
|
+
all_tz_primary_sidelighted_quatity = 0.0
|
|
17
|
+
all_tz_skylight_quatity = 0.0
|
|
18
|
+
|
|
19
|
+
model.getThermalZonesSorted.each do |tz|
|
|
20
|
+
if tz.primaryDaylightingControl.is_initialized
|
|
21
|
+
tz_cost_primary_sidelighted = 0.0
|
|
22
|
+
tz_cost_skylight = 0.0
|
|
23
|
+
tz_multiplier = tz.multiplier()
|
|
24
|
+
daylight_spaces = []
|
|
25
|
+
primary_sidelighted_area_hash = {}
|
|
26
|
+
daylighted_area_under_skylights_hash = {}
|
|
27
|
+
primary_sidelighted_area = 0.0
|
|
28
|
+
daylighted_under_skylight_area = 0.0
|
|
29
|
+
tz_area = 0.0
|
|
30
|
+
tz_number_fixtures = 0.0
|
|
31
|
+
tz_primary_sidelighted_ratio_daylight_area = 0.0
|
|
32
|
+
tz_primary_sidelighted_number_fixtures = 0.0
|
|
33
|
+
tz_primary_sidelighted_number_sensors = 0.0
|
|
34
|
+
tz_skylights_ratio_daylight_area = 0.0
|
|
35
|
+
tz_skylights_number_fixtures = 0.0
|
|
36
|
+
tz_skylights_number_sensors = 0.0
|
|
37
|
+
if !tz.primaryDaylightingControl.get.name().empty? &&
|
|
38
|
+
tz.fractionofZoneControlledbyPrimaryDaylightingControl() > 0.00
|
|
39
|
+
|
|
40
|
+
tz.spaces().sort.each do |space|
|
|
41
|
+
daylight_spaces << space
|
|
61
42
|
end
|
|
62
43
|
end
|
|
63
|
-
if (led_lights > 0) or (standards_template == 'NECB 2020')
|
|
64
|
-
lights_type = 'LED'
|
|
65
|
-
else
|
|
66
|
-
lights_type = 'CFL'
|
|
67
|
-
end
|
|
68
44
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
45
|
+
# Calculate tz_primary_sidelighted_area AND
|
|
46
|
+
# tz_daylighted_area_under_skylights. The above
|
|
47
|
+
# two area values are required for the calculation
|
|
48
|
+
# of tz_primary_sidelighted_number_fixtures AND
|
|
49
|
+
# tz_skylights_number_fixtures.
|
|
50
|
+
daylight_spaces.sort.each do |daylight_space|
|
|
51
|
+
|
|
52
|
+
# Go to the next space if the current space's space type is undefined.
|
|
53
|
+
next if daylight_space.spaceType.get.name.to_s.downcase.include? "undefined"
|
|
54
|
+
|
|
55
|
+
area_weighted_vt_handle = 0.0
|
|
56
|
+
window_area_sum = 0.0
|
|
57
|
+
skylight_area_weighted_vt_handle = 0.0
|
|
58
|
+
skylight_area_sum = 0.0
|
|
59
|
+
|
|
60
|
+
# Find lights_type in each daylight_space.
|
|
61
|
+
led_lights = 0
|
|
62
|
+
daylight_space_type = daylight_space.spaceType()
|
|
63
|
+
daylight_space_type.get.lights.sort.each do |inst|
|
|
64
|
+
daylight_space_lights_definition = inst.lightsDefinition
|
|
65
|
+
daylight_space_lights_definition_name = daylight_space_lights_definition.name
|
|
66
|
+
if daylight_space_lights_definition_name.to_s.include?('LED lighting')
|
|
67
|
+
led_lights += 1
|
|
68
|
+
end
|
|
88
69
|
end
|
|
89
|
-
end
|
|
90
70
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
71
|
+
if (led_lights > 0) or (standards_template == 'NECB 2020')
|
|
72
|
+
lights_type = 'LED'
|
|
73
|
+
else
|
|
74
|
+
lights_type = 'CFL'
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Find height of daylight_space.
|
|
78
|
+
max_space_height_m = 0.0
|
|
79
|
+
daylight_space.surfaces.sort.select { |surface| surface.surfaceType == 'Wall' }.each do |wall_surface|
|
|
80
|
+
|
|
81
|
+
# Find the vertex with the max z value.
|
|
82
|
+
vertex_with_max_height = wall_surface.vertices.max_by(&:z)
|
|
83
|
+
|
|
84
|
+
# Replace max if this surface has something bigger.
|
|
85
|
+
max_space_height_m = vertex_with_max_height.z if vertex_with_max_height.z > max_space_height_m
|
|
86
|
+
end
|
|
87
|
+
max_space_height_ft = (OpenStudio.convert(max_space_height_m, 'm', 'ft').get) #Convert height to ft
|
|
88
|
+
|
|
89
|
+
# Find area, floor_surface, and floor_vertices of daylight_space.
|
|
90
|
+
floor_surface = nil
|
|
91
|
+
floor_area = 0.0
|
|
92
|
+
floor_vertices = []
|
|
93
|
+
daylight_space.surfaces.sort.each do |surface|
|
|
94
|
+
if surface.surfaceType == 'Floor'
|
|
95
|
+
floor_surface = surface
|
|
96
|
+
floor_area += surface.netArea
|
|
97
|
+
floor_vertices << surface.vertices
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Costing-related step: Find fixture type that should be used in the
|
|
102
|
+
# daylight_space based on space_type, template, and lights_type.
|
|
103
|
+
search_fixture_type = {
|
|
104
|
+
row_id_1: daylight_space.spaceType.get.standardsSpaceType.to_s, #space_type
|
|
105
|
+
row_id_2: standards_template,
|
|
106
|
+
row_id_3: lights_type
|
|
107
|
+
}
|
|
108
|
+
sheet_name = 'lighting_sets'
|
|
109
|
+
if max_space_height_ft < 7.88
|
|
110
|
+
column_search = 'Fixture_type_less_than_7.88ft_ht'
|
|
111
|
+
elsif max_space_height_ft >= 7.88 && max_space_height_ft < 15.75
|
|
112
|
+
column_search = 'Fixture_type_7.88_to_15.75ft_ht'
|
|
113
|
+
else #i.e. max_space_height_ft >= 15.75ft_ht
|
|
114
|
+
column_search = 'Fixture_type_greater_than_>15.75ft_ht'
|
|
115
|
+
end
|
|
116
|
+
row_search_1 = 'space_type'
|
|
117
|
+
row_search_2 = 'template'
|
|
118
|
+
row_search_3 = 'Type'
|
|
119
|
+
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)
|
|
120
|
+
|
|
121
|
+
# COSTING-related step: Find number_fixtures_per_1000_ft2 that
|
|
122
|
+
# should be considered in the daylight_space based on fixture_type
|
|
123
|
+
search_fixtures_per_1000_ft2 = @costing_database['raw']['lighting'].select { |data|
|
|
124
|
+
data['lighting_type_id'].to_f.round(1) == fixture_type.to_f.round(1)
|
|
125
|
+
}.first
|
|
126
|
+
if search_fixtures_per_1000_ft2.nil?
|
|
127
|
+
puts("No data found for #{search_fixtures_per_1000_ft2}!")
|
|
128
|
+
raise
|
|
129
|
+
end
|
|
130
|
+
number_fixtures_per_1000_ft2 = search_fixtures_per_1000_ft2['Fix_1000ft'].to_i
|
|
131
|
+
|
|
132
|
+
# Costing-related step: Calculate number_fixtures_space that should
|
|
133
|
+
# be considered in the daylight_space based on
|
|
134
|
+
# number_fixtures_per_1000_ft2 and area of daylight_space.
|
|
135
|
+
floor_area_ft2 = (OpenStudio.convert(floor_area, 'm^2', 'ft^2').get) #convert floor_area to ft2
|
|
136
|
+
number_fixtures_space = (floor_area_ft2 / 1000) * number_fixtures_per_1000_ft2
|
|
137
|
+
number_fixtures_space = number_fixtures_space.ceil
|
|
138
|
+
tz_number_fixtures += number_fixtures_space
|
|
139
|
+
|
|
140
|
+
# Calculate 'primary_sidelighted_area' of the thermal zone.
|
|
141
|
+
primary_sidelighted_area, area_weighted_vt_handle, window_area_sum =
|
|
142
|
+
prototype_creator.get_parameters_sidelighting(daylight_space: daylight_space,
|
|
143
|
+
floor_surface: floor_surface,
|
|
144
|
+
floor_vertices: floor_vertices,
|
|
145
|
+
floor_area: floor_area,
|
|
146
|
+
primary_sidelighted_area: primary_sidelighted_area,
|
|
147
|
+
area_weighted_vt_handle: area_weighted_vt_handle,
|
|
148
|
+
window_area_sum: window_area_sum)
|
|
149
|
+
|
|
150
|
+
primary_sidelighted_area_hash[daylight_space.name.to_s] = primary_sidelighted_area
|
|
151
|
+
|
|
152
|
+
# Calculate 'daylighted_under_skylight_area' of the thermal zone.
|
|
153
|
+
# Loop through the surfaces of each daylight_space to calculate
|
|
154
|
+
# daylighted_area_under_skylights and skylight_effective_aperture
|
|
155
|
+
# for each daylight_space.
|
|
156
|
+
daylighted_under_skylight_area, skylight_area_weighted_vt_handle, skylight_area_sum =
|
|
157
|
+
prototype_creator.get_parameters_skylight(daylight_space: daylight_space,
|
|
158
|
+
skylight_area_weighted_vt_handle: skylight_area_weighted_vt_handle,
|
|
159
|
+
skylight_area_sum: skylight_area_sum,
|
|
160
|
+
daylighted_under_skylight_area: daylighted_under_skylight_area)
|
|
161
|
+
|
|
162
|
+
daylighted_area_under_skylights_hash[daylight_space.name.to_s] = daylighted_under_skylight_area
|
|
163
|
+
tz_area += floor_area
|
|
164
|
+
|
|
165
|
+
end # daylight_spaces.sort.each do |daylight_space|
|
|
166
|
+
|
|
167
|
+
# If no fixtures or daylighting is defined then go to the next thermal zone
|
|
168
|
+
next if tz_number_fixtures.to_f == 0.0 || tz_primary_sidelighted_ratio_daylight_area.to_f.nan?
|
|
169
|
+
|
|
170
|
+
# Costing-related step: Calculate number of fixtures in thermal zones
|
|
171
|
+
# with window(s).
|
|
172
|
+
tz_primary_sidelighted_ratio_daylight_area = primary_sidelighted_area / tz_area
|
|
173
|
+
tz_primary_sidelighted_number_fixtures = (
|
|
174
|
+
tz_number_fixtures * tz_primary_sidelighted_ratio_daylight_area).ceil
|
|
175
|
+
tz_primary_sidelighted_number_sensors = (tz_primary_sidelighted_number_fixtures / 4.0).ceil
|
|
176
|
+
all_tz_primary_sidelighted_quatity += tz_primary_sidelighted_number_sensors * tz_multiplier
|
|
177
|
+
|
|
178
|
+
if tz_primary_sidelighted_number_sensors > 0.0
|
|
179
|
+
tags = ['lighting', 'daylighting_sensor_control']
|
|
180
|
+
# cost of daylighting sensor
|
|
181
|
+
quantity_tz_primary_sidelighted_daylighting_sensor = 1.0 * tz_primary_sidelighted_number_sensors * tz_multiplier
|
|
182
|
+
search_tz_primary_sidelighted_daylighting_sensor = {
|
|
183
|
+
row_id_1: 'Ea',
|
|
184
|
+
row_id_2: 407
|
|
185
|
+
}
|
|
186
|
+
sheet_name = 'materials_lighting'
|
|
187
|
+
column_1 = 'unit'
|
|
188
|
+
column_2 = 'lighting_type_id'
|
|
189
|
+
cost_tz_primary_sidelighted_daylighting_sensor = assembly_cost(
|
|
190
|
+
cost_info: search_tz_primary_sidelighted_daylighting_sensor,
|
|
191
|
+
sheet_name: sheet_name,
|
|
192
|
+
column_1: column_1,
|
|
193
|
+
column_2: column_2,
|
|
194
|
+
quantity: quantity_tz_primary_sidelighted_daylighting_sensor,
|
|
195
|
+
tags: tags)
|
|
196
|
+
|
|
197
|
+
# Cost of wiring:
|
|
198
|
+
quantity_tz_primary_sidelighted_wiring = (30.0 / 100.0) * tz_primary_sidelighted_number_sensors *
|
|
199
|
+
tz_multiplier
|
|
200
|
+
search_tz_primary_sidelighted_wiring = { row_id_1: 'CLF', row_id_2: 10 }
|
|
201
|
+
sheet_name = 'materials_lighting'
|
|
202
|
+
column_1 = 'unit'
|
|
203
|
+
column_2 = 'lighting_type_id'
|
|
204
|
+
cost_tz_primary_sidelighted_wiring = assembly_cost(
|
|
205
|
+
cost_info: search_tz_primary_sidelighted_wiring,
|
|
206
|
+
sheet_name: sheet_name,
|
|
207
|
+
column_1: column_1,
|
|
208
|
+
column_2: column_2,
|
|
209
|
+
quantity: quantity_tz_primary_sidelighted_wiring,
|
|
210
|
+
tags: tags)
|
|
211
|
+
|
|
212
|
+
# Cost of PVC conduit:
|
|
213
|
+
quantity_tz_primary_sidelighted_pvc_conduit = 30.0 * tz_primary_sidelighted_number_sensors * tz_multiplier
|
|
214
|
+
search_tz_primary_sidelighted_pvc_conduit = { row_id_1: 'LF', row_id_2: 17 }
|
|
215
|
+
sheet_name = 'materials_lighting'
|
|
216
|
+
column_1 = 'unit'
|
|
217
|
+
column_2 = 'lighting_type_id'
|
|
218
|
+
cost_tz_primary_sidelighted_pvc_conduit = assembly_cost(
|
|
219
|
+
cost_info: search_tz_primary_sidelighted_pvc_conduit,
|
|
220
|
+
sheet_name: sheet_name,
|
|
221
|
+
column_1: column_1,
|
|
222
|
+
column_2: column_2,
|
|
223
|
+
quantity: quantity_tz_primary_sidelighted_pvc_conduit,
|
|
224
|
+
tags: tags)
|
|
225
|
+
|
|
226
|
+
# Cost of box:
|
|
227
|
+
quantity_tz_primary_sidelighted_box = 1.0 * tz_primary_sidelighted_number_sensors * tz_multiplier
|
|
228
|
+
search_tz_primary_sidelighted_box = { row_id_1: 'Ea', row_id_2: 14 }
|
|
229
|
+
sheet_name = 'materials_lighting'
|
|
230
|
+
column_1 = 'unit'
|
|
231
|
+
column_2 = 'lighting_type_id'
|
|
232
|
+
cost_tz_primary_sidelighted_box = assembly_cost(
|
|
233
|
+
cost_info: search_tz_primary_sidelighted_box,
|
|
234
|
+
sheet_name: sheet_name,
|
|
235
|
+
column_1: column_1,
|
|
236
|
+
column_2: column_2,
|
|
237
|
+
quantity: quantity_tz_primary_sidelighted_box,
|
|
238
|
+
tags: tags)
|
|
239
|
+
|
|
240
|
+
# Total cost for this zone:
|
|
241
|
+
tz_cost_primary_sidelighted = cost_tz_primary_sidelighted_daylighting_sensor +
|
|
242
|
+
cost_tz_primary_sidelighted_wiring +
|
|
243
|
+
cost_tz_primary_sidelighted_pvc_conduit +
|
|
244
|
+
cost_tz_primary_sidelighted_box
|
|
245
|
+
|
|
246
|
+
dsc_cost_total += tz_cost_primary_sidelighted
|
|
104
247
|
end
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
248
|
+
|
|
249
|
+
# Costing-related step: Calculate number of fixtures in thermal zones with skylight(s).
|
|
250
|
+
tz_skylights_ratio_daylight_area = daylighted_under_skylight_area / tz_area
|
|
251
|
+
tz_skylights_number_fixtures = (tz_number_fixtures * tz_skylights_ratio_daylight_area).ceil
|
|
252
|
+
tz_skylights_number_sensors = (tz_skylights_number_fixtures / 4.0).ceil
|
|
253
|
+
all_tz_skylight_quatity += tz_skylights_number_sensors * tz_multiplier
|
|
254
|
+
|
|
255
|
+
if tz_skylights_number_sensors > 0.0
|
|
256
|
+
tags = ['lighting', 'daylighting_sensor_control']
|
|
257
|
+
|
|
258
|
+
# Cost of daylighting sensor(s):
|
|
259
|
+
quantity_tz_skylights_daylighting_sensor = 1.0 * tz_skylights_number_sensors * tz_multiplier
|
|
260
|
+
search_tz_skylights_daylighting_sensor = { row_id_1: 'Ea', row_id_2: 407 }
|
|
261
|
+
sheet_name = 'materials_lighting'
|
|
262
|
+
column_1 = 'unit'
|
|
263
|
+
column_2 = 'lighting_type_id'
|
|
264
|
+
cost_tz_skylights_daylighting_sensor = assembly_cost(
|
|
265
|
+
cost_info: search_tz_skylights_daylighting_sensor,
|
|
266
|
+
sheet_name: sheet_name,
|
|
267
|
+
column_1: column_1,
|
|
268
|
+
column_2: column_2,
|
|
269
|
+
quantity: quantity_tz_skylights_daylighting_sensor,
|
|
270
|
+
tags: tags)
|
|
271
|
+
|
|
272
|
+
# Cost of wiring:
|
|
273
|
+
quantity_tz_skylights_wiring = (30.0 / 100.0) * tz_skylights_number_sensors * tz_multiplier
|
|
274
|
+
search_tz_skylights_wiring = { row_id_1: 'CLF', row_id_2: 10 }
|
|
275
|
+
sheet_name = 'materials_lighting'
|
|
276
|
+
column_1 = 'unit'
|
|
277
|
+
column_2 = 'lighting_type_id'
|
|
278
|
+
cost_tz_skylights_wiring = assembly_cost(
|
|
279
|
+
cost_info: search_tz_skylights_wiring,
|
|
280
|
+
sheet_name: sheet_name,
|
|
281
|
+
column_1: column_1,
|
|
282
|
+
column_2: column_2,
|
|
283
|
+
quantity: quantity_tz_skylights_wiring,
|
|
284
|
+
tags: tags)
|
|
285
|
+
|
|
286
|
+
# Cost of PVC conduit:
|
|
287
|
+
quantity_tz_skylights_pvc_conduit = 30.0 * tz_skylights_number_sensors * tz_multiplier
|
|
288
|
+
search_tz_skylights_pvc_conduit = { row_id_1: 'LF', row_id_2: 17 }
|
|
289
|
+
sheet_name = 'materials_lighting'
|
|
290
|
+
column_1 = 'unit'
|
|
291
|
+
column_2 = 'lighting_type_id'
|
|
292
|
+
cost_tz_skylights_pvc_conduit = assembly_cost(
|
|
293
|
+
cost_info: search_tz_skylights_pvc_conduit,
|
|
294
|
+
sheet_name: sheet_name,
|
|
295
|
+
column_1: column_1,
|
|
296
|
+
column_2: column_2,
|
|
297
|
+
quantity: quantity_tz_skylights_pvc_conduit,
|
|
298
|
+
tags: tags)
|
|
299
|
+
|
|
300
|
+
# Cost of box:
|
|
301
|
+
quantity_tz_skylights_box = 1.0 * tz_skylights_number_sensors * tz_multiplier
|
|
302
|
+
search_tz_skylights_box = {
|
|
303
|
+
row_id_1: 'Ea',
|
|
304
|
+
row_id_2: 14
|
|
305
|
+
}
|
|
306
|
+
sheet_name = 'materials_lighting'
|
|
307
|
+
column_1 = 'unit'
|
|
308
|
+
column_2 = 'lighting_type_id'
|
|
309
|
+
cost_tz_skylights_box = assembly_cost(
|
|
310
|
+
cost_info: search_tz_skylights_box,
|
|
311
|
+
sheet_name: sheet_name,
|
|
312
|
+
column_1: column_1,
|
|
313
|
+
column_2: column_2,
|
|
314
|
+
quantity: quantity_tz_skylights_box,
|
|
315
|
+
tags: tags)
|
|
316
|
+
|
|
317
|
+
# Total cost for this zone:
|
|
318
|
+
tz_cost_skylight = cost_tz_skylights_daylighting_sensor +
|
|
319
|
+
cost_tz_skylights_wiring +
|
|
320
|
+
cost_tz_skylights_pvc_conduit +
|
|
321
|
+
cost_tz_skylights_box
|
|
322
|
+
|
|
323
|
+
dsc_cost_total += tz_cost_skylight
|
|
117
324
|
end
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
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
|
|
325
|
+
|
|
326
|
+
# Gather information for reporting:
|
|
327
|
+
@costing_report["lighting"]["daylighting_sensor_control"] << {
|
|
328
|
+
'zone' => tz.name.to_s,
|
|
329
|
+
'zone_area' => tz_area,
|
|
330
|
+
'zone_multiplier' => tz_multiplier,
|
|
331
|
+
'number_of_fixtures_required_without_considering_daylighted_area_under_sidelighting_and_skylights' =>
|
|
332
|
+
tz_number_fixtures,
|
|
333
|
+
'primary_sidelighted_area' => primary_sidelighted_area,
|
|
334
|
+
'primary_sidelighted_number_fixtures' => tz_primary_sidelighted_number_fixtures,
|
|
335
|
+
'primary_sidelighted_number_sensors' => tz_primary_sidelighted_number_sensors,
|
|
336
|
+
'skylights_daylighted_area' => daylighted_under_skylight_area,
|
|
337
|
+
'skylights_number_fixtures' => tz_skylights_number_fixtures,
|
|
338
|
+
'skylights_number_sensors' => tz_skylights_number_sensors,
|
|
339
|
+
'daylighting_sensor_control_cost_for_this_zone' => tz_cost_primary_sidelighted + tz_cost_skylight
|
|
294
340
|
}
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
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
|
|
341
|
+
|
|
342
|
+
end # tz.primaryDaylightingControl.is_initialized
|
|
343
|
+
end # model.getThermalZonesSorted.each do |tz|
|
|
344
|
+
|
|
345
|
+
puts "\nDaylighting sensor controls costing data successfully generated. Total DSC costs: $#{dsc_cost_total.round(2)}"
|
|
346
|
+
|
|
347
|
+
return dsc_cost_total
|
|
348
|
+
end # cost_audit_daylighting_sensor_control(model, prototype_creator)
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
def get_fixture_type_id(fixture_info:, sheet_name:, row_name_1:, row_name_2:, row_name_3:, column_search:)
|
|
352
|
+
fixture_type = nil
|
|
353
|
+
fixture_type = @costing_database['raw'][sheet_name].select { |data|
|
|
354
|
+
data[row_name_1].to_s.upcase == fixture_info[:row_id_1].to_s.upcase and
|
|
355
|
+
data[row_name_2].to_s.upcase == fixture_info[:row_id_2].to_s.upcase and
|
|
356
|
+
data[row_name_3].to_s.upcase == fixture_info[:row_id_3].to_s.upcase
|
|
357
|
+
}.first
|
|
358
|
+
|
|
359
|
+
if fixture_type.nil?
|
|
360
|
+
puts("No data found for #{fixture_type}!")
|
|
361
|
+
raise
|
|
362
|
+
end
|
|
363
|
+
return fixture_type[column_search]
|
|
350
364
|
end
|
|
351
|
-
return fixture_type[column_search]
|
|
352
365
|
end
|
|
353
|
-
|
|
354
|
-
end
|
|
366
|
+
end
|