Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 ORBIT/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
from ORBIT.parametric import ParametricManager
from ORBIT.supply_chain import SupplyChainManager

__version__ = "1.2.5"
__version__ = "1.2.6"
37 changes: 37 additions & 0 deletions ORBIT/phases/design/array_system_design.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@


import warnings
from copy import deepcopy
from collections import OrderedDict

import numpy as np
Expand Down Expand Up @@ -1129,3 +1130,39 @@ def cable_lengths_by_type_speed(self):
for name in self.cables
}
return cables

def create_layout_df(self) -> pd.DataFrame:
"""Creates a Pandas DataFrame layout.

Returns
-------
pd.DataFrame
The wind farm layout returned back in its original form.
"""
layout_df = deepcopy(self.location_data)
substation_cols = [
"substation_id",
"substation_name",
"substation_latitude",
"substation_longitude",
]
substations = (
layout_df[substation_cols]
.drop_duplicates()
.rename(
columns={
col: col.replace("substation_", "")
for col in layout_df.columns
}
)
)
layout_df = layout_df.drop(columns=substation_cols).rename(
columns={
col: col.replace("turbine_", "") for col in layout_df.columns
}
)
layout_df = (
pd.concat((layout_df, substations))
.reset_index(drop=True)
.fillna("")
)
9 changes: 7 additions & 2 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@
ORBIT Changelog
===============

Unreleased
----------
1.2.6
-----
- Implements `create_layout_df` for the `CustomArraySystemDesign` model to ensure
compatibility with workflows relying on the layout generation tools.

1.2.5
-----
- Allow for a Pandas DataFrame to be passed directly to the ``CustomArraySystemDesign.layout_data``
configuration input.
- Move the matplotlib import from the import section of ``/ORBIT/phases/design/array_system_design.py``
Expand Down