I don’t have the case file you are using so I can’t duplicate your results, but the creation of an island does not necessarily change the cost, unless it forces a shift to more expensive generation. Have you looked at the dispatch before and after taking out that line? If the objective function value is not changing, then it seems likely that the optimal dispatch before contingency is still feasible after the islanding.
Also, be sure that all islands have a slack/reference bus. Ray > On Feb 28, 2019, at 11:20 PM, tochi nwachuku <too...@gmail.com> wrote: > > > Hello, > > I am having some issues with Matpower results structure while calling a DC > OPF. I disconnect one branch at a time (for loop) and solve for a couple of > variables. I note that disconnection of branch (7-8) creates an island. This > should change the Minimal cost. My algorithm gives the wrong results. Any > help will be appreciated. > > > > define_constants; > mpc=case24_ieee_rts_Reduced; > nl=size(mpc.branch,1); > for lines=1:nl > mpc.branch(lines,BR_STATUS)=0; > r=rundcopf(mpc); > if r.success ==1 > %p(:,lines)=r.branch(:,PF); %% Powerflow > %p(:,lines)=r.bus(:,LAM_P); %% LMP > MCost(:,lines) =r.f; %% Minimal Cost function > end > mpc.branch(lines,BR_STATUS)=1; > > end > > figure; > hold on > for ii = 1:lines > plot(abs(MCost(:,ii))) > end > grid on > > > Cheers > > Tochi