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

asked 2023-03-02 09:58:28 -0500

krkh-1702's avatar

updated 2023-03-02 12:08:28 -0500

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
[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!

edit retag flag offensive close merge delete


I'm not sure if I am understanding the question. Are you saying that, after running OpenStudio-HPXML, the EnergyPlus IDF file has a reference to a schedule file that doesn't exist on your machine?

shorowit's avatar shorowit  ( 2023-03-02 13:58:11 -0500 )edit

Yes, after running Openstudio-HPXML, I get a set of files that includes annual results and an IDF file (with other files). When I try to run this IDF file with EnergyPlus, it does not work because it refers to a schedule file that does not exist. This is because the referenced schedule file is being generated by OpenStudio-HPXML. When I run batch simulations, only the schedule for the last model is there because OpenStudio overwrites it (the 'generated_files' folder from the image contains the schedule).

krkh-1702's avatar krkh-1702  ( 2023-03-02 20:05:06 -0500 )edit

Can you provide an example HPXML and schedules.csv, and the command you're using to run OpenStudio-HPXML?

shorowit's avatar shorowit  ( 2023-03-03 15:35:12 -0500 )edit