NREL / OpenStudio-workflow-gem

http://openstudio.net
Other
14 stars 4 forks source link

Issue with assigning a non zero value for "num_stories_below_grade" in "create_bar_from_building_type_ratios measure" #112

Open korbaga opened 4 years ago

korbaga commented 4 years ago

OpenStudio run is failing every time I am assigning a non zero value for "num_stories_below_grade" in "create_bar_from_building_type_ratios measure" with the following error
"Infinity not allowed in JSON::/ruby/2.2.0/gems/json_pure-2.2.0/lib/json/pure/generator.rb:375:in to_json'\n:/ruby/2.2.0/gems/json_pure-2.2.0/lib/json/pure/generator.rb:309:inblock in json_transform'\n:/ruby/2.2.0/gems/json_pure-2.2.0/lib/json/pure/generator.rb:301:in each'\n:/ruby/2.2.0/gems/json_pure-2.2.0/lib/json/pure/generator.rb:301:injson_transform'\n:/ruby/2.2.0/gems/json_pure-2.2.0/lib/json/pure/generator.rb:283:in to_json'\n:/ruby/2.2.0/gems/json_pure-2.2.0/lib/json/pure/generator.rb:309:inblock in json_transform'\n:/ruby/2.2.0/gems/json_pure-2.2.0/lib/json/pure/generator.rb:301:in each'\n:/ruby/2.2.0/gems/json_pure-2.2.0/lib/json/pure/generator.rb:301:injson_transform'\n:/ruby/2.2.0/gems/json_pure-2.2.0/lib/json/pure/generator.rb:283:in to_json'\n:/ruby/2.2.0/gems/json_pure-2.2.0/lib/json/pure/generator.rb:242:ingenerate'\n:/ruby/2.2.0/gems/json_pure-2.2.0/lib/json/common.rb:286:in pretty_generate'\n:/ruby/2.2.0/gems/openstudio-workflow-1.3.4/lib/openstudio/workflow/adapters/output/local.rb:111:inblock in communicate_measure_attributes'\neval:361:in open'\n:/ruby/2.2.0/gems/openstudio-workflow-1.3.4/lib/openstudio/workflow/adapters/output/local.rb:110:incommunicate_measure_attributes'\n:/ruby/2.2.0/gems/openstudio-workflow-1.3.4/lib/openstudio/workflow/jobs/run_os_measures.rb:73:in perform'\n:/ruby/2.2.0/gems/openstudio-workflow-1.3.4/lib/openstudio/workflow/run.rb:285:instep'\n:/ruby/2.2.0/gems/openstudio-workflow-1.3.4/lib/openstudio/workflow/run.rb:232:in run'\n:/openstudio_cli.rb:975:inexecute'\n:/openstudio_cli.rb:763:in execute'\n:/openstudio_cli.rb:1746:in

'\neval:116:in eval'\neval:116:inrequire_embedded_absolute'\neval:101:in block in require'\neval:95:ineach'\neval:95:in require'\neval:3:in
'"

DavidGoldwasser commented 4 years ago

@korbaga can you do a few things for me.

  1. Confirm that you can still see this error when you try it with the CLI setup for OpenStudio 3.0 instead of 2.91.
  2. Then try it with this OSW which I ran on my machine using 3.0 and do not get the error. https://github.com/DavidGoldwasser/osw2osa/blob/master/workflows/bar_typical/in.osw

If you still get the error on your OSW but don't on mine, then I can try running your OSW on my machine. If you get the error on mine as well, then maybe there is some platform difference?

@nllong and @kflemin the error is really strange. The datapoint shows as failed on the OSW but there are no step_errors on any of the measures. I remember old JSON errors related to duplicate variables or constants of same name, but don't remember seeing one about infinity. When he makes a minor change to his in.osw to for example have 5 stories above grade and 0 below, from 4 above and 1 below, then it works. It seemed to happen on other buildings on campus he is modeling that had basements, but the measure seems to be functioning fine? Maybe there is something malformed in the measure.xml, but then way is it only failing when basement value is not 0. I could even understand if I added a new argument that wasn't in the in.osw before, but the basement argument is always there.

korbaga commented 4 years ago

Dave I run the osw with Openstudio 3.0 and I still see the error. Regarding running https://github.com/DavidGoldwasser/osw2osa/blob/master/workflows/bar_typical/in.osw - I got the following error . "[17:35:59.392093 ERROR] Found error in state 'initialization' with message ["Cannot find measure ChangeBuildingLocation::/ruby/2.2.0/gems/openstudio-workflow-1.3.4/lib/openstudio/workflow/util/measure.rb:150:in block in validate_measures'\n:/ruby/2.2.0/gems/openstudio-workflow-1.3.4/lib/openstudio/workflow/util/measure.rb:136:ineach'\n:/ruby/2.2.0/gems/openstudio-workflow-1.3.4/lib/openstudio/workflow/util/measure.rb:136:in each_with_index'\n:/ruby/2.2.0/gems/openstudio-workflow-1.3.4/lib/openstudio/workflow/util/measure.rb:136:invalidate_measures'\n:/ruby/2.2.0/gems/openstudio-workflow-1.3.4/lib/openstudio/workflow/jobs/run_initialization.rb:119:in perform'\n:/ruby/2.2.0/gems/openstudio-workflow-1.3.4/lib/openstudio/workflow/run.rb:285:instep'\n:/ruby/2.2.0/gems/openstudio-workflow-1.3.4/lib/openstudio/workflow/run.rb:232:in run'\n:/openstudio_cli.rb:975:inexecute'\n:/openstudio_cli.rb:763:in execute'\n:/openstudio_cli.rb:1746:in

'\neval:116:in eval'\neval:116:inrequire_embedded_absolute'\neval:101:in block in require'\neval:95:ineach'\neval:95:in require'\neval:3:in
'"]}"

DavidGoldwasser commented 4 years ago

Not sure why it can no long find the ChangeBuildingLocation measure when you switch to newer version of OpenStudio?

brianlball commented 4 years ago

is this still an issue? also with OS 3.0 you should use Ruby 2.5.5

korbaga commented 4 years ago

Hi Brian, yes it is still an issue. I checked it with Ruby 2.5.8