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 2021-03-31 12:34:25 -0600

stanman's avatar

updated 2021-04-06 15:35:22 -0600

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!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2021-03-31 15:31:38 -0600

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)"
edit flag offensive delete link more

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: 2021-03-31 12:34:25 -0600

Seen: 95 times

Last updated: Mar 31 '21