First time here? Check out the Help page!

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

How to I limit the number of output variables in my model.

asked 4 years ago

stanman's avatar

updated 3 years ago

When I run my model and convert the .eso file into a csv to help troubleshoot my loop flows and temperatures, the .eso files includes every single output variable option and is too large to convert to a csv, so it takes the fist 255 variables to display. Unfortunately none of these are the variables I need. The first few models I ran I was able to choose which variables were outputted through the variables subtab by selecting the variables I wanted outputted. Now no matter what model I open, save or start new every single variable is output despite not being selected. I have tried turning all of and saving and reloading multiple time, but no luck. Is there a way around this to select only the variables I want to be outputted? I'm not sure why I can't seem to turn them off anymore.

Any and all advice is greatly appreciated. Thanks in advance!

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
2

answered 4 years ago

I would start by pruning ALL output variables from your model. Here is how you would use ruby the CLI/ruby bindings to load a model in the same directory called in.osm and save it as in2.osm after deleting all output variables.

path = 'in.osm'
vt = OpenStudio::OSVersion::VersionTranslator.new
m = vt.loadModel(path)
if m.empty?
  raise "Cannot load model at #{path}"
end
m = m.get
i = 0
m.getOutputVariables.each do |o|
   i += 1
   o.remove
end
puts "Deleted #{i} output variables"
m.save('in2.osm', true)

Here is a one-liner via the CLI, in case you don't have ruby installed and setup for openstudio:

openstudio -e "vt = OpenStudio::OSVersion::VersionTranslator.new; m = vt.loadModel('in.osm').get; i = 0; m.getOutputVariables.each{|o| i += 1; o.remove}; puts \"Deleted #{i} output variables\"; m.save('in2.osm', true)"
Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

1 follower

Stats

Asked: 4 years ago

Seen: 111 times

Last updated: Mar 31 '21