I don’t think you want to modify makeSdzip.m at all. Simply modify the bus
loads in a loop, something like …
mpc0 = loadcase('your_base_case_file')
nt = size(P, 2);
cost = zeros(nt, 1);
for t = 1:size(P, 2)
mpc = mpc0;
mpc.bus(:, PD) = P(:, t);
mpc.bus(:, QD) = Q(:, t);
r = runopf(mpc);
cost(t) = r.f;
end
Hope this helps,
Ray
> On Oct 5, 2018, at 10:30 PM, Aamir Nawaz <[email protected]> wrote:
>
> Dear Professor,
> I have executed runpf code with multiple scenarios of generation, wind and
> load. I have change file named "makeSdzip.m" as given below:
> bus(:,PD)=bus(:,PD)+bus(:,PD).*P(:,Ti);bus(:,QD)=bus(:,QD)+bus(:,QD).*Q(:,Ti);
> where P and Q are global variables having expected power contribution from
> each bus.
> I want to do probabilistic OPF. My question is that how can i put this P and
> Q expected values at each bus into calculation of OPF so i can get cost for
> each of scenario separately. Please guide. thanks.
>
> Regards,
> Aamir Nawaz
>