-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Use chandrupatla to find MPP in lambertw method #2571
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
base: main
Are you sure you want to change the base?
Conversation
Restart of #2567 |
Pursuing the test failures, one condition tested is
Here, Evaluating at Digging deeper, We could set small negative current to zero in I think intercepting small photocurrent and skipping the MPP (or entire IV curve) calculation is better. Your thoughts? |
I think this is probably fine, although the indexing is going to make the code clunky. A possible alternative: instead of |
This is the way. And reverting from |
Weird test failure seemingly unrelated to these code changes. |
I think it is related. The failing test has negative Would truncating negative |
Co-authored-by: Kevin Anderson <kevin.anderso@gmail.com>
Thanks, I was missing how the test failure related to the changes in this PR. That fixture evaluates the CEC model via the model chain. The failure exposed additional issues however:
The test fails because of the NaN at the second time step in the AC series:
Apparently, prior to numpy 2.X, the assert was OK (the ubuntu conda min test passes). For the life of me I can't see why this test wasn't failing on the last few PRs that also use numpy 2.X. The NaNs are introduced in the AC series in pvlib-python/pvlib/inverter.py Line 321 in 28ea577
Upstream, there are numeric values in Why is a NaN also in the first line, where the DC values look reasonable? Because the test system is malformed. The test system pairs a single 220W module with a 3kW inverter. I think the fixes here is to repair the test: replace the above assert so that it handles NaN, and correct this fixture so that a reasonable AC power is output for the first time step: pvlib-python/tests/test_modelchain.py Line 129 in 28ea577
|
optimize.elementwise
functions #2497[ ] Tests added[ ] Updates entries indocs/sphinx/source/reference
for API changes.docs/sphinx/source/whatsnew
for all changes. Includes link to the GitHub Issue with:issue:`num`
or this Pull Request with:pull:`num`
. Includes contributor name and/or GitHub username (link with:ghuser:`user`
).remote-data
) and Milestone are assigned to the Pull Request and linked Issue.Uses
'chandrupatla'
when scipy>=1.15. Existing tests are good enough.