-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Support for PV systems with multiple arrays #1076
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
Changes from all commits
Commits
Show all changes
249 commits
Select commit
Hold shift + click to select a range
4c1b9bc
Initial implementation of pvsystem.Array class
wfvining 532bf77
Refactor PVSystem to use pvsystem.Array internally
wfvining 4cccbd5
Use self._array.temperature_parameters in PVSystem
wfvining 6e980d5
Fix error passing surface_tilt in place of surface_azimuth
wfvining 527ea2c
Expose Array attributes as attributes of PVSystem
wfvining 8b096ab
Pass attributes of PVSystem._array when constructing LocalizedPVSystem
wfvining a84eab9
Fix over-indented lines
wfvining 955d932
Merge branch 'master' into array-class
wfvining-snl 39d47eb
Access Array attributes as attributes of the PVSystem
wfvining 2f7ccdb
Initialize Array.albedo correctly
wfvining 0bc8a42
add ModelChainResults, plumb for airmass
cwhanse 75bd755
assign rest of ModelChain outputs to ModelChain.results
cwhanse 22d6414
first cut at ModelChain tests
cwhanse 312c3f6
formatting
cwhanse b9029d6
more test development
cwhanse bc2c2c1
few more additions
cwhanse 8ebcedc
put dataclasses in pip section for py36
cwhanse 05091f0
Store a list of Arrays in PVSystem
wfvining 6602401
Wrap per-array inputs in a list
wfvining 4f8f1dd
Restore PVSystem._infer_cell_type()
wfvining 02d1bfc
Rename and document validation decorator
wfvining 7071cc7
Rename decorator for returning singleton list as a single value
wfvining 8de0eae
Fix indentation and formatting errors
wfvining 0c75807
Use nested def instead of assigning a lambda
wfvining cdb3463
Fix indentation in ModelChain._prepare_temperatures
wfvining 90dba53
Add test for Array.__repr__()
wfvining 202fc22
Pass list of Arrays to PVSystem.__init__
wfvining 40ee652
Return tuple instead of list for multi-array PVSystem
wfvining be48170
Fix indentation
wfvining c3796db
deprecate old ModelChain attributes
cwhanse 6ad6ade
Merge branch 'array-class' of https://github.com/wfvining/pvlib-pytho…
cwhanse 03eac94
remove solar_position = None from ModelChain.__init__
cwhanse 3e82f83
Require tuple input in list_or_scalar decorator
wfvining 4ed9424
Document meaning of `arrays` parameter to PVSystem.__init__
wfvining 389d1b2
Test multi-array PVSystem.scale_voltage_current_power()
wfvining 87a6000
add modelchain test on pvsystem with 2 arrays
cwhanse 1d21af4
Test multi-array PVSystem.get_aoi()
wfvining 3fa6ba3
Test multi-array PVSystem.get_irradiance()
wfvining c60c382
Test multi-array PVSystem.pvwatts_dc()
wfvining dfa07ca
Test input length validation on PVSystem.pvwatts_dc()
wfvining 26b7efb
Cover non-tuple iterable edge case
wfvining accef41
Test multi-array PVSystem.get_iam()
wfvining adf366b
Fix whitespace in test_pvsystem.py
wfvining be8fc9e
Test PVSystem.get_iam() input length mismatch
wfvining cb0f670
Test PVSystem.sapm with multiple arrays
wfvining 8554aed
Test PVSystem.sapm_spectral_loss with multiple arrays
wfvining 5f6a0ce
Test PVSystem.sapm_effective_irradiance with multiple arrays
wfvining 0e88f9e
Test PVSystem.sapm_celltemp() with multiple arrays
wfvining 25d7f94
Clean up whitespace
wfvining 55c202c
Test PVSystem.first_solar_spectral_loss() with multiple arrays
wfvining fc22db0
Test PVSystem.pvsyst_celltemp() with multiple arrays
wfvining 84653bb
Consolidate tests for PVSystem.xxxx_celltemp() functions
wfvining 97975f3
Clean up whitespace
wfvining d90970d
Fix comment in PVSystem.fuentes_celltemp()
wfvining 16e6fa9
Test all PVSystem.calcparams_xxxx() functions with multiple arrays
wfvining c82eccb
Add tests to cover PVSystem.albedo and PVSystem.surface_azimuth attri…
wfvining f82ff5e
Conditionally install dataclasses for tests
wfvining 402e42f
formatting
cwhanse f220a82
Remove TODOs
wfvining 9e7960f
Make decorators private
wfvining 2600141
Update PVSystem.__repr__() to handle multiple Arrays
wfvining b72840c
Expect new format in tracking.SingleAxisTracker.__repr__() tests
wfvining ea26f83
Update parameter names and doc for _validate_against_arrays()
wfvining 482b2fd
Replace validation decorator with a private method
wfvining 09bf16a
Remove unused `inspect` import in `pvsystem`
wfvining b23d3b5
Add blank line before nested defs
wfvining ed929dd
lets see what breaks
cwhanse 493b704
correct misspelled parameters
cwhanse 7e1f3c1
infer methods, handle tuples in calculations
cwhanse 2da65b4
inverter isn't on array
cwhanse 8013029
fix iteration in ModelChain.effective_irradiance_model
cwhanse 7744a44
_tuple_from_dfs to function
cwhanse 0606eb5
use isinstance for dataframe vs. tuple of df
cwhanse 4231205
consolidate check for consistent parameters
cwhanse 6611f57
missing set()
cwhanse 3e4871c
missed one instance
cwhanse 75195b6
Rename and document kwarg to prevent unwrapping return value
wfvining 9ce66a4
Test ModelChain with multi-array system and no losses
wfvining e053674
Initialize losses parameters corresponding to system._arrays
wfvining e33a860
Fix whitespace
wfvining 1abc17f
Add PVSystem.num_arrays property
wfvining d4a82b1
Use self.system.num_arrays instead of len(self.system._arrays)
wfvining 070f628
Correct types of ModelChainResult fields
wfvining a64d8b1
Remove direct uses of ModelChain.system._arrays
wfvining 3376753
Assign to self.results.effective_irradiance
wfvining 4abaf2b
Test multi-array ModelChain with pvwatts losses
wfvining b4ace32
Shorten line
wfvining cf8fd87
Test multi-array modelchain with DC models that call _singlediode
wfvining e666052
Rewrite ModelChain._singlediode to support multi-array systems
wfvining b187444
Add `name` attribute to `pvsystem.Array`
wfvining b98ea00
Allow per-array GHI/DHI/DNI input to PVSystem.get_irradiance()
wfvining a49d16e
Test that the correct input is passed to each array
wfvining 955f727
Fix whitespace in test_modelchain.py
wfvining 92f28f5
Support multiple weather input to PVSystem.xxxx_celltemp()
wfvining 2783a87
Fix whitespace in test_pvsystem.py
wfvining 0a00f52
Merge branch 'master' into array-class
wfvining 71c7f3b
Allow unique weather input for each array
wfvining 0b16384
Merge branch 'master' into array-class
wfvining df13360
Document that ModelChain.prepare_inputs() can take a tuple
wfvining 94a087c
Raise if length of weather is not same as system.num_arrays
wfvining 071ddf4
Add tests for ModelChain.run_model with multiple weather
wfvining 0b3c7ed
Add test for ModelChain._prepare_temperature with multiple weather
wfvining 4d0ec6c
Use itertools.starmap in _validate_weather_indices
wfvining d7a64f6
Update arrays in sapm_dc_snl_ac_system_same_arrays fixture
wfvining d808820
Rework _prepare_temperature tests
wfvining 0f4cbf7
ModelChain._prepare_temperature accepts multiple DataFrames
wfvining 5ef7b9a
Fix indentation in ModelChain._get_cell_temperature()
wfvining 8cfacfa
Support multiple weather DataFrames in all ModelChain.xxxx_temp()
wfvining 2f991f3
Refactor ModelChain.xxxx_temp() functions
wfvining 0096181
Accept multiple weather frames in ModelChain.complete_irradiance
wfvining 663fb0c
ModelChain.complete_irradiance input same length as number of arrays
wfvining a0fa84b
Validate per-array input to ModelChain.prepare_inputs_from_poa()
wfvining f7fd6c7
Multiple inputs to ModelChain.run_model_from_effective_irradiance()
wfvining 919353b
Clean up whitespace
wfvining 59db97c
Only validate indices if a tuple is passed
wfvining 280a2a5
Add test to cover undefined attribute
wfvining eb31432
Verify all arrays have consistent parameters
wfvining cc87fd3
Don't test that all combinations of indices are equal
wfvining 926044f
Use ModelChain.results.dc instead of ModelChain.dc
wfvining a430ab5
Consolidate multi-input validation
wfvining 5c1cdb1
Add tests for multi-array module/string paramters
wfvining fa5a06f
Refactor all same index check
wfvining 5078e9d
Prevent instantiation of SingleAxisTracker with multiple arrays
wfvining a18b189
Test that inconsistent array parameters causes error
wfvining e28ac7e
Add test coverage for pvsystem.Array._infer_xxxx() methods
wfvining e1be2bf
Add pvsystem.Array to Classes section of api.rst
wfvining 58c9e0c
Merge branch 'master' into array-class
wfvining 0301ce7
Add PVSystem.sandia_multi() method
wfvining 08946f8
Fix whitespace
wfvining 5167901
Add 'sandia_multi' as a valid key for ModelChain.ac_model
wfvining db6d736
Add sandia_multi_inverter to ModelChain.infer_ac_model()
wfvining 99a63e7
Update ModelChain tests to use sandia_multi inverter model
wfvining 85ee956
Shorten long line
wfvining cf6e94c
Support multiple arrays in ModelChain.pvwatts_losses
wfvining f5f309d
Decorate test_complete_irradiance_arrays with @requires_tables
wfvining a0047a4
Pass explicit freq to DataFrame.shift() in poa_arrays test
wfvining e58db3a
Pass explicit freq to DataFrame.shift() in ModelChain tests
wfvining 54fc167
Add description of multi-array PVSystem to pvsystem.rst
wfvining ca77bef
Remove commented-out code in ModelChainResults
wfvining e4da96b
Docstring edits
wfvining a43125f
Remove stray whitespace from _tuple_from_dfs() docstring
wfvining 4138990
Add docstring to ModelChain._check_consistent_params()
wfvining 03b9795
Improvements in pvsystem.rst
wfvining d542241
Docstring edits in pvsystem.py
wfvining 555c830
Shorten line in pvsystem.Array docstring
wfvining 6c4e9f0
Fix typo in ModelChain.complete_irradiance() docstring
wfvining 494560c
Avoid use of `inplace=True` in ModelChain._singlediode()
wfvining 8960f25
Make list of deprecated ModelChain attrs a class variable
wfvining ed2c72a
Include 'dataclasses' as a requirement in setup.py
wfvining 42e096a
Remove dataclasses from CI environment for python 3.7+
wfvining c03625b
Replace modelchain._array_keys() with modelchain._common_keys()
wfvining a7567c9
Update ModelChain.__getattr__ deprecation message
wfvining 07b3d05
Expose PVSystem.arrays as a public attribute
wfvining 8936e60
Iterate over arrays in ModelChain._check_consistent_params()
wfvining f454807
Refactor ModelChain.effective_irradiance_model()
wfvining c572153
rewrite pvsystem.rst
cwhanse 11fe336
Raise a TypeError in ModelChain._check_multiple_input()
wfvining 06203dd
Note that indices assumed to be same in ModelChain._assign_times()
wfvining 9c53600
Add comment in ModelChain.complete_irradiance()
wfvining 9c10612
Copy input before assigning in ModelChain.complete_irradiance()
wfvining 57ba56f
Document ModelChain.run_model() and run_model_from_poa() input type
wfvining 46f0bfd
Don't allow SingleAxisTracker Array with non-None tilt/azimuth
wfvining 23c50fa
Improve documentation of ValueErrors from ModelChain methods
wfvining 286667f
Separate ac model inference for multiple arrays
wfvining 9b6ef5c
Update docstring for ModelChain.run_model_from_effective_irradiance()
wfvining db8d046
Expand error messages for missing array params in ModelChain
wfvining 784e1ad
Remove ModelChain._check_consistent_params
wfvining 6d1bff5
Test ModelChain.infer_ac_model() error with one array
wfvining 192a550
Capitalize 'Arrays' when referring to the "constituents" of a PVSystem
wfvining 7c4a0af
Return early from ModelChain._prepare_temperature()
wfvining 404ffd1
More test coverage of ModelChain.run_model_from_effective_irradiance()
wfvining 529313a
Note poa_global requirements for run_model_from_effective_irradiance()
wfvining ab8f982
Move ModelChain.tracking to ModelChain.results.tracking
wfvining a15eaa7
Improve pvsystem.Array docstring
wfvining ce7f95d
Better documentation for ModelChain._check_multiple_input()
wfvining 5d9c1e6
Merge branch 'array-class' of https://github.com/wfvining/pvlib-pytho…
cwhanse b53d2be
Raise ValueError from ModelChain._prepare_temperature()
wfvining 224c968
Update expected error message for run_model_from_effective_irradiance()
wfvining 07b9b5b
coerce weather/data to tuple in run_model methods
cwhanse 4f6744f
Merge branch 'master' of https://github.com/pvlib/pvlib-python into a…
wfvining 689fd82
Merge branch 'array-class' of https://github.com/wfvining/pvlib-pytho…
cwhanse d0fc6eb
don't use decorator, _to_tuple in complete_irradiance
cwhanse fbb27a8
adjust modelchain, add tests for [weather, weather], add test_run_mod…
cwhanse 6ca45cc
Parameterize types in tests
cwhanse aecf156
add tuple/list type tests
cwhanse 60e2c5d
Use unwrap=True to simplify ModelChain._singldiode()
wfvining 57a0ab8
Add docstrings to helper functions
wfvining 3530fd6
Fix type annotations in ModelChainResults
wfvining 2644d6a
Add index information to error message in ModelChain._verify()
wfvining 89053bc
fix copy, add input_type to wrong length tests
cwhanse 1cb9e86
Improve error message for inconsistent temperature model params
wfvining a809051
Correct attribute name in ModelChain._set_celltemp docstring
wfvining 956df5a
Remove unused ModelChainResult.array_ac field
wfvining 40aa2da
add coerce to prepare_inputs functions
cwhanse f4f09c7
add _to_tuple back to run_model
cwhanse e5914a9
Coerce weather/data inputs to tuple in ModelChain entry points (#1)
cwhanse c283134
Add DatetimeIndex for test_prepare_inputs_multi_weather()
wfvining a3c374a
Add whatsnew entries for 0.9.0
wfvining b267175
Merge branch 'master' of https://github.com/pvlib/pvlib-python into a…
cwhanse 7353c84
merge master and upstream
cwhanse f046347
edits to pvsystem.rst
cwhanse 6e14654
fix ipython in pvsystem.rst
cwhanse 9e09c80
edits to modelchain.py docstrings
cwhanse 4534633
minor edits to whatsnew
cwhanse 42dde2c
pvsystem.rst edits
cwhanse b23be5e
Allow Series input to modelchain._common_keys()
wfvining 1673ca0
Update whatsnew v0.9.0 label
wfvining a277b0a
Note dataclasses requirement in whatsnew/v0.9.0.rst
wfvining 1d823cf
Fix indentation in ModelChain.martin_ruiz_aoi_loss()
wfvining e4a00aa
Clean up Array.get_iam() docstring
wfvining 0ee4a87
Change PVSystem to Array in Array.get_iam() error message
wfvining dc6b0ec
Update links to other pvlib functions in Array.get_irradiance()
wfvining 111ff32
Compare function objects in ModelChain._get_cell_temperature()
wfvining 93a70b4
Merge branch 'master' of https://github.com/pvlib/pvlib-python into a…
cwhanse 5264866
merge master, edits to pvsystem.rst from review
cwhanse 4bd32ab
Reword multi-array SingleAxisTracker error message
wfvining 1dcda05
Revert "Compare function objects in ModelChain._get_cell_temperature()"
wfvining eef913a
Update return types of PVSystem methods
wfvining 82cccd2
Compare function objects in ModelChain._get_cell_temperature()
wfvining bff88d1
Add project urls to setup.py for pypi page (#1119)
AzizCode92 bbf01d6
fix pvgis test (#1121)
kandersolar 7114e58
make clean: also delete generated, auto_examples, savefig (#1122)
kandersolar 00bed5e
merge master, edits to pvsystem.rst from review
cwhanse aa2e65c
Fix formatting in PVSystem.get_iam() docstring
wfvining af04a55
Pass model and kwargs to Array.get_irradiance()
wfvining 1d061d6
Note which parameters of PVSystem methods accept tuples
wfvining 036f601
Update Array docstring to describe modules "at same orientation"
wfvining 268e736
Document 0.25 as fallback value for Array.albedo
wfvining 7bc040a
Update defaults in Array docstring
wfvining 002ca84
Rename and clean up duplicate PVSystem test
wfvining 2e389fa
Reword PVSystem.sandia_multi docstring
wfvining 19ed9a2
Add notes on system-wide parameters to PVSystem method docstrings
wfvining 68617fa
Add ModelChainResults to classes section of api.rst
wfvining 02e17c4
Expand ModelChain docstring to describe how models are applied
wfvining 2cd4d7a
Revert "Add ModelChainResults to classes section of api.rst"
wfvining 8433e24
Simplify ModelChain.__getattr__()
wfvining 252b545
Replace object with super() in ModelChain.__setattr__
wfvining 1f13855
Use mc.results.ac instead of mc.ac in introtutorial.rst
wfvining 775d3bf
Replace deprecated ModelChain attributes in forecasts.rst
wfvining 8eb21ac
Merge branch 'master' into array-class
wfvining 8472e98
fix pvsystem.rst examples
cwhanse 8cfab24
fix conflict
cwhanse 33ccfeb
Fix bug in pvsystem.rst examples
wfvining c90136b
Add modelchain.ModelChainResult to Classes section of api.rst
wfvining c2a1d7c
Update contributors list
wfvining 8d74ea5
Add ModelChain.solar_position to deprecated attrs in whatsnew
wfvining 159829a
Fix single array aoi example output
wfvining 823151f
Add missing space in ValueError message from PVSystem.get_iam()
wfvining f3b3751
Add Results to ModelChain section of api.rst
wfvining File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,5 +27,6 @@ dependencies: | |
- siphon # conda-forge | ||
- statsmodels | ||
- pip: | ||
- dataclasses | ||
- nrel-pysam>=2.0 | ||
- pvfactors==1.4.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.