Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Value error when running case30pwl for OPF #17

Open
rwl opened this issue May 12, 2015 · 0 comments
Open

Value error when running case30pwl for OPF #17

rwl opened this issue May 12, 2015 · 0 comments

Comments

@rwl
Copy link
Owner

rwl commented May 12, 2015

As reported by Minjiang Chen on the mailing list:

But when I tried to run OPF for the ‘case30pwl’, I has an error which I will show details below. I also tried to run with PF for the ‘case30pwl’, it is fine.

And I also run other cases which are using the polynomial ‘gencost’, they are all working on opf mode.

Here are the code I run:

from pypower.api import runopf, loadcase

ppc = loadcase('case30pwl')
r = runopf(ppc)

Here are the error I got:

            PYPOWER Version 4.1.2, 27-Oct-2014 -- AC Optimal Power Flow

Traceback (most recent call last):

            File "D:\Minjiang\PhD\Research Progress\Programming\PyPower\Work1\Test5.py", line 13, in <module>
             r = runopf(ppc)
            File "C:\Python27\lib\site-packages\pypower-4.1.2-py2.7.egg\pypower\runopf.py", line 44, in runopf
             r = opf(casedata, ppopt)
            File "C:\Python27\lib\site-packages\pypower-4.1.2-py2.7.egg\pypower\opf.py", line 185, in opf
            results, success, raw = opf_execute(om, ppopt)
            File "C:\Python27\lib\site-packages\pypower-4.1.2-py2.7.egg\pypower\opf_execute.py", line 94, in opf_execute
            results, success, raw = pipsopf_solver(om, ppopt)
            File "C:\Python27\lib\site-packages\pypower-4.1.2-py2.7.egg\pypower\pipsopf_solver.py", line 147, in pipsopf_solver
            solution = pips(f_fcn, x0, A, l, u, xmin, xmax, gh_fcn, hess_fcn, opt)
            File "C:\Python27\lib\site-packages\pypower-4.1.2-py2.7.egg\pypower\pips.py", line 275, in pips
            f, df = f_fcn(x)                 # cost
         File "C:\Python27\lib\site-packages\pypower-4.1.2-py2.7.egg\pypower\pipsopf_solver.py", line 143, in <lambda>
            f_fcn = lambda x, return_hessian=False: opf_costfcn(x, om, return_hessian)
            File "C:\Python27\lib\site-packages\pypower-4.1.2-py2.7.egg\pypower\opf_costfcn.py", line 118, in opf_costfcn
            df_dPgQg[ipol] = baseMVA * polycost(gencost[ipol, :], xx[ipol], 1)
            File "C:\Python27\lib\site-packages\pypower-4.1.2-py2.7.egg\pypower\polycost.py", line 48, in polycost
            maxN = max( gencost[:, NCOST].astype(int) )

ValueError: max() arg is an empty sequence

I didn’t change anything in the ‘case30pwl’.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant