Skip to content

add mlfm - #1354

Closed
steve-ransome wants to merge 94 commits into
pvlib:mainfrom
steve-ransome:mlfm
Closed

add mlfm#1354
steve-ransome wants to merge 94 commits into
pvlib:mainfrom
steve-ransome:mlfm

Conversation

@steve-ransome

@steve-ransome steve-ransome commented Dec 10, 2021

Copy link
Copy Markdown

Comment thread pvlib/mlfm.py Outdated
@markcampanelli

Copy link
Copy Markdown
Contributor

Because there are several mflm-related tutorial notebooks and supporting files, we may want to add a general docs/tutorials/mflm/ directory (with a data sub-directory) to hold everything.

@steve-ransome

steve-ransome commented Oct 17, 2022

Copy link
Copy Markdown
Author

We already do that. , there are directories for reference data, meas_gtw measurements+weather, figs and outputs

@markcampanelli

Copy link
Copy Markdown
Contributor

We already do that. , there are directories for reference data, meas_gtw measurements+weather, figs and outputs

I may have not been clear. I was thinking in terms of how this structure might better grow and coexist with other multi-file tutorials.

mflm alternative directory structure

@markcampanelli

markcampanelli commented Nov 14, 2022

Copy link
Copy Markdown
Contributor

@steve-ransome In the example notebooks, don't use Windows-specific path separators, which don't work on Mac/Linux. For example, instead of
ref_file_name = (root_dir + '\\mlfm_data\\ref\\' + 'mlfm_reference_modules.csv'),
use
ref_file_name = os.path.join(root_dir, 'mlfm_data', 'ref', 'mlfm_reference_modules.csv')

@steve-ransome

Copy link
Copy Markdown
Author

Thanks, have updated mlfm to use that

@markcampanelli

Copy link
Copy Markdown
Contributor

@steve-ransome Would it be helpful at this point for me to review all the comments that I initiated and resolve/follow up with them?

@steve-ransome

Copy link
Copy Markdown
Author

Thanks @markcampanelli that would be very useful. I think I've got as far as I can for the moment.

Comment thread pvlib/tests/test_mlfm.py Outdated
@markcampanelli

Copy link
Copy Markdown
Contributor

@steve-ransome I walked through the comment history, and there seems to be some unresolved ones from all the reviewers (including me). Not sure if the maintainers are open to arranging a conference call to walk through all of these?

Personally I have few outstanding small issues, whereas my main issue is that the coefficient-solver information is not propagated back to the user, including a potential convergence failure.

In particular, I think the whatsnew info is still missing. This depends on the intended release version, and I wonder if the MLFM addition warrants a "new feature" version bump to v0.10.0, which would likely queue it behind the pending v0.9.4 release.

@adriesse

adriesse commented Dec 5, 2022

Copy link
Copy Markdown
Member

Personally I have few outstanding small issues, whereas my main issue is that the coefficient-solver information is not propagated back to the user, including a potential convergence failure.

This could be a more general question about how we would like fitting functions in pvlib to behave. curve_fit will raise a warning or exception if things go terribly wrong. Is that suitable and/or sufficient? Admittedly the user will have to have a higher level of expertise to figure out what might be the problem. If this is not good enough, then maybe we shouldn't be using curve_fit but rather some lower level function like least_squares or minimize.

@kandersolar

Copy link
Copy Markdown
Member

This PR is in a sorry state. Looks like some bad merges got in here somehow. If this ever goes forward, I think it would be easiest to just start a fresh PR, so I'm closing this one.

FWIW I also think this feature is complicated enough that it would need a more experienced pvlib contributor to champion it.

@kandersolar kandersolar closed this Aug 5, 2026
@cwhanse

cwhanse commented Aug 5, 2026

Copy link
Copy Markdown
Member

Been a while since I tried to help this one. My memory is that a primary (perhaps fatal) deficiency is a lack of clear references.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adding the Loss Factors Model and Mechanistic Performance Models to PVLIB

7 participants