Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

require 'openstudio'

m = OpenStudio::Model::Model.new
plant = OpenStudio::Model::PlantLoop.new m

splitter = plant.supplySplitter
mixer = plant.supplyMixer

branchInletNodes = splitter.outletModelObjects

branchInletNodes.each do |node|
  # get the components between the branch inlet and the mixer
  branchComponents = plant.supplyComponents(node.to_Node.get,mixer)
  # the last component is going to be the mixer so pop it off
  puts branchComponents
end