Skip to content

Comments

Change how number of turbines is counted#241

Merged
paulf81 merged 2 commits intoNatLabRockies:developfrom
paulf81:feature/change_n_turbine
Dec 20, 2024
Merged

Change how number of turbines is counted#241
paulf81 merged 2 commits intoNatLabRockies:developfrom
paulf81:feature/change_n_turbine

Conversation

@paulf81
Copy link
Collaborator

@paulf81 paulf81 commented Dec 18, 2024

Change how number of turbines is counted

The current method for counting the number of turbines uses a loop to see when the next turbine doesn't appear. This created an issue for a current project, where simply counting the number of columns that fit the pattern "pow_###" should provide the equivalent result and avoid the issue. This PR makes the change and adds a missing back test of the older get_num_turbines function.

@paulf81 paulf81 added the enhancement An improvement of an existing feature label Dec 18, 2024
@paulf81 paulf81 requested a review from ejsimley December 18, 2024 23:02
@paulf81 paulf81 self-assigned this Dec 18, 2024
Copy link
Collaborator

@ejsimley ejsimley left a comment

Choose a reason for hiding this comment

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

This works fine. However, I realized the code still assumes turbines are numbered sequentially when looping through turbines (e.g., for ti in range(self.n_turbines)). So maybe for now just stay with the sequential numbering requirement and we can update later if we decide it makes sense.

@paulf81
Copy link
Collaborator Author

paulf81 commented Dec 19, 2024

Ok, do you have a preference? Merge this in as harmless or save for a more comprehensive change?

@ejsimley
Copy link
Collaborator

Ok, do you have a preference? Merge this in as harmless or save for a more comprehensive change?

Good question. I say merge now, but I'll add an issue so we can keep track of this topic.

@paulf81 paulf81 merged commit 0a1f45f into NatLabRockies:develop Dec 20, 2024
@paulf81
Copy link
Collaborator Author

paulf81 commented Dec 20, 2024

Merged!

@paulf81 paulf81 deleted the feature/change_n_turbine branch December 20, 2024 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement An improvement of an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants