Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Define callbacks (and where to register them) in the Energyplus API for Sinergym environments. #357

Open
1 task done
AlejandroCN7 opened this issue Aug 31, 2023 · 0 comments
Assignees
Labels
BackEnd Simulator and communication interface Feature request

Comments

@AlejandroCN7
Copy link
Collaborator

Feature 🚀

A clear and concise description of the feature proposal.

Motivation

Right now, the interface for sending and receiving simulation data is done with predefined callbacks registered at specific moments of the simulation flow.

The idea is to leave this as it is, since any change can cause the simulation to malfunction. However, functionality could be created to modify these function registers in the environment with the responsibility of the user.

If this is done, it would be convenient to create some kind of property in the environment that allows us to know the current state of which callbacks are defined and at what point in the simulation each one is called.

Solution

One way to accomplish this would be with some method created in the environment layer. In this method, you would specify the callback function you want to register (previously created) and the name of the runtime method of the Energyplus API where you want to register it (only the name in STR, then you would check if it is correct). An example:

collect_obs():
    # The code to read Output:Variables, for example
    pass

env.clear_simulator_callbacks()
env.simulation_registration(collect_obs,'callback_after_predictor_before_hvac_managers')

Checklist

  • I have checked that there is no similar issue in the repo (required)

📝 Please, don't forget to include more labels besides Feature request if it is necessary.

@AlejandroCN7 AlejandroCN7 added BackEnd Simulator and communication interface Feature request labels Aug 31, 2023
@AlejandroCN7 AlejandroCN7 self-assigned this Aug 31, 2023
@AlejandroCN7 AlejandroCN7 changed the title [Feature]: Define callbacks (and where to register them) in the Energyplus API for Synergym environments. [Feature]: Define callbacks (and where to register them) in the Energyplus API for Sinergym environments. Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BackEnd Simulator and communication interface Feature request
Projects
None yet
Development

No branches or pull requests

1 participant