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
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@
tools.
- Modernize and streamline the installation instructions.

### Deprecations

- Project parameter `contingency` is fully deprecated in favor of `installation_contingency` and
`procurement_contingency` and will raise a `KeyError` when detected by the `ProjectManager`.
- Top-level `landfall` dictionary is no longer suppored and is fully deprecated in favor of nesting
it in the `export_system_design` and `export_system` dictionary, for design and installation phases.
- The `export_system`-level `interconnection_distance` variable is deprecated and should now be
placed in the `export_system.landfall` dictionary.

## 1.2.6

- Implements `create_layout_df` for the `CustomArraySystemDesign` model to ensure
Expand Down
21 changes: 8 additions & 13 deletions ORBIT/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
from math import ceil
from numbers import Number
from pathlib import Path
from warnings import warn
from itertools import product

warnings.filterwarnings("default")
Expand Down Expand Up @@ -196,19 +195,15 @@ def run(self, **kwargs):
def _print_warnings(self):

if "contingency" in self.project_params:
warn(
"The 'contingency' project parameter will be deprecated"
" and replaced with two separate parameters:"
" 'installation_contingency' and 'procurement_contingency'."
" Specify the 'installation_contingency' and "
" 'procurement_contingency' in $/kW, or alternatively, use"
" 'procurement_contingency_factor' in '%' of the turbine "
" + system + project capex, and"
" 'installation_contingency_factor' in '%' of the"
" installation capex",
DeprecationWarning,
stacklevel=2,
msg = (
"The 'contingency' project parameter was replaced with"
" separate 'installation_contingency' and"
" 'procurement_contingency' in ($/kW). Alternatively, use"
" the 'procurement_contingency_factor' (% of turbine, system,"
" and project CapEx) or 'installation_contingency_factor'"
" (% of installation capex)."
)
raise KeyError(msg)

try:
df = pd.DataFrame(self.logs)
Expand Down
16 changes: 6 additions & 10 deletions ORBIT/phases/design/electrical_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
__maintainer__ = ""
__email__ = []

from warnings import warn

import numpy as np

Expand Down Expand Up @@ -120,17 +119,14 @@ def __init__(self, config, **kwargs):

self._design = self.config["export_system_design"]

_landfall = self.config.get("landfall", {})
if _landfall:
warn(
"landfall dictionary will be deprecated and moved"
" into [export_system_design][landfall].",
DeprecationWarning,
stacklevel=2,
if self.config.get("landfall", None) is not None:
msg = (
"The top-level 'landfall' dictionary is deprecated and"
" should be nested in the 'export_system_design' dictionary."
)
raise KeyError(msg)

else:
_landfall = self._design.get("landfall", {})
_landfall = self._design.get("landfall", {})

self._distance_to_interconnection = _landfall.get(
"interconnection_distance", 3
Expand Down
16 changes: 6 additions & 10 deletions ORBIT/phases/design/export_system_design.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
__maintainer__ = "Rob Hammond"
__email__ = "rob.hammond@nlr.gov"

from warnings import warn

import numpy as np

Expand Down Expand Up @@ -86,17 +85,14 @@ def __init__(self, config, **kwargs):
self._distance_to_landfall = config["site"]["distance_to_landfall"]
self._get_touchdown_distance()

_landfall = self.config.get("landfall", {})
if _landfall:
warn(
"landfall dictionary will be deprecated and moved"
" into [export_system_design][landfall].",
DeprecationWarning,
stacklevel=2,
if self.config.get("landfall", None) is not None:
msg = (
"The top-level 'landfall' dictionary is deprecated and"
" should be nested in the 'export_system_design' dictionary."
)
raise KeyError(msg)

else:
_landfall = self.config["export_system_design"].get("landfall", {})
_landfall = self._design.get("landfall", {})

self._distance_to_interconnection = _landfall.get(
"interconnection_distance", 3
Expand Down
33 changes: 14 additions & 19 deletions ORBIT/phases/install/cable_install/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

from copy import deepcopy
from math import ceil
from warnings import warn

from marmot import process

Expand Down Expand Up @@ -138,16 +137,13 @@ def extract_distances(self):

site = self.config["site"]["distance"]

_landfall = self.config.get("landfall", {})
if _landfall:
warn(
"landfall dictionary will be deprecated and moved"
" into [export_system][landfall].",
DeprecationWarning,
stacklevel=2,
if self.config.get("landfall", None) is not None:
msg = (
"The top-level 'landfall' dictionary is deprecated and"
" should be nested in the 'export_system' dictionary."
)
else:
_landfall = self.config["export_system"].get("landfall", {})
raise KeyError(msg)
_landfall = self.config["export_system"].get("landfall", {})

trench = _landfall.get("trench_length", 1)

Expand Down Expand Up @@ -203,16 +199,15 @@ def calculate_onshore_transmission_cost(self, **kwargs):
# capacity = self.config["plant"]["capacity"]
system = self.config["export_system"]
voltage = system.get("interconnection_voltage", 345)
distance = system.get("interconnection_distance", None)

if distance:
warn(
"[export_system][interconnection_distance] will be deprecated"
" and moved to"
" [export_system][landfall][interconnection_distance].",
DeprecationWarning,
stacklevel=2,

if system.get("interconnection_distance", None) is not None:
msg = (
"The `export_system`-level 'interconnection_distance' is"
"deprecated and should be placed in the 'export_system'"
"'landfall' dictionary"
"(e.g., export_system.landfall.interconnection_distance)."
)
raise KeyError(msg)

landfall = system.get("landfall", {})
distance = landfall.get("interconnection_distance", 3)
Expand Down
28 changes: 10 additions & 18 deletions ORBIT/phases/install/quayside_assembly_tow/gravity_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
__maintainer__ = "Jake Nunemaker"
__email__ = "jake.nunemaker@nlr.gov"

from warnings import warn

import simpy
from marmot import le, process
Expand All @@ -27,13 +26,11 @@ class GravityBasedInstallation(InstallPhase):

#:
expected_config = {
"support_vessel": "str, (optional)",
"wtiv": "str, (optional)",
"ahts_vessel": "str",
"towing_vessel": "str",
"towing_vessel_groups": {
"towing_vessels": "int",
"station_keeping_vessels": "int (optional)",
"ahts_vessels": "int (optional, default: 1)",
"num_groups": "int (optional)",
},
Expand Down Expand Up @@ -235,16 +232,12 @@ def initialize_support_vessel(self, **kwargs):
Initializes Multi-Purpose Support Vessel to perform installation
processes at site.
"""

specs = self.config.get("support_vessel", None)

if specs is not None:
warn(
"support_vessel will be deprecated and replaced with"
" towing_vessels and ahts_vessel in the towing groups.\n",
DeprecationWarning,
stacklevel=2,
if self.config.get("support_vessel") is not None:
msg = (
"`support_vessel` has been replaced with the separate"
" `towing_vessels`, `towing_groups`, and `ahts_vessel`."
)
raise KeyError(msg)

specs = self.config["ahts_vessel"]
vessel = self.initialize_vessel("Multi-Purpose AHTS Vessel", specs)
Expand All @@ -258,13 +251,12 @@ def initialize_support_vessel(self, **kwargs):
)

if station_keeping_vessels is not None:
warn(
"['towing_vessl_groups]['station_keeping_vessels']"
" will be deprecated and replaced with"
" ['towing_vessl_groups]['ahts_vessels'].\n",
DeprecationWarning,
stacklevel=2,
msg = (
"`towing_vessl_groups.station_keeping_vessels` has been"
" replaced with the separate `towing_vessels`,"
" `towing_groups`, and `ahts_vessel`."
)
raise KeyError(msg)

station_keeping_vessels = self.config["towing_vessel_groups"].get(
"ahts_vessels", 1
Expand Down
26 changes: 10 additions & 16 deletions ORBIT/phases/install/quayside_assembly_tow/moored.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@ class MooredSubInstallation(InstallPhase):

#:
expected_config = {
"support_vessel": "str, (optional)",
"ahts_vessel": "str",
"towing_vessel": "str",
"towing_vessel_groups": {
"towing_vessels": "int",
"station_keeping_vessels": "int (optional)",
"ahts_vessels": "int (optional, default: 1)",
"num_groups": "int (optional)",
},
Expand Down Expand Up @@ -245,15 +243,12 @@ def initialize_support_vessel(self):
processes at site.
"""

specs = self.config.get("support_vessel", None)

if specs is not None:
warn(
"support_vessel will be deprecated and replaced with"
" towing_vessels and ahts_vessel in the towing groups.\n",
DeprecationWarning,
stacklevel=2,
if self.config.get("support_vessel") is not None:
msg = (
"`support_vessel` has been replaced with the separate"
" `towing_vessels`, `towing_groups`, and `ahts_vessel`."
)
raise KeyError(msg)

# vessel = self.initialize_vessel("Multi-Purpose Support Vessel",
# specs)
Expand All @@ -267,13 +262,12 @@ def initialize_support_vessel(self):
)

if station_keeping_vessels is not None:
warn(
"['towing_vessl_groups]['station_keeping_vessels']"
" will be deprecated and replaced with"
" ['towing_vessl_groups]['ahts_vessels'].\n",
DeprecationWarning,
stacklevel=2,
msg = (
"`towing_vessl_groups.station_keeping_vessels` has been"
" replaced with the separate `towing_vessels`,"
" `towing_groups`, and `ahts_vessel`."
)
raise KeyError(msg)

# install_moored_substructures(
# self.support_vessel,
Expand Down
3 changes: 1 addition & 2 deletions docs/methods/install/MooredSubInstallation.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,11 @@ config = {

...

"support_vessel": "example_support_vessel", # Will perform onsite installation procedures.
"ahts_vessel": "example_ahts_vessel", # Anchor handling tug supply vessel associated with each tow group.
"towing_vessel": "example_towing_vessel", # Towing groups will contain multiple of this vessel.
"towing_groups": {
"towing_vessel": 1, # Vessels used to tow the substructure to site.
"station_keeping_vessels": 3, # Vessels used for station keeping during mooring line hookups.
"ahts_vessels": 3, # Number of anchor handling/station keeping vessels
"num_groups": 1 # Number of independent groups. Optional, defualt: 1.
},

Expand Down
7 changes: 4 additions & 3 deletions docs/tutorials/available_outputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ import matplotlib.pyplot as plt

from ORBIT import ProjectManager, load_config

# Apply thousands separators and no decimals to floats
pd.options.display.float_format = '{:,.0f}'.format

# Ensure the correct examples directory is used when running this in docs or in examples
here = Path(".").resolve()
example_dir = here.parents[1] / "examples" if here.stem == "tutorials" else here
Expand Down Expand Up @@ -388,8 +391,6 @@ mp_vessel_summary = (
mp_install[["agent", "action", "duration", "cost"]]
.groupby(["agent", "action"])
.sum()
.style
.format("{:,.2f}")
)
mp_vessel_summary
```
Expand Down Expand Up @@ -425,5 +426,5 @@ pd.concat(
pd.DataFrame(project.cash_flow.values(), columns=["cash_flow"]),
],
axis=1
).head(12).style.format("{:,.2f}")
).head(12)
```
3 changes: 1 addition & 2 deletions examples/configs/example_floating_project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ array_cable_install_vessel: example_cable_lay_vessel
export_cable_install_vessel: example_cable_lay_vessel
mooring_install_vessel: example_support_vessel
oss_install_vessel: floating_heavy_lift_vessel
support_vessel: example_support_vessel
ahts_vessel: example_ahts_vessel
towing_vessel: example_towing_vessel
towing_vessel_groups:
station_keeping_vessels: 2
ahts_vessel: 2
towing_vessels: 3
wtiv: floating_heavy_lift_vessel
# Module Specific
Expand Down
17 changes: 8 additions & 9 deletions examples/configs/example_gravity_based_project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,28 @@ plant:
turbine_spacing: 7
turbine: 15MW_generic
# Vessels
support_vessel: example_support_vessel
ahts_vessel: example_ahts_vessel
towing_vessel: example_towing_vessel
towing_vessel_groups:
towing_vessels: 3
ahts_vessels: 2
towing_vessels: 3
ahts_vessels: 2
array_cable_install_vessel: example_cable_lay_vessel
export_cable_install_vessel: example_cable_lay_vessel
export_cable_bury_vessel: example_cable_lay_vessel
oss_install_vessel: example_heavy_lift_vessel
spi_vessel: example_scour_protection_vessel
ahts_vessel: example_ahts_vessel
# wtiv: example_wtiv # GBF installation without WTIV
# Substructure
substructure:
unit_cost: 5700000
takt_time: 0
# towing_speed: 6.5, considered on towing vessel file.
port:
monthly_rate: 520700 # This is the turbine assembly crane monthly rate. The port rental costs are put in as line items in the LCOE calc (where CapEx breakdown is updated) to include the summed port & quayside cost assumed at 8 months. This 8 months includeds 6 months takt time and 2 months storage (why takt is set to 0).
sub_assembly_lines: 2 # how many you can produce in parallel
turbine_assembly_cranes: 2
sub_storage: 1
assembly_storage: 1
monthly_rate: 520700 # This is the turbine assembly crane monthly rate. The port rental costs are put in as line items in the LCOE calc (where CapEx breakdown is updated) to include the summed port & quayside cost assumed at 8 months. This 8 months includeds 6 months takt time and 2 months storage (why takt is set to 0).
sub_assembly_lines: 2 # how many you can produce in parallel
turbine_assembly_cranes: 2
sub_storage: 1
assembly_storage: 1
# Module Specific
OffshoreSubstationInstallation:
feeder: example_heavy_feeder
Expand Down
Loading
Loading