flexdesign.investment.investment_metrics¶
- flexdesign.investment.investment_metrics(results: DesignResults, baseline_operating_cost: dict[int, float], horizon_years: int | None = None) InvestmentMetrics¶
Return the NPV and IRR of a design’s operating savings net of capital spending.
- Parameters:
results – Results from
design_results().baseline_operating_cost – Annual operating cost without the investment, keyed by the same modeled years as the results.
horizon_years – Years to evaluate; None uses the study length. Years past the study repeat the last modeled year.
- Returns:
The metrics, with cash flows indexed by year and year 0 the initial build.
- Raises:
ValueError – If the baseline years differ from the modeled years, or
horizon_yearsis below 1.
Warning
Replacement outflows can give more than one IRR; only one is reported.