Sorry, this content is no longer available
2

Find and run with (highest)available version of EnergyPlus

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!

yiyuan-jia's avatar
218
yiyuan-jia
asked 2015-06-25 14:56:21 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2015-07-12 14:12:55 -0500
edit flag offensive 0 remove flag 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
add a comment see more comments

1 Answer

4

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.

macumber's avatar
12k
macumber
answered 2015-06-26 10:07:49 -0500
edit flag offensive 0 remove flag delete link

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
add a comment see more comments