cadema-PoliTO / RECOpt

The repository contains a routine that optimizes the operation of a PV system with energy storage for fixed or variable (parametric) sizes for both of them, in the context of collective self-consumption and energy communities in Italy. PV production data are to be provided by the user (PVGIS database can be used), while consumption profiles are generated for an aggregate of households using probabilistic methods.
MIT License
14 stars 1 forks source link

Problem with aggregate_load_profiler method #2

Closed LucaNicoliYT88 closed 1 year ago

LucaNicoliYT88 commented 2 years ago

Ciao,

I am trying to run the simualtion with standard parameters, but there is a problem. When the script is trying to execute the aggregate_load_profiler method, there is a issue wiith sorted_lp array.

quantile_lp_max = sorted_lp[:, nmax] quantile_lp_med = sorted_lp[:, nmed] quantile_lp_min = sorted_lp[:, nmin]

The shape of sorted_lp is (24, 2), but we are trying to extract nmax=2, nmed=1, nmin=0.

I think something went wrong with the creation of sorted_lp.

Can you help me?

Luca

gianmarco-lorenti commented 1 year ago

Hi!

I am sorry for the extreme delay in my answer...

I think the problem is related to the number of households that you are trying to simulate.

If there are only two households (as I think it is, given the shape of sorted_lp), the procedure cannot extract a max, med, min.

It's a bug, but it can be corrected by adding a "safety measure" in aggregate_load_profiler.py that sets nmax to 1 if there are only two households.

Gianmarco

alucard88nicoli commented 1 year ago

Ciao, I am just trying to execute the same version that you uplaod without change nothing.

gianmarco-lorenti commented 1 year ago

I have now modified the file aggregate_load_profile so to solve that bug. It should work no.