NREL / OpenOA

This library provides a framework for assessing wind plant performance using operational assessment (OA) methodologies that consume time series data from wind plants. The goal of the project is to provide an open source implementation of common data structures, analysis methods, and utility functions relevant to wind plant OA.
https://openoa.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
193 stars 63 forks source link

Bug Fix: Asset table operations #282

Closed ejsimley closed 8 months ago

ejsimley commented 8 months ago

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.
codecov-commenter commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.