forked from NREL/hercules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge with Misha's WHOC branch of hercules
- Loading branch information
Showing
11 changed files
with
338 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,4 +39,4 @@ hercules/local_amr_wind_demo/sample_copy.nc | |
t_00* | ||
logdummy | ||
loghercules | ||
*echo | ||
*echo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
from abc import abstractmethod | ||
|
||
class ControllerStandin(): | ||
""" | ||
This class is a pass-through stand-in for a plant-level controller. | ||
Actual controllers should be implemented in WHOC | ||
(https://github.com/NREL/wind-hybrid-open-controller). However, this | ||
has been left in to allow users to run Hercules without plant-level | ||
control, if desired. | ||
""" | ||
|
||
def __init__(self, input_dict): | ||
|
||
# Get wind farm information (assumes exactly one wind farm) | ||
self.wf_name = list(input_dict["hercules_comms"]["amr_wind"].keys())[0] | ||
|
||
@abstractmethod | ||
def step(self, main_dict): | ||
|
||
num_turbines = main_dict["hercules_comms"]\ | ||
["amr_wind"]\ | ||
[self.wf_name]\ | ||
["num_turbines"] | ||
|
||
# Set turbine yaw angles based on current AMR-Wind wind direction | ||
wd = main_dict["hercules_comms"]\ | ||
["amr_wind"]\ | ||
[self.wf_name]\ | ||
["wind_direction"] | ||
main_dict["hercules_comms"]\ | ||
["amr_wind"]\ | ||
[self.wf_name]\ | ||
["turbine_yaw_angles"] = num_turbines*[wd] | ||
|
||
# TODO: does there need to be a seperate "controller" dict? | ||
# Might make understanding the log easier? | ||
return main_dict | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.