NREL / EnergyPlus

EnergyPlus™ is a whole building energy simulation program that engineers, architects, and researchers use to model both energy consumption and water use in buildings.
https://energyplus.net
Other
1.12k stars 390 forks source link

Refactor WeatherManager data structures to reduce copying and improve cache locality #8926

Open amirroth opened 3 years ago

amirroth commented 3 years ago

Issue overview

WeatherManager does a lot of copying between a temporary weather structure that holds the contents of a single EPW file line, a set of variables for tomorrow's weather, another set of variables for today's weather and a third set of variables for the current weather. Ideally, the weather structure would be the basis of everything. Today and tomorrow would each be arrays of this weather structure (and the arrays would not be indexed by timestep followed by hour, they would be indexed either by hour followed by timestep, or they would be 1D and indexed by a daily timestep). Tomorrow would be copied into today using a move constructor not a deep copy and the current weather would just be a reference to one of today's weather structures.

shorowit commented 1 month ago

Ideally this would also allow weather to be retrieved from any day in EMS programs. Right now, only data for tomorrow is available.