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

Revision history [back]

click to hide/show revision 1
initial version

StateManager's delete_state function error

Hi! I worked with EnergyPlus API Python V9-5-0 and all was good. Now, I tried to run the same program with EP API Python V9-6-0 and the function api.state_manager.delete_state(state) present me an error in the lecture of a file. The follow is the messege in the Terminal:

EnergyPlus Starting
EnergyPlus, Version 9.6.0-f420c06a69, YMD=2021.12.09 15:06
Adjusting Air System Sizing
Adjusting Standard 62.1 Ventilation Sizing
Initializing Simulation
Reporting Surfaces
Beginning Primary Simulation
Initializing New Environment Parameters
Warming up {1}
Updating Beam-to-Diffuse Exterior Solar Reflection Factors
Updating Beam-to-Beam Exterior Solar Reflection Factors
Warming up {2}
Warming up {3}
Warming up {4}
Starting Simulation at 07/14/2013 for DDMM
Writing tabular output file results using comma format.
Writing tabular output file results using HTML format.
EnergyPlus Run Time=00hr 00min  1.30sec
EnergyPlus Completed Successfully.
Traceback (most recent call last):
  File "c:\Users\grhen\Documents\GitHub\RLforEP\Main_v2_9_20211204.py", line 104, in <module>
    EMS_prop_v2_9_20211204.init_EPRandomConvergence(conf_experimento, var_case_n)
  File "c:\Users\grhen\Documents\GitHub\RLforEP\EMS_prop_v2_9_20211204.py", line 294, in init_EPRandomConvergence
    runEP(conf_experimento, var_case_n, var_step_n, epJSON_new)
  File "c:\Users\grhen\Documents\GitHub\RLforEP\EMS_prop_v2_9_20211204.py", line 195, in runEP     
    api.state_manager.delete_state(state)
  File "C:\EnergyPlusV9-6-0\pyenergyplus\state.py", line 105, in delete_state
    self.api.stateDelete(state)
OSError: exception: access violation reading 0x0000000000000010

The complete code is very large, but the problem can be see here:

state = api.state_manager.new_state()
api.state_manager.reset_state(state)
api.runtime.callback_begin_zone_timestep_after_init_heat_balance(state, callbackFunction)
api.runtime.run_energyplus(state, ['-d', var_case_n['Folder_Output'], '-w', conf_experimento['Weather_file'], epJSON_file])
api.state_manager.delete_state(state)

Wenn I don't use the function api.state_manager.delete_state(state) all is good, but with the time the memory give me problems. I like to use V9-6-0 because is faster. Somebudy can help me?

StateManager's delete_state function error

Hi! I worked with EnergyPlus API Python V9-5-0 and all was good. Now, I tried to run the same program with EP API Python V9-6-0 and the function api.state_manager.delete_state(state) present me an error in the lecture of a file. The follow is the messege in the Terminal:

EnergyPlus Starting
EnergyPlus, Version 9.6.0-f420c06a69, YMD=2021.12.09 15:06
Adjusting Air System Sizing
Adjusting Standard 62.1 Ventilation Sizing
Initializing Simulation
Reporting Surfaces
Beginning Primary Simulation
Initializing New Environment Parameters
Warming up {1}
Updating Beam-to-Diffuse Exterior Solar Reflection Factors
Updating Beam-to-Beam Exterior Solar Reflection Factors
Warming up {2}
Warming up {3}
Warming up {4}
Starting Simulation at 07/14/2013 for DDMM
Writing tabular output file results using comma format.
Writing tabular output file results using HTML format.
EnergyPlus Run Time=00hr 00min  1.30sec
EnergyPlus Completed Successfully.
Traceback (most recent call last):
  File "c:\Users\grhen\Documents\GitHub\RLforEP\Main_v2_9_20211204.py", line 104, in <module>
    EMS_prop_v2_9_20211204.init_EPRandomConvergence(conf_experimento, var_case_n)
  File "c:\Users\grhen\Documents\GitHub\RLforEP\EMS_prop_v2_9_20211204.py", line 294, in init_EPRandomConvergence
    runEP(conf_experimento, var_case_n, var_step_n, epJSON_new)
  File "c:\Users\grhen\Documents\GitHub\RLforEP\EMS_prop_v2_9_20211204.py", line 195, in runEP     
    api.state_manager.delete_state(state)
  File "C:\EnergyPlusV9-6-0\pyenergyplus\state.py", line 105, in delete_state
    self.api.stateDelete(state)
OSError: exception: access violation reading 0x0000000000000010

The complete code is very large, but the problem can be see here:

state = api.state_manager.new_state()
api.state_manager.reset_state(state)
api.runtime.callback_begin_zone_timestep_after_init_heat_balance(state, callbackFunction)
api.runtime.run_energyplus(state, ['-d', var_case_n['Folder_Output'], '-w', conf_experimento['Weather_file'], epJSON_file])
api.state_manager.delete_state(state)

Wenn I don't use the function api.state_manager.delete_state(state) all is good, but with the time the memory give me problems. I like to use V9-6-0 because is faster. Somebudy can help me?

StateManager's delete_state function error

Hi! I worked with EnergyPlus API Python V9-5-0 and all was good. Now, I tried to run the same program with EP API Python V9-6-0 and the function api.state_manager.delete_state(state) present me an error in the lecture of a file. The follow is the messege in the Terminal:

EnergyPlus Starting
EnergyPlus, Version 9.6.0-f420c06a69, YMD=2021.12.09 15:06
Adjusting Air System Sizing
Adjusting Standard 62.1 Ventilation Sizing
Initializing Simulation
Reporting Surfaces
Beginning Primary Simulation
Initializing New Environment Parameters
Warming up {1}
Updating Beam-to-Diffuse Exterior Solar Reflection Factors
Updating Beam-to-Beam Exterior Solar Reflection Factors
Warming up {2}
Warming up {3}
Warming up {4}
Starting Simulation at 07/14/2013 for DDMM
Writing tabular output file results using comma format.
Writing tabular output file results using HTML format.
EnergyPlus Run Time=00hr 00min  1.30sec
EnergyPlus Completed Successfully.
Traceback (most recent call last):
  File "c:\Users\grhen\Documents\GitHub\RLforEP\Main_v2_9_20211204.py", line 104, in <module>
    EMS_prop_v2_9_20211204.init_EPRandomConvergence(conf_experimento, var_case_n)
  File "c:\Users\grhen\Documents\GitHub\RLforEP\EMS_prop_v2_9_20211204.py", line 294, in init_EPRandomConvergence
    runEP(conf_experimento, var_case_n, var_step_n, epJSON_new)
  File "c:\Users\grhen\Documents\GitHub\RLforEP\EMS_prop_v2_9_20211204.py", line 195, in runEP     
    api.state_manager.delete_state(state)
  File "C:\EnergyPlusV9-6-0\pyenergyplus\state.py", line 105, in delete_state
    self.api.stateDelete(state)
OSError: exception: access violation reading 0x0000000000000010

The complete code is very large, but the problem can be see here:

state = api.state_manager.new_state()
api.state_manager.reset_state(state)
api.runtime.callback_begin_zone_timestep_after_init_heat_balance(state, callbackFunction)
api.runtime.run_energyplus(state, ['-d', var_case_n['Folder_Output'], '-w', conf_experimento['Weather_file'], epJSON_file])
api.state_manager.delete_state(state)

Wenn I don't use the function api.state_manager.delete_state(state) all is good, but with the time the memory give me problems. I like to use V9-6-0 because is faster. Somebudy can help me?