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

EnergyPlusPlugin - How to dispose resources after simulation?

asked 2022-08-01 08:14:12 -0600

kem's avatar

updated 2022-08-01 12:09:36 -0600

Hi, is there any method of EnergyPlusPlugin which is called by E+ before the simulation terminates? Generally, is there any way the plugin instance can recognize the simulation is done?

Why am I asking? I want to correctly dispose resources (=socket) created in the EnergyPlusPlugin instance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-08-03 14:52:53 -0600

I suggest running the API in Library Mode, that way you have a script that calls a function that runs the simulation, and after that function call you can call whatever other function to dispose resources. You could call delete_state, which frees the memory, after your simulation completes, but I think this may happen automatically (?) at the end of a simulation.

    import EnergyPlusAPI as eplus_api
    eplus_api.runtime.run_energyplus(state)
    clear_resources()
edit flag offensive delete link more

Comments

Thank you. The point is we already have quite complex solution using plugin mode. So I am trying to investigate solution with plugin first.

kem's avatar kem  ( 2022-08-06 12:30:18 -0600 )edit
1

So. After waiting a while my conclusion is: There is no way to recognize the simulation is done in the Python Plugin mode.

kem's avatar kem  ( 2022-09-15 05:46:25 -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

1 follower

Stats

Asked: 2022-08-01 08:14:12 -0600

Seen: 199 times

Last updated: Aug 03 '22