Ray, thank you for your suggestion. After adding the gencost matrix, the RUNOPF for each distribution power system case runs correctly!
Thanks for your suggestion!! Appreciate it! Jane On Mon, Nov 26, 2018 at 4:21 PM Ray Zimmerman <r...@cornell.edu> wrote: > If you look at the actual error messages the reason for each failure > should be clear. In some cases, the case file does not include a gencost > field (you would have to provide your own costs if you want to run an OPF) > and in other cases you have typos in the name of the case (trailing space > inside the single quotes). > > Ray > > On Nov 26, 2018, at 2:23 PM, Jane Cheung <cheung180...@gmail.com> wrote: > > Ray, > Thanks for you fixed the problem related with the CASE33BW > The matpower 7.0b1 could not solve the RUNOPF with all the distribution > power system case except the one you fixed. The outputs in command window > are listed is blowing: > > Best regards! > > > ___________________________________________________ > > runopf('case4_dist') > Reference to non-existent field 'gencost'. > > Error in opf_args (line 188) > deal(mpc.baseMVA, mpc.bus, mpc.gen, mpc.branch, mpc.gencost); > > Error in opf (line 181) > [mpc, mpopt] = opf_args(varargin{:}); > > Error in runopf (line 75) > [r, success] = opf(casedata, mpopt); > > >> runopf('case18') > Reference to non-existent field 'gencost'. > > Error in opf_args (line 188) > deal(mpc.baseMVA, mpc.bus, mpc.gen, mpc.branch, mpc.gencost); > > Error in opf (line 181) > [mpc, mpopt] = opf_args(varargin{:}); > > Error in runopf (line 75) > [r, success] = opf(casedata, mpopt); > > >> runopf('case22') > Reference to non-existent field 'gencost'. > > Error in opf_args (line 188) > deal(mpc.baseMVA, mpc.bus, mpc.gen, mpc.branch, mpc.gencost); > > Error in opf (line 181) > [mpc, mpopt] = opf_args(varargin{:}); > > Error in runopf (line 75) > [r, success] = opf(casedata, mpopt); > > >> runopf('case69') > Reference to non-existent field 'gencost'. > > Error in opf_args (line 188) > deal(mpc.baseMVA, mpc.bus, mpc.gen, mpc.branch, mpc.gencost); > > Error in opf (line 181) > [mpc, mpopt] = opf_args(varargin{:}); > > Error in runopf (line 75) > [r, success] = opf(casedata, mpopt); > > >> runopf('case85 ') > Error using loadcase (line 190) > loadcase: specified case not in MATLAB's search path > > Error in opf_args (line 186) > mpc = loadcase(casefile); > > Error in opf (line 181) > [mpc, mpopt] = opf_args(varargin{:}); > > Error in runopf (line 75) > [r, success] = opf(casedata, mpopt); > > >> runopf('case141 ') > Error using loadcase (line 190) > loadcase: specified case not in MATLAB's search path > > Error in opf_args (line 186) > mpc = loadcase(casefile); > > Error in opf (line 181) > [mpc, mpopt] = opf_args(varargin{:}); > > Error in runopf (line 75) > [r, success] = opf(casedata, mpopt); > > On Mon, Nov 26, 2018 at 12:08 PM Ray Zimmerman <r...@cornell.edu> wrote: > >> Thanks. I am now able to reproduce it. It is only an issue on versions of >> Matlab prior to R2016b (v9.1). I should have fix on the master branch on >> GitHub shortly. Follow issue 53 >> <https://mailtrack.io/trace/link/feb55bb9dc1219aa89fe791c5d00c36fdc59e1ab?url=https%3A%2F%2Fgithub.com%2FMATPOWER%2Fmatpower%2Fissues%2F53&userId=3378854&signature=f6914ec1c78fd0ad> >> for >> details. >> >> Ray >> >> >> On Nov 24, 2018, at 1:36 PM, Jane Cheung <cheung180...@gmail.com> wrote: >> >> >> Ray, thanks for your reply! >> Below are the results of the output of the mpver: >> (Appreciate it again!) >> >> *************************************************************************************************** >> >> >> mpver >> >> MATPOWER Version 7.0b1 31-Oct-2018 >> MATLAB Version 9.0 10-Feb-2016 Release: >> (R2016a) >> Optimization Toolbox Version 7.4 10-Feb-2016 Release: >> (R2016a) >> MIPS Version 1.3 30-Oct-2018 >> MOST Version 1.0.1 30-Oct-2018 >> SDP_PF Version 1.0 17-Jan-2014 >> YALMIP Version 20180817 17-Aug-2018 >> BPMPD_MEX -- not installed -- >> CLP -- not installed -- >> CPLEX -- not installed -- >> GLPK -- not installed -- >> Gurobi Version 8.0.1 >> IPOPT -- not installed -- >> KNITRO -- not installed -- >> MINOPF -- not installed -- >> MOSEK Version 8.1.0.62 04-Sep-2018 >> PARDISO -- not installed -- >> PDIPMOPF -- not installed -- >> SCPDIPMOPF -- not installed -- >> SDPT3 -- not installed -- >> SeDuMi -- not installed -- >> TRALMOPF -- not installed -- >> Architecture: PCWIN64 >> >> MATPOWER 7.0b1 is distributed under the 3-clause BSD License. >> Please see the LICENSE file for details. >> >> On Thu, Nov 22, 2018 at 12:31 AM Ray Zimmerman <r...@cornell.edu> wrote: >> >>> I am not able to reproduce the error on my machine. Can you send the >>> output of mpver? >>> >>> Ray >>> >>> >>> On Nov 21, 2018, at 3:28 PM, Jane Cheung <cheung180...@gmail.com> wrote: >>> >>> I could also do it using old version >>> It could not be done using the new version >>> >>> On Wed, Nov 21, 2018 at 4:20 PM Ilias Sarantakos < >>> il.saranta...@gmail.com> wrote: >>> >>>> Hi Jane, >>>> >>>> I have an older version of MATPOWER and it is ok. Please see below. >>>> Have you modified anything? >>>> >>>> >>>> MATPOWER Version 6.1-dev, 25-May-2017 -- AC Optimal Power Flow >>>> MATLAB Interior Point Solver -- MIPS, Version 1.2, 20-Mar-2015 >>>> (using built-in linear solver) >>>> Converged! >>>> >>>> Converged in 8.23 seconds >>>> Objective Function Value = 78.35 $/hr >>>> >>>> ================================================================================ >>>> | System >>>> Summary | >>>> >>>> ================================================================================ >>>> >>>> How many? How much? P (MW) Q >>>> (MVAr) >>>> --------------------- ------------------- ------------- >>>> ----------------- >>>> Buses 33 Total Gen Capacity 10.0 -10.0 to >>>> 10.0 >>>> Generators 1 On-line Capacity 10.0 -10.0 to >>>> 10.0 >>>> Committed Gens 1 Generation (actual) 3.9 2.4 >>>> Loads 32 Load 3.7 2.3 >>>> Fixed 32 Fixed 3.7 2.3 >>>> Dispatchable 0 Dispatchable -0.0 of -0.0 -0.0 >>>> Shunts 0 Shunt (inj) -0.0 0.0 >>>> Branches 37 Losses (I^2 * Z) 0.20 0.14 >>>> Transformers 0 Branch Charging (inj) - 0.0 >>>> Inter-ties 0 Total Inter-tie Flow 0.0 0.0 >>>> Areas 1 >>>> >>>> Minimum Maximum >>>> ------------------------- >>>> -------------------------------- >>>> Voltage Magnitude 0.913 p.u. @ bus 18 1.000 p.u. @ bus 1 >>>> Voltage Angle -0.50 deg @ bus 18 0.50 deg @ bus 30 >>>> P Losses (I^2*R) - 0.05 MW @ line 2-3 >>>> Q Losses (I^2*X) - 0.03 MVAr @ line 5-6 >>>> Lambda P 20.00 $/MWh @ bus 1 22.95 $/MWh @ bus 18 >>>> Lambda Q 0.00 $/MWh @ bus 1 2.05 $/MWh @ bus 33 >>>> >>>> >>>> ================================================================================ >>>> | Bus >>>> Data | >>>> >>>> ================================================================================ >>>> Bus Voltage Generation Load >>>> Lambda($/MVA-hr) >>>> # Mag(pu) Ang(deg) P (MW) Q (MVAr) P (MW) Q (MVAr) >>>> P Q >>>> ----- ------- -------- -------- -------- -------- -------- >>>> ------- ------- >>>> 1 1.000 0.000* 3.92 2.44 - - >>>> 20.000 - >>>> 2 0.997 0.014 - - 0.10 0.06 >>>> 20.096 0.059 >>>> 3 0.983 0.096 - - 0.09 0.04 >>>> 20.559 0.353 >>>> 4 0.975 0.162 - - 0.12 0.08 >>>> 20.807 0.527 >>>> 5 0.968 0.228 - - 0.06 0.03 >>>> 21.056 0.703 >>>> 6 0.950 0.134 - - 0.06 0.02 >>>> 21.597 1.098 >>>> 7 0.946 -0.096 - - 0.20 0.10 >>>> 21.671 1.137 >>>> 8 0.941 -0.060 - - 0.20 0.10 >>>> 21.871 1.231 >>>> 9 0.935 -0.133 - - 0.06 0.02 >>>> 22.106 1.341 >>>> 10 0.929 -0.196 - - 0.06 0.02 >>>> 22.325 1.446 >>>> 11 0.928 -0.189 - - 0.04 0.03 >>>> 22.362 1.464 >>>> 12 0.927 -0.177 - - 0.06 0.04 >>>> 22.427 1.495 >>>> 13 0.921 -0.269 - - 0.06 0.04 >>>> 22.660 1.602 >>>> 14 0.919 -0.347 - - 0.12 0.08 >>>> 22.738 1.637 >>>> 15 0.917 -0.385 - - 0.06 0.01 >>>> 22.796 1.656 >>>> 16 0.916 -0.408 - - 0.06 0.02 >>>> 22.853 1.678 >>>> 17 0.914 -0.485 - - 0.06 0.02 >>>> 22.925 1.708 >>>> 18 0.913 -0.495 - - 0.09 0.04 >>>> 22.949 1.718 >>>> 19 0.997 0.004 - - 0.09 0.04 >>>> 20.111 0.066 >>>> 20 0.993 -0.063 - - 0.09 0.04 >>>> 20.215 0.112 >>>> 21 0.992 -0.083 - - 0.09 0.04 >>>> 20.234 0.121 >>>> 22 0.992 -0.103 - - 0.09 0.04 >>>> 20.251 0.128 >>>> 23 0.979 0.065 - - 0.09 0.05 >>>> 20.674 0.409 >>>> 24 0.973 -0.024 - - 0.42 0.20 >>>> 20.885 0.510 >>>> 25 0.969 -0.067 - - 0.42 0.20 >>>> 20.992 0.561 >>>> 26 0.948 0.173 - - 0.06 0.03 >>>> 21.659 1.160 >>>> 27 0.945 0.229 - - 0.06 0.03 >>>> 21.739 1.245 >>>> 28 0.934 0.312 - - 0.06 0.02 >>>> 22.030 1.568 >>>> 29 0.926 0.390 - - 0.12 0.07 >>>> 22.239 1.814 >>>> 30 0.922 0.496 - - 0.20 0.60 >>>> 22.347 1.955 >>>> 31 0.918 0.411 - - 0.15 0.07 >>>> 22.495 2.029 >>>> 32 0.917 0.388 - - 0.21 0.10 >>>> 22.526 2.045 >>>> 33 0.917 0.380 - - 0.06 0.04 >>>> 22.534 2.050 >>>> -------- -------- -------- -------- >>>> Total: 3.92 2.44 3.72 2.30 >>>> >>>> >>>> ================================================================================ >>>> | Branch >>>> Data | >>>> >>>> ================================================================================ >>>> Brnch From To From Bus Injection To Bus Injection Loss >>>> (I^2 * Z) >>>> # Bus Bus P (MW) Q (MVAr) P (MW) Q (MVAr) P (MW) >>>> Q (MVAr) >>>> ----- ----- ----- -------- -------- -------- -------- -------- >>>> -------- >>>> 1 1 2 3.92 2.44 -3.91 -2.43 >>>> 0.012 0.01 >>>> 2 2 3 3.44 2.21 -3.39 -2.18 >>>> 0.052 0.03 >>>> 3 3 4 2.36 1.68 -2.34 -1.67 >>>> 0.020 0.01 >>>> 4 4 5 2.22 1.59 -2.20 -1.58 >>>> 0.019 0.01 >>>> 5 5 6 2.14 1.55 -2.11 -1.52 >>>> 0.038 0.03 >>>> 6 6 7 1.10 0.53 -1.09 -0.52 >>>> 0.002 0.01 >>>> 7 7 8 0.89 0.42 -0.89 -0.42 >>>> 0.005 0.00 >>>> 8 8 9 0.69 0.32 -0.68 -0.32 >>>> 0.004 0.00 >>>> 9 9 10 0.62 0.30 -0.62 -0.29 >>>> 0.004 0.00 >>>> 10 10 11 0.56 0.27 -0.56 -0.27 >>>> 0.001 0.00 >>>> 11 11 12 0.52 0.24 -0.51 -0.24 >>>> 0.001 0.00 >>>> 12 12 13 0.45 0.21 -0.45 -0.21 >>>> 0.003 0.00 >>>> 13 13 14 0.39 0.17 -0.39 -0.17 >>>> 0.001 0.00 >>>> 14 14 15 0.27 0.09 -0.27 -0.09 >>>> 0.000 0.00 >>>> 15 15 16 0.21 0.08 -0.21 -0.08 >>>> 0.000 0.00 >>>> 16 16 17 0.15 0.06 -0.15 -0.06 >>>> 0.000 0.00 >>>> 17 17 18 0.09 0.04 -0.09 -0.04 >>>> 0.000 0.00 >>>> 18 2 19 0.36 0.16 -0.36 -0.16 >>>> 0.000 0.00 >>>> 19 19 20 0.27 0.12 -0.27 -0.12 >>>> 0.001 0.00 >>>> 20 20 21 0.18 0.08 -0.18 -0.08 >>>> 0.000 0.00 >>>> 21 21 22 0.09 0.04 -0.09 -0.04 >>>> 0.000 0.00 >>>> 22 3 23 0.94 0.46 -0.94 -0.46 >>>> 0.003 0.00 >>>> 23 23 24 0.85 0.41 -0.84 -0.40 >>>> 0.005 0.00 >>>> 24 24 25 0.42 0.20 -0.42 -0.20 >>>> 0.001 0.00 >>>> 25 6 26 0.95 0.97 -0.95 -0.97 >>>> 0.003 0.00 >>>> 26 26 27 0.89 0.95 -0.88 -0.95 >>>> 0.003 0.00 >>>> 27 27 28 0.82 0.92 -0.81 -0.91 >>>> 0.011 0.01 >>>> 28 28 29 0.75 0.89 -0.75 -0.88 >>>> 0.008 0.01 >>>> 29 29 30 0.63 0.81 -0.62 -0.81 >>>> 0.004 0.00 >>>> 30 30 31 0.42 0.21 -0.42 -0.21 >>>> 0.002 0.00 >>>> 31 31 32 0.27 0.14 -0.27 -0.14 >>>> 0.000 0.00 >>>> 32 32 33 0.06 0.04 -0.06 -0.04 >>>> 0.000 0.00 >>>> 33 21 8 0.00 0.00 0.00 0.00 >>>> 0.000 0.00 >>>> 34 9 15 0.00 0.00 0.00 0.00 >>>> 0.000 0.00 >>>> 35 12 22 0.00 0.00 0.00 0.00 >>>> 0.000 0.00 >>>> 36 18 33 0.00 0.00 0.00 0.00 >>>> 0.000 0.00 >>>> 37 25 29 0.00 0.00 0.00 0.00 >>>> 0.000 0.00 >>>> -------- >>>> -------- >>>> Total: >>>> 0.203 0.14 >>>> >>>> >>>> ================================================================================ >>>> | Voltage >>>> Constraints | >>>> >>>> ================================================================================ >>>> Bus # Vmin mu Vmin |V| Vmax Vmax mu >>>> ----- -------- ----- ----- ----- -------- >>>> 1 0.000 1.000 1.000 1.000 9.536 >>>> >>>> >>>> Kind regards, >>>> >>>> Ilias Sarantakos >>>> PhD Student >>>> Newcastle University, UK >>>> >>>> Στις Τετ, 21 Νοε 2018 στις 10:09 μ.μ., ο/η Jane Cheung < >>>> cheung180...@gmail.com> έγραψε: >>>> >>>>> mpc=loadcase('case33bw'); >>>>> runopf(mpc) >>>>> Error using + >>>>> Matrix dimensions must agree. >>>>> >>>>> Error in opf_setup (line 212) >>>>> cpg(ip1) = cpg(ip1) + pcost(ip1, COST) * baseMVA; >>>>> >>>>> Error in opf (line 225) >>>>> om = opf_setup(mpc, mpopt); >>>>> >>>>> Error in runopf (line 75) >>>>> [r, success] = opf(casedata, mpopt); >>>>> >>>>> >>>>> there is still wrong with it >>>>> >>>>> >>>>> On Wed, Nov 21, 2018 at 12:59 PM Jane Cheung <cheung180...@gmail.com> >>>>> wrote: >>>>> >>>>>> the command are below: >>>>>> >>>>>> >> *runopf('case33bw')* >>>>>> *Error using + * >>>>>> *Matrix dimensions must agree.* >>>>>> >>>>>> *Error in opf_setup (line 212)* >>>>>> * cpg(ip1) = cpg(ip1) + pcost(ip1, COST) * baseMVA;* >>>>>> >>>>>> *Error in opf (line 225)* >>>>>> *om = opf_setup(mpc, mpopt);* >>>>>> >>>>>> *Error in runopf (line 75)* >>>>>> *[r, success] = opf(casedata, mpopt);* >>>>>> >>>>>> Jane >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> On Wed, Nov 21, 2018 at 12:27 PM Alex David <alex.david1...@gmx.com> >>>>>> wrote: >>>>>> >>>>>>> Hi Jane, >>>>>>> >>>>>>> Could you share the error message and the case file (maybe)? Then it >>>>>>> will be easy to learn the reason. >>>>>>> >>>>>>> AD >>>>>>> >>>>>>> *Sent:* Wednesday, November 21, 2018 at 7:21 PM >>>>>>> *From:* "Jane Cheung" <cheung180...@gmail.com> >>>>>>> *To:* "MATPOWER discussion forum" <matpowe...@list.cornell.edu> >>>>>>> *Subject:* Re: problem of solving the OPF in distribution system >>>>>>> I just use the case data in matpower, something went wrong >>>>>>> >>>>>>> On Wed, Nov 21, 2018 at 11:01 AM Alex David <alex.david1...@gmx.com> >>>>>>> wrote: >>>>>>> >>>>>>>> Hi Jane, >>>>>>>> >>>>>>>> I would suggest to have a look at the casefile (your distribution >>>>>>>> system case). >>>>>>>> >>>>>>>> Kind regards, >>>>>>>> AD >>>>>>>> >>>>>>>> *Sent:* Wednesday, November 21, 2018 at 3:19 PM >>>>>>>> *From:* "Jane Cheung" <cheung180...@gmail.com> >>>>>>>> *To:* matpower-l@cornell.edu, matpowe...@list.cornell.edu >>>>>>>> *Subject:* problem of solving the OPF in distribution system >>>>>>>> Hi Ray, >>>>>>>> >>>>>>>> While I was using the MATPOWER 7.0b1 to run the command below: >>>>>>>> * runopf('filename')* >>>>>>>> * where filename is the distribution power system case, >>>>>>>> All the distribution case system could not be solved and some error >>>>>>>> came . >>>>>>>> >>>>>>>> What changes have been made to the new version of matpower? If the >>>>>>>> OPF problem for distribution power systems would like to be solved, >>>>>>>> how to >>>>>>>> deal with that? >>>>>>>> >>>>>>>> Best regards! >>>>>>>> >>>>>>>> Jane >>>>>>>> >>>>>>> >>> >> >