Updated 30 Apr 2019
The toolbox facilitates simultaneous simulation of EnergyPlus and Matlab (co-simulation). The main component is the mlep class containing all the necessary tools to configure and run EnergyPlus co-simulation within the Matlab environment.
* Windows. The toolbox has only been tested for Windows, but considerable preparations for other OS has already been done.
* EnergyPlus installed. You can obtain the software here https://energyplus.net/. If you install the EnergyPlus to the default location ('C:\EnergyPlusVx-x-x') then it might be detected automatically by the toolbox.
* Download and install the toolbox binary from https://github.com/dostaji4/EnergyPlus-co-simulation-toolbox/releases or Mathworks FileExchange.
The toolbox contains:
* Parsing of the IDF file to determine co-simulation inputs/outputs.
* Automatic socket communication configuration (on localhost).
* Background start of the EnergyPlus process with an output to the Matlab command line.
* System Object implementation usable in Matlab & Simulink.
* Bus input/output integration for easy Simulink model setup.
See the GettingStarted.mlx guide delivered with the Matlab toolbox or the documentation residing under Help -> Supplemental Software -> EnergyPlus co-simulation toolbox
Copyright (C) 2018, Jiri Dostal (firstname.lastname@example.org)
All rights reserved.
This software builds on the free software by Truong Nghiem(email@example.com), Willy Bernal (Willy.BernalHeredia@nrel.gov) and several other third-party open-source tools.
Jiri Dostal (2019). EnergyPlus Co-simulation Toolbox (https://www.github.com/dostaji4/EnergyPlus-co-simulation-toolbox), GitHub. Retrieved .
@PaulaVanDenBrom I haven't found myself in such a need so far. Do you need to co-simulate multiple buildings simultaneously? With my only limited knowledge of parallelization, I don't find an extension for parfor trivial. What about having multiple buildings side-by-side in Simulink? I haven't tested this yet, to be honest, but that is one feature I'd like to work! So, be sure to let me know. EnergyPlus simulation is running in a separate OS process. Simulation of several buildings would result in several EnergyPlus processes. And the OS is responsible for loading multiple computation cores (how it does that? I don't have the slightest idea).
Is it possible to convert this code into a parfor loop?
* minor bug in ExternalInterface:Actuator & ExternalInterface:Variable. Working now as intended.
* updated examples to EnergyPlus version 9.1.0
* corrected a bug in the setup routine. Made first time use through Simulink end in a neverending loop.
Added better documentation
* compatibility issues in r18b
forgot to add the update binary
* using Matlab's internal JRE instead of searching for external one.
Adding the binary to the repository code. Hopefully, the Matlab Add-on Explorer will detect it now.
Adding further info. Mainly for manual toolbox installation (The binary is obtainable at GitHub)
Create scripts with code, output, and formatted text in a single executable document.