Hai Ning Xie,
Its working fine for me. Here I am giving the test results for three
different cases.
--------------------------------------------------------------
>> mpc=loadcase('case9');
>> mpopt=mpoption('PF_DC',1);
>> [r, success] = opf(mpc, mpopt);
MATPOWER Version 4.0b2, 19-Mar-2010 -- DC Optimal Power Flow
Matlab Interior Point Solver -- MIPS, Version 1.0b2, 19-Mar-2010
Converged!
>> mpc=loadcase('case30');
>> [r, success] = opf(mpc, mpopt);
MATPOWER Version 4.0b4, 21-May-2010 -- DC Optimal Power Flow
MATLAB Interior Point Solver -- MIPS, Version 1.0b4, 21-May-2010
Converged!
>> mpc=loadcase('case300');
>> [r, success] = opf(mpc, mpopt);
MATPOWER Version 4.0b4, 21-May-2010 -- DC Optimal Power Flow
MATLAB Interior Point Solver -- MIPS, Version 1.0b4, 21-May-2010
Converged!
----------------------Possible ways to fix this error ---------------
1. Can you check you data file, which has any modified elements?
2. Check the Matlab root directory from where you are running the program.
(bcz it may take files from local directory if available.)
3. You can upload your matlab data file to this forum, so that other can
check and update you.
----------------------------------------------------------------------------------
2010/7/19 <[email protected]>
> Hi all,
>
> Recently I've been using Matpower 4.0b4 to simulate AC OPF and DC OPF. When
> I calculate AC OPF, there's no problem. However, when I calculate DC OPF
> (for example, case9), the following message appears:
>
> ??? Error using ==> mtimes
> Inner matrix dimensions must agree.
>
> Error in ==> dcopf_solver at 217
> branch(:, PF) = (Bf * Va + Pfinj) * baseMVA;
>
> Error in ==> opf_execute at 72
> [results, success, raw] = dcopf_solver(om, mpopt);
>
> Error in ==> opf at 225
> [results, success, raw] = opf_execute(om, mpopt);
>
> Error in ==> runopf at 96
> [r, success] = opf(casedata, mpopt);
>
> Did anyone find the same problem? How can I solve it?
>
> Thanks in advance!
>
>
> ------------------------------------
> Ing. Ning Xie
> POLITECNICO DI TORINO
> Dipartimento di Ingegneria Elettrica
> Corso Duca degli Abruzzi, 24
> 10129 TORINO - ITALY
> Tel +39 011 090 7117
> Fax +39 011 090 7199
> E-mail [email protected]
>
>
>
--
-------------------------------------------------------------
WITH REGARDS,
V.RAVIKUMAR PANDI,
-------------------------------------------------------------
HAVE A NICE DAY
-------------------------------------------------------------