Skip to content
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

add PVSystem.losses_parameters, add support for custom pvwatts losses parameters in ModelChain #491

Merged
merged 5 commits into from
Aug 1, 2018

Conversation

wholmgren
Copy link
Member

@wholmgren wholmgren commented Jun 23, 2018

  • Closes pvwatts loss model implementation with user defined input values  #484
  • Fully tested. Added and/or modified tests to ensure correct behavior for all reasonable inputs. Tests must pass on the TravisCI and Appveyor testing services.
  • Code quality and style is sufficient. Passes git diff upstream/master -u -- "*.py" | flake8 --diff and/or landscape.io linting service.
  • New code is fully documented. Includes sphinx/numpydoc compliant docstrings and comments in the code where necessary.
  • Updates entries to docs/sphinx/source/api.rst for API changes.
  • Adds description and name entries in the appropriate docs/sphinx/source/whatsnew file for all changes.

Added tests to ensure that custom losses are now supported in ModelChain.

@wholmgren wholmgren requested a review from cwhanse June 26, 2018 17:57
parameter. (:issue:`462`)
* Add losses_parameters attribute to PVSystem objects and remove the kwargs
support from PVSystem.pvwatts_losses. Enables custom losses specification
in ModelChain calculations. (:issue:`484`)
* pvsystem.calcparams_desoto now requires arguments for each module model parameter.
Copy link
Member

Choose a reason for hiding this comment

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

delete this line (redundant, and yours is better)

@@ -119,8 +119,7 @@ def __init__(self,
modules_per_string=1, strings_per_inverter=1,
inverter=None, inverter_parameters=None,
racking_model='open_rack_cell_glassback',
name=None,
**kwargs):
losses_parameters=None, name=None, **kwargs):
Copy link
Member

Choose a reason for hiding this comment

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

Need an entry in the signature describing losses_parameters

@@ -99,6 +99,9 @@ class PVSystem(object):
racking_model : None or string, default 'open_rack_cell_glassback'
Used for cell and module temperature calculations.

losses_parameters : None, dict or Series, default None
Losses parameters as defined by PVWatts or other.
Copy link
Member

Choose a reason for hiding this comment

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

Can we list the permissible keywords for the dict here? Also I think it would help to include a comment on how they are used, e.g., Loss parameters (%) are combined into a single loss factor, L = (1 - Soiling) * (1 - Age) * ..., that is applied to AC power

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not opposed to adding some additional detail to this doc string, but I would like to do it in a model-independent way. pvlib currently only includes the pvwatts losses model, but this dict should be useful to future models. Also note the current text is similar to the module_parameters and inverter_parameters doc strings.

@wholmgren
Copy link
Member Author

Any other comments on this PVSystem.losses_parameters PR? I'll merge in the next few days if there are no objections and we can resolve the outstanding issue regarding the doc string.

@cwhanse
Copy link
Member

cwhanse commented Jul 29, 2018

I'm OK merging now and opening a new issue to improve the doc string and creating an example of the loss model use.

@wholmgren wholmgren merged commit 237b03f into pvlib:master Aug 1, 2018
@wholmgren wholmgren deleted the lossesparams branch August 1, 2018 02:40
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.

2 participants