This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# returns an array of OpenStudio class names with the prefix and colons removed | |
# searches the IDD for objects that start with the prefix, which is in EnergyPlus syntax with colons | |
def self.get_class_names(prefix) | |
array = [] | |
os_prefix = "OS:#{prefix}" | |
factory = OpenStudio::IddFileAndFactoryWrapper.new('OpenStudio'.to_IddFileType) | |
factory.objects.each do |obj| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# returns an array of supply component class names | |
def self.get_plant_loop_supply_classes(hvac_library_osm_path) | |
array = [] | |
model = OpenStudio::Model::Model.load(hvac_library_osm_path).get | |
plant_loop = OpenStudio::Model::PlantLoop.new(model) | |
supply_outlet_node = plant_loop.supplyOutletNode | |
model.modelObjects.each do |obj| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# returns an array of supply component class_names | |
def self.get_air_loop_supply_classes(hvac_library_osm_path) | |
array = [] | |
model = OpenStudio::Model::Model.load(hvac_library_osm_path).get | |
air_loop = OpenStudio::Model::AirLoopHVAC.new(model) | |
supply_outlet_node = air_loop.supplyOutletNode | |
model.modelObjects.each do |obj| |
NewerOlder