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,687 +1,687 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
sheet_name:sheet_name,
|
|
50
|
-
column_1:column_1,
|
|
51
|
-
column_2:column_2,
|
|
52
|
-
quantity: quantity_concrete,
|
|
53
|
-
tags: tags)
|
|
54
|
-
# puts "quantity_concrete is #{quantity_concrete}"
|
|
55
|
-
# puts "pv_ground_costing_concrete is #{pv_ground_costing_concrete}"
|
|
56
|
-
|
|
57
|
-
### Step 2b: costing of excavation -------------------------------
|
|
58
|
-
quantity_excavation = 3.0 * dc_system_capacity_kw #unit: yd3
|
|
59
|
-
search_excavation = {
|
|
60
|
-
row_id_1: 'Excavation_trench_4_6',
|
|
61
|
-
row_id_2: 0.75
|
|
62
|
-
}
|
|
63
|
-
sheet_name = 'materials_hvac'
|
|
64
|
-
column_1 = 'Material'
|
|
65
|
-
column_2 = 'Size'
|
|
66
|
-
pv_ground_costing_excavation = assembly_cost(cost_info:search_excavation,
|
|
1
|
+
module BTAP
|
|
2
|
+
class Costing
|
|
3
|
+
def cost_audit_pv_ground(model, prototype_creator)
|
|
4
|
+
@costing_report['renewables']['pv'] = []
|
|
5
|
+
a = 0 # This is for reporting purposes.
|
|
6
|
+
pv_ground_total_cost = 0.0
|
|
7
|
+
#-------------------------------------------------------------------------------------------------------------------
|
|
8
|
+
# summary of all steps as per Mike Lubun's spec:
|
|
9
|
+
# Step 2: costing of concrete base
|
|
10
|
+
# Step 3: pv modules' racking costing
|
|
11
|
+
# Step 4: pv module costing
|
|
12
|
+
# Step 5: pv wiring costing
|
|
13
|
+
# Step 6: pv inverter costing
|
|
14
|
+
# Step 7: transformer costing
|
|
15
|
+
# Step 8: circuit breakers costing
|
|
16
|
+
# Step 9: circuit breaker fuses costing
|
|
17
|
+
# Step 10: PV fuses costing
|
|
18
|
+
# Step 11: disconnects costing
|
|
19
|
+
# Step 12: total cost (sum of Step 2 to 11)
|
|
20
|
+
#-------------------------------------------------------------------------------------------------------------------
|
|
21
|
+
##### Gather PV information from the model
|
|
22
|
+
model.getGeneratorPVWattss.sort.each do |generator_PVWatt|
|
|
23
|
+
|
|
24
|
+
tags = ['renewables','pv']
|
|
25
|
+
|
|
26
|
+
dc_system_capacity_w = generator_PVWatt.dcSystemCapacity()
|
|
27
|
+
module_type = generator_PVWatt.moduleType()
|
|
28
|
+
dc_system_capacity_kw = dc_system_capacity_w/1000
|
|
29
|
+
#-----------------------------------------------------------------------------------------------------------------
|
|
30
|
+
##### Step 2: costing of concrete base (#Note: steps' numbers are based on Mike Lubun's spec document)
|
|
31
|
+
### Step 2a: costing of concrete
|
|
32
|
+
### Step 2b: costing of excavation
|
|
33
|
+
### Step 2c: costing of concrete footing
|
|
34
|
+
### Step 2d: costing of backfill
|
|
35
|
+
### Step 2e: costing of compaction
|
|
36
|
+
### Step 2f: costing of underground electrical duct
|
|
37
|
+
### Step 2g: costing of grounding
|
|
38
|
+
### Step 2h: sum of 2a,b,c,d,e,f,g
|
|
39
|
+
### Step 2a: costing of concrete -------------------------------
|
|
40
|
+
quantity_concrete = 0.5 * dc_system_capacity_kw #unit: yd3
|
|
41
|
+
search_concrete_3000psi = {
|
|
42
|
+
row_id_1: 'concrete',
|
|
43
|
+
row_id_2: 3000.0
|
|
44
|
+
}
|
|
45
|
+
sheet_name = 'materials_hvac'
|
|
46
|
+
column_1 = 'Material'
|
|
47
|
+
column_2 = 'Size'
|
|
48
|
+
pv_ground_costing_concrete = assembly_cost(cost_info:search_concrete_3000psi,
|
|
67
49
|
sheet_name:sheet_name,
|
|
68
50
|
column_1:column_1,
|
|
69
51
|
column_2:column_2,
|
|
70
|
-
quantity:
|
|
52
|
+
quantity: quantity_concrete,
|
|
71
53
|
tags: tags)
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
sheet_name:sheet_name,
|
|
86
|
-
column_1:column_1,
|
|
87
|
-
column_2:column_2,
|
|
88
|
-
quantity: quantity_concrete_form,
|
|
89
|
-
tags: tags)
|
|
90
|
-
# puts "quantity_concrete_form is #{quantity_concrete_form}"
|
|
91
|
-
# puts "pv_ground_concrete_footing is #{pv_ground_concrete_footing}"
|
|
92
|
-
|
|
93
|
-
### Step 2d: costing of backfill -------------------------------
|
|
94
|
-
quantity_backfill = 3.0 * dc_system_capacity_kw #unit: each
|
|
95
|
-
search_backfill = {
|
|
96
|
-
row_id_1: 'Backfill ',
|
|
97
|
-
row_id_2: nil
|
|
98
|
-
}
|
|
99
|
-
sheet_name = 'materials_hvac'
|
|
100
|
-
column_1 = 'Material'
|
|
101
|
-
column_2 = nil
|
|
102
|
-
pv_ground_backfill = assembly_cost(cost_info:search_backfill,
|
|
103
|
-
sheet_name:sheet_name,
|
|
104
|
-
column_1:column_1,
|
|
105
|
-
column_2:column_2,
|
|
106
|
-
quantity: quantity_backfill,
|
|
107
|
-
tags: tags)
|
|
108
|
-
# puts "quantity_backfill is #{quantity_backfill}"
|
|
109
|
-
# puts "pv_ground_backfill is #{pv_ground_backfill}"
|
|
110
|
-
|
|
111
|
-
### Step 2e: costing of compaction -------------------------------
|
|
112
|
-
quantity_compaction = 3.0 * dc_system_capacity_kw #unit: yd3
|
|
113
|
-
search_compaction = {
|
|
114
|
-
row_id_1: 'Compaction_WalkBehind',
|
|
115
|
-
row_id_2: 4.0
|
|
116
|
-
}
|
|
117
|
-
sheet_name = 'materials_hvac'
|
|
118
|
-
column_1 = 'Material'
|
|
119
|
-
column_2 = 'Size'
|
|
120
|
-
pv_ground_compaction = assembly_cost(cost_info:search_compaction,
|
|
121
|
-
sheet_name:sheet_name,
|
|
122
|
-
column_1:column_1,
|
|
123
|
-
column_2:column_2,
|
|
124
|
-
quantity: quantity_compaction,
|
|
125
|
-
tags: tags)
|
|
126
|
-
# puts "quantity_compaction is #{quantity_compaction}"
|
|
127
|
-
# puts "pv_ground_compaction is #{pv_ground_compaction}"
|
|
128
|
-
|
|
129
|
-
### Step 2f: costing of underground electrical duct -------------------------------
|
|
130
|
-
quantity_underground_electrical_duct = 100.0
|
|
131
|
-
search_underground_electrical_duct = {
|
|
132
|
-
row_id_1: 'groundconduit',
|
|
133
|
-
row_id_2: 1470.0
|
|
134
|
-
}
|
|
135
|
-
sheet_name = 'materials_hvac'
|
|
136
|
-
column_1 = 'Material'
|
|
137
|
-
column_2 = 'material_id'
|
|
138
|
-
pv_ground_underground_electrical_duct = assembly_cost(cost_info:search_underground_electrical_duct,
|
|
139
|
-
sheet_name:sheet_name,
|
|
140
|
-
column_1:column_1,
|
|
141
|
-
column_2:column_2,
|
|
142
|
-
quantity: quantity_underground_electrical_duct,
|
|
143
|
-
tags: tags)
|
|
144
|
-
# puts "quantity_underground_electrical_duct is #{quantity_underground_electrical_duct}"
|
|
145
|
-
# puts "pv_ground_underground_electrical_duct is #{pv_ground_underground_electrical_duct}"
|
|
146
|
-
|
|
147
|
-
### Step 2g: costing of grounding -------------------------------
|
|
148
|
-
# Step 2g-1: costing of ground rod
|
|
149
|
-
quantity_grounding_ground_rod = 1.0
|
|
150
|
-
search_grounding_ground_rod = {
|
|
151
|
-
row_id_1: 'Ground_Rod',
|
|
152
|
-
row_id_2: 1356.0
|
|
153
|
-
}
|
|
154
|
-
sheet_name = 'materials_hvac'
|
|
155
|
-
column_1 = 'Material'
|
|
156
|
-
column_2 = 'material_id'
|
|
157
|
-
pv_ground_grounding_ground_rod = assembly_cost(cost_info:search_grounding_ground_rod,
|
|
54
|
+
# puts "quantity_concrete is #{quantity_concrete}"
|
|
55
|
+
# puts "pv_ground_costing_concrete is #{pv_ground_costing_concrete}"
|
|
56
|
+
|
|
57
|
+
### Step 2b: costing of excavation -------------------------------
|
|
58
|
+
quantity_excavation = 3.0 * dc_system_capacity_kw #unit: yd3
|
|
59
|
+
search_excavation = {
|
|
60
|
+
row_id_1: 'Excavation_trench_4_6',
|
|
61
|
+
row_id_2: 0.75
|
|
62
|
+
}
|
|
63
|
+
sheet_name = 'materials_hvac'
|
|
64
|
+
column_1 = 'Material'
|
|
65
|
+
column_2 = 'Size'
|
|
66
|
+
pv_ground_costing_excavation = assembly_cost(cost_info:search_excavation,
|
|
158
67
|
sheet_name:sheet_name,
|
|
159
68
|
column_1:column_1,
|
|
160
69
|
column_2:column_2,
|
|
161
|
-
quantity:
|
|
70
|
+
quantity: quantity_excavation,
|
|
162
71
|
tags: tags)
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
72
|
+
# puts "quantity_excavation is #{quantity_excavation}"
|
|
73
|
+
# puts "pv_ground_costing_excavation is #{pv_ground_costing_excavation}"
|
|
74
|
+
|
|
75
|
+
### Step 2c: costing of concrete footing -------------------------------
|
|
76
|
+
quantity_concrete_form = 1.0 * dc_system_capacity_kw #unit: each
|
|
77
|
+
search_concrete_footing = {
|
|
78
|
+
row_id_1: 'concreteforms',
|
|
79
|
+
row_id_2: nil
|
|
80
|
+
}
|
|
81
|
+
sheet_name = 'materials_hvac'
|
|
82
|
+
column_1 = 'Material'
|
|
83
|
+
column_2 = nil
|
|
84
|
+
pv_ground_concrete_footing = assembly_cost(cost_info:search_concrete_footing,
|
|
176
85
|
sheet_name:sheet_name,
|
|
177
86
|
column_1:column_1,
|
|
178
87
|
column_2:column_2,
|
|
179
|
-
quantity:
|
|
88
|
+
quantity: quantity_concrete_form,
|
|
180
89
|
tags: tags)
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
90
|
+
# puts "quantity_concrete_form is #{quantity_concrete_form}"
|
|
91
|
+
# puts "pv_ground_concrete_footing is #{pv_ground_concrete_footing}"
|
|
92
|
+
|
|
93
|
+
### Step 2d: costing of backfill -------------------------------
|
|
94
|
+
quantity_backfill = 3.0 * dc_system_capacity_kw #unit: each
|
|
95
|
+
search_backfill = {
|
|
96
|
+
row_id_1: 'Backfill ',
|
|
97
|
+
row_id_2: nil
|
|
98
|
+
}
|
|
99
|
+
sheet_name = 'materials_hvac'
|
|
100
|
+
column_1 = 'Material'
|
|
101
|
+
column_2 = nil
|
|
102
|
+
pv_ground_backfill = assembly_cost(cost_info:search_backfill,
|
|
103
|
+
sheet_name:sheet_name,
|
|
104
|
+
column_1:column_1,
|
|
105
|
+
column_2:column_2,
|
|
106
|
+
quantity: quantity_backfill,
|
|
107
|
+
tags: tags)
|
|
108
|
+
# puts "quantity_backfill is #{quantity_backfill}"
|
|
109
|
+
# puts "pv_ground_backfill is #{pv_ground_backfill}"
|
|
110
|
+
|
|
111
|
+
### Step 2e: costing of compaction -------------------------------
|
|
112
|
+
quantity_compaction = 3.0 * dc_system_capacity_kw #unit: yd3
|
|
113
|
+
search_compaction = {
|
|
114
|
+
row_id_1: 'Compaction_WalkBehind',
|
|
115
|
+
row_id_2: 4.0
|
|
116
|
+
}
|
|
117
|
+
sheet_name = 'materials_hvac'
|
|
118
|
+
column_1 = 'Material'
|
|
119
|
+
column_2 = 'Size'
|
|
120
|
+
pv_ground_compaction = assembly_cost(cost_info:search_compaction,
|
|
121
|
+
sheet_name:sheet_name,
|
|
122
|
+
column_1:column_1,
|
|
123
|
+
column_2:column_2,
|
|
124
|
+
quantity: quantity_compaction,
|
|
125
|
+
tags: tags)
|
|
126
|
+
# puts "quantity_compaction is #{quantity_compaction}"
|
|
127
|
+
# puts "pv_ground_compaction is #{pv_ground_compaction}"
|
|
128
|
+
|
|
129
|
+
### Step 2f: costing of underground electrical duct -------------------------------
|
|
130
|
+
quantity_underground_electrical_duct = 100.0
|
|
131
|
+
search_underground_electrical_duct = {
|
|
132
|
+
row_id_1: 'groundconduit',
|
|
133
|
+
row_id_2: 1470.0
|
|
134
|
+
}
|
|
135
|
+
sheet_name = 'materials_hvac'
|
|
136
|
+
column_1 = 'Material'
|
|
137
|
+
column_2 = 'material_id'
|
|
138
|
+
pv_ground_underground_electrical_duct = assembly_cost(cost_info:search_underground_electrical_duct,
|
|
139
|
+
sheet_name:sheet_name,
|
|
140
|
+
column_1:column_1,
|
|
141
|
+
column_2:column_2,
|
|
142
|
+
quantity: quantity_underground_electrical_duct,
|
|
143
|
+
tags: tags)
|
|
144
|
+
# puts "quantity_underground_electrical_duct is #{quantity_underground_electrical_duct}"
|
|
145
|
+
# puts "pv_ground_underground_electrical_duct is #{pv_ground_underground_electrical_duct}"
|
|
146
|
+
|
|
147
|
+
### Step 2g: costing of grounding -------------------------------
|
|
148
|
+
# Step 2g-1: costing of ground rod
|
|
149
|
+
quantity_grounding_ground_rod = 1.0
|
|
150
|
+
search_grounding_ground_rod = {
|
|
151
|
+
row_id_1: 'Ground_Rod',
|
|
152
|
+
row_id_2: 1356.0
|
|
153
|
+
}
|
|
154
|
+
sheet_name = 'materials_hvac'
|
|
155
|
+
column_1 = 'Material'
|
|
156
|
+
column_2 = 'material_id'
|
|
157
|
+
pv_ground_grounding_ground_rod = assembly_cost(cost_info:search_grounding_ground_rod,
|
|
230
158
|
sheet_name:sheet_name,
|
|
231
159
|
column_1:column_1,
|
|
232
160
|
column_2:column_2,
|
|
233
|
-
quantity:
|
|
161
|
+
quantity: quantity_grounding_ground_rod,
|
|
234
162
|
tags: tags)
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
163
|
+
# puts "quantity_grounding_ground_rod is #{quantity_grounding_ground_rod}"
|
|
164
|
+
# puts "pv_grounding_ground_rod is #{pv_ground_grounding_ground_rod}"
|
|
165
|
+
|
|
166
|
+
# Step 2g-2: costing of exo weld
|
|
167
|
+
quantity_grounding_exo_weld = 2.0
|
|
168
|
+
search_grounding_exo_weld = {
|
|
169
|
+
row_id_1: 'Exo_weld',
|
|
170
|
+
row_id_2: 1373.0
|
|
171
|
+
}
|
|
172
|
+
sheet_name = 'materials_hvac'
|
|
173
|
+
column_1 = 'Material'
|
|
174
|
+
column_2 = 'material_id'
|
|
175
|
+
pv_ground_grounding_exo_weld = assembly_cost(cost_info:search_grounding_exo_weld,
|
|
176
|
+
sheet_name:sheet_name,
|
|
177
|
+
column_1:column_1,
|
|
178
|
+
column_2:column_2,
|
|
179
|
+
quantity: quantity_grounding_exo_weld,
|
|
180
|
+
tags: tags)
|
|
181
|
+
# puts "quantity_grounding_exo_weld is #{quantity_grounding_exo_weld}"
|
|
182
|
+
# puts "pv_grounding_exo_weld is #{pv_ground_grounding_exo_weld}"
|
|
183
|
+
|
|
184
|
+
# Step 2g-3: costing of ground wire #4
|
|
185
|
+
quantity_grounding_ground_wire_4 = 100.0 / 100.0
|
|
186
|
+
search_grounding_ground_wire_4 = {
|
|
187
|
+
row_id_1: 'Wire_copper_stranded',
|
|
188
|
+
row_id_2: 1372.0
|
|
189
|
+
}
|
|
190
|
+
sheet_name = 'materials_hvac'
|
|
191
|
+
column_1 = 'Material'
|
|
192
|
+
column_2 = 'material_id'
|
|
193
|
+
pv_ground_grounding_ground_wire_4 = assembly_cost(cost_info:search_grounding_ground_wire_4,
|
|
194
|
+
sheet_name:sheet_name,
|
|
195
|
+
column_1:column_1,
|
|
196
|
+
column_2:column_2,
|
|
197
|
+
quantity: quantity_grounding_ground_wire_4,
|
|
198
|
+
tags: tags)
|
|
199
|
+
# puts "quantity_grounding_ground_wire_4 is #{quantity_grounding_ground_wire_4}"
|
|
200
|
+
# puts "pv_grounding_ground_wire_4 is #{pv_ground_grounding_ground_wire_4}"
|
|
201
|
+
|
|
202
|
+
# Step 2g-4: costing of ground wire #6
|
|
203
|
+
quantity_grounding_ground_wire_6 = 20.0
|
|
204
|
+
search_grounding_ground_wire_6 = {
|
|
205
|
+
row_id_1: 'Wire_copper_solid',
|
|
206
|
+
row_id_2: 1361.0
|
|
207
|
+
}
|
|
208
|
+
sheet_name = 'materials_hvac'
|
|
209
|
+
column_1 = 'Material'
|
|
210
|
+
column_2 = 'material_id'
|
|
211
|
+
pv_ground_grounding_ground_wire_6 = assembly_cost(cost_info:search_grounding_ground_wire_6,
|
|
212
|
+
sheet_name:sheet_name,
|
|
213
|
+
column_1:column_1,
|
|
214
|
+
column_2:column_2,
|
|
215
|
+
quantity: quantity_grounding_ground_wire_6,
|
|
216
|
+
tags: tags)
|
|
217
|
+
# puts "quantity_grounding_ground_wire_6 is #{quantity_grounding_ground_wire_6}"
|
|
218
|
+
# puts "pv_grounding_ground_wire_6 is #{pv_ground_grounding_ground_wire_6}"
|
|
219
|
+
|
|
220
|
+
# Step 2g-5: costing of wire brazing
|
|
221
|
+
quantity_grounding_wire_brazing = 1.0
|
|
222
|
+
search_grounding_wire_brazing = {
|
|
223
|
+
row_id_1: 'Brazed_connection',
|
|
224
|
+
row_id_2: 1374.0
|
|
225
|
+
}
|
|
226
|
+
sheet_name = 'materials_hvac'
|
|
227
|
+
column_1 = 'Material'
|
|
228
|
+
column_2 = 'material_id'
|
|
229
|
+
pv_ground_grounding_wire_brazing = assembly_cost(cost_info:search_grounding_wire_brazing,
|
|
230
|
+
sheet_name:sheet_name,
|
|
231
|
+
column_1:column_1,
|
|
232
|
+
column_2:column_2,
|
|
233
|
+
quantity: quantity_grounding_wire_brazing,
|
|
234
|
+
tags: tags)
|
|
235
|
+
# puts "quantity_grounding_wire_brazing is #{quantity_grounding_wire_brazing}"
|
|
236
|
+
# puts "pv_grounding_wire_brazing is #{pv_ground_grounding_wire_brazing}"
|
|
237
|
+
|
|
238
|
+
# total cost of grounding
|
|
239
|
+
pv_ground_grounding = pv_ground_grounding_ground_rod +
|
|
240
|
+
pv_ground_grounding_exo_weld +
|
|
241
|
+
pv_ground_grounding_ground_wire_4 +
|
|
242
|
+
pv_ground_grounding_ground_wire_6 +
|
|
243
|
+
pv_ground_grounding_wire_brazing
|
|
244
|
+
# puts "pv_ground_grounding is #{pv_ground_grounding}"
|
|
245
|
+
|
|
246
|
+
### Step 2h: sum of 2a,b,c,d,e,f,g ------------------------------
|
|
247
|
+
# calculate total cost of concrete base (2a + 2b + 2c + 2d + 2e + 2f + 2g)
|
|
248
|
+
costing_of_concrete_base = pv_ground_costing_concrete +
|
|
249
|
+
pv_ground_costing_excavation +
|
|
250
|
+
pv_ground_concrete_footing +
|
|
251
|
+
pv_ground_backfill +
|
|
252
|
+
pv_ground_compaction +
|
|
253
|
+
pv_ground_underground_electrical_duct +
|
|
254
|
+
pv_ground_grounding
|
|
255
|
+
# puts "costing_of_concrete_base is #{costing_of_concrete_base}"
|
|
256
|
+
#-----------------------------------------------------------------------------------------------------------------
|
|
257
|
+
##### Step 3: pv modules' racking costing
|
|
258
|
+
quantity_racking = dc_system_capacity_kw * 1.0
|
|
259
|
+
search_pv_racking = {
|
|
260
|
+
row_id_1: 'pvgroundmount',
|
|
261
|
+
row_id_2: 6.0
|
|
262
|
+
}
|
|
263
|
+
sheet_name = 'materials_hvac'
|
|
264
|
+
column_1 = 'Material'
|
|
265
|
+
column_2 = 'Size'
|
|
266
|
+
pv_ground_racking = assembly_cost(cost_info:search_pv_racking,
|
|
267
|
+
sheet_name:sheet_name,
|
|
268
|
+
column_1:column_1,
|
|
269
|
+
column_2:column_2,
|
|
270
|
+
quantity:quantity_racking,
|
|
271
|
+
tags: tags)
|
|
272
|
+
# puts "quantity_racking is #{quantity_racking}"
|
|
273
|
+
# puts "pv_ground_racking is #{pv_ground_racking}"
|
|
274
|
+
#-----------------------------------------------------------------------------------------------------------------
|
|
275
|
+
##### Step 4: pv module costing
|
|
276
|
+
# Note: osm file does not show total area of PV panels; instead it shows the total wattage of PV panels.
|
|
277
|
+
# So, for the calculation of number of PV panels, we have assumed that a specific module is being used based on
|
|
278
|
+
# the module type that we can get from the osm file. In this way, we know the wattage of each PV panel;
|
|
279
|
+
# so, we can calculate number of PV panels.
|
|
280
|
+
if module_type == 'Standard' #As per Mike Lubun's comment, we assume using 'HES-160-36PV 26.6 x 58.3 x 1.38' as 'Standard' (i.e. 'poly'/'perc')
|
|
281
|
+
row_id_1 = 'HES-160-36PV 26.6 x 58.3 x 1.38'
|
|
282
|
+
row_id_2 = 160.0 #wattage of each module of 'HES-160-36PV 26.6 x 58.3 x 1.38'
|
|
283
|
+
quantity_number_of_panels = dc_system_capacity_w / row_id_2
|
|
284
|
+
elsif module_type == 'Premium' #As per Mike Lubun's comment, we assume using 'Heliene 36HD 26.6 x 58.6 x 1.6' as 'Premium' (i.e. 'mono')
|
|
285
|
+
row_id_1 = 'Heliene 36HD 26.6 x 58.6 x 1.6'
|
|
286
|
+
row_id_2 = 160.0 #wattage of each module of 'Heliene 36HD 26.6 x 58.6 x 1.6'
|
|
287
|
+
quantity_number_of_panels = dc_system_capacity_w / row_id_2
|
|
288
|
+
elsif module_type == 'ThinFilm' #As per Mike Lubun's comment, we assume using 'Powerfilm, Soltronic Semi-Flex with Sunpower cells, 21 x 44.5 x 0.08' as 'ThinFilm' (i.e. 'thin')
|
|
289
|
+
row_id_1 = 'Powerfilm, Soltronic Semi-Flex with Sunpower cells, 21 x 44.5 x 0.08'
|
|
290
|
+
row_id_2 = 100.0 #wattage of each module of 'Powerfilm, Soltronic Semi-Flex with Sunpower cells, 21 x 44.5 x 0.08'
|
|
291
|
+
quantity_number_of_panels = dc_system_capacity_w / row_id_2
|
|
292
|
+
end
|
|
293
|
+
search_pv_module = {
|
|
294
|
+
row_id_1: row_id_1,
|
|
295
|
+
row_id_2: row_id_2
|
|
296
|
+
}
|
|
297
|
+
sheet_name = 'materials_hvac'
|
|
298
|
+
column_1 = 'description'
|
|
299
|
+
column_2 = 'Size'
|
|
300
|
+
pv_ground_costing_pv_module = assembly_cost(cost_info:search_pv_module,
|
|
301
|
+
sheet_name:sheet_name,
|
|
302
|
+
column_1:column_1,
|
|
303
|
+
column_2:column_2,
|
|
304
|
+
quantity:quantity_number_of_panels,
|
|
305
|
+
tags: tags)
|
|
306
|
+
# puts "quantity_number_of_panels is #{quantity_number_of_panels}"
|
|
307
|
+
# puts "pv_ground_costing_pv_module is #{pv_ground_costing_pv_module}"
|
|
308
|
+
|
|
309
|
+
#-----------------------------------------------------------------------------------------------------------------
|
|
310
|
+
##### Step 5: pv wiring costing
|
|
311
|
+
# Step 5-1
|
|
312
|
+
quantity_wiring_wire = dc_system_capacity_kw * 1.0#unit: CLF (Hundred Linear Feet)
|
|
313
|
+
search_pv_wire = {
|
|
314
|
+
row_id_1: 'Wire_copper_stranded',
|
|
315
|
+
row_id_2: 6.0
|
|
316
|
+
}
|
|
317
|
+
sheet_name = 'materials_hvac'
|
|
318
|
+
column_1 = 'Material'
|
|
319
|
+
column_2 = 'Size'
|
|
320
|
+
pv_ground_wiring_wire = assembly_cost(cost_info:search_pv_wire,
|
|
321
|
+
sheet_name:sheet_name,
|
|
322
|
+
column_1:column_1,
|
|
323
|
+
column_2:column_2,
|
|
324
|
+
quantity:quantity_wiring_wire,
|
|
325
|
+
tags: tags)
|
|
326
|
+
# puts "quantity_wiring_wire is #{quantity_wiring_wire}"
|
|
327
|
+
# puts "pv_ground_wiring_wire is #{pv_ground_wiring_wire}"
|
|
328
|
+
|
|
329
|
+
# Step 5-2
|
|
330
|
+
quantity_wiring_conduit = dc_system_capacity_kw * 27.0 #unit: LF
|
|
331
|
+
search_pv_conduit = {
|
|
332
|
+
row_id_1: 'Conduit',
|
|
333
|
+
row_id_2: 851.0
|
|
334
|
+
}
|
|
335
|
+
sheet_name = 'materials_hvac'
|
|
336
|
+
column_1 = 'Material'
|
|
337
|
+
column_2 = 'material_id'
|
|
338
|
+
pv_ground_wiring_conduit = assembly_cost(cost_info:search_pv_conduit,
|
|
339
|
+
sheet_name:sheet_name,
|
|
340
|
+
column_1:column_1,
|
|
341
|
+
column_2:column_2,
|
|
342
|
+
quantity:quantity_wiring_conduit,
|
|
343
|
+
tags: tags)
|
|
344
|
+
# puts "quantity_wiring_conduit is #{quantity_wiring_conduit}"
|
|
345
|
+
# puts "pv_ground_wiring_conduit is #{pv_ground_wiring_conduit}"
|
|
346
|
+
|
|
347
|
+
pv_ground_wiring = pv_ground_wiring_wire + pv_ground_wiring_conduit
|
|
348
|
+
# puts "pv_ground_wiring is #{pv_ground_wiring}"
|
|
349
|
+
|
|
350
|
+
#-----------------------------------------------------------------------------------------------------------------
|
|
351
|
+
##### Step 6: pv inverter costing
|
|
352
|
+
# Step 6-1: inverters themselves
|
|
353
|
+
if dc_system_capacity_kw < 4.0
|
|
354
|
+
inverter_size = 3.0
|
|
355
|
+
inverter_multiplier = 1.0
|
|
356
|
+
elsif dc_system_capacity_kw == 4.0
|
|
357
|
+
inverter_size = 4.0
|
|
358
|
+
inverter_multiplier = 1.0
|
|
359
|
+
elsif dc_system_capacity_kw > 4.0
|
|
360
|
+
inverter_size = 4.0
|
|
361
|
+
inverter_multiplier = dc_system_capacity_kw / 4.0
|
|
362
|
+
inverter_multiplier = inverter_multiplier.ceil
|
|
363
|
+
end
|
|
364
|
+
# puts "inverter_multiplier is #{inverter_multiplier}"
|
|
365
|
+
quantity_inverter_itself = inverter_multiplier.to_f
|
|
366
|
+
search_pv_inverter_itself = {
|
|
367
|
+
row_id_1: 'inverter24',
|
|
368
|
+
row_id_2: inverter_size
|
|
369
|
+
}
|
|
370
|
+
sheet_name = 'materials_hvac'
|
|
371
|
+
column_1 = 'Material'
|
|
372
|
+
column_2 = 'Size'
|
|
373
|
+
pv_ground_inverter_itself = assembly_cost(cost_info:search_pv_inverter_itself,
|
|
301
374
|
sheet_name:sheet_name,
|
|
302
375
|
column_1:column_1,
|
|
303
376
|
column_2:column_2,
|
|
304
|
-
quantity:
|
|
377
|
+
quantity:quantity_inverter_itself,
|
|
305
378
|
tags: tags)
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
column_2 = 'Size'
|
|
320
|
-
pv_ground_wiring_wire = assembly_cost(cost_info:search_pv_wire,
|
|
321
|
-
sheet_name:sheet_name,
|
|
322
|
-
column_1:column_1,
|
|
323
|
-
column_2:column_2,
|
|
324
|
-
quantity:quantity_wiring_wire,
|
|
325
|
-
tags: tags)
|
|
326
|
-
# puts "quantity_wiring_wire is #{quantity_wiring_wire}"
|
|
327
|
-
# puts "pv_ground_wiring_wire is #{pv_ground_wiring_wire}"
|
|
328
|
-
|
|
329
|
-
# Step 5-2
|
|
330
|
-
quantity_wiring_conduit = dc_system_capacity_kw * 27.0 #unit: LF
|
|
331
|
-
search_pv_conduit = {
|
|
332
|
-
row_id_1: 'Conduit',
|
|
333
|
-
row_id_2: 851.0
|
|
334
|
-
}
|
|
335
|
-
sheet_name = 'materials_hvac'
|
|
336
|
-
column_1 = 'Material'
|
|
337
|
-
column_2 = 'material_id'
|
|
338
|
-
pv_ground_wiring_conduit = assembly_cost(cost_info:search_pv_conduit,
|
|
379
|
+
# puts "quantity_inverter_itself is #{quantity_inverter_itself}"
|
|
380
|
+
# puts "pv_ground_inverter_itself is #{pv_ground_inverter_itself}"
|
|
381
|
+
|
|
382
|
+
# Step 6-2: inverters' boxes
|
|
383
|
+
quantity_inverter_box = inverter_multiplier.to_f
|
|
384
|
+
search_pv_inverter_box = {
|
|
385
|
+
row_id_1: 'pvbox',
|
|
386
|
+
row_id_2: 1135.0
|
|
387
|
+
}
|
|
388
|
+
sheet_name = 'materials_hvac'
|
|
389
|
+
column_1 = 'Material'
|
|
390
|
+
column_2 = 'material_id'
|
|
391
|
+
pv_ground_inverter_box = assembly_cost(cost_info:search_pv_inverter_box,
|
|
339
392
|
sheet_name:sheet_name,
|
|
340
393
|
column_1:column_1,
|
|
341
394
|
column_2:column_2,
|
|
342
|
-
quantity:
|
|
395
|
+
quantity:quantity_inverter_box,
|
|
343
396
|
tags: tags)
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
column_2 = 'Size'
|
|
457
|
-
pv_ground_circuit_breakers = assembly_cost(cost_info:search_circuit_breakers,
|
|
397
|
+
# puts "quantity_inverter_box is #{quantity_inverter_box}"
|
|
398
|
+
# puts "pv_ground_inverter_box is #{pv_ground_inverter_box}"
|
|
399
|
+
|
|
400
|
+
pv_ground_inverter = pv_ground_inverter_itself + pv_ground_inverter_box
|
|
401
|
+
# puts "pv_ground_inverter is #{pv_ground_inverter}"
|
|
402
|
+
|
|
403
|
+
#-----------------------------------------------------------------------------------------------------------------
|
|
404
|
+
##### Step 7: transformer costing
|
|
405
|
+
transformer_types = [1.0, 2.0, 3.0, 5.0, 7.5, 10.0, 15.0, 25.0, 37.5, 50.0, 75.0, 100.0, 167.0] #based on Mike Lubun's costing spreadsheet
|
|
406
|
+
transformer_closet_to_pv_kw = transformer_types.sort_by { |item| (dc_system_capacity_kw-item).abs }.first(1)
|
|
407
|
+
# puts "transformer_closet_to_pv_kw is #{transformer_closet_to_pv_kw}"
|
|
408
|
+
if dc_system_capacity_kw <= 167.0
|
|
409
|
+
transformer_multiplier = 1.0
|
|
410
|
+
row_id_2 = transformer_closet_to_pv_kw[0]
|
|
411
|
+
else #i.e. dc_system_capacity_kw > 167.0
|
|
412
|
+
transformer_multiplier = dc_system_capacity_kw / 167.0
|
|
413
|
+
transformer_multiplier = transformer_multiplier.ceil
|
|
414
|
+
row_id_2 = 167.0
|
|
415
|
+
end
|
|
416
|
+
# puts "transformer_multiplier is #{transformer_multiplier}"
|
|
417
|
+
quantity_transformer = transformer_multiplier.to_f
|
|
418
|
+
search_transformer = {
|
|
419
|
+
row_id_1: 'Transformer_dry_low_voltage',
|
|
420
|
+
row_id_2: row_id_2
|
|
421
|
+
}
|
|
422
|
+
sheet_name = 'materials_hvac'
|
|
423
|
+
column_1 = 'Material'
|
|
424
|
+
column_2 = 'Size'
|
|
425
|
+
pv_ground_transformer = assembly_cost(cost_info:search_transformer,
|
|
426
|
+
sheet_name:sheet_name,
|
|
427
|
+
column_1:column_1,
|
|
428
|
+
column_2:column_2,
|
|
429
|
+
quantity:quantity_transformer,
|
|
430
|
+
tags: tags)
|
|
431
|
+
# puts "quantity_transformer is #{quantity_transformer}"
|
|
432
|
+
# puts "pv_ground_transformer is #{pv_ground_transformer}"
|
|
433
|
+
|
|
434
|
+
#-----------------------------------------------------------------------------------------------------------------
|
|
435
|
+
##### Step 8: circuit breakers costing
|
|
436
|
+
circuit_breaker240_types = [30.0, 60.0, 100.0, 200.0, 400.0, 600.0]
|
|
437
|
+
circuit_breaker_amps = (dc_system_capacity_kw * 1000.0 * 1.5 / 24.0) * 1.25
|
|
438
|
+
# puts "circuit_breaker_amps is #{circuit_breaker_amps}"
|
|
439
|
+
circuit_breaker_closet_to_pv_amps = circuit_breaker240_types.sort_by { |item| (circuit_breaker_amps-item).abs }.first(1)
|
|
440
|
+
# puts "circuit_breaker_closet_to_pv_amps is #{circuit_breaker_closet_to_pv_amps}"
|
|
441
|
+
if circuit_breaker_amps <= 600.0
|
|
442
|
+
circuit_breaker_multiplier = 1.0
|
|
443
|
+
row_id_2 = circuit_breaker_closet_to_pv_amps[0]
|
|
444
|
+
else #i.e. circuit_breaker_amps > 600.0
|
|
445
|
+
circuit_breaker_multiplier = circuit_breaker_amps / 600.0
|
|
446
|
+
circuit_breaker_multiplier = circuit_breaker_multiplier.ceil
|
|
447
|
+
row_id_2 = 600.0
|
|
448
|
+
end
|
|
449
|
+
quantity_circuit_breakers = circuit_breaker_multiplier.to_f
|
|
450
|
+
search_circuit_breakers = {
|
|
451
|
+
row_id_1: 'Circuit_breaker240',
|
|
452
|
+
row_id_2: row_id_2
|
|
453
|
+
}
|
|
454
|
+
sheet_name = 'materials_hvac'
|
|
455
|
+
column_1 = 'Material'
|
|
456
|
+
column_2 = 'Size'
|
|
457
|
+
pv_ground_circuit_breakers = assembly_cost(cost_info:search_circuit_breakers,
|
|
458
|
+
sheet_name:sheet_name,
|
|
459
|
+
column_1:column_1,
|
|
460
|
+
column_2:column_2,
|
|
461
|
+
quantity:quantity_circuit_breakers,
|
|
462
|
+
tags: tags)
|
|
463
|
+
# puts "quantity_circuit_breakers is #{quantity_circuit_breakers}"
|
|
464
|
+
# puts "pv_ground_circuit_breakers is #{pv_ground_circuit_breakers}"
|
|
465
|
+
|
|
466
|
+
#-----------------------------------------------------------------------------------------------------------------
|
|
467
|
+
##### Step 9: circuit breaker fuses costing
|
|
468
|
+
circuit_breaker_fuse = circuit_breaker_amps
|
|
469
|
+
circuit_breaker_fuse_250V_timedelay_types = [30.0, 5.0, 60.0, 100.0, 200.0, 400.0, 600.0]
|
|
470
|
+
circuit_breaker_fuse_closet_to_pv_amps = circuit_breaker_fuse_250V_timedelay_types.sort_by { |item| (circuit_breaker_fuse-item).abs }.first(1)
|
|
471
|
+
# puts "circuit_breaker_fuse_closet_to_pv_amps is #{circuit_breaker_fuse_closet_to_pv_amps}"
|
|
472
|
+
if circuit_breaker_fuse <= 600.0
|
|
473
|
+
circuit_breaker_fuse_multiplier = 1.0
|
|
474
|
+
row_id_2 = circuit_breaker_fuse_closet_to_pv_amps[0]
|
|
475
|
+
else #i.e. circuit_breaker_fuse > 600.0
|
|
476
|
+
circuit_breaker_fuse_multiplier = circuit_breaker_fuse / 600.0
|
|
477
|
+
circuit_breaker_fuse_multiplier = circuit_breaker_fuse_multiplier.ceil
|
|
478
|
+
row_id_2 = 600.0
|
|
479
|
+
end
|
|
480
|
+
quantity_circuit_breaker_fuses = circuit_breaker_fuse_multiplier.to_f
|
|
481
|
+
search_circuit_breaker_fuses = {
|
|
482
|
+
row_id_1: 'fuse_250V_timedelay',
|
|
483
|
+
row_id_2: row_id_2
|
|
484
|
+
}
|
|
485
|
+
sheet_name = 'materials_hvac'
|
|
486
|
+
column_1 = 'Material'
|
|
487
|
+
column_2 = 'Size'
|
|
488
|
+
pv_ground_circuit_breaker_fuses = assembly_cost(cost_info:search_circuit_breaker_fuses,
|
|
489
|
+
sheet_name:sheet_name,
|
|
490
|
+
column_1:column_1,
|
|
491
|
+
column_2:column_2,
|
|
492
|
+
quantity:quantity_circuit_breaker_fuses,
|
|
493
|
+
tags: tags)
|
|
494
|
+
# puts "quantity_circuit_breaker_fuses is #{quantity_circuit_breaker_fuses}"
|
|
495
|
+
# puts "pv_ground_circuit_breaker_fuses is #{pv_ground_circuit_breaker_fuses}"
|
|
496
|
+
|
|
497
|
+
#-----------------------------------------------------------------------------------------------------------------
|
|
498
|
+
##### Step 10: PV fuses costing
|
|
499
|
+
# Step 10-1: PV fuses
|
|
500
|
+
quantity_pv_fuse_itself = (dc_system_capacity_kw * 1.0).ceil.to_f
|
|
501
|
+
search_pv_fuse = {
|
|
502
|
+
row_id_1: 'fuse_120V',
|
|
503
|
+
row_id_2: 15.0
|
|
504
|
+
}
|
|
505
|
+
sheet_name = 'materials_hvac'
|
|
506
|
+
column_1 = 'Material'
|
|
507
|
+
column_2 = 'Size'
|
|
508
|
+
pv_ground_pv_fuse_itself = assembly_cost(cost_info:search_pv_fuse,
|
|
458
509
|
sheet_name:sheet_name,
|
|
459
510
|
column_1:column_1,
|
|
460
511
|
column_2:column_2,
|
|
461
|
-
quantity:
|
|
512
|
+
quantity:quantity_pv_fuse_itself,
|
|
462
513
|
tags: tags)
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
##### Step 10: PV fuses costing
|
|
499
|
-
# Step 10-1: PV fuses
|
|
500
|
-
quantity_pv_fuse_itself = (dc_system_capacity_kw * 1.0).ceil.to_f
|
|
501
|
-
search_pv_fuse = {
|
|
502
|
-
row_id_1: 'fuse_120V',
|
|
503
|
-
row_id_2: 15.0
|
|
504
|
-
}
|
|
505
|
-
sheet_name = 'materials_hvac'
|
|
506
|
-
column_1 = 'Material'
|
|
507
|
-
column_2 = 'Size'
|
|
508
|
-
pv_ground_pv_fuse_itself = assembly_cost(cost_info:search_pv_fuse,
|
|
509
|
-
sheet_name:sheet_name,
|
|
510
|
-
column_1:column_1,
|
|
511
|
-
column_2:column_2,
|
|
512
|
-
quantity:quantity_pv_fuse_itself,
|
|
513
|
-
tags: tags)
|
|
514
|
-
# puts "quantity_pv_fuse_itself is #{quantity_pv_fuse_itself}"
|
|
515
|
-
# puts "pv_ground_pv_fuse_itself is #{pv_ground_pv_fuse_itself}"
|
|
516
|
-
|
|
517
|
-
# Step 10-2: PV combiner box
|
|
518
|
-
quantity_pv_combiner_box = (dc_system_capacity_kw / 10.0).ceil.to_f
|
|
519
|
-
search_pv_combiner_box = {
|
|
520
|
-
row_id_1: 'pvcombinerbox',
|
|
521
|
-
row_id_2: 1125.0
|
|
522
|
-
}
|
|
523
|
-
sheet_name = 'materials_hvac'
|
|
524
|
-
column_1 = 'Material'
|
|
525
|
-
column_2 = 'material_id'
|
|
526
|
-
pv_ground_pv_combiner_box = assembly_cost(cost_info:search_pv_combiner_box,
|
|
527
|
-
sheet_name:sheet_name,
|
|
528
|
-
column_1:column_1,
|
|
529
|
-
column_2:column_2,
|
|
530
|
-
quantity:quantity_pv_combiner_box,
|
|
531
|
-
tags: tags)
|
|
532
|
-
# puts "quantity_pv_combiner_box is #{quantity_pv_combiner_box}"
|
|
533
|
-
# puts "pv_ground_pv_combiner_box is #{pv_ground_pv_combiner_box}"
|
|
534
|
-
|
|
535
|
-
pv_ground_pv_fuses = pv_ground_pv_fuse_itself + pv_ground_pv_combiner_box
|
|
536
|
-
# puts "pv_ground_pv_fuses is #{pv_ground_pv_fuses}"
|
|
537
|
-
|
|
538
|
-
#-----------------------------------------------------------------------------------------------------------------
|
|
539
|
-
##### Step 11: disconnects costing
|
|
540
|
-
quantity_disconnect_before_inverter = 1.0
|
|
541
|
-
search_disconnect_before_inverter = {
|
|
542
|
-
row_id_1: 'Circuit_breaker240',
|
|
543
|
-
row_id_2: 1403.0
|
|
544
|
-
}
|
|
545
|
-
sheet_name = 'materials_hvac'
|
|
546
|
-
column_1 = 'Material'
|
|
547
|
-
column_2 = 'material_id'
|
|
548
|
-
pv_ground_disconnect_before_inverter = assembly_cost(cost_info:search_disconnect_before_inverter,
|
|
549
|
-
sheet_name:sheet_name,
|
|
550
|
-
column_1:column_1,
|
|
551
|
-
column_2:column_2,
|
|
552
|
-
quantity:quantity_disconnect_before_inverter,
|
|
553
|
-
tags: tags)
|
|
554
|
-
# puts "quantity_disconnect_before_inverter is #{quantity_disconnect_before_inverter}"
|
|
555
|
-
# puts "pv_ground_disconnect_before_inverter is #{pv_ground_disconnect_before_inverter}"
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
quantity_disconnect_after_transformer = 1.0
|
|
559
|
-
search_disconnect_after_transformer = {
|
|
560
|
-
row_id_1: 'Circuit_breaker240',
|
|
561
|
-
row_id_2: 1407.0
|
|
562
|
-
}
|
|
563
|
-
sheet_name = 'materials_hvac'
|
|
564
|
-
column_1 = 'Material'
|
|
565
|
-
column_2 = 'material_id'
|
|
566
|
-
pv_ground_disconnect_after_transformer = assembly_cost(cost_info:search_disconnect_after_transformer,
|
|
514
|
+
# puts "quantity_pv_fuse_itself is #{quantity_pv_fuse_itself}"
|
|
515
|
+
# puts "pv_ground_pv_fuse_itself is #{pv_ground_pv_fuse_itself}"
|
|
516
|
+
|
|
517
|
+
# Step 10-2: PV combiner box
|
|
518
|
+
quantity_pv_combiner_box = (dc_system_capacity_kw / 10.0).ceil.to_f
|
|
519
|
+
search_pv_combiner_box = {
|
|
520
|
+
row_id_1: 'pvcombinerbox',
|
|
521
|
+
row_id_2: 1125.0
|
|
522
|
+
}
|
|
523
|
+
sheet_name = 'materials_hvac'
|
|
524
|
+
column_1 = 'Material'
|
|
525
|
+
column_2 = 'material_id'
|
|
526
|
+
pv_ground_pv_combiner_box = assembly_cost(cost_info:search_pv_combiner_box,
|
|
527
|
+
sheet_name:sheet_name,
|
|
528
|
+
column_1:column_1,
|
|
529
|
+
column_2:column_2,
|
|
530
|
+
quantity:quantity_pv_combiner_box,
|
|
531
|
+
tags: tags)
|
|
532
|
+
# puts "quantity_pv_combiner_box is #{quantity_pv_combiner_box}"
|
|
533
|
+
# puts "pv_ground_pv_combiner_box is #{pv_ground_pv_combiner_box}"
|
|
534
|
+
|
|
535
|
+
pv_ground_pv_fuses = pv_ground_pv_fuse_itself + pv_ground_pv_combiner_box
|
|
536
|
+
# puts "pv_ground_pv_fuses is #{pv_ground_pv_fuses}"
|
|
537
|
+
|
|
538
|
+
#-----------------------------------------------------------------------------------------------------------------
|
|
539
|
+
##### Step 11: disconnects costing
|
|
540
|
+
quantity_disconnect_before_inverter = 1.0
|
|
541
|
+
search_disconnect_before_inverter = {
|
|
542
|
+
row_id_1: 'Circuit_breaker240',
|
|
543
|
+
row_id_2: 1403.0
|
|
544
|
+
}
|
|
545
|
+
sheet_name = 'materials_hvac'
|
|
546
|
+
column_1 = 'Material'
|
|
547
|
+
column_2 = 'material_id'
|
|
548
|
+
pv_ground_disconnect_before_inverter = assembly_cost(cost_info:search_disconnect_before_inverter,
|
|
567
549
|
sheet_name:sheet_name,
|
|
568
550
|
column_1:column_1,
|
|
569
551
|
column_2:column_2,
|
|
570
|
-
quantity:
|
|
552
|
+
quantity:quantity_disconnect_before_inverter,
|
|
571
553
|
tags: tags)
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
554
|
+
# puts "quantity_disconnect_before_inverter is #{quantity_disconnect_before_inverter}"
|
|
555
|
+
# puts "pv_ground_disconnect_before_inverter is #{pv_ground_disconnect_before_inverter}"
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+
quantity_disconnect_after_transformer = 1.0
|
|
559
|
+
search_disconnect_after_transformer = {
|
|
560
|
+
row_id_1: 'Circuit_breaker240',
|
|
561
|
+
row_id_2: 1407.0
|
|
562
|
+
}
|
|
563
|
+
sheet_name = 'materials_hvac'
|
|
564
|
+
column_1 = 'Material'
|
|
565
|
+
column_2 = 'material_id'
|
|
566
|
+
pv_ground_disconnect_after_transformer = assembly_cost(cost_info:search_disconnect_after_transformer,
|
|
567
|
+
sheet_name:sheet_name,
|
|
568
|
+
column_1:column_1,
|
|
569
|
+
column_2:column_2,
|
|
570
|
+
quantity:quantity_disconnect_after_transformer,
|
|
571
|
+
tags: tags)
|
|
572
|
+
# puts "quantity_disconnect_after_transformer is #{quantity_disconnect_after_transformer}"
|
|
573
|
+
# puts "pv_ground_disconnect_after_transformer is #{pv_ground_disconnect_after_transformer}"
|
|
574
|
+
|
|
575
|
+
pv_ground_disconnects = pv_ground_disconnect_before_inverter + pv_ground_disconnect_after_transformer
|
|
576
|
+
# puts "pv_ground_disconnects is #{pv_ground_disconnects}"
|
|
577
|
+
|
|
578
|
+
#-----------------------------------------------------------------------------------------------------------------
|
|
579
|
+
##### Step 12: calculate total cost of the ground mount PV system (sum of steps 2 to 11)
|
|
580
|
+
pv_ground_total_cost_handle = costing_of_concrete_base +
|
|
581
|
+
pv_ground_racking +
|
|
582
|
+
pv_ground_costing_pv_module +
|
|
583
|
+
pv_ground_wiring +
|
|
584
|
+
pv_ground_inverter +
|
|
585
|
+
pv_ground_transformer +
|
|
586
|
+
pv_ground_circuit_breakers +
|
|
587
|
+
pv_ground_circuit_breaker_fuses +
|
|
588
|
+
pv_ground_pv_fuses +
|
|
589
|
+
pv_ground_disconnects
|
|
590
|
+
|
|
591
|
+
pv_ground_total_cost += pv_ground_total_cost_handle
|
|
592
|
+
|
|
593
|
+
# puts "pv_ground_total_cost_handle is #{pv_ground_total_cost_handle}"
|
|
594
|
+
|
|
595
|
+
##### Gather information for reporting
|
|
596
|
+
@costing_report['renewables']['pv'] << {
|
|
597
|
+
'generator_PVWatt_name' => generator_PVWatt.name.to_s,
|
|
598
|
+
'costing_of_concrete_base' => costing_of_concrete_base,
|
|
599
|
+
'pv_ground_racking' => pv_ground_racking,
|
|
600
|
+
'pv_ground_costing_pv_module' => pv_ground_costing_pv_module,
|
|
601
|
+
'pv_ground_wiring' => pv_ground_wiring,
|
|
602
|
+
'pv_ground_inverter' => pv_ground_inverter,
|
|
603
|
+
'pv_ground_transformer' => pv_ground_transformer,
|
|
604
|
+
'pv_ground_circuit_breakers' => pv_ground_circuit_breakers,
|
|
605
|
+
'pv_ground_circuit_breaker_fuses' => pv_ground_circuit_breaker_fuses,
|
|
606
|
+
'pv_ground_pv_fuses' => pv_ground_pv_fuses,
|
|
607
|
+
'pv_ground_disconnects' => pv_ground_disconnects,
|
|
608
|
+
'the_generator_PVWatt_total_cost' => pv_ground_total_cost_handle
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
a += 1
|
|
612
612
|
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
613
|
+
end
|
|
614
|
+
if a > 0
|
|
615
|
+
@costing_report['renewables']['pv'] << {
|
|
616
|
+
'pv_ground_total_cost' => pv_ground_total_cost
|
|
617
|
+
}
|
|
618
|
+
end
|
|
619
619
|
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
620
|
+
puts "\nGround-mounted PV costing data successfully generated. Total PV costs: $#{pv_ground_total_cost.round(2)}"
|
|
621
|
+
|
|
622
|
+
return pv_ground_total_cost
|
|
623
|
+
end #cost_audit_pv_ground(model, prototype_creator)
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
def assembly_cost(cost_info:, sheet_name:, column_1:, column_2:, quantity:, tags:)
|
|
627
|
+
#-------------------------------------------------------------------------------------------------------------------
|
|
628
|
+
### Step I: find mat_id
|
|
629
|
+
mat_data = nil
|
|
630
|
+
mat_data = @costing_database['raw'][sheet_name].select { |data|
|
|
631
|
+
data[column_1].to_s.upcase == cost_info[:row_id_1].to_s.upcase and
|
|
632
|
+
data[column_2].to_f.round(1) == cost_info[:row_id_2].to_f.round(1)
|
|
633
|
+
}.first
|
|
634
|
+
mat_id = mat_data['id']
|
|
635
|
+
material_adjust = mat_data['material_mult']
|
|
636
|
+
labour_adjust = mat_data['labour_mult']
|
|
637
|
+
material_adjust = 1.0 if material_adjust.nil?
|
|
638
|
+
labour_adjust = 1.0 if labour_adjust.nil?
|
|
639
|
+
#-------------------------------------------------------------------------------------------------------------------
|
|
640
|
+
### Step II: calculate unit cost
|
|
641
|
+
mat_cost_info = @costing_database['costs'].select { |data| data['id'] == mat_id.to_s.upcase }.first
|
|
642
|
+
regional_material, regional_installation, regional_equipment = get_regional_cost_factors(@costing_report["province_state"], @costing_report["city"], mat_cost_info)
|
|
643
|
+
# puts "regional_material, regional_installation, regional_equipment #{regional_material}, #{regional_installation}, #{regional_equipment}"
|
|
644
|
+
|
|
645
|
+
if mat_cost_info['baseCosts']['materialOpCost'].nil?
|
|
646
|
+
cost_material = 0.0
|
|
647
|
+
else
|
|
648
|
+
cost_material = mat_cost_info['baseCosts']['materialOpCost'] * (regional_material / 100.0) * material_adjust.to_f
|
|
649
|
+
end
|
|
650
|
+
if mat_cost_info['baseCosts']['laborOpCost'].nil?
|
|
651
|
+
cost_labour = 0.0
|
|
652
|
+
else
|
|
653
|
+
cost_labour = mat_cost_info['baseCosts']['laborOpCost'] * (regional_installation / 100.0) * labour_adjust.to_f
|
|
654
|
+
end
|
|
655
|
+
if mat_cost_info['baseCosts']['equipmentOpCost'].nil?
|
|
656
|
+
cost_equipment = 0.0
|
|
657
|
+
else
|
|
658
|
+
cost_equipment = mat_cost_info['baseCosts']['equipmentOpCost'] * (regional_equipment / 100.0)
|
|
659
|
+
end
|
|
660
660
|
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
661
|
+
cost_unit = cost_material + cost_labour + cost_equipment
|
|
662
|
+
# puts "cost_unit is #{cost_unit}"
|
|
663
|
+
#-------------------------------------------------------------------------------------------------------------------
|
|
664
|
+
### Step III: calculate total cost
|
|
665
|
+
cost_total = cost_unit * quantity
|
|
666
|
+
# puts "cost_total is #{cost_total}"
|
|
667
|
+
#-------------------------------------------------------------------------------------------------------------------
|
|
668
|
+
# Gather info for costed items output file
|
|
669
|
+
unless mat_data['Material'].nil?
|
|
670
|
+
tags << mat_data['Material']
|
|
671
|
+
end
|
|
672
|
+
unless mat_data['description'].nil?
|
|
673
|
+
tags << mat_data['description']
|
|
674
|
+
end
|
|
675
|
+
if not tags.empty?
|
|
676
|
+
add_costed_item(material_id: mat_id.to_s,
|
|
677
|
+
quantity: quantity,
|
|
678
|
+
material_mult: material_adjust.to_f,
|
|
679
|
+
labour_mult: labour_adjust.to_f,
|
|
680
|
+
equip_mult: 1.0,
|
|
681
|
+
tags: tags)
|
|
682
|
+
end
|
|
683
683
|
|
|
684
|
-
|
|
684
|
+
return cost_total
|
|
685
|
+
end
|
|
685
686
|
end
|
|
686
|
-
|
|
687
687
|
end
|