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

Revision history [back]

It sounds like the only difference between this question and your other post regarding using EMS for dynamic glazing is that now you have a Genetic Algorithm generating window properties each timestep. If this is done in a separate simulation outside of EnergyPlus in another tool like Matlab, then you can:

  1. write the window properties each timestep from Matlab to a CSV
  2. define a Schedule:File object in your IDF to read that CSV of window properties
  3. use an EMS Sensor for "Schedule Value" of the Schedule:File object to know how to change EMS Construction State using the EMS program each timestep

If the Genetic Algorithm is supposed to work in PARALLEL with EnergyPlus via co-simulation (two simulation engines working with the same building mode each timestep), then you will need to use the Functional Mock-Up Unit (FMU) / Functional Mock-Up Interface (FMI) feature. I haven't used this myself, but from this example in the documentation for an external shading controller there is an ExternalInterface:Actuator object used to link with the EMS:Actuator object.