In EnergyPlus you can do this using the EMS (Energy Management System (doc)) scripting facility, which OpenStudio now supports as well. There are also several packages that use this facility to support co-simulation, most notably BCVTB (Building Control Virtual Test Bed).
In EnergyPlus you can do this using the EMS (Energy Management System (doc)) System) scripting facility, which OpenStudio now supports as well. There are also several packages that use this facility to support co-simulation, most notably BCVTB (Building Control Virtual Test Bed).Bed).