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

Bug Fix: Asset table operations #282

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

ejsimley
Copy link
Collaborator

@ejsimley ejsimley commented Mar 7, 2024

This small pull request fixes a few issues I found when calling the get_freestream_turbines method in PlantData and running wake loss analyses for a wind plant with both turbine and tower assets.

  1. In calculate_asset_distance_matrix and calculate_asset_direction_matrix, the diagonals of the matrices weren't getting set to np.inf like we expected. This could possibly be because of a new pandas version.
  2. An error would appear in get_freestream_turbines when there are tower assets in addition to turbine assets. Specifically, self.asset.index includes both turbine and tower indices, but freestream_indices only includes boolean values corresponding to turbines, so the dimensions didn't match in the return statement.

@ejsimley ejsimley requested a review from RHammond2 March 7, 2024 00:46
@ejsimley ejsimley added the bug label Mar 7, 2024
@ejsimley ejsimley added this to the V3.1 milestone Mar 7, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.49%. Comparing base (94fd51f) to head (12d489e).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #282      +/-   ##
===========================================
+ Coverage    72.46%   72.49%   +0.02%     
===========================================
  Files           29       29              
  Lines         3683     3687       +4     
  Branches       794      794              
===========================================
+ Hits          2669     2673       +4     
  Misses         825      825              
  Partials       189      189              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@RHammond2 RHammond2 left a comment

Choose a reason for hiding this comment

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

Thanks for catching this, @ejsimley! This fix looks good to me.

@ejsimley ejsimley merged commit aa11436 into NREL:develop Mar 7, 2024
6 checks passed
@ejsimley ejsimley deleted the fix/asset_table_functions branch March 7, 2024 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants