I think the base case has the generator at bus 8 turned off, while the target case has it ON. My guess is this is causing problems in the CPF when creating the transfer vectors due to differences in sizes of the Pg/Qg. Can you keep the generator ON at bus 8 in the base case with zero real and reactive power output to mimic an OFF generator and rerun your code.
Btw, please ALWAYS copy/paste the ENTIRE error message MATLAB dumps out. This will be helpful in debugging the problem. Shri From: Akash Tyagi <akashtyagi0...@gmail.com<mailto:akashtyagi0...@gmail.com>> Reply-To: MATPOWER discussion forum <matpowe...@list.cornell.edu<mailto:matpowe...@list.cornell.edu>> Date: Thursday, April 13, 2017 at 12:36 AM To: MATPOWER discussion forum <matpowe...@list.cornell.edu<mailto:matpowe...@list.cornell.edu>> Subject: regarding CPF Thanks for solving the problem. Now my CPF is running, but there is one more problem. I have successfully run the CPF for my case30aaa and i found the the minimum bus voltage is at bus-8, and now i want to inject reactive power at this bus in order to reduce the losses, and make the status of the generatoe ON. I did the following steps, but it fails. clc clear close all; define_constants; mpopt=mpoption('out.all',-1,'verbose',2); mpopt=mpoption(mpopt,'cpf.stop_at','NOSE','cpf.step',0.2); mpopt=mpoption(mpopt,'cpf.plot.level',2); mpcb=loadcase(case30aaa); mpct=mpcb; mpct.bus(:,[PD,QD])=mpcb.bus(:,[PD,QD])*5; % increasing the load by 5 mpct.gen(8,QG)=mpcb.gen(8,QG)+10; mpcb.gen(8,GEN_STATUS)=1; runopf(mpcb) [results,success]=runcpf(mpcb,mpct,mpopt);