Replies: 2 comments 3 replies
-
|
Fully agree, I think this will help guard against future errors, and I like the approach you propose |
Beta Was this translation helpful? Give feedback.
-
|
Another option would be to create a special data class to handle them. Users would still pass them in the dictionary as described above, but maybe in the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In Floris v3 and earlier, the only control setpoints available to the user were
yaw_angles. As of Floris v4 and the introduction of operation models, we now allow various new control setpoints to be passed in at the top level (currently,power_setpoints#783 and the various controls needed for the Helix wake mixing model #842 ).Each time a new control setpoint is added, it has to be piped through various levels of the FLORIS code. This often gets overlooked, as was the case in #1022 .
I'd like to consider whether we can create a data structure that stores all control setpoints in a unified object that can be passed through the code more readily. I'm imagining that this could be a dictionary
control_setpoints={"yaw_angles": ... , "power_setpoints": ...}, where each key specifies a (valid) control setpoint and each value is a numpy array of shapen_findex x n_turbines. These would then be validated and mapped to a similarcontrol_setpoints_sorteddictionary.As well as making new setpoints simpler to include, I think this will also help with reducing the
findicesin certain cases, e.g. #963 .Of course, we'll need to maintain support for the keyword arguments (
yaw_angles,power_setpoints, etc) already in place inFlorisModel.set(). However, we'd be able to take those and add them to the dictionary/control setpoints data structure, and can add a deprecation warning at some point in the future.Relevant issues/PRs (I'll add to this list as I find things):
#963
#1027
#783
#842
#964
#1080
#1090
#1107
#454
Beta Was this translation helpful? Give feedback.
All reactions