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.
merging WHOC-style battery controller
- Loading branch information
Showing
13 changed files
with
341 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
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
6 changes: 3 additions & 3 deletions
6
example_case_folders/06_amr_wind_standin_and_battery/batch_script.sh
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
#!/bin/bash | ||
|
||
export HELICS_PORT=32000 | ||
helics_broker -f 2 --consoleloglevel=trace --loglevel=debug --local_port=$HELICS_PORT & | ||
|
||
|
||
helics_broker -f 2 --consoleloglevel=trace --loglevel=debug --local_port=$HELICS_PORT & | ||
|
||
cd example_case_folders/06_amr_wind_standin_and_battery | ||
|
||
python hercules_runscript_dummy_amr.py amr_input.inp amr_standin_data.csv >> logdummy 2>&1 & | ||
python hercules_runscript_dummy_amr.py amr_input.inp amr_standin_windpower.csv >> logdummy 2>&1 & | ||
|
||
python hercules_runscript.py hercules_input_000.yaml >> logdummy 2>&1 | ||
python hercules_runscript.py hercules_input_000.yaml | ||
|
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.