Skip to content

Commit bc746b4

Browse files
add issuance of equity [construction] cash flow row. test that sums for total installed cost and issuance of equity are correct.
1 parent 3b36dac commit bc746b4

File tree

8 files changed

+53
-25
lines changed

8 files changed

+53
-25
lines changed

src/geophires_x/EconomicsUtils.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def _calculate_pre_revenue_costs_and_cashflow(
273273
equity_spend_vec: list[float] = []
274274
debt_draw_vec: list[float] = []
275275
debt_balance_usd_vec: list[float] = []
276-
interest_accrued_vec: list[float] = [] # WIP addding cashflow line item "Debt interest payment [construction] ($)"
276+
interest_accrued_vec: list[float] = []
277277

278278
for year_index in range(pre_revenue_years_count):
279279
base_capex_this_year_usd = total_overnight_capex_usd * phased_capex_schedule[year_index]
@@ -333,6 +333,11 @@ def _append_row(row_name: str, row_vals: list[float | str]) -> None:
333333
pre_revenue_cf_profile.append(blank_row.copy())
334334

335335
# --- Financing Activities ---
336+
_append_row(
337+
f'Issuance of equity ($)',
338+
[abs(it) for it in equity_spend_vec],
339+
)
340+
336341
_append_row(
337342
# 'Debt draw ($)'
338343
f'Issuance of debt ($)',

tests/examples/Fervo_Project_Cape-4.out

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
Simulation Metadata
66
----------------------
7-
GEOPHIRES Version: 3.10.8
8-
Simulation Date: 2025-11-18
9-
Simulation Time: 11:30
10-
Calculation Time: 1.767 sec
7+
GEOPHIRES Version: 3.10.10
8+
Simulation Date: 2025-11-24
9+
Simulation Time: 09:00
10+
Calculation Time: 1.727 sec
1111

1212
***SUMMARY OF RESULTS***
1313

@@ -218,6 +218,7 @@ CONSTRUCTION
218218
Purchase of property [construction] ($) -2,660,866,376
219219
Cash flow from investing activities [construction] ($) -2,660,866,376
220220

221+
Issuance of equity [construction] ($) 1,064,346,550
221222
Issuance of debt [construction] ($) 1,596,519,826
222223
Debt balance [construction] ($) 1,596,519,826
223224
Debt interest payment [construction] ($) 0

tests/examples/example_SAM-single-owner-PPA-2.out

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
Simulation Metadata
66
----------------------
7-
GEOPHIRES Version: 3.10.8
8-
Simulation Date: 2025-11-18
9-
Simulation Time: 11:30
10-
Calculation Time: 0.966 sec
7+
GEOPHIRES Version: 3.10.10
8+
Simulation Date: 2025-11-24
9+
Simulation Time: 09:00
10+
Calculation Time: 0.971 sec
1111

1212
***SUMMARY OF RESULTS***
1313

@@ -198,6 +198,7 @@ CONSTRUCTION
198198
Purchase of property [construction] ($) -1,609,421,820
199199
Cash flow from investing activities [construction] ($) -1,609,421,820
200200

201+
Issuance of equity [construction] ($) 804,710,910
201202
Issuance of debt [construction] ($) 804,710,910
202203
Debt balance [construction] ($) 804,710,910
203204
Debt interest payment [construction] ($) 0

tests/examples/example_SAM-single-owner-PPA-3.out

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
Simulation Metadata
66
----------------------
7-
GEOPHIRES Version: 3.10.8
8-
Simulation Date: 2025-11-18
9-
Simulation Time: 11:30
10-
Calculation Time: 1.152 sec
7+
GEOPHIRES Version: 3.10.10
8+
Simulation Date: 2025-11-24
9+
Simulation Time: 09:00
10+
Calculation Time: 1.154 sec
1111

1212
***SUMMARY OF RESULTS***
1313

@@ -200,6 +200,7 @@ CONSTRUCTION
200200
Purchase of property [construction] ($) -275,473,424
201201
Cash flow from investing activities [construction] ($) -275,473,424
202202

203+
Issuance of equity [construction] ($) 165,284,055
203204
Issuance of debt [construction] ($) 110,189,370
204205
Debt balance [construction] ($) 110,189,370
205206
Debt interest payment [construction] ($) 0

tests/examples/example_SAM-single-owner-PPA-4.out

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
Simulation Metadata
66
----------------------
7-
GEOPHIRES Version: 3.10.8
8-
Simulation Date: 2025-11-18
9-
Simulation Time: 11:30
10-
Calculation Time: 1.162 sec
7+
GEOPHIRES Version: 3.10.10
8+
Simulation Date: 2025-11-24
9+
Simulation Time: 09:00
10+
Calculation Time: 1.159 sec
1111

1212
***SUMMARY OF RESULTS***
1313

@@ -201,6 +201,7 @@ CONSTRUCTION
201201
Purchase of property [construction] ($) -225,808,536
202202
Cash flow from investing activities [construction] ($) -225,808,536
203203

204+
Issuance of equity [construction] ($) 135,485,121
204205
Issuance of debt [construction] ($) 90,323,414
205206
Debt balance [construction] ($) 90,323,414
206207
Debt interest payment [construction] ($) 0

tests/examples/example_SAM-single-owner-PPA-5.out

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
Simulation Metadata
66
----------------------
7-
GEOPHIRES Version: 3.10.8
8-
Simulation Date: 2025-11-18
9-
Simulation Time: 11:18
10-
Calculation Time: 1.732 sec
7+
GEOPHIRES Version: 3.10.10
8+
Simulation Date: 2025-11-24
9+
Simulation Time: 08:52
10+
Calculation Time: 1.725 sec
1111

1212
***SUMMARY OF RESULTS***
1313

@@ -218,6 +218,7 @@ CONSTRUCTION
218218
Purchase of property [construction] ($) -6,132,082 -12,546,240 -44,921,812 -65,650,020 -134,319,940 -137,409,299 -281,139,426
219219
Cash flow from investing activities [construction] ($) -6,132,082 -12,546,240 -44,921,812 -65,650,020 -134,319,940 -137,409,299 -281,139,426
220220

221+
Issuance of equity [construction] ($) 6,132,082 12,546,240 44,921,812 65,650,020 47,011,979 48,093,255 98,398,799
221222
Issuance of debt [construction] ($) 0 0 0 0 87,307,961 89,316,044 182,740,627
222223
Debt balance [construction] ($) 0 0 0 0 87,307,961 182,735,563 378,267,679
223224
Debt interest payment [construction] ($) 0 0 0 0 0 6,111,557 12,791,489

tests/examples/example_SAM-single-owner-PPA.out

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
Simulation Metadata
66
----------------------
7-
GEOPHIRES Version: 3.10.8
8-
Simulation Date: 2025-11-18
9-
Simulation Time: 11:30
10-
Calculation Time: 1.159 sec
7+
GEOPHIRES Version: 3.10.10
8+
Simulation Date: 2025-11-24
9+
Simulation Time: 09:00
10+
Calculation Time: 1.157 sec
1111

1212
***SUMMARY OF RESULTS***
1313

@@ -200,6 +200,7 @@ CONSTRUCTION
200200
Purchase of property [construction] ($) -225,808,536
201201
Cash flow from investing activities [construction] ($) -225,808,536
202202

203+
Issuance of equity [construction] ($) 135,485,121
203204
Issuance of debt [construction] ($) 90,323,414
204205
Debt balance [construction] ($) 90,323,414
205206
Debt interest payment [construction] ($) 0

tests/geophires_x_tests/test_economics_sam.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,23 @@ def _floats(_cf: list[Any]) -> list[float]:
245245
_floats(self._get_cash_flow_row(cy4_cf, 'Debt balance ($)'))[0],
246246
)
247247

248+
def _sum(cf_row_name: str, abs_val: bool = False) -> float:
249+
return sum([abs(it) if abs_val else it for it in _floats(self._get_cash_flow_row(cy4_cf, cf_row_name))])
250+
251+
installed_cost_from_construction_cash_flow = _sum(
252+
'Purchase of property [construction] ($)', abs_val=True
253+
) + _sum('Debt interest payment [construction] ($)')
254+
255+
self.assertEqual(
256+
abs(_floats(self._get_cash_flow_row(cy4_cf, 'Total installed cost ($)'))[0]),
257+
installed_cost_from_construction_cash_flow,
258+
)
259+
260+
self.assertEqual(
261+
_sum('Issuance of equity [construction] ($)'),
262+
_floats(self._get_cash_flow_row(cy4_cf, 'Issuance of equity ($)'))[0],
263+
)
264+
248265
def assertAlmostEqualWithinSigFigs(self, expected: float | int, actual: float | int, num_sig_figs: int = 3):
249266
"""
250267
TODO move to parent class (BaseTestCase)

0 commit comments

Comments
 (0)