Replies: 7 comments 15 replies
-
If move PVMM to PVlib, then let pvlib can calculate electrical shading losses easily like PVsyst, I will vote this action. |
Beta Was this translation helpful? Give feedback.
-
It would be great to have a similar functionality in pvlib using the single-diode model. I don't know enough about pvmismatch to comment on the options, but I'm guessing the single-diode model would require a rewrite. In response to Joel Spolsky: There's an exception to every rule. (Anyway, we're not a software company.) |
Beta Was this translation helpful? Give feedback.
-
@mikofski are you proposing 1. forking the project to a repository under the pvlib organization or 2. adding a subpackage to pvlib python? I thought you were advocating for option 1 but wanted to double check. That's easy and I support that. Option 2 would be harder. |
Beta Was this translation helpful? Give feedback.
-
I think it is a great idea to bring PVMM (somehow) under pvlib. The exposure brought by adding PVMM to plvib would already play an important role in saving PVMM. More people would know about it and more would realize what it can offer, thus more people would consider to contribute to it. Regarding the rewrite/refactor question: if I follow @mikofski's requirements, then I think this case is much closer to the refactor option:
Maybe an argument for "rewrite" can be to make the structure and format of PVMM more similar to pvlib's code. An additional aspect to consider, a bit connected to @yangangky's comment: |
Beta Was this translation helpful? Give feedback.
-
My $0.03 (inflation adjusted opinions) I gave up on #117. Honestly, I think PVMM needs a rather thorough re-engineering. You can call that refactoring, or reimplementation, if you'd like. The just-in-time computation in PVMM may have performance advantages but it makes it nearly impossible to reconstruct a PVMM calculation using other code. The PVMM parameter interface is a bit unconventional for most PV modelers. I'm not saying PVMM doesn't produce correct results, just that the way it is constructed is a barrier to extending and integrating PVMM with pvlib-python. I think the modeling community would benefit from PVMM 2.0, that is built from the ground up to offer options for the diode model, can make use of common diode model parameter sets (from CEC and Pvsyst), and allows options for cell temperature models. I think that both pvlib and PVMM 2.0 would benefit if PVMM 2.0 was part of the pvlib organization. I don't think that PVMM would be as successful as a module within pvlib-python as it would as a separate package. In my view, PVMM is more of an application built to solve a specific set of problems, rather than a library that prioritizes flexible re-use. There are parts of PVMM that would be great to move to pvlib-python, e.g., functions to sum IV curves for cells connected in series and parallel. Other parts (interfaces to spatially variable irradiance calculators) are better maintained separate from pvlib. |
Beta Was this translation helpful? Give feedback.
-
@mikofski @wholmgren @cwhanse @adriesse @shirubana @adambgnr @kanderso-nrel @yangangky |
Beta Was this translation helpful? Give feedback.
-
@mikofski |
Beta Was this translation helpful? Give feedback.
-
Dear @chetan201 , @cwhanse , @shirubana , @kanderso-nrel , @bmeyers , @mdeceglie , @adriesse , and any and all others,
PVMismatch (PVMM) may not the best software, but it is mismatch software that makes it much easier than SPICE to model system IV curves at the cell level by tweaking any cell parameter like irradiance, temperature, series & shunt resistance, short circuit current, dark saturation current, etc. However, if you look at its pulse it appears dead. Its last period of significant contributions was in 2017, when contributions peaked at about 10 commits over a few days. Look at recent commits and there's been only 3 in the past year. Finally here are 4 outstanding PR's that haven't been reviewed and no sign of when they might be merged. What I'm trying to say is that I think this project is dead, or at least it's dead to the public.
So the question is, should we let it die? If so, does it need replacement? Is there a need for a PVMM2? Or another option would be to move it away from SunPower and under pvlib. My vote would be for the latter. According to Joel Spolsky, old code is always better than new code, by its very definition that it's already matured, and he blogged about why its nearly always a bad idea to consider a complete rewrite in "things you should never do, part 1". So I don't think we should let it die, and if a PVMM2 is in the works then I think it should be a fork of PVMM.
Potential talking points
SunPower
If SunPower has any proprietary processes that rely on freezing this particular fork, then they can easily do that either in this fork or from whatever upstream fork evolves. If we decide to fork PVMM -> PVMM2, then they can maintain this older fork, and pull or backport features from the newer one as needed. My point is there is no outcome where SP loses access to the version of PVMM that they depend on or the ability to manipulate their fork any way they want. So this is a non-factor
new fork or old
Ownership of the existing project could be transferred to pvlib or pvlib could create a fork of PVMM. The first option would provide the cleanest history of issues, pull requests, discussions, etc., but there's nothing to stop anyone from forking PVMM and starting their own version. It is BSD3 licensed, so no liability would ever fall on SunPower or any contributor. IE: SP would not be threatened by any forks that start deploying their own versions. The only downside of starting a new version of PVMM from a fork is that the history would be discontinuous and there would always be the confusion of multiple projects. There are several examples of these, some successful (PIL vs. Pillow) but many others not so successful. If necessary, it's something that could be worked out.
pvlib or not
My personal preference would be pvlib b/c it seems the most natural place for PV modeling software to go, but it's up to you all to decide what's best. There aren't very many open source umbrella organizations, so if not pvlib, it could go to DuraMAT or NREL, but both of those can't really take an open source project from the wild. pvlib is unique in it's purely public nature, which is what I think has allowed it to be so successful.
complete rewrite
Quoting Joel Spolsky, that might be:
However, that doesn't mean it's the wrong thing to do. It just might be a tougher road or a harder row to hoe.
Reasons to rewrite
Reasons to refactor
Feel free to add on to this, but I think that we should really look to resolve this within the next 3-6 months. I don't think we should let another year go by without any action on it. I can't see a single reason why we should allow this situation to persist other than no one cares.
If you agree with this move please add your comments below and state your desired outcome. Please forward or @ anyone else you think would be interested in supporting this move.
Thanks,
Mark
Beta Was this translation helpful? Give feedback.
All reactions