Closed ppinchuk closed 2 years ago
Feel free to wait until after our discussion on Tuesday to review.
Merging #362 (034c734) into main (a947b6b) will increase coverage by
1.19%
. The diff coverage is98.16%
.
@@ Coverage Diff @@
## main #362 +/- ##
==========================================
+ Coverage 79.14% 80.34% +1.19%
==========================================
Files 135 142 +7
Lines 18211 19409 +1198
==========================================
+ Hits 14414 15595 +1181
- Misses 3797 3814 +17
Flag | Coverage Δ | |
---|---|---|
unittests | 80.34% <98.16%> (+1.19%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
tests/test_losses_utils.py | 94.91% <94.91%> (ø) |
|
reV/losses/utils.py | 96.29% <96.29%> (ø) |
|
tests/test_losses_scheduled.py | 96.75% <96.75%> (ø) |
|
tests/test_losses_power_curve.py | 98.34% <98.34%> (ø) |
|
reV/SAM/generation.py | 93.59% <100.00%> (+0.08%) |
:arrow_up: |
reV/losses/__init__.py | 100.00% <100.00%> (ø) |
|
reV/losses/power_curve.py | 100.00% <100.00%> (ø) |
|
reV/losses/scheduled.py | 100.00% <100.00%> (ø) |
|
reV/utilities/exceptions.py | 100.00% <100.00%> (ø) |
|
reV/config/project_points.py | 85.41% <0.00%> (+0.04%) |
:arrow_up: |
... and 6 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update a947b6b...034c734. Read the comment docs.
Going to add a few more things while testing this out with Owen so no rush really
It looks really good based on my verification of the outputs. My only real concern on the technology side is that it respects the cutout speeds even when shifted.
Yea, so I perform that check in multiple places https://github.com/NREL/reV/blob/3313b708e4b00ebf6ec76367b0b086a9b131b501/reV/losses/power_curve.py#L152
and also: https://github.com/NREL/reV/blob/3313b708e4b00ebf6ec76367b0b086a9b131b501/reV/losses/power_curve.py#L613 which has the following code:
new_gen = self.power_curve(
self.power_curve.wind_speed - transformation_var
)
mask = (
self.power_curve.wind_speed >= self.power_curve.cutoff_wind_speed
)
new_gen[mask] = 0
That all being said, I am adding some more commits below to verify and ensure this behavior moving forward
Added a new
reV
module for calculating losses. This module facilitates the addition of losses to generation outputs that are more sophisticated than simple haircut losses. Two new types of losses are added in particular.Power Curve Losses (Wind only)
Users can now specify a target loss percentage and a type of power curve transformation.
reV
will then attempt to apply the transformation in order to reach the target loss percentage given the annual wind distribution at each site. This results in different transformations for each site.~Currently, a horizontal power curve translation is the only kind of transformation that is implemented.~ JK, I added a total of three :). I think the latter two should make Owen much happier. New transformations can easily be implemented by sub classing
PowerCurveTransfromation
and implementing anapply
method that calculates the transformation using a single tunable variable, and abounds
property that sets the limits on that transformation variable (and also register the new class to theTRASNFORMATIONS
dictionary).Stochastically Scheduled Outages (Wind and Solar)
Users can now specify information about a set of outages, which
reV
then attempts to schedule stochastically. Details for each outage includecount
: An integer value representing the total number of times the outage should be scheduled.duration
: An integer value representing the total number of consecutive hours that the outage should take.percentage_of_farm_down
: An integer or float value representing the total percentage of the farm that will be take offline for the duration of the outage.allowed_months
: A list of month names corresponding to the allowed months for the outage. Month names can be unformatted and can be specified using 3-letter month abbreviations.allow_outage_overlap
: (optional) A bool flag indicating whether or not this outage is allowed to overlap with other outages, including itself.Notes
AbstractSamPv.gen_profile
property to pull the "gen" profile instead of "ac". This change was necessary to overcome a bug in SAM/PySAM < 3.0.0 and can (probably) be reverted whenreV
compatibility with PySAM 3.0.0+ is integrated.