Skip to content
Merged
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
23 changes: 19 additions & 4 deletions process/costs.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import logging

import numpy as np

from process import constants
Expand All @@ -22,6 +24,8 @@
)
from process.exceptions import ProcessValueError

logger = logging.getLogger(__name__)


class Costs:
def __init__(self):
Expand Down Expand Up @@ -3025,8 +3029,18 @@ def coelc(self):

# Annual cost of operation and maintenance

annoam = cost_variables.ucoam[cost_variables.lsa - 1] * np.sqrt(
heat_transport_variables.p_plant_electric_net_mw / 1200.0e0
if heat_transport_variables.p_plant_electric_net_mw < 0:
sqrt_p_plant_electric_net_mw_1200 = 0.0
logger.warning(
"p_plant_electric_net_mw has gone negative! Clamping it to 0 for the calculation of annoam and annwst (cost of maintenance and cost of waste)."
)
else:
sqrt_p_plant_electric_net_mw_1200 = np.sqrt(
heat_transport_variables.p_plant_electric_net_mw / 1200.0e0
)
annoam = (
cost_variables.ucoam[cost_variables.lsa - 1]
* sqrt_p_plant_electric_net_mw_1200
)

# Additional cost due to pulsed reactor thermal storage
Expand Down Expand Up @@ -3096,8 +3110,9 @@ def coelc(self):

# Annual cost of waste disposal

annwst = cost_variables.ucwst[cost_variables.lsa - 1] * np.sqrt(
heat_transport_variables.p_plant_electric_net_mw / 1200.0e0
annwst = (
cost_variables.ucwst[cost_variables.lsa - 1]
* sqrt_p_plant_electric_net_mw_1200
)

# Cost of electricity due to waste disposal
Expand Down