Skip to content

Commit 26032e1

Browse files
drop redundant/quasi-conflicting summary line items from construction cash flow
1 parent 3f34a4a commit 26032e1

File tree

7 files changed

+1065
-1071
lines changed

7 files changed

+1065
-1071
lines changed

src/geophires_x/EconomicsSamPreRevenue.py

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,17 @@ def _calculate_pre_revenue_costs_and_cashflow(
9797
debt_fraction: float,
9898
debt_financing_start_year: int,
9999
logger: logging.Logger,
100+
include_summary_line_items: bool = False,
100101
) -> PreRevenueCostsAndCashflow:
101102
"""
102103
Calculates the true capitalized cost and interest during pre-revenue years (exploration/permitting/appraisal,
103104
construction) by simulating a year-by-year phased expenditure with inflation.
104105
105-
Also builds a pre-revenue cash flow profile for constructionrevenue years.
106+
Also builds a pre-revenue cash flow profile for construction revenue years.
107+
108+
:param include_summary_line_items: Include cash flow from investment and financing activities and pre-tax returns
109+
in the summary line items. Disabled by default since they are redundant with other construction line items and
110+
confusing to reconcile with their non-construction equivalents.
106111
"""
107112

108113
logger.info(f"Using Phased CAPEX Schedule: {phased_capex_schedule}")
@@ -167,11 +172,13 @@ def _append_row(row_name: str, row_vals: list[float | str]) -> None:
167172

168173
# --- Investing Activities ---
169174
_append_row(f'Purchase of property ($)', [-x for x in capex_spend_vec])
170-
_append_row(
171-
f'Cash flow from investing activities ($)',
172-
# 'CAPEX spend ($)'
173-
[-x for x in capex_spend_vec],
174-
)
175+
176+
if include_summary_line_items:
177+
_append_row(
178+
f'Cash flow from investing activities ($)',
179+
# 'CAPEX spend ($)'
180+
[-x for x in capex_spend_vec],
181+
)
175182

176183
pre_revenue_cf_profile.append(blank_row.copy())
177184

@@ -196,21 +203,26 @@ def _append_row(row_name: str, row_vals: list[float | str]) -> None:
196203

197204
_append_row(_IDC_CASH_FLOW_ROW_NAME, interest_accrued_vec)
198205

199-
_append_row(f'Cash flow from financing activities ($)', [e + d for e, d in zip(equity_spend_vec, debt_draw_vec)])
206+
if include_summary_line_items:
207+
_append_row(
208+
f'Cash flow from financing activities ($)', [e + d for e, d in zip(equity_spend_vec, debt_draw_vec)]
209+
)
200210

201211
pre_revenue_cf_profile.append(blank_row.copy())
202212

203213
# --- Returns ---
204214
equity_cash_flow_usd = [-x for x in equity_spend_vec]
205-
_append_row(f'Total pre-tax returns ($)', equity_cash_flow_usd)
215+
216+
if include_summary_line_items:
217+
_append_row(f'Total pre-tax returns ($)', equity_cash_flow_usd)
218+
206219
_append_row(_TOTAL_AFTER_TAX_RETURNS_CASH_FLOW_ROW_NAME, equity_cash_flow_usd)
207220

208221
return PreRevenueCostsAndCashflow(
209222
total_installed_cost_usd=total_capitalized_cost_usd,
210223
construction_financing_cost_usd=total_interest_accrued_usd,
211224
debt_balance_usd=current_debt_balance_usd,
212225
inflation_cost_usd=total_inflation_cost_usd,
213-
# pre_revenue_cash_flow_profile_dict=pre_revenue_cf_profile_dict,
214226
pre_revenue_cash_flow_profile=pre_revenue_cf_profile,
215227
)
216228

tests/examples/Fervo_Project_Cape-4.out

Lines changed: 174 additions & 177 deletions
Large diffs are not rendered by default.

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

Lines changed: 174 additions & 177 deletions
Large diffs are not rendered by default.

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

Lines changed: 174 additions & 177 deletions
Large diffs are not rendered by default.

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

Lines changed: 174 additions & 177 deletions
Large diffs are not rendered by default.

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

Lines changed: 174 additions & 177 deletions
Large diffs are not rendered by default.

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

Lines changed: 174 additions & 177 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)