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

Revision history [back]

click to hide/show revision 1
initial version

does openstudio reverse translator only collect curve objects?

So, just curious. The file vrf_library.idf contains a whole bunch of EnergyPlus objects.

However, I observe the following:

library = OpenStudio::Workspace::load("#{File.dirname(__FILE__)}/resources/vrf_library.idf").get

# UNFORTUNATELY, the following ONLY captures curves from the library file!!!

reverse_translator = OpenStudio::EnergyPlus::ReverseTranslator.new
library_model = reverse_translator.translateWorkspace(library)

puts "Start Translation!"
puts library_model
puts "Stop Translation"

library_curve_linear = library_model.getObjectByTypeAndName(OpenStudio::Model::CurveLinear::iddObjectType,"OS Default Cooling Cycling").get.to_CurveLinear.get
library_curve_cubic = library_model.getObjectByTypeAndName(OpenStudio::Model::CurveCubic::iddObjectType,"OS Default Heating Combination").get.to_CurveCubic.get
library_curve_biquadratic = library_model.getObjectByTypeAndName(OpenStudio::Model::CurveBiquadratic::iddObjectType,"OS Default HR Capacity").get.to_CurveBiquadratic.get

puts "Start Curve Linear!"
puts library_curve_linear
puts "Stop Curve Linear!"

puts "Start Curve Cubic!"
puts library_curve_cubic
puts "Stop Curve cubic!"

puts "Start Curve BiQuadratic!"
puts library_curve_biquadratic
puts "Stop Curve BiQuadratic!"

The line "puts library_model" literally only prints curves, none of the other objects. Is that an inherent limitation in OpenStudio?

does openstudio reverse translator only collect curve objects?

So, just curious. The file vrf_library.idf contains a whole bunch of EnergyPlus objects.

However, I observe the following:

library = OpenStudio::Workspace::load("#{File.dirname(__FILE__)}/resources/vrf_library.idf").get

# UNFORTUNATELY, the following ONLY captures curves from the library file!!!

reverse_translator = OpenStudio::EnergyPlus::ReverseTranslator.new
library_model = reverse_translator.translateWorkspace(library)

puts "Start Translation!"
puts library_model
puts "Stop Translation"

library_curve_linear = library_model.getObjectByTypeAndName(OpenStudio::Model::CurveLinear::iddObjectType,"OS Default Cooling Cycling").get.to_CurveLinear.get
library_curve_cubic = library_model.getObjectByTypeAndName(OpenStudio::Model::CurveCubic::iddObjectType,"OS Default Heating Combination").get.to_CurveCubic.get
library_curve_biquadratic = library_model.getObjectByTypeAndName(OpenStudio::Model::CurveBiquadratic::iddObjectType,"OS Default HR Capacity").get.to_CurveBiquadratic.get

puts "Start Curve Linear!"
puts library_curve_linear
puts "Stop Curve Linear!"

puts "Start Curve Cubic!"
puts library_curve_cubic
puts "Stop Curve cubic!"

puts "Start Curve BiQuadratic!"
puts library_curve_biquadratic
puts "Stop Curve BiQuadratic!"

The line "puts library_model" literally only prints curves, none of the other objects. Is that an inherent limitation in OpenStudio?