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

Find and run with (highest)available version of EnergyPlus

asked 2015-06-25 14:56:21 -0500

updated 2015-07-12 14:12:55 -0500

Hi I'm working on a project that use the RunOSM library to run osm files through EnergyPlus. What I want to do is to search for the highest version of EnergyPlus installed in the user's machine and use it to run osm model. So I guess would need to change the code within the RunOSM class.

The original code of finding EnergyPlus in the RunOSM is:

ep_hash = OpenStudio::EnergyPlus::find_energyplus(8,3)

Which will store the path information of the EnergyPlus Version 8.3 in hash ep_hash. However, in case the user only has EnergyPlus 8.2 installed, EnergyPlus would be found and reports error.

Here is what I did to replace the line above:

idx = 3
ep_hash = Hash.new
while ep_hash[:energyplus_exe].nil?
  break if idx < 0
  ep_hash = OpenStudio::EnergyPlus::find_energyplus(8,idx)
  idx -= 1    
end

So that it will search for the highest version of EnergyPlus while still capable to run with lower versions.

This seems to work in term of finding other version of EnergyPlus, while still reports error says certain job "did not finish successfully" when I run RunOSM in my main program, I figured I might need to modify the find_energyplus code developed by NREL or is there any other more elegant way for this without touching the source code?

Thanks!

edit retag flag offensive close merge delete

Comments

@macumber should be able to go into more details, but I can say that a specific version of OpenStudio is only capable of doing forward translation to IDF for a specific version of EnergyPlus. OpenStudio 1.7 writes to EnergyPlus 8.2. OpenStudio 1.8 will write to EnergyPlus 8.3. In the past when people want to use a newer EnergyPlus that isn't yet supported I have suggested using EnergyPlus's version translation tool then EP Launch. While I have not done it I've been told there should be a way to access it from ruby.

David Goldwasser's avatar David Goldwasser  ( 2015-06-25 20:16:53 -0500 )edit

Thanks David, that helps too.

yiyuan-jia's avatar yiyuan-jia  ( 2015-06-29 10:17:46 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
4

answered 2015-06-26 10:07:49 -0500

David is right that each version of OpenStudio only supports translation to one specific version of EnergyPlus. We are working to deprecate the find_energyplus method and instead always use the version of EnergyPlus that ships with OpenStudio. In the future there should be no need for the user to install any version of EnergyPlus, they should only have to install OpenStudio.

edit flag offensive delete link more

Comments

Thanks Dan, always point to EnergyPlus within the OpenStudio package might be the safest way.

yiyuan-jia's avatar yiyuan-jia  ( 2015-06-29 10:16:49 -0500 )edit

Your Answer

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

Add Answer

Careers

Question Tools

1 follower

Stats

Asked: 2015-06-25 14:56:21 -0500

Seen: 179 times

Last updated: Jun 26 '15