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

Revision history [back]

How can I change the 'generated _files' folder path after running an OpenStudio-HPXML simulation from CLI?

I want to run different energy models in HPXML format, each having its own different schedules saved as CSV. The folder structure is: Building X> X.xml, schedules.csv

I wrote a python script to run the models successfully and save the results individually using OpenStudio-HPXML. I want to run the obtained IDF models from this simulation using EnergyPlus with JE+ because I want to change some parameters. I get an error because the schedules generated after running the OpenStudio simulation are not found; only one schedule exists for the last XML file that ran. I am attaching a screenshot of the current folder structure - all of my OpenStudio-HPXML run models are in the BEM folder. The schedules obtained after the simulation are supposed to be in 'generated_files' folder, but I see only one folder with one schedule for the last energy simulation.

I tried to change my python script to see if changing the path for 'modified_{building_X}.osw' works, but then I am getting an error on the compatibility of OpenStudio with the Ruby version, as shown below. I really appreciate any help, THANK YOU!

(base) C:\Users\kkhar\Downloads\OpenStudio_euss_2022_thesis\workflow>python original.py [10:18:51.447741 ERROR] Found error in state 'initialization' with message ["Cannot find measure HPXMLtoOpenStudio::/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/util/measure.rb:155:in block in validate_measures'\n:/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/util/measure.rb:141:ineach'\n:/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/util/measure.rb:141:in each_with_index'\n:/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/util/measure.rb:141:invalidate_measures'\n:/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/jobs/run_initialization.rb:122:in perform'\n:/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/run.rb:291:instep'\n:/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/run.rb:233:in run'\n:/openstudio_cli.rb:1173:inexecute'\n:/openstudio_cli.rb:803:in execute'\n:/openstudio_cli.rb:1972:in<main>'\neval:188:in eval'\neval:188:inrequire_embedded_absolute'\neval:173:in block in require_embedded'\neval:167:ineach'\neval:167:in require_embedded'\neval:126:inrequire'\neval:3:in `<main>'"]}

enter code here

image description

How can I change the 'generated _files' folder path after running an OpenStudio-HPXML simulation from CLI?

I want to run different energy models in HPXML format, each having its own different schedules saved as CSV. The folder structure is: Building X> X.xml, schedules.csv

I wrote a python script to run the models successfully and save the results individually using OpenStudio-HPXML. I want to run the obtained IDF models from this simulation using EnergyPlus with JE+ because I want to change some parameters. I get an error because the schedules generated after running the OpenStudio simulation are not found; only one schedule exists for the last XML file that ran. I am attaching a screenshot of the current folder structure - all of my OpenStudio-HPXML run models are in the BEM folder. The schedules obtained after the simulation are supposed to be in 'generated_files' folder, but I see only one folder with one schedule for the last energy simulation.

I tried to change my python script to see if changing the path for 'modified_{building_X}.osw' works, but then I am getting an error on the compatibility of OpenStudio with the Ruby version, as shown below. I really appreciate any help, THANK YOU!

(base) C:\Users\kkhar\Downloads\OpenStudio_euss_2022_thesis\workflow>python original.py
[10:18:51.447741 ERROR] Found error in state 'initialization' with message ["Cannot find measure HPXMLtoOpenStudio::/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/util/measure.rb:155:in block in validate_measures'\n:/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/util/measure.rb:141:ineach'\n:/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/util/measure.rb:141:in each_with_index'\n:/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/util/measure.rb:141:invalidate_measures'\n:/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/jobs/run_initialization.rb:122:in perform'\n:/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/run.rb:291:instep'\n:/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/run.rb:233:in run'\n:/openstudio_cli.rb:1173:inexecute'\n:/openstudio_cli.rb:803:in execute'\n:/openstudio_cli.rb:1972:in<main>'\neval:188:in eval'\neval:188:inrequire_embedded_absolute'\neval:173:in block in require_embedded'\neval:167:ineach'\neval:167:in require_embedded'\neval:126:inrequire'\neval:3:in `<main>'"]}

enter code here
`block in validate_measures'
  :/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/util/measure.rb:141:in `each'
  :/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/util/measure.rb:141:in `each_with_index'
  :/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/util/measure.rb:141:in `validate_measures'
  :/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/jobs/run_initialization.rb:122:in `perform'
  :/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/run.rb:291:in `step'
  :/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/run.rb:233:in `run'
  :/openstudio_cli.rb:1173:in `execute'
  :/openstudio_cli.rb:803:in `execute'
  :/openstudio_cli.rb:1972:in `<main>'
  eval:188:in `eval'
  eval:188:in `require_embedded_absolute'
  eval:173:in `block in require_embedded'
  eval:167:in `each'
  eval:167:in `require_embedded'
  eval:126:in `require'
  eval:3:in `<main>'"]}

image description

I really appreciate any help, THANK YOU!

How can I change the 'generated _files' folder path after running an OpenStudio-HPXML simulation from CLI?

I want to run different energy models in HPXML format, each having its own different schedules saved as CSV. The folder structure is: Building X> X.xml, schedules.csv

I wrote a python script to run the models successfully and save the results individually using OpenStudio-HPXML. I want to run the obtained IDF models from this simulation using EnergyPlus with JE+ because I want to change some parameters. I get an error because the schedules generated after running the OpenStudio simulation are not found; only one schedule exists for the last XML file that ran. I am attaching a screenshot of the current folder structure - all of my OpenStudio-HPXML run models are in the BEM folder. The schedules obtained after the simulation are supposed to be in 'generated_files' folder, but I see only one folder with one schedule for the last energy simulation.

I tried to change my python script to see if changing the path for 'modified_{building_X}.osw' works, but then I am getting an error on the compatibility of OpenStudio with the Ruby version, as shown below.

(base) C:\Users\kkhar\Downloads\OpenStudio_euss_2022_thesis\workflow>python original.py
[10:18:51.447741 ERROR] Found error in state 'initialization' with message ["Cannot find measure HPXMLtoOpenStudio::/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/util/measure.rb:155:in `block in validate_measures'
  :/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/util/measure.rb:141:in `each'
  :/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/util/measure.rb:141:in `each_with_index'
  :/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/util/measure.rb:141:in `validate_measures'
  :/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/jobs/run_initialization.rb:122:in `perform'
  :/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/run.rb:291:in `step'
  :/ruby/2.7.0/gems/openstudio-workflow-2.3.1/lib/openstudio/workflow/run.rb:233:in `run'
  :/openstudio_cli.rb:1173:in `execute'
  :/openstudio_cli.rb:803:in `execute'
  :/openstudio_cli.rb:1972:in `<main>'
  eval:188:in `eval'
  eval:188:in `require_embedded_absolute'
  eval:173:in `block in require_embedded'
  eval:167:in `each'
  eval:167:in `require_embedded'
  eval:126:in `require'
  eval:3:in `<main>'"]}

image description

I really appreciate any help, THANK YOU!