tum-ens / pyGRETA

python Generator of REnewable Time series and mAps
GNU General Public License v3.0
38 stars 14 forks source link

PV does not seem to work correctly #25

Closed kais-siala closed 5 years ago

kais-siala commented 5 years ago

There were two main errors: 1) The code always returned CF_csp. I could not fully understand why. Instead of writing...

    aux = np.zeros(len(reg_ind[0]))
    aux[filter] = CF_pv
    CF_pv = aux
    aux[filter] = CF_csp
    CF_csp = aux

I added a new line that seemed redundant to me and it worked (= returned CF_pv).

    aux = np.zeros(len(reg_ind[0]))
    aux[filter] = CF_pv
    CF_pv = aux
    aux = np.zeros(len(reg_ind[0]))
    aux[filter] = CF_csp
    CF_csp = aux

I suspect that before, all the names CF_pv, aux and CF_csp used to point to the same thing in the memory.

  1. The filter is incorrect. I turned it off and it works now. I think I filtered the afternoon hours out, which I should not do. This needs to be fixed. Without filtering, the code works but is slow.