Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update installation instructions #132

Open
wants to merge 65 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 64 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
7482bb3
Rename readme
paulf81 Nov 20, 2024
9d67279
readme to md
paulf81 Nov 20, 2024
bc3580d
Clean up run scripts
paulf81 Nov 20, 2024
9ce83d2
Merge branch 'develop' into feature/standard_example
paulf81 Nov 20, 2024
50e1f6c
Remove example 2
paulf81 Nov 20, 2024
6bc5a84
update runscript and readme
paulf81 Nov 20, 2024
7f0009b
Update readmes
paulf81 Nov 20, 2024
61400c4
Update run script
paulf81 Nov 20, 2024
a0e6736
update readme and runscript
paulf81 Nov 21, 2024
e5ffd78
update run scripts
paulf81 Nov 21, 2024
685dbd7
re-org example 7
paulf81 Nov 21, 2024
4d72ff9
rename example 5
paulf81 Nov 21, 2024
1ce747e
rename example 8
paulf81 Nov 21, 2024
b766429
set sim to 20 s
paulf81 Nov 21, 2024
15ea201
Update output vis
paulf81 Nov 21, 2024
046b28e
move amr_input
paulf81 Nov 21, 2024
4d843f4
delete unnecessary rm
paulf81 Nov 21, 2024
f1329d3
update README
paulf81 Nov 21, 2024
d8cccf8
temp move amr-openfast to be adjacent to amr cases
paulf81 Nov 21, 2024
fccf59a
update readme and runscript
paulf81 Nov 21, 2024
7d75b0d
organize inputs
paulf81 Nov 21, 2024
f1a7ffc
reinclude input csv
paulf81 Nov 21, 2024
d93f9bb
Updating electrolyzer example to work with electrolyzer develop branch
genevievestarke Nov 21, 2024
3650720
changing generate_amr_wind_standin_data to work with the other standi…
Nov 22, 2024
afb4db8
Merge branch 'develop' into feature/standard_example
misi9170 Nov 22, 2024
2e16b76
Add back input data for example 10.
misi9170 Nov 22, 2024
d6c84b2
Fix issues with example 10 (mainly, enable power return from either S…
misi9170 Nov 22, 2024
773b6eb
Add plot outputs
paulf81 Nov 22, 2024
08864c9
remove all python 3
paulf81 Nov 22, 2024
0fd0d95
Update run_script
paulf81 Nov 22, 2024
adcab20
Update outputs
paulf81 Nov 22, 2024
1eed659
long line
paulf81 Nov 22, 2024
63937c3
ruff
paulf81 Nov 22, 2024
8269df5
Update example 01
paulf81 Nov 22, 2024
ea85de7
Update Example 05 README
genevievestarke Nov 23, 2024
44d4870
Update example 06 run_script to generate standin data and output dire…
Nov 25, 2024
80ca2bd
Change emulator.py to not call py_sims.step when there are no py_sims…
Nov 25, 2024
0367082
Copied solar_pysam_test.py input file to test_inputs folder instead o…
Nov 25, 2024
cff75b9
Renumber AMR examples
paulf81 Nov 26, 2024
d7c6a15
Update 06 outputs
paulf81 Nov 26, 2024
67a423b
Try editing batch
paulf81 Nov 26, 2024
1503bd8
Add helics killer
paulf81 Nov 26, 2024
1058576
Update kestrel run scripts
paulf81 Nov 26, 2024
dcdc062
Merge branch 'develop' into feature/standard_example
misi9170 Dec 2, 2024
b774b40
trimmed the input solar file so that DNI > 900 MW so that solar power…
brookeslawski Dec 2, 2024
4521c13
Merge branch 'feature/standard_example' of github.com:NREL/hercules i…
brookeslawski Dec 2, 2024
5a8cd07
Update yaml input file headers
genevievestarke Dec 3, 2024
8868428
Merge branch 'develop' into feature/standard_example
misi9170 Dec 3, 2024
071a7a8
Move port to 32010
paulf81 Dec 4, 2024
b8b7aaa
Add kill script link
paulf81 Dec 4, 2024
5f338a4
Add plot script
paulf81 Dec 4, 2024
b0f2445
Rename dir 10
paulf81 Dec 4, 2024
5b5aad4
update readme names
paulf81 Dec 4, 2024
3e4daa5
Update example refs in docs
paulf81 Dec 4, 2024
af1da04
ignore doc builds
paulf81 Dec 4, 2024
fbe256a
Update README titles
paulf81 Dec 4, 2024
f55723a
Add .log extensions to logfiles, remove unused batch_script from 06 e…
misi9170 Dec 4, 2024
506e4d8
Reinclude data file for 07 example.
misi9170 Dec 4, 2024
0d62ba3
adding solar input csv file for example 07
brookeslawski Dec 4, 2024
89fe6d4
Change to run_script
misi9170 Dec 4, 2024
4d53a84
Reinstate 06 example batch_script.sh
misi9170 Dec 4, 2024
b07835a
remove check examples workflow
paulf81 Dec 5, 2024
9f055e3
Update SEAS reference
paulf81 Dec 5, 2024
6e380cf
Merge branch 'develop' into feature/update_install
paulf81 Dec 5, 2024
150949a
Update to local running instructions
genevievestarke Jan 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
python -m pip install --upgrade pip
pip install -e ".[develop]"
pip install git+https://github.com/NREL/electrolyzer.git@develop
pip install https://github.com/NREL/SEAS/blob/main/SEAS.tar.gz?raw=true
pip install https://github.com/NREL/SEAS/blob/v1/SEAS.tar.gz?raw=true
# - uses: pre-commit/[email protected]
- name: Run ruff
run: |
Expand Down
53 changes: 23 additions & 30 deletions docs/install_local.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@


# Installation

## Conda environment

Create a new conda environment for hercules:
```
conda create --name hercules python=3.11
conda activate hercules
```

## Hercules

If you haven't already cloned hercules:
```
git clone https://github.com/NREL/hercules
Expand All @@ -19,11 +24,14 @@ pip install -e hercules
Possibly, `cd` into hercules and switch to the
develop branch.

## SEAS, Electrolyzer, PySAM, and WHOC

### SEAS

SEAS is also required for hercules. To install
SEAS, use

``` pip install https://github.com/NREL/SEAS/blob/main/SEAS.tar.gz?raw=true ```
``` pip install https://github.com/NREL/SEAS/blob/v1/SEAS.tar.gz?raw=true ```

If this fails, the following may work instead (but you need permissions):

Expand All @@ -44,6 +52,8 @@ cd ..
pip install -e SEAS
```

### Electrolyzer

A python electrolyzer model is also required for hercules. To install
the electrolyzer, use

Expand All @@ -62,17 +72,15 @@ Then,
cd ..
pip install -e electrolyzer
```

NREL's PySAM software is also required for hercules. To install, use
```
pip install nrel-pysam==4.2.0
```
### PyYAML

If you run hercules and get an error that `pyyaml` is missing, you may also need to install it using
```
conda install -c conda-forge pyyaml
```

### WHOC

NREL's Wind Hybrid Open Controller (WHOC) software is used to implement controllers in the Hercules platform. This package is not essential to run Hercules by itself, but is needed to implement any controls in the platform. Example 06 has an example of how this is used to control a battery based on wind farm power output.

To install:
Expand All @@ -85,22 +93,20 @@ git fetch --all
pip install -e .
```
Note: if you want the newest updates to the WHOC repository, you can checkout the develop branch instead of the main branch.
<!--
# Other steps for era 5
Now need to add a file called APIKEY which contains the API Key you'll find in your data.planetos account

The instructions said to place it in the folder
OpenOA/operational_analysis/toolkits

But I found I also had to copy it down to here:
/Users/pfleming/opt/anaconda3/envs/hercules/lib/python3.8/site-packages/operational_analysis/toolkits/
# Running [Local]

Col
-->
## Using the run scripts

# Running [Local]
The simplest way to run hercules is to use the provided run scripts via:
```
bash run_script.sh
```

## Running manually

To run locally using a standin for AMR-Wind, launch 3 separate
To run locally without the included runscript using a standin for AMR-Wind, launch 3 separate
terminals. In each, `conda activate` your hercules environment (`conda
activate hercules`).

Copy link
Collaborator

@misi9170 misi9170 Dec 5, 2024

Choose a reason for hiding this comment

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

I can't actually comment on the lines below this, because this PR doesn't change them, but they seem to assume the user has already declared a HELICS_PORT variable?

Also, hercules_runscript_dummy_amr.py doesn't exist anymore (should be some sort of florisstandin runscript)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, I'm not positive about this whole section. In the same way as the runscript in each folder might be a little different, the manual version might also be a little different and the best approach would be just to enter the lines appearing in the runscript as they appear. Possibly in 3 terminals, or using the & to unblock, maybe just shorten this section to something more like "to be sure, it's possible to enter the commands in the runscript directly..."?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it makes sense to encourage people to use the run_script.sh . So, perhaps those instructions should come first. But then, maybe it is worth taking the example of one of the run_script.sh , and talking through what each line is doing (and explain that it is possible to run this from three separate terminals, if that's what the user would prefer to do)?

Expand Down Expand Up @@ -128,10 +134,6 @@ run the co-simulation. You should see printout from both the dummy AMR-wind
process and the hercules emulator printed to your screen.


Alternatively, the bash files in each example are set up to be run from the terminal using
```
./bash_script.sh
```
However, if the simulation hangs, be sure to check if there are multiple processes running with
```
ps
Expand All @@ -141,15 +143,6 @@ which will tell you all of the processes currently working. You can kill proces
kill <PID>
```

<!--
In 4 different terminals with location set to hercules/, type the following commands
(This is more and more out of date)

- Terminal 1: `python control_center.py`
- Terminal 2: `python testclient.py`
- Terminal 3: `python vis_client.py`
- Terminal 4: `python front_end_dash.py`
-->

# Running [Kestrel]

Expand Down
2 changes: 1 addition & 1 deletion docs/install_on_kestrel.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Go back to herc_root
#### Install SEAS from public repo

```
pip install https://github.com/NREL/SEAS/blob/main/SEAS.tar.gz?raw=true
pip install https://github.com/NREL/SEAS/blob/v1/SEAS.tar.gz?raw=true
```

If this fails can also try but note need special permissions:
Expand Down