You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for your great work. I'm trying to add new models to the environment but after compiling the FMU it is unclear how to use it. By reading a little bit of the code of the existing ones I have understood that I have to create a enviromnet.py script but is completely unclear how to and in particular how to add it to the factory.py script that is the one in charge of doing the make command. Could you provide some guidelines for it or a tutorial?
Thanks a lot
The text was updated successfully, but these errors were encountered:
Dear Lorenzo, thanks for your interest in Energym! It's a good idea to provide a full tutorial, we will do that, but it might take a while. In the meantime, here are the most important steps:
add your model in the simulation folder in the appropriate category (EnergyPlus or Modelica)
create a folder in energym.envs with the name of your model with an init.py and environment.py in it.
in the environment.py, you have to specify the inputs and outputs as dictionaries, in the INPUTS_SPECS and OUTPUTS_SPECS, and the default kpi options (also as dictionary)
To create a class for your model, either subclass EnvEPlusFMU (if your model is EnergyPlus based) or EnvModFMU (if your model is Modelica based)
Specify fixed attributes of your model (like simulation step size) in the class and pass the flexible attributes (like the simulation start time) in the init.
add the name of your model to the EnvNames enum in env_names.py
import your class in factory.py
in the make function, filter for the name you specified in EnvNames and create one instantiation for the case of the evaluation mode (everything should be fixed there), and one for the normal mode (considering passed keyword arguments in make)
I hope the steps make sense, and I think it is helpful to pick one of the available models to compare how the steps are done there. If you have any questions, feel free to reach out anytime!
Dear,
Thanks for your great work. I'm trying to add new models to the environment but after compiling the FMU it is unclear how to use it. By reading a little bit of the code of the existing ones I have understood that I have to create a
enviromnet.py
script but is completely unclear how to and in particular how to add it to thefactory.py
script that is the one in charge of doing themake
command. Could you provide some guidelines for it or a tutorial?Thanks a lot
The text was updated successfully, but these errors were encountered: