Skip to content

preconfigured ModelChain for pvwatts, sapm #1022

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

Merged
merged 13 commits into from
Aug 25, 2020
Merged

Conversation

wholmgren
Copy link
Member

@wholmgren wholmgren commented Aug 11, 2020

  • Closes pre-configured ModelChains #1013
  • I am familiar with the contributing guidelines
  • Tests added
  • Updates entries to docs/sphinx/source/api.rst for API changes.
  • Adds description and name entries in the appropriate "what's new" file in 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`).
  • New code is fully documented. Includes numpydoc compliant docstrings, examples, and comments where necessary.
  • Pull request is nearly complete and ready for detailed review.
  • Maintainer: Appropriate GitHub Labels and Milestone are assigned to the Pull Request and linked Issue.

@wholmgren
Copy link
Member Author

@cwhanse are you ok with the pattern drafted here?

@cwhanse
Copy link
Member

cwhanse commented Aug 12, 2020

Yes, I prefer the factory to the subclass but not strongly.

@wholmgren wholmgren changed the title PVWatts ModelChain preconfigured ModelChain for pvwatts, sapm, pvsyst Aug 12, 2020
@wholmgren
Copy link
Member Author

@cwhanse can you provide any additional default options for the pvsyst configuration? Let me know if I missed anything for sapm, too.

losses_model: pvwatts_losses
"""

kwargs.update(PVWATTS_CONFIG)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is overlap in kwargs, this prioritizes PVWATTS_CONFIG, e.g. if the user passes transposition_model='isotropic', 'perez' will get used anyway. Should these lines should be config = PVWATTS_CONFIG.copy(); config.update(kwargs) so that user-supplied parameters take precedence over the defaults? Or maybe if people want to mix and match models, they should just use the main ModelChain constructor.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Yes and yes. I'll change the code, document the behavior, and encourage use of the main constructor for maximum flexibility.

@wholmgren wholmgren added this to the 0.8.0 milestone Aug 18, 2020
@wholmgren wholmgren added enhancement SPI DOE SETO Solar Performance Insight project labels Aug 18, 2020
@wholmgren wholmgren marked this pull request as ready for review August 18, 2020 02:51
@wholmgren
Copy link
Member Author

@cwhanse this is ready for review. I suspect we'll need to modify the default configurations.

@wholmgren
Copy link
Member Author

anything else on this PR @cwhanse?

@wholmgren wholmgren changed the title preconfigured ModelChain for pvwatts, sapm, pvsyst preconfigured ModelChain for pvwatts, sapm Aug 25, 2020
@wholmgren wholmgren merged commit a7edb8b into pvlib:master Aug 25, 2020
@wholmgren wholmgren deleted the mcpre branch August 25, 2020 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement SPI DOE SETO Solar Performance Insight project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pre-configured ModelChains
3 participants