Distributed energy, financial modelling

One evaluation engine replaced the spreadsheet behind every hybrid generation decision.

Engineering detail and committee summary now read from the same calculation.

Client
Under NDA
Field
Distributed energy
Services
Strategy, financial modelling, development

Challenge

The whole evaluation lived in a spreadsheet.

The decision to replace diesel generation with a hybrid system of photovoltaic and LPG engines is taken on NPV, IRR and payback. Those figures came out of a workbook whose formulas chained across tabs.

Every engineer kept a version of that workbook. Nobody could say which one was current, and the file that reached management took two days to assemble.

Three things broke at the same time: the traceability of the number, the consistency between teams, and the ability to answer what happens if the LPG price rises 8% while the meeting is still running.

In numbers

What the engine holds to.

Tolerance against the original model on NPV, IRR and payback
0.01%
Full recalculation after a parameter change
<500 ms
Excel report generated
<3 s
OPEX cost lines modelled year by year
16

Approach

Two interfaces over one calculation engine.

Engineering mode exposes every parameter of the model: the energy balance, the LPG cost structure down to freight per tonne, CAPEX broken out into editable line items, OPEX year by year, compound inflation and one-off events such as the overhaul. The cash flow is visible and auditable line by line.

Presentation mode takes the same numbers and arranges them for committee: projected saving, a comparison against current operation, the energy mix and the offered price per MWh. It reads in plain language and draws on the same single source.

Both modes export the same six-sheet Excel report, formatted and ready to attach to a proposal.

The platform runs on Python, Streamlit, Plotly and openpyxl. IRR is solved by Newton-Raphson in plain Python, which keeps the engine portable and the deployment simple.

Parity

Replacing a spreadsheet already in use is a question of parity.

If the new system returns a different NPV from the original sheet, nobody opens it again.

So we worked in the reverse of the usual order. We rebuilt the model cell by cell, documenting each formula against its original reference, and designed the interface afterwards.

The engine was validated against the base case of the spreadsheet on all three financial indicators, and on CAPEX to the dollar. Every function in the engine carries in its documentation the sheet and cell it replicates.

Reading the domain was most of the work: why the LPG conversion factor is fixed at 2.015 kg per gallon, why photovoltaic maintenance grows linearly while the LPG system's compounds, and what it means for the overhaul to fall in year eight.

Result

The meeting is about the decision now.

Management takes its figures from one place, and an answer to a price question arrives while the question is still on the table.

A reconciliation suite checks the energy balance, the consumption, the CAPEX sum, the coherence of the cash flow and an independent calculation of NPV.

The calculation engine sits apart from the interface and from the report generator, so the model can feed other channels without being rewritten.

Have a puzzle?

Tell us about the project that standard platforms cannot handle.