Skip to content

Accelerate singlediode._lambertw #1649

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

Open
cwhanse opened this issue Jan 25, 2023 · 2 comments · May be fixed by #1661
Open

Accelerate singlediode._lambertw #1649

cwhanse opened this issue Jan 25, 2023 · 2 comments · May be fixed by #1661

Comments

@cwhanse
Copy link
Member

cwhanse commented Jan 25, 2023

I've found a way to replace the calculation of the maximum power point in singlediode._lambertw with a more analytic approach. The speedup is not quite 10x, and would make pvsystem.singlediode(...method='lambertw') and pvsystem.singlediode(...method='newton') comparable.

I'm not sure if the maths are new, they might be. In any case, it would not be difficult to document on pvpmc.sandia.gov, if not in a conference paper.

We could remove the golden mean search, or retain it. I lean towards retaining it. The new way would use scipy.optimize.newton which should converge with quite high confidence, but, not guaranteed for some pathological case. golden mean search would always converge.

gist with new method.

@adriesse
Copy link
Member

adriesse commented Feb 1, 2023

I looked at the gist but was unable to get the gist of it. :( But if it works, why not?

@cwhanse
Copy link
Member Author

cwhanse commented Feb 1, 2023

@adriesse fair point, I will document this work before proposing changes to pvlib code.

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

Successfully merging a pull request may close this issue.

3 participants