nicomignoni / Smart-Grid-Centralized-Opt

Scripts for a university project, a simple centralized smart grid energy cost minimization problem.
MIT License
12 stars 1 forks source link

About erf #1

Open Neiou8 opened 2 years ago

Neiou8 commented 2 years ago

Hi Nicola, excellent work and thanks for making the codes open! I was wondering to know what is the meaning of erf in the gen_PVScenarios.m and what effect does it have.

Yks = zeros(size(Xks));
for i=1:size(Xks, 1)
    for j=1:size(Xks, 2)
        Yks(i,j) = 0.5 * ( 1 + erf( Xks(i,j))/sqrt(2)  );
    end
end

Thank you in advance!

nicomignoni commented 2 years ago

It's a random sequence that is used for computing the inverse of the Beta function later in the code. It has been taken from this paper: N. Vespermann, T. Hamacher and J. Kazempour, "Access Economy for Storage in Energy Communities," in IEEE Transactions on Power Systems, https://doi.org/10.1109/TPWRS.2020.3033999.

Neiou8 commented 2 years ago

Thank you. Does this code refer to the inverse probit function in this paper?I found that after running this part of the code can convert Xks with negative numbers into Yks with all positive numbers. I'm just a little didn't understand the meaning of this part.