Rufineer v0.43.0
Account
Browse the docs

Example 1 of 13

Kestrel Energy 45 MWac solar

Based on kestrel-lender-model.xlsm

A lender-grade solar IPP model for Kestrel Power in Zimbabwe. It has senior and subordinated debt, four ancillary facilities (VAT, working capital, DSRA, MRA), local tax rules and a copy-paste Solve sheet. It is the model that pushed Rufineer furthest. Design example: written in the full v0.5 language. The compiler builds the working core today, so this one doesn't compile yet. Source: examples/design/kestrel/.

Workbook
26 sheets, 146 period columns
Timeline
FC 31 Dec 2026, 15 monthly construction columns, then quarterly for 25 years of operations
Plant
45 MWac / 50.39 MWp, sole offtaker Tamarind Gold at 9 USc/kWh, 15-year PPA
Capital
USD 39.0m construction cost, senior gearing capped at 70%, total at 80%, 7-year tenor
Rebuild shown
16 files, 304 lines

Where each sheet goes

Workbook sheetsRufineer
Inp, Inp_options, Inp_EPC, Inp_time, Dev_Costs, Lender Advisorsinputs/*.rfn, with tables read from sheets of kestrel_inputs.xlsx
Flagstimeline in model.rfn, period lines in debt.rfn
Consconstruction.rfn
Opsenergy.rfn, opex.rfn
Workings (sources and uses, sizing, sculpting, debt accounts)funding.rfn, debt.rfn
VAT&WCfacilities.rfn
Acc & Taxtax.rfn
CFW, Bi-annual CFW, Annual CFW, Fin workingscash.rfn (one waterfall, exported three ways)
IFS, Annual FSstatements.rfn
Valuation, Dashboardreturns.rfn
Solve Modelgenerated from the solve lines and checks.rfn

Source 16 files shown, 304 lines

model.rfn
model "Kestrel Energy 45 MWac" {
  sponsor   "Kestrel Power"
  country   "Zimbabwe"
  currency  USD
  display   thousands
  data      "kestrel_inputs.xlsx"        // every table below is a sheet in here
  sheets    [dashboard, solve, cash, statements, returns,
             inputs, timing, construction, energy, opex,
             funding, debt, facilities, tax]
}

/// One time ruler with two column widths, as in the workbook's Flags sheet
timeline {
  start          2027-01-01                 // financial close 2026-12-31
  fiscal_year    ends Dec
  construction   15m   step month
  operations     25y   step quarter
}

currency ZAR, RMB, ZiG                      // some EPC lines are priced in these
fx ZAR/USD = inputs.rates.zar_usd
fx RMB/USD = inputs.rates.rmb_usd

What this model needed from the language

  • Two column widths on one ruler. The Flags sheet runs monthly for 15 months, then quarterly. step is set per phase, and year_frac handles the change in width.
  • Currencies. EPC lines are priced in USD, ZAR and RMB. Each is written in its own currency and converted at an fx line: while building, the forward rate bought at financial close; after that, spot (Forward cover).
  • Waterfall with lock-up. The four CFW sheets share one logic at three frequencies, so they become one waterfall and one export line.
  • Several solves. The workbook copy-pastes uses of funds, CFADS, CIT and repayments. Each one becomes a solve line with its own convergence check.
  • Tax rules. The capital allowances are each capex's allowance, and the tax holiday, loss expiry and interest limitation a tax { … } block in the model block (A tax regime), so the Acc & Tax sheet's 486 rows are not rewritten by hand. Deferred tax is still written by hand.