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 -0500

kem's avatar

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

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 -0500

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 -0500 )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

Question Tools

1 follower

Stats

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

Seen: 120 times

Last updated: Aug 03