Skip to content

Commit 1eb51dd

Browse files
committed
Fixed negativity in sqrt in costs.py by np.clip.
1 parent ac78fdb commit 1eb51dd

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

process/costs.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3026,7 +3026,9 @@ def coelc(self):
30263026
# Annual cost of operation and maintenance
30273027

30283028
annoam = cost_variables.ucoam[cost_variables.lsa - 1] * np.sqrt(
3029-
heat_transport_variables.p_plant_electric_net_mw / 1200.0e0
3029+
np.clip(
3030+
heat_transport_variables.p_plant_electric_net_mw, 0, np.inf
3031+
) / 1200.0e0
30303032
)
30313033

30323034
# Additional cost due to pulsed reactor thermal storage
@@ -3097,7 +3099,9 @@ def coelc(self):
30973099
# Annual cost of waste disposal
30983100

30993101
annwst = cost_variables.ucwst[cost_variables.lsa - 1] * np.sqrt(
3100-
heat_transport_variables.p_plant_electric_net_mw / 1200.0e0
3102+
np.clip(
3103+
heat_transport_variables.p_plant_electric_net_mw, 0, np.inf
3104+
) / 1200.0e0
31013105
)
31023106

31033107
# Cost of electricity due to waste disposal

0 commit comments

Comments
 (0)