Dear MATPOWER team,

I managed to modify an OPF in a meshed AC/DC grid by adding a linear constraint 
after setup_opf and add_constraint. The grid contains AC and DC lines as well 
as isolated nodes. However I get an error due to dimensional problems when I 
want to convert the data back to external numbering. The error occurs because 
of the isolated nodes. If I am not using them, the code works. Can you help me?

Thank you very much.

mpc = loadcase('testcase');
mpc = toggle_dcline(mpc, 'on');
mpc=ext2int(mpc);
om=opf_setup(mpc, mpopt);
om=add_constraints(om, 'PDC', A_Pg_DC, l, u, {'Pg'});
[results, success, raw]=opf_execute(om, mpopt);

results=int2ext(results); %%this causes the error

??? Error using ==> horzcat
CAT arguments dimensions are not consistent.

Error in ==> int2ext at 108
                mpc.bus = [mpc.bus zeros(nr,
                nc-size(mpc.bus,2))];

Error in ==> Optimierung at 104
results=int2ext(results);

Kind regards
Samuel Schilling

Reply via email to