Zenmo / zero_engine

This repository contains the 'engine' part of the Zenmo Zero models; the calculation model of the energy system simulation
GNU General Public License v3.0
0 stars 0 forks source link

Reduce memory use of load duration curves: don't store all data per gridconnection, only calculate on-demand. (make getters per duration curve) #29

Closed GillisHommen closed 5 months ago

GillisHommen commented 6 months ago

Only yearly load duration curve should be stored to provide 'previous' result. Or perhaps disable this for GridConnections? (only use for EnergyModel-scope)

GillisHommen commented 5 months ago

Solution in commit 38afcb1df9e93736242e962f6a2580e5b504caf8

Datasets for load duration curves are declared, but not initialized when a GridConnection or GridNode is created. Only when the function f_getDuurkromme() is called are the datasets initialized and the corresponding memory used. If this function is not called, the memory use per gridConnection/gridNode for load duration curves is negligable.