function P = Electricity_price(Pmin,Pmax,P0,P1std,P2std,T)
P1 = normrnd(0,P1std,1,T+1);%P1std=50
P2 = normrnd(0,P2std,1,T+1);%P2std=500
a =  unifrnd(0,1,1,T+1);
p = 0.031;
for i = 1:length(a)
    if a(i)>p
        a(i) = 0;
    else
        a(i) = 1;
    end
end
P = P0 + P1 + a.*P2;
P = min(max(P,Pmin),Pmax);
end

