Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a9f8fe5

Browse files
authoredApr 9, 2024
Merge pull request #7 from NREL/maintenance/version-pinning
Maintenance: Version pinning
2 parents 74e3931 + 9914824 commit a9f8fe5

File tree

9 files changed

+129
-12
lines changed

9 files changed

+129
-12
lines changed
 

‎CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# CHANGELOG
2+
3+
## 0.5.2 (9 April 2024)
4+
5+
- Pins FLORIS to v3.6 to avoid workarounds for previous versions, and to avoid issues with
6+
adopting v4.
7+
- Updates WOMBAT to 0.9.3 to account for the latest bug fixes.
8+
- Fixes minor typos.
9+
- Adds in mermaid markdown workflow diagrams for the documentation.

‎docs/diagrams/input_flow.mmd

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
flowchart TD
2+
3+
subgraph Configuration
4+
5+
ConfigA[orbit_config]
6+
ConfigB[wombat_config]
7+
ConfigC[floris_config]
8+
ConfigD[Additional\nConfigurations]
9+
ConfigE[fa:fa-code fa:fa-file WAVES Configuration]
10+
11+
ConfigE ---|fa:fa-file file name or \n fa:fa-code settings| ConfigB
12+
ConfigE ---|fa:fa-file file name or \n fa:fa-code settings| ConfigA
13+
ConfigE ---|fa:fa-file file name or \n fa:fa-code settings| ConfigC
14+
ConfigE ---|fa:fa-code settings| ConfigD
15+
16+
ConfigD --- ConfigF(Shared ORBIT settings and \n ORBIT tie-ins for weather)
17+
ConfigD --- ConfigG(FLORIS tie-ins for weather)
18+
ConfigD --- ConfigH(Detailed CapEx breakdowns)
19+
ConfigD --- ConfigI(High level financial variables)
20+
ConfigD --- ConfigJ(Indicators to connect any \n of ORBIT or FLORIS \n to WOMBAT configurations)
21+
end
22+
23+
subgraph Initialization
24+
InitA(Create ORBIT ProjectManager)
25+
InitB(Create WOMBAT Simulation)
26+
InitC(Create FLORIS FlorisInterface)
27+
InitD[Connect layouts\nand weather profiles]
28+
InitE[Project]
29+
InitF[Project.orbit --> ProjectManager]
30+
InitG[Project.wombat --> Simulation]
31+
InitH[Project.floris --> FlorisInterface]
32+
33+
InitA --> InitD
34+
InitB --> InitD
35+
InitC --> InitD
36+
InitD --> InitE
37+
InitE --- InitF
38+
InitE --- InitG
39+
InitE --- InitH
40+
end
41+
42+
Configuration --> Initialization

‎docs/diagrams/input_flow.svg

Lines changed: 1 addition & 0 deletions
Loading

‎docs/diagrams/results_flow.mmd

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
flowchart LR
2+
3+
A("Project.run()")
4+
A --> B("Project.orbit.run()")
5+
A --> C("Project.wombat.run()")
6+
A --> D("Project.run_floris()")
7+
8+
B --> ORBIT
9+
C --> WOMBAT
10+
D --> FLORIS
11+
12+
13+
subgraph Independent
14+
15+
NT[n_turbines]
16+
NOSS[n_substations]
17+
TurbRat[turbine_rating]
18+
19+
subgraph ORBIT
20+
ArrayLen[total_array_length]
21+
ExpLen[total_export_length]
22+
CapEx[capex_breakdown]
23+
end
24+
25+
subgraph WOMBAT
26+
Avail[availability]
27+
OpEx[opex]
28+
end
29+
30+
subgraph FLORIS
31+
TurbPotential[turbine_potential_energy]
32+
ProjPotential[project_potential_energy]
33+
TurbProd[turbine_production_energy]
34+
ProjProd[project_production_energy]
35+
end
36+
37+
end
38+
39+
subgraph Combined
40+
EnergyPotential[energy_potential] --> EnergyLoss[energy_losses]
41+
EnergyProd[energy_production] --> EnergyLoss
42+
EnergyPotential --> CF[capacity_factor]
43+
EnergyProd --> CF
44+
EnergyProd --> Revenue[revenue]
45+
Revenue --> CashFlow[cash_flow]
46+
CashFlow --> NPV[npv]
47+
CashFlow --> IRR[irr]
48+
CashFlow --> LCOE[lcoe]
49+
50+
TurbPotential --> EnergyPotential
51+
ProjPotential --> EnergyPotential
52+
TurbProd --> EnergyProd
53+
ProjProd --> EnergyProd
54+
Avail --> EnergyProd
55+
OpEx --> CashFlow
56+
CapEx --> CashFlow
57+
end

‎docs/diagrams/results_flow.svg

Lines changed: 1 addition & 0 deletions
Loading

‎docs/user_guide.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,12 @@ The following method is run on intialization when ``Project.connect_floris_to_la
120120
:noindex:
121121
```
122122

123+
Visually, this looks like the following workflow:
124+
125+
```{image} diagrams/input_flow.svg
126+
:align: center
127+
```
128+
123129
### Updating Configurations
124130

125131
Sometimes, additional configurations may need to be connected prior to running an analysis. For
@@ -199,6 +205,12 @@ For the following set of methods, users only need to create a ``Project`` object
199205

200206
## Results
201207

208+
Visually, the following is a general flow of operations for combining each model's outputs:
209+
210+
```{image} diagrams/results_flow.svg
211+
:align: center
212+
```
213+
202214
To quickly produce any of the high-level outputs to a single `DataFrame`, the below method can be
203215
used in place of individually calculating each metric and combining into a report. Additionally,
204216
users can refer to the [COWER 2022 example](example_cower_2022:results) for the reported results,

‎pyproject.toml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
requires = ["setuptools", "setuptools-scm"]
33
build-backend = "setuptools.build_meta"
44

5-
[metadata]
6-
version = "attr: waves.__version__"
7-
85
[project]
96
name = "WAVES"
107
dynamic = ["version"]
@@ -19,10 +16,10 @@ dependencies = [
1916
"pyyaml",
2017
"matplotlib>=3.6",
2118
"numpy-financial>=1.0.0",
22-
"floris>=3.3",
23-
"wombat>=0.9.1",
19+
"floris==3.6", # TODO: upgrade to FLORIS v4
20+
"wombat>=0.9.3",
2421
"orbit-nrel>=1.0.8",
25-
"typer[all]",
22+
"typer>=0.12.3",
2623
]
2724
keywords = [
2825
"python3",
@@ -54,9 +51,6 @@ classifiers = [
5451
"Typing :: Typed",
5552
]
5653

57-
[console_scripts]
58-
waves = "waves:__main__"
59-
6054
[project.scripts]
6155
waves = "waves.__main__:app"
6256

@@ -87,6 +81,7 @@ examples=[
8781
"jupyterlab",
8882
"jupyterlab-myst",
8983
]
84+
all = ["waves[dev,docs,examples]"]
9085

9186
[tool.setuptools]
9287
include-package-data = true

‎waves/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
from waves.project import Project
44

55

6-
__version__ = "0.5.1"
6+
__version__ = "0.5.2"

‎waves/project.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,7 +1154,7 @@ def n_turbines(self) -> int:
11541154
return len(self.wombat.windfarm.turbine_id)
11551155
if self.floris_config is not None:
11561156
return self.floris.farm.n_turbines
1157-
raise RuntimeError("No models wer provided, cannot calculate value.")
1157+
raise RuntimeError("No models were provided, cannot calculate value.")
11581158

11591159
def turbine_rating(self) -> float:
11601160
"""Calculates the average turbine rating, in MW, of all the turbines in the project.
@@ -1173,7 +1173,7 @@ def turbine_rating(self) -> float:
11731173
return self.orbit.turbine_rating
11741174
if self.wombat_config is not None:
11751175
return self.wombat.windfarm.capacity / 1000 / self.n_turbines
1176-
raise RuntimeError("No models wer provided, cannot calculate value.")
1176+
raise RuntimeError("No models were provided, cannot calculate value.")
11771177

11781178
def n_substations(self) -> int:
11791179
"""Calculates the number of subsations in the project.

0 commit comments

Comments
 (0)