openstudio-standards 0.2.17.rc1 → 0.2.17.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/data/standards/OpenStudio_Standards-ashrae_90_1.xlsx +0 -0
- data/data/standards/openstudio_standards_duplicates_log.csv +5 -0
- data/lib/openstudio-standards/btap/btap_result.rb +138 -138
- data/lib/openstudio-standards/btap/economics.rb +58 -53
- data/lib/openstudio-standards/btap/envelope.rb +1 -1
- data/lib/openstudio-standards/btap/fileio.rb +12 -12
- data/lib/openstudio-standards/btap/measures.rb +63 -59
- data/lib/openstudio-standards/btap/vintagizer.rb +1 -1
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.SizingSystem.rb +9 -3
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.hvac_systems.rb +50 -22
- data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +15 -1
- data/lib/openstudio-standards/standards/Standards.Construction.rb +1 -1
- data/lib/openstudio-standards/standards/Standards.Model.rb +18 -18
- data/lib/openstudio-standards/standards/Standards.PlanarSurface.rb +1 -1
- data/lib/openstudio-standards/standards/Standards.ZoneHVACComponent.rb +3 -2
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirLoopHVAC.rb +43 -40
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.ZoneHVACComponent.rb +2 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.entryways.json +8 -8
- data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.parking.json +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/doe_ref_1980_2004.AirLoopHVAC.rb +11 -0
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/doe_ref_pre_1980.AirLoopHVAC.rb +11 -0
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.AirLoopHVAC.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.Model.rb +9 -9
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.PlanarSurface.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.PlantLoop.rb +5 -1
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_6.rb +5 -1
- data/lib/openstudio-standards/standards/necb/ECMS/hvac_systems.rb +8 -4
- data/lib/openstudio-standards/standards/necb/ECMS/nv.rb +8 -2
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb +7 -3
- data/lib/openstudio-standards/standards/necb/NECB2011/qaqc/necb_qaqc.rb +4 -4
- data/lib/openstudio-standards/version.rb +1 -1
- metadata +4 -2
@@ -27,7 +27,7 @@ module BTAP
|
|
27
27
|
|
28
28
|
#This method removes all costs from model
|
29
29
|
#@author phylroy.lopez@nrcan.gc.ca
|
30
|
-
#@param model [OpenStudio::model::Model] A model object
|
30
|
+
#@param model [OpenStudio::model::Model] A model object
|
31
31
|
#@param runner [String]
|
32
32
|
def self.remove_all_costs(model,runner = nil)
|
33
33
|
#Remove all cost items.
|
@@ -39,7 +39,7 @@ module BTAP
|
|
39
39
|
|
40
40
|
#This method will add the costs.
|
41
41
|
#@author phylroy.lopez@nrcan.gc.ca
|
42
|
-
#@param model [OpenStudio::model::Model] A model object
|
42
|
+
#@param model [OpenStudio::model::Model] A model object
|
43
43
|
#@param name [String]
|
44
44
|
#@param cost [Float]
|
45
45
|
#@param unittype [String]
|
@@ -54,10 +54,10 @@ module BTAP
|
|
54
54
|
end
|
55
55
|
return cost_object
|
56
56
|
end
|
57
|
-
|
57
|
+
|
58
58
|
#This method will add the cost per building.
|
59
59
|
#@author phylroy.lopez@nrcan.gc.ca
|
60
|
-
#@param model [OpenStudio::model::Model] A model object
|
60
|
+
#@param model [OpenStudio::model::Model] A model object
|
61
61
|
#@param name [String]
|
62
62
|
#@param cost [Float]
|
63
63
|
#@param runner [Float]
|
@@ -70,10 +70,10 @@ module BTAP
|
|
70
70
|
runner.nil? ? puts(message) : runner.registerInfo(message)
|
71
71
|
end
|
72
72
|
end
|
73
|
-
|
73
|
+
|
74
74
|
#This method will add the cost per total area.
|
75
75
|
#@author phylroy.lopez@nrcan.gc.ca
|
76
|
-
#@param model [OpenStudio::model::Model] A model object
|
76
|
+
#@param model [OpenStudio::model::Model] A model object
|
77
77
|
#@param name [String]
|
78
78
|
#@param cost [Float]
|
79
79
|
#@param runner [Float]
|
@@ -89,7 +89,7 @@ module BTAP
|
|
89
89
|
|
90
90
|
#This method will set the ecm envelope.
|
91
91
|
#@author phylroy.lopez@nrcan.gc.ca
|
92
|
-
#@param model [OpenStudio::model::Model] A model object
|
92
|
+
#@param model [OpenStudio::model::Model] A model object
|
93
93
|
#@param library_file_path [String]
|
94
94
|
#@param default_construction_set_name [String]
|
95
95
|
#@param ext_wall_rsi [Float]
|
@@ -240,7 +240,7 @@ module BTAP
|
|
240
240
|
tubular_daylight_diffuser_cost_m2,
|
241
241
|
total_building_construction_set_cost
|
242
242
|
)
|
243
|
-
#Give adiabatic surfaces a construction. Does not matter what. This is a bug in
|
243
|
+
#Give adiabatic surfaces a construction. Does not matter what. This is a bug in OpenStudio that leave these surfaces unassigned by the default construction set.
|
244
244
|
all_adiabatic_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition(model.getSurfaces, "Adiabatic")
|
245
245
|
unless all_adiabatic_surfaces.empty?
|
246
246
|
BTAP::Geometry::Surfaces::set_surfaces_construction( all_adiabatic_surfaces, model.building.get.defaultConstructionSet.get.defaultInteriorSurfaceConstructions.get.wallConstruction.get)
|
@@ -256,10 +256,10 @@ module BTAP
|
|
256
256
|
return false
|
257
257
|
end
|
258
258
|
end
|
259
|
-
|
259
|
+
|
260
260
|
#This method will set the ecm infiltration.
|
261
261
|
#@author phylroy.lopez@nrcan.gc.ca
|
262
|
-
#@param model [OpenStudio::model::Model] A model object
|
262
|
+
#@param model [OpenStudio::model::Model] A model object
|
263
263
|
#@param infiltration_design_flow_rate [Float]
|
264
264
|
#@param infiltration_flow_per_space [Float]
|
265
265
|
#@param infiltration_flow_per_exterior_area [Float]
|
@@ -277,7 +277,7 @@ module BTAP
|
|
277
277
|
cost_per_exterior_area_m2,
|
278
278
|
runner = nil
|
279
279
|
)
|
280
|
-
default_surface_construction_set = model.building.get.defaultConstructionSet.get
|
280
|
+
default_surface_construction_set = model.building.get.defaultConstructionSet.get
|
281
281
|
log = BTAP::Resources::SpaceLoads::ScaleLoads::set_inflitration_magnitude(
|
282
282
|
model,
|
283
283
|
infiltration_design_flow_rate,
|
@@ -286,9 +286,9 @@ module BTAP
|
|
286
286
|
infiltration_air_changes_per_hour
|
287
287
|
)
|
288
288
|
#log change
|
289
|
-
message = log
|
289
|
+
message = log
|
290
290
|
runner.nil? ? puts(message) : runner.registerinfo(message)
|
291
|
-
#set costs based on all external surface type constructions.
|
291
|
+
#set costs based on all external surface type constructions.
|
292
292
|
constructions_and_cost = [
|
293
293
|
["infiltration_ext_wall_cost_m3",cost_per_exterior_area_m2, default_surface_construction_set.defaultExteriorSurfaceConstructions.get.wallConstruction.get],
|
294
294
|
["infiltration_ext_floor_cost_m3", cost_per_exterior_area_m2, default_surface_construction_set.defaultExteriorSurfaceConstructions.get.floorConstruction.get],
|
@@ -318,10 +318,10 @@ module BTAP
|
|
318
318
|
BTAP::Resources::Economics::object_cost(building, "Infiltration Cost per building.", cost_per_building, "CostPerEach")
|
319
319
|
return true
|
320
320
|
end
|
321
|
-
|
321
|
+
|
322
322
|
#This method will set the ecm fans.
|
323
323
|
#@author phylroy.lopez@nrcan.gc.ca
|
324
|
-
#@param model [OpenStudio::model::Model] A model object
|
324
|
+
#@param model [OpenStudio::model::Model] A model object
|
325
325
|
#@return [String] log
|
326
326
|
def ecm_fans( model )
|
327
327
|
measure_values =
|
@@ -349,7 +349,7 @@ module BTAP
|
|
349
349
|
fan.setMotorEfficiency( @fan_motor_eff ) unless @fan_motor_eff.nil?
|
350
350
|
log << fan.name.get.to_s << ",#{fan.fanEfficiency},#{fan.motorEfficiency}\n"
|
351
351
|
end
|
352
|
-
|
352
|
+
|
353
353
|
end
|
354
354
|
|
355
355
|
case @fan_volume_type
|
@@ -409,11 +409,11 @@ module BTAP
|
|
409
409
|
end
|
410
410
|
return log
|
411
411
|
end
|
412
|
-
|
413
|
-
|
412
|
+
|
413
|
+
|
414
414
|
#This method will set the ecm pumps.
|
415
415
|
#@author phylroy.lopez@nrcan.gc.ca
|
416
|
-
#@param model [OpenStudio::model::Model] A model object
|
416
|
+
#@param model [OpenStudio::model::Model] A model object
|
417
417
|
#@return [String] log
|
418
418
|
def ecm_pumps( model )
|
419
419
|
measure_values =
|
@@ -505,10 +505,10 @@ module BTAP
|
|
505
505
|
CSV.open("#{@script_root_folder_path}/sample_pump_eff_ecm.csv", 'w') { |csv| csv << measure_values.unshift("measure_id") }
|
506
506
|
return log
|
507
507
|
end
|
508
|
-
|
508
|
+
|
509
509
|
#This method will set the ecm cooling COP.
|
510
510
|
#@author phylroy.lopez@nrcan.gc.ca
|
511
|
-
#@param model [OpenStudio::model::Model] A model object
|
511
|
+
#@param model [OpenStudio::model::Model] A model object
|
512
512
|
def ecm_cooling_cop( model )
|
513
513
|
log = ""
|
514
514
|
measure_values =[
|
@@ -523,7 +523,9 @@ module BTAP
|
|
523
523
|
model.getCoilCoolingDXSingleSpeeds.sort.each do |cooling_coil|
|
524
524
|
cooling_coil.setRatedCOP( OpenStudio::OptionalDouble.new( @cop ) ) unless @cop.nil?
|
525
525
|
cop = "NA"
|
526
|
-
|
526
|
+
# Prior to 3.5.0, it was an optional double, now it's a double
|
527
|
+
cop_ = OpenStudio::OptionalDouble.new(cooling_coil.ratedCOP)
|
528
|
+
cop = cop_.get unless cop_.empty?
|
527
529
|
log << cooling_coil.name.get.to_s << ",#{cop}\n"
|
528
530
|
|
529
531
|
end
|
@@ -535,18 +537,21 @@ module BTAP
|
|
535
537
|
cooling_coil.setRatedHighSpeedCOP( @cop ) unless @cop.nil?
|
536
538
|
cooling_coil.setRatedLowSpeedCOP( @cop ) unless @cop.nil?
|
537
539
|
cop_high = "NA"
|
538
|
-
|
540
|
+
# Prior to 3.5.0, it was an optional double, now it's a double
|
541
|
+
cop_ = OpenStudio::OptionalDouble.new(cooling_coil.ratedHighSpeedCOP)
|
542
|
+
cop_high = cop_.get unless cop_.empty?
|
539
543
|
cop_low = "NA"
|
540
|
-
|
544
|
+
cop_ = OpenStudio::OptionalDouble.new(cooling_coil.ratedLowSpeedCOP)
|
545
|
+
cop_low = cop_.get unless cop_.empty?
|
541
546
|
log << cooling_coil.name.get.to_s << ",#{cop_high},#{cop_low}\n"
|
542
547
|
end
|
543
548
|
end
|
544
549
|
return log
|
545
550
|
end
|
546
|
-
|
551
|
+
|
547
552
|
#This method will set the ecm economizers.
|
548
553
|
#@author phylroy.lopez@nrcan.gc.ca
|
549
|
-
#@param model [OpenStudio::model::Model] A model object
|
554
|
+
#@param model [OpenStudio::model::Model] A model object
|
550
555
|
#@return [String] log
|
551
556
|
def ecm_economizers( model )
|
552
557
|
|
@@ -577,7 +582,7 @@ module BTAP
|
|
577
582
|
end
|
578
583
|
#This method will set the ecm sizing.
|
579
584
|
#@author phylroy.lopez@nrcan.gc.ca
|
580
|
-
#@param model [OpenStudio::model::Model] A model object
|
585
|
+
#@param model [OpenStudio::model::Model] A model object
|
581
586
|
#@return [String] table
|
582
587
|
def ecm_sizing( model)
|
583
588
|
measure_values =[
|
@@ -608,10 +613,10 @@ module BTAP
|
|
608
613
|
CSV.open("#{@script_root_folder_path}/sample_sizing_param_ecm.csv", 'w') { |csv| csv << measure_values.unshift("measure_id") }
|
609
614
|
return table
|
610
615
|
end
|
611
|
-
|
616
|
+
|
612
617
|
#This method will set the ecm domestic hot water.
|
613
618
|
#@author phylroy.lopez@nrcan.gc.ca
|
614
|
-
#@param model [OpenStudio::model::Model] A model object
|
619
|
+
#@param model [OpenStudio::model::Model] A model object
|
615
620
|
#@return [String] log
|
616
621
|
def ecm_dhw( model )
|
617
622
|
log = "shw_setpoint_sched,shw_heater_fuel_type,shw_thermal_eff\n"
|
@@ -638,10 +643,10 @@ module BTAP
|
|
638
643
|
end
|
639
644
|
return log
|
640
645
|
end
|
641
|
-
|
646
|
+
|
642
647
|
#This method will set the ecm chotwater boilers.
|
643
648
|
#@author phylroy.lopez@nrcan.gc.ca
|
644
|
-
#@param model [OpenStudio::model::Model] A model object
|
649
|
+
#@param model [OpenStudio::model::Model] A model object
|
645
650
|
#@return [String] table
|
646
651
|
def ecm_hotwater_boilers( model )
|
647
652
|
measure_values = [
|
@@ -754,10 +759,10 @@ module BTAP
|
|
754
759
|
end #end boilers loop
|
755
760
|
return table
|
756
761
|
end
|
757
|
-
|
762
|
+
|
758
763
|
#This method will set the ecm dcv.
|
759
764
|
#@author phylroy.lopez@nrcan.gc.ca
|
760
|
-
#@param model [OpenStudio::model::Model] A model object
|
765
|
+
#@param model [OpenStudio::model::Model] A model object
|
761
766
|
#@return [String] log
|
762
767
|
def ecm_dcv( model )
|
763
768
|
log = ""
|
@@ -771,10 +776,10 @@ module BTAP
|
|
771
776
|
end
|
772
777
|
return log
|
773
778
|
end
|
774
|
-
|
779
|
+
|
775
780
|
#This method will set the ecm heating and cooling setpoints.
|
776
781
|
#@author phylroy.lopez@nrcan.gc.ca
|
777
|
-
#@param model [OpenStudio::model::Model] A model object
|
782
|
+
#@param model [OpenStudio::model::Model] A model object
|
778
783
|
#@return [String] log
|
779
784
|
def ecm_heating_cooling_setpoints(model)
|
780
785
|
|
@@ -825,10 +830,10 @@ module BTAP
|
|
825
830
|
end
|
826
831
|
return log
|
827
832
|
end
|
828
|
-
|
833
|
+
|
829
834
|
#This method will set the ecm erv.
|
830
835
|
#@author phylroy.lopez@nrcan.gc.ca
|
831
|
-
#@param model [OpenStudio::model::Model] A model object
|
836
|
+
#@param model [OpenStudio::model::Model] A model object
|
832
837
|
#@return [String] log
|
833
838
|
def ecm_erv( model )
|
834
839
|
log = ""
|
@@ -878,8 +883,8 @@ module BTAP
|
|
878
883
|
@erv_nominal_electric_power,
|
879
884
|
@erv_economizer_lockout.to_bool
|
880
885
|
).each { |erv| log << erv.to_s }
|
881
|
-
|
882
|
-
|
886
|
+
|
887
|
+
|
883
888
|
#Add setpoint manager to all OA object in airloops.
|
884
889
|
model.getHeatExchangerAirToAirSensibleAndLatents.sort.each do |erv|
|
885
890
|
|
@@ -899,10 +904,10 @@ module BTAP
|
|
899
904
|
end
|
900
905
|
return log
|
901
906
|
end
|
902
|
-
|
907
|
+
|
903
908
|
#This method will set the ecm cexhaust fans.
|
904
909
|
#@author phylroy.lopez@nrcan.gc.ca
|
905
|
-
#@param model [OpenStudio::model::Model] A model object
|
910
|
+
#@param model [OpenStudio::model::Model] A model object
|
906
911
|
#@return [String] log
|
907
912
|
def ecm_exhaust_fans( model )
|
908
913
|
log = ""
|
@@ -920,10 +925,10 @@ module BTAP
|
|
920
925
|
end
|
921
926
|
return log
|
922
927
|
end
|
923
|
-
|
928
|
+
|
924
929
|
#This method will set the ecm lighting.
|
925
930
|
#@author phylroy.lopez@nrcan.gc.ca
|
926
|
-
#@param model [OpenStudio::model::Model] A model object
|
931
|
+
#@param model [OpenStudio::model::Model] A model object
|
927
932
|
#@return [String] log
|
928
933
|
def ecm_lighting( model )
|
929
934
|
log = ""
|
@@ -947,10 +952,10 @@ module BTAP
|
|
947
952
|
end
|
948
953
|
return log
|
949
954
|
end
|
950
|
-
|
955
|
+
|
951
956
|
#This method will set the ecm temperature setback.
|
952
957
|
#@author phylroy.lopez@nrcan.gc.ca
|
953
|
-
#@param model [OpenStudio::model::Model] A model object
|
958
|
+
#@param model [OpenStudio::model::Model] A model object
|
954
959
|
#@return [String] log
|
955
960
|
def ecm_plugs( model )
|
956
961
|
log = ""
|
@@ -978,10 +983,10 @@ module BTAP
|
|
978
983
|
CSV.open("#{@script_root_folder_path}/sample_scale_plug_loads_ecm.csv", 'w') { |csv| csv << measure_values.unshift("measure_id") }
|
979
984
|
return log
|
980
985
|
end
|
981
|
-
|
986
|
+
|
982
987
|
#This method will set the ecm cold deck reset control.
|
983
988
|
#@author phylroy.lopez@nrcan.gc.ca
|
984
|
-
#@param model [OpenStudio::model::Model] A model object
|
989
|
+
#@param model [OpenStudio::model::Model] A model object
|
985
990
|
#@return [String] log
|
986
991
|
def ecm_cold_deck_reset_control( model )
|
987
992
|
log = ""
|
@@ -1034,10 +1039,10 @@ module BTAP
|
|
1034
1039
|
end
|
1035
1040
|
return log
|
1036
1041
|
end
|
1037
|
-
|
1042
|
+
|
1038
1043
|
#This method will reset the sat ecm.
|
1039
1044
|
#@author phylroy.lopez@nrcan.gc.ca
|
1040
|
-
#@param model [OpenStudio::model::Model] A model object
|
1045
|
+
#@param model [OpenStudio::model::Model] A model object
|
1041
1046
|
#@return [String] log
|
1042
1047
|
def ecm_sat_reset( model )
|
1043
1048
|
log = ""
|
@@ -1074,10 +1079,10 @@ module BTAP
|
|
1074
1079
|
end
|
1075
1080
|
return log
|
1076
1081
|
end
|
1077
|
-
|
1082
|
+
|
1078
1083
|
#This method will set the ecm temperature setback.
|
1079
1084
|
#@author phylroy.lopez@nrcan.gc.ca
|
1080
|
-
#@param model [OpenStudio::model::Model] A model object
|
1085
|
+
#@param model [OpenStudio::model::Model] A model object
|
1081
1086
|
#@return [String] log
|
1082
1087
|
def ecm_temp_setback( model )
|
1083
1088
|
log = ""
|
@@ -1115,7 +1120,7 @@ module BTAP
|
|
1115
1120
|
log << "no change to setbacks."
|
1116
1121
|
end
|
1117
1122
|
return log
|
1118
|
-
end
|
1123
|
+
end
|
1119
1124
|
end
|
1120
1125
|
end #module Resources
|
1121
1126
|
end #module BTAP
|
@@ -1155,4 +1160,4 @@ end #module BTAP
|
|
1155
1160
|
#"ZoneHVACComponent
|
1156
1161
|
# "CostPerEach"
|
1157
1162
|
#All others
|
1158
|
-
#"CostPerEach"
|
1163
|
+
#"CostPerEach"
|
@@ -70,7 +70,7 @@ module BTAP
|
|
70
70
|
def self.assign_interior_surface_construction_to_adiabatic_surfaces(model, runner = nil)
|
71
71
|
BTAP::runner_register("Info", "assign_interior_surface_construction_to_adiabatic_surfaces", runner)
|
72
72
|
unless model.building.get.defaultConstructionSet.empty? or model.building.get.defaultConstructionSet.get.defaultInteriorSurfaceConstructions.empty? or model.building.get.defaultConstructionSet.get.defaultInteriorSurfaceConstructions.get.wallConstruction.empty?
|
73
|
-
#Give adiabatic surfaces a construction. Does not matter what. This is a bug in
|
73
|
+
#Give adiabatic surfaces a construction. Does not matter what. This is a bug in OpenStudio that leave these surfaces unassigned by the default construction set.
|
74
74
|
|
75
75
|
all_adiabatic_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition(model.getSurfaces, "Adiabatic")
|
76
76
|
|
@@ -98,7 +98,7 @@ module BTAP
|
|
98
98
|
end
|
99
99
|
|
100
100
|
|
101
|
-
# This method loads an
|
101
|
+
# This method loads an OpenStudio file into the model.
|
102
102
|
# @author Phylroy A. Lopez
|
103
103
|
# @param filepath [String] path to the OSM file.
|
104
104
|
# @param name [String] optional model name to be set to model.
|
@@ -163,7 +163,7 @@ module BTAP
|
|
163
163
|
|
164
164
|
|
165
165
|
|
166
|
-
# This method loads an
|
166
|
+
# This method loads an OpenStudio file into the model.
|
167
167
|
# @author Phylroy A. Lopez
|
168
168
|
# @param filepath [String] path to the OSM file.
|
169
169
|
# @param name [String] optional model name to be set to model.
|
@@ -847,7 +847,7 @@ module BTAP
|
|
847
847
|
# This method converts an idf object to a hash
|
848
848
|
#
|
849
849
|
# @author Padmassun Rajakareyar
|
850
|
-
# @param obj [
|
850
|
+
# @param obj [OpenStudio::ModelObject]
|
851
851
|
# @return new_obj_hash [Hash] idf object converted to hash.
|
852
852
|
# @example
|
853
853
|
# Converts the following IDF (openstudio::ModelObject) to
|
@@ -899,7 +899,7 @@ module BTAP
|
|
899
899
|
# This method uses idf_to_h(obj) method, but deletes the fields named 'Handle' and 'Name'
|
900
900
|
#
|
901
901
|
# @author Padmassun Rajakareyar
|
902
|
-
# @param obj [
|
902
|
+
# @param obj [OpenStudio::ModelObject]
|
903
903
|
# @return new_obj_hash [Hash] idf object converted to hash.
|
904
904
|
# @example
|
905
905
|
# Converts the following IDF (openstudio::ModelObject) to
|
@@ -1017,9 +1017,9 @@ module BTAP
|
|
1017
1017
|
# the duplicate materials can be removed safely.
|
1018
1018
|
#
|
1019
1019
|
# @author Padmassun Rajakareyar
|
1020
|
-
# @param model [
|
1020
|
+
# @param model [OpenStudio::Model]
|
1021
1021
|
# @param grouped_objs [Hash] Output provided by group_similar_objects()
|
1022
|
-
# @return model_string [String] An
|
1022
|
+
# @return model_string [String] An OpenStudio::Model object converted to a string
|
1023
1023
|
def self.replace_duplicate_obj_handles(model, grouped_objs)
|
1024
1024
|
model_string = model.to_s # convert the OS:Model into a String
|
1025
1025
|
grouped_objs.each {|key, dup_array|
|
@@ -1050,8 +1050,8 @@ module BTAP
|
|
1050
1050
|
# converts it to an OpenStudio Model using a VersionTranslater
|
1051
1051
|
#
|
1052
1052
|
# @author Padmassun Rajakareyar
|
1053
|
-
# @param model_string [String] An
|
1054
|
-
# @return model [
|
1053
|
+
# @param model_string [String] An OpenStudio::Model object converted to a string
|
1054
|
+
# @return model [OpenStudio::Model]
|
1055
1055
|
def self.get_OS_Model_from_string(model_string)
|
1056
1056
|
require 'securerandom'
|
1057
1057
|
require 'fileutils'
|
@@ -1076,9 +1076,9 @@ module BTAP
|
|
1076
1076
|
# based on the values of each fields within the ModelObject
|
1077
1077
|
#
|
1078
1078
|
# @author Padmassun Rajakareyar
|
1079
|
-
# @param model [
|
1079
|
+
# @param model [OpenStudio::Model]
|
1080
1080
|
# @param model_obj_type [String] ModelObject type e.g. "OS:Material"
|
1081
|
-
# @return new_model [
|
1081
|
+
# @return new_model [OpenStudio::Model] Returns new model (OS:Model) if the changes were made.
|
1082
1082
|
# or else returns the old model if no changes were made.
|
1083
1083
|
def self.eleminate_duplicate_objs(model, model_obj_type) # = "OS:Material")
|
1084
1084
|
model_objs_json = {}
|
@@ -1155,8 +1155,8 @@ module BTAP
|
|
1155
1155
|
# "OS:StandardsInformation:Construction"
|
1156
1156
|
#
|
1157
1157
|
# @author Padmassun Rajakareyar
|
1158
|
-
# @param model [
|
1159
|
-
# @return new_model [
|
1158
|
+
# @param model [OpenStudio::Model]
|
1159
|
+
# @return new_model [OpenStudio::Model] Returns new model after removing the
|
1160
1160
|
# duplicate ModelObjects atated abioe.
|
1161
1161
|
def self.remove_duplicate_materials_and_constructions(model)
|
1162
1162
|
old_number_of_objects = model.getModelObjects.length
|