When I run the below script (which computes pwl cost functions from the
default gencost data), the default OPF algorithm compared to the SDP OPF
algorithm return different success codes. Basically, the SDP approach does
not solve.
For the SDP approach, I'm currently using MATPOWER version 5.0b1, SDPOPF
version 1.0, and Sedumi version 1.21.
What am I doing wrong here? Thanks, Anya
------------------------------------------------------------------------------------
function pwl_costs()
x = case14;
segments = 10;
gens = length(x.gencost(:,1));
tmp = zeros(gens,14);
tmp(:,1) = ones(gens,1);
tmp(:,4) = segments*ones(gens,1);
iter = 4;
for i=1:segments
Pg = (i-1)*((x.gen(:,9)-x.gen(:,10))/segments) + x.gen(:,10);
iter = iter + 1;
tmp(:,iter) = Pg;
iter = iter + 1;
tmp(:,iter) = x.gencost(:,5).*Pg.^2 + x.gencost(:,6).*Pg;
end
x.gencost = tmp;
solOPF = runopf(x)
solSDPOPF = runsdpopf(x)
end