-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Conversation
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. |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
Any other comments on this |
I'm OK merging now and opening a new issue to improve the doc string and creating an example of the loss model use. |
git diff upstream/master -u -- "*.py" | flake8 --diff
and/or landscape.io linting service.docs/sphinx/source/api.rst
for API changes.docs/sphinx/source/whatsnew
file for all changes.Added tests to ensure that custom losses are now supported in ModelChain.