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

Radiance Measure fails on OpenStudio 2.9

asked 2020-10-10 08:30:55 -0600

Iswarya M Mohan's avatar

updated 2021-05-20 17:37:46 -0600

Hello, I have already tried the same model with OpenStudio Versions 2.7, 2.8 and 2.9. The model runs fine with EnergyPlus Simulations but fails as soon as Radiance Measure is applied. The added illuminance Map, Glare Sensor and the Daylight Controller fall inside a Thermal Zone as was required as I searched through a few previous questions that have been covered in the same forum. The link to the model is : https://drive.google.com/drive/folder...

Kindly help.

The Output shown on Simulation Window> Initializing workflow. Processing OpenStudio Measures. Applying RadianceMeasure Failed.

The Advanced Output Standard Output: [17:48:52.990200 ERROR] :/ruby/2.2.0/gems/openstudio-workflow-1.3.4/lib/openstudio/workflow/util/measure.rb failed with message C:/Users/nycta/BCL/1e3cfef8-b051-4e60-8bb0-ed2d29d4f45f/77b56312-1bff-49a4-91e8-64db8264357c/measure.rb:1320: syntax error, unexpected '.' t_radGlareSensorViews[space_name]&.each do |sensor, v| ^ C:/Users/nycta/BCL/1e3cfef8-b051-4e60-8bb0-ed2d29d4f45f/77b56312-1bff-49a4-91e8-64db8264357c/measure.rb:1418: syntax error, unexpected keyword_rescue, expecting keyword_end rescue Exception => e ^ in :/ruby/2.2.0/gems/openstudio-workflow-1.3.4/lib/openstudio/workflow/util/measure.rb:339:in load' :/ruby/2.2.0/gems/openstudio-workflow-1.3.4/lib/openstudio/workflow/util/measure.rb:339:inapply_measure' :/ruby/2.2.0/gems/openstudio-workflow-1.3.4/lib/openstudio/workflow/util/measure.rb:109:in block in apply_measures' :/ruby/2.2.0/gems/openstudio-workflow-1.3.4/lib/openstudio/workflow/util/measure.rb:67:ineach_index' :/ruby/2.2.0/gems/openstudio-workflow-1.3.4/lib/openstudio/workflow/util/measure.rb:67:in apply_measures' :/ruby/2.2.0/gems/openstudio-workflow-1.3.4/lib/openstudio/workflow/jobs/run_os_measures.rb:68:inperform' :/ruby/2.2.0/gems/openstudio-workflow-1.3.4/lib/openstudio/workflow/run.rb:285:in step' :/ruby/2.2.0/gems/openstudio-workflow-1.3.4/lib/openstudio/workflow/run.rb:232:inrun' :/openstudio_cli.rb:975:in execute' :/openstudio_cli.rb:763:inexecute' :/openstudio_cli.rb:1746:in ' eval:116:ineval' eval:116:in require_embedded_absolute' eval:101:inblock in require' eval:95:in each' eval:95:inrequire' eval:3:in ' [17:48:52.991198 ERROR] Found error in state 'os_measures' with message [":/ruby/2.2.0/gems/openstudio-workflow-1.3.4/lib/openstudio/workflow/util/measure.rb failed with message C:/Users/nycta/BCL/1e3cfef8-b051-4e60-8bb0-ed2d29d4f45f/77b56312-1bff-49a4-91e8-64db8264357c/measure.rb:1320: syntax error, unexpected '.'\n t_radGlareSensorViews[space_name]&.each do |sensor, v|\n ^\nC:/Users/nycta/BCL/1e3cfef8-b051-4e60-8bb0-ed2d29d4f45f/77b56312-1bff-49a4-91e8-64db8264357c/measure.rb:1418: syntax error, unexpected keyword_rescue, expecting keyword_end\n rescue Exception => e\n ^ in :/ruby/2.2.0/gems/openstudio-workflow-1.3.4/lib/openstudio/workflow/util/measure.rb:339:inload'\n:/ruby/2.2.0/gems/openstudio-workflow-1.3.4/lib/openstudio/workflow/util/measure.rb:339:in apply_measure'\n:/ruby/2.2.0/gems/openstudio-workflow-1.3.4/lib/openstudio/workflow/util/measure.rb:109:inblock in apply_measures'\n:/ruby/2.2.0/gems/openstudio-workflow-1.3.4/lib/openstudio/workflow/util/measure.rb:67:in each_index'\n:/ruby/2.2.0/gems/openstudio-workflow-1.3.4/lib/openstudio/workflow/util/measure.rb:67:inapply_measures'\n:/ruby/2.2 ... (more)

edit retag flag offensive close merge delete

Comments

Can you set “input” in measure?

bzxgcs's avatar bzxgcs  ( 2022-09-29 00:42:10 -0600 )edit

2 Answers

Sort by » oldest newest most voted
2

answered 2021-04-19 11:01:52 -0600

lorenzo.belussi's avatar

@David Goldwasser how can i fix the problem with in openstuio 2.9 using the documentation in github?

edit flag offensive delete link more

Comments

1

I was able to fix it this way (I am not sure if this is exactly right, but it works):

  1. Follow the github link.
  2. Click the measure.rb link
  3. Right click on the "Raw" link and save link as (this downloads the ruby file
  4. You will have to either locate the measure in your My Measures folder or the BCL folder. I think it would be best to do your My Measures folder, otherwise it might try to sync with the older BCL version...
  5. If you do not have a custom copy of the Radiance measure, you will have to make one.
  6. Replace the measure.rb file with the new one you got from Github.
Ski90Moo's avatar Ski90Moo  ( 2021-04-19 15:26:43 -0600 )edit

If you want more information on how measures are handled, you can see this video: https://youtu.be/R3MLMjjU0t8

Ski90Moo's avatar Ski90Moo  ( 2021-04-19 15:27:08 -0600 )edit

@Ski90Moo thank you! I followed step-by-step your suggestion but I have another syntax error: C:/Users/loren/AppData/Local/Temp/OpenStudioApp.b13988/resources/measures/Radiance Daylighting Measure/measure.rb:1418: syntax error, unexpected keyword_rescue, expecting keyword_end rescue Exception => e Have you any ideas? Thank you very much

lorenzo.belussi's avatar lorenzo.belussi  ( 2021-04-21 07:50:01 -0600 )edit

@lorenzo.belussi it appears there is an error when reading line 1418. It is saying there is an end statement missing. In looking at an older version of the radiance measure it reads like this:

def writeTimeSeriesToSql(sqlfile, simDateTimes, illum, space_name, ts_name, ts_units) data = OpenStudio::Vector.new(illum.length) illum.length.times do |n| begin data[n] = illum[n].to_f rescue Exception => e print_statement('Error inserting data: ' + illum[n] + ' inserting 0 instead', runner) data[n] = 0 end end

Ski90Moo's avatar Ski90Moo  ( 2021-05-12 12:17:37 -0600 )edit

I would suspect the code has been updated to conform to the latest ruby or PERL syntax... make sure you are using the latest and compatible versions of all softwares.

Ski90Moo's avatar Ski90Moo  ( 2021-05-12 12:20:31 -0600 )edit
0

answered 2020-10-13 20:48:22 -0600

It looks like there is an error on line 1320 of the measure. This chunk of code:

      t_radGlareSensorViews[space_name]&.each do |sensor, v|
        new_hash[sensor] = v[hour]
      end

should be (notice I removed the & symbol):

      t_radGlareSensorViews[space_name].each do |sensor, v|
        new_hash[sensor] = v[hour]
      end

@david-goldwasser where is the radiance measure maintained these days?

edit flag offensive delete link more

Comments

The new online BCL update works on 3.1 as well...Thanks a lot!!!

Iswarya M Mohan's avatar Iswarya M Mohan  ( 2020-10-17 12:27:31 -0600 )edit

It appears that the measure was not updated on the BCL. Last update was 6/23/2020.

Ski90Moo's avatar Ski90Moo  ( 2021-02-27 14:40:59 -0600 )edit
1

@Ski90Moo we are working on a refactor of BCL, if you want to get the most current one for now please use the github link in my earlier comment.

David Goldwasser's avatar David Goldwasser  ( 2021-03-01 12:00:11 -0600 )edit

@David Goldwasser I downloaded the github version, but it still raises error like the question said. What' s more, I found I can't set "input" of the measure.

bzxgcs's avatar bzxgcs  ( 2022-09-29 00:48:02 -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

3 followers

Stats

Asked: 2020-10-10 07:34:59 -0600

Seen: 437 times

Last updated: Apr 19 '21