Rufineer v0.43.0
Account
Browse the docs

Example 2 of 13

Wind farm training model

Based on Project-Finance-Training-Model-Sample.xlsx

A 30-turbine merchant wind project with a scenario manager, macro-based debt sizing, MACRS tax depreciation, a DSRA, a shareholder loan with cash sweep and lock-up tests. It covers the core of project finance in 15 sheets, so it is the best place to learn Rufineer. 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/wind/.

Workbook
15 sheets, quarterly, values only (no formulas or macros in the sample)
Timeline
Construction Jan 2020 to Jun 2021 (6 quarters), operations 15 years to Jun 2036
Project
30 turbines, P50 2,300 MWh per turbine per year, merchant price USD 80 to 85/MWh (real)
Capital
USD 37.5m capex plus 5% contingency, 75% gearing or DSCR 1.30x (lower of), SHL and equity split 50/50
Rebuild shown
11 files, 264 lines

Where each sheet goes

Workbook sheetsRufineer
SETUP, >model.rfn (constants and switches come from the compiler)
Inputs, Depr inputsinputs.rfn, and inputs/tables.rfn reading sheets of wind_farm_inputs.xlsx
Timingtimeline in model.rfn
Opsops.rfn
Conscons.rfn (costs, sources and uses, funding order)
Debt, DSCR debt sizing, Macrodebt.rfn (one solve replaces the Macro sheet)
D&Ttax.rfn
Equityequity.rfn
FSfs.rfn
Scenariosscenarios.rfn
Checkschecks.rfn

Source 11 files shown, 264 lines

model.rfn
model "Wind Farm PF Training Model" {
  currency USD
  display  thousands
  data     "wind_farm_inputs.xlsx"  // capex, price curves, MACRS: one sheet each
}

timeline {
  start        2020-01-01
  step         quarter
  construction 18m
  operations   15y
}

What this model needed from the language

  • A table indexed by case and year. The price table has central, high and low rows and a column per calendar year. columns by year reads the year headers, and the last year is held after 2024.
  • Funding in sequence. Equity, then SHL, then senior, then additional equity. The funding block states the order once, where the Cons sheet needs a chain of Cashflow required after … rows.
  • Sizing in the debt case, then locked. The equity cases reuse the debt-case debt size. scenario(debt).size reads a value pasted from another scenario's run.
  • Alerts and warnings. The workbook's two kinds of check become alert and check.