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

ModelToRad Error in Simulation

asked 2015-01-09 09:56:32 -0600

timyoder's avatar

updated 2015-01-09 10:33:17 -0600

Hello,

I am a new OpenStudio user and I am attempting to incorporate daylighting into my model. When I run the simulation using Radiance as the daylight simulation engine, it fails with the following output:

no sql file given, running EnergyPlus...
Adding path for local perl: C:/Program Files (x86)/OpenStudio 1.5.0/strawberry-perl-5.16.2.1-32bit-portable-reduced/perl/bin
Setting RAYPATH: C:/Program Files (x86)/Radiance/lib, C:/Program Files (x86)/Radiance/bin, '.'
Appending PATH: C:/Program Files (x86)/Radiance/bin, '.'
2015-01-09 15:45:56 UTC: running 'ruby -I 'C:\Program Files (x86)\OpenStudio 1.5.0\Ruby' -I 'C:\Program Files (x86)\OpenStudio 1.5.0\ruby-install\ruby\lib\ruby\site_ruby\2.0.0' -I 'C:\Program Files (x86)\OpenStudio 1.5.0\ruby-install\ruby\lib\ruby\site_ruby\2.0.0\i386-msvcrt' -I 'C:\Program Files (x86)\OpenStudio 1.5.0\ruby-install\ruby\lib\ruby\site_ruby' -I 'C:\Program Files (x86)\OpenStudio 1.5.0\ruby-install\ruby\lib\ruby\vendor_ruby\2.0.0' -I 'C:\Program Files (x86)\OpenStudio 1.5.0\ruby-install\ruby\lib\ruby\vendor_ruby\2.0.0\i386-msvcrt' -I 'C:\Program Files (x86)\OpenStudio 1.5.0\ruby-install\ruby\lib\ruby\vendor_ruby' -I 'C:\Program Files (x86)\OpenStudio 1.5.0\ruby-install\ruby\lib\ruby\2.0.0' -I 'C:\Program Files (x86)\OpenStudio 1.5.0\ruby-install\ruby\lib\ruby\2.0.0\i386-mingw32' -I 'C:\Program Files (x86)\OpenStudio 1.5.0\Ruby\' -I 'C:\Program Files (x86)\OpenStudio 1.5.0\Ruby\openstudio' -I 'C:\Program Files (x86)\OpenStudio 1.5.0\Ruby\lib'  '.\ModelToRad.rb' 'C:\Users\tyoder\AppData\Local\Temp\OpenStudio.yF7192\resources\run\1-Ruby-0\in.osm' '''
2015-01-09 15:45:58 UTC: completed.
failed to run ModelToRad

I am running Windows 7 with OpenStudio 1.5.0, EnergyPlus 8.1 and Radiance 4.2.2. I have tried uninstalling and reinstalling Radiance (and scanning for tools in OpenStudio) a few times with no avail.

Also of possible importance, when I install Radiance using the "Add radiance to the system PATH for current user" I get an error that says "Warning! PATH too long installer unable to modify PATH!" But I have also installed it without adding it to the system PATH and I get the same error in OpenSudio.

Any help that you could give me would be greatly appreciated!!

Thanks, Tim

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted
3

answered 2015-02-12 07:53:05 -0600

Eric Field's avatar

updated 2015-02-18 02:53:30 -0600

Dinosaver's avatar

Found a solution to this:

I was having the same problem, and dug a little deeper. ModeltoRad can't find EnergyPlus when it tries to, and so it fails. The stderr file shows that line 129 of ModelToRad fails with no input to a method. That's the EnergyPlus location. ModelToRad uses findEnergyPlus.rb to search for EnergyPlus, but findEnergyPlus is presuming that e+ is in the same old locations that it used to be (C:/EnergyPlus or /EnergyPlus). With the recent builds of OpenStudio, though, EnergyPlus is being bundled into the OS installer, and we don't install it on it's own anymore. EnergyPlus is now in a different location: [OpenStudioroot]/sharedresources/EnergyPlus[version], but findEnergyPlus.rb doesn't know to look there.

The solution is simple, if a little kludgy. Edit your findEnergyPlus.rb file. find it in: (Windows) C:\Program Files\OpenStudio [version]\Ruby\openstudio\energyplus\ (Mac) /Applications/OpenStudio [version]/Ruby/openstudio/emergyplus/

Go down to line 86 where you'll see the search code. For Windows, insert the following line of code at line 90, right below the first potentialpaths line: potentialpaths=Dir.glob('C:/Program Files/OpenStudio 1.5.5/share/openstudio/EnergyPlus*')

For OS1.6 it looks like (I have it installed on E drive, watch the syntax for the same 89 line!) potential_paths = Dir.glob('E:/Program Files/OpenStudio 1.6.0/share/openstudio/EnergyPlusV8-2-0*')

For Mac, same thing, just at line 97: potential_paths=Dir.glob('/Applications/OpenStudio 1.5.5/sharedresources/openstudio/EnergyPlus*')

NOTE: I'm using OpenStudio 1.5.5, so put this in the path, but if you're using 1.6.0, or something else, just put the proper version for your file path.

Save the file (you may need to change or authorize permissions to save the file). Now ModelToRad will run, and OpenStudio can use Radiance.

This seems to apply to all recent versions -- I've done this on both 1.5.5 and 1.6.0 and it worked on both. It likely applies to many others. Hopefully NREL can fix this little bug (and make it more universal using a path variable) for future releases.

I hope this helps! It got me working.

edit flag offensive delete link more

Comments

OpenStudio 1.7.0 will support finding the E+ installed with OpenStudio for use in ModelToRad so this work around should no longer be necessary.

macumber's avatar macumber  ( 2015-02-18 09:53:33 -0600 )edit

I am still getting the similar error with version 1.7, still wondering if I should try this bulky solution...

neko209385's avatar neko209385  ( 2015-06-10 03:39:28 -0600 )edit
1

answered 2015-01-12 22:36:43 -0600

Hi @timyoder, I'd try a couple things. First, install Radiance to a nice short path with no spaces in the directory names, e.g.. "C:\radiance". Then rerun the "scan for tools" in OpenStudio, and make sure that the Radiance you just installed is the one showing up in the tools summary.

If you have multiple copies of Radiance installed, this can be problematic. It also sounds like you have a lot of items in your system path, which may also be causing you some issues here. Windows is limited in how long of a $PATH variable you can have. If there is any way you can weed out any duplicate or unused $PATH entries, that would help too. If it still fails, the next thing to look at would be the error logs.

Let us know how you make out with the first steps; we'll get you going here.

edit flag offensive delete link more
0

answered 2016-07-27 16:41:03 -0600

landon's avatar

I would suggest you to try out Long Path Tool.

edit flag offensive delete link more
-1

answered 2015-01-15 10:52:11 -0600

Resry's avatar

Hi all,

I have the same Problem when running Openstudio1.5 with Radiance coupling: following Errors occure in the very beginning of the Simulation..

no sql file given, running EnergyPlus... Adding path for local perl: C:/Program Files (x86)/OpenStudio 1.5.0/strawberry-perl-5.16.2.1-32bit-portable-reduced/perl/bin Setting RAYPATH: C:/Radiance/lib, C:/Radiance/bin, '.' Appending PATH: C:/Radiance/bin, '.' 2015-01-15 16:18:02 UTC: running 'ruby -I 'C:\Program Files (x86)\OpenStudio 1.5.0\Ruby' -I 'C:\Program Files (x86)\OpenStudio 1.5.0\ruby-install\ruby\lib\ruby\site_ruby\2.0.0' -I 'C:\Program Files (x86)\OpenStudio 1.5.0\ruby-install\ruby\lib\ruby\site_ruby\2.0.0\i386-msvcrt' -I 'C:\Program Files (x86)\OpenStudio 1.5.0\ruby-install\ruby\lib\ruby\site_ruby' -I 'C:\Program Files (x86)\OpenStudio 1.5.0\ruby-install\ruby\lib\ruby\vendor_ruby\2.0.0' -I 'C:\Program Files (x86)\OpenStudio 1.5.0\ruby-install\ruby\lib\ruby\vendor_ruby\2.0.0\i386-msvcrt' -I 'C:\Program Files (x86)\OpenStudio 1.5.0\ruby-install\ruby\lib\ruby\vendor_ruby' -I 'C:\Program Files (x86)\OpenStudio 1.5.0\ruby-install\ruby\lib\ruby\2.0.0' -I 'C:\Program Files (x86)\OpenStudio 1.5.0\ruby-install\ruby\lib\ruby\2.0.0\i386-mingw32' -I 'C:\Program Files (x86)\OpenStudio 1.5.0\Ruby\' -I 'C:\Program Files (x86)\OpenStudio 1.5.0\Ruby\openstudio' -I 'C:\Program Files (x86)\OpenStudio 1.5.0\Ruby\lib' '.\ModelToRad.rb' 'C:\Users\c8461098\AppData\Local\Temp\OpenStudio.Sv6408\resources\run\1-Ruby-0\in.osm' ''' 2015-01-15 16:18:04 UTC: completed. failed to run ModelToRad

So it seems, that everythink is allright the Radiance Installation and the PATHs. I have installed the actual Version 4.2.2 directly on C:\Radiance. There is still this Problem to run the ruby-script "ModelToRun"...can there be anything wrong with this file..?

Thanks!

edit flag offensive delete link more

Comments

Hi, welcome to the site. Could you convert this answer to a comment, or open a new question if @rpg777's answer doesn't help? We try to keep answers for actual answers and comments for additional information (like yours) that might help solve the problem.

Jamie Bull's avatar Jamie Bull  ( 2015-01-15 11:12:33 -0600 )edit

@rpg777,

Thanks for the answer! I have not forgotten this problem. I tried to install radiance directly onto the C: drive which produced the same results. I did some research about modifying system PATHs using the Environment Variable options within the advance system settings of My Computer. I was kinda over my head so I involved the IT Manager at my firm. He said that the PATH hadn't been written for Radiance at all and that he was going to look into the problem further next week. If Radiance is in fact not installing properly, that could very well be the problem. I will update next week!

timyoder's avatar timyoder  ( 2015-01-16 14:31:50 -0600 )edit

Actually Tim, OpenStudio does a commendable job of internally setting paths to Radiance and other support programs, regardless of whether you set them when you install the programs. If you're still having this same error after confirming your Radiance path has no spaces in it, and that you've run Scan For Tools and that version of Radiance is being reported there, then we need to look at your standard and error logs.

rpg777's avatar rpg777  ( 2015-01-20 11:32:14 -0600 )edit

Even with the shorten path (no spaces), the simulation resulted in the same ModelToRad error. In the simulation tree, the only error file is Null job>Ruby (DaylightCalculations.rb)>Output Files> stderr. This error file contained the following text: "DL is deprecated, please use Fiddle DL is deprecated, please use Fiddle ./ModelToRad.rb:129:in <main>': undefined method[]' for nil:NilClass (NoMethodError)"

Other than that output file, there was not much else that was populated in the simulation tree.

timyoder's avatar timyoder  ( 2015-01-28 12:42:59 -0600 )edit

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: 2015-01-09 09:56:32 -0600

Seen: 652 times

Last updated: Feb 18 '15