Skip to content

A method to solve simulation-based optimization problems using Matlab and EnergyPlus

Notifications You must be signed in to change notification settings

spapadopoulos/EnergyPlusOpt

Repository files navigation

EnergyPlus Optimization

A framework to couple Matlab with EnergyPlus and solve simulation-based optimization problems.

Installation

  • Create environment variables

    1. Set environment variable ENERGYPLUS and point it to the location of the E+ installed folder (e.g. C:\EnergyPlusV8-9-0\ ).
    2. Create IO folder in E+ installation with two subfolders "Input" and "Output".
    3. Copy building.idf in the Input folder.
  • Alter the batch file.

    1. Find RunEPlus batch file in E+ installation.
    2. Replace set program_path=%~dp0 with set program_path="%ENERGYPLUS%".
    3. Replace set input_path=ExampleFiles\ with set input_path=%program_path%IO\Input.
    4. Replace set output_path=ExampleFiles\Outputs\ with set output_path=%program_path%IO\Output\

Functions

idfread(filename) -- Reads and parses IDF file in a structure array.

idfwrite(filename) -- Write IDF file from structure array.

runep(filename, epwfilename) -- Runs E+ process directly in Matlab given .IDF and .EPW (weather) files.

Case study

Problem definition: We try to optimize HVAC heating and cooling set points in office spaces with respect to energy savings and occupants' thermal comfort.

  • HVAC_opt_multiobjective.m -- We formulate the objetive functions as the output of EnergyPlus simulation

  • ga_run.m -- We solve the problem using a genetic algorithm solver (i.e. NSGA-II)

The figure below is an illustration of the optimization process:

alt text

For detailed problem formulation and case study results see here.

Potential extensions

The framework can be applied in a variety of single or multi-objective building energy optimization problems, such as retrofit optimization with respect to energy and first costs, or blind opening and visual comfort to name a few.

About

A method to solve simulation-based optimization problems using Matlab and EnergyPlus

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages