Rufineer v0.43.0
Account
Browse the docs

Example 3 of 13

Mbira toll road

Based on mbira-toll-road-model.xlsm

A 25-year road concession with toll gates that open as each road section is finished, six vehicle classes, DSCR-based sizing with a year-by-year DSCR profile, and DSRA and MMRA reserves. Construction is modelled monthly on separate sheets and summed into a quarterly main timeline. 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/toll/.

Workbook
27 sheets: monthly construction sheets (ConTime, ConCost, ConFin), quarterly for the rest
Timeline
Rulers start Oct 2024, FC 31 Dec 2024, 36 months construction, 25-year concession
Revenue
4 gates x 6 vehicle classes, 2018 AADT counts, class-specific traffic growth
Capital
Roadworks USD 141.0m, 70% gearing or DSCR sizing, 15-year sculpted term loan with 1-year grace
Scenarios
Base case 1 (4 gates), Base case 2 (2 gates, active), Base case 3 (3 gates)
Rebuild shown
10 files, 187 lines, plus the shared concession package

Where each sheet goes

Workbook sheetsRufineer
Guidestyle.rfn (colour key) and doc comments
InpC, InpS, InpS-m, InpS-ainputs/*.rfn, with tables read from sheets of toll_inputs.xlsx
ConTime, Timetimeline with detail month
ConCost, ConFinmonthly modules cons_cost.rfn, cons_fin.rfn
Esc, Revrev.rfn
Ops, Acct, Tax, Equityconcession package (ops.rfn, tax.rfn, equity.rfn)
Debt, DSRA, MMRAdebt.rfn, reserves.rfn
Solvegenerated from two solve lines
Metrics, S&U, FS Qtr, FS Ann, Output, Checkconcession package (metrics.rfn, statements.rfn, checks.rfn)
Change, Tmpnot needed: version control replaces the change log

Source 10 files shown, 187 lines

model.rfn
model "Mbira Toll Road" {
  currency  USD
  data      "toll_inputs.xlsx"       // tolls, traffic counts, fees, curves
  include   "../concession"          // shared with the Border Post model
}

timeline {
  start          2024-10-01           // financial close 2024-12-31
  fiscal_year    ends Dec
  step           quarter
  construction   36m   detail month   // monthly sheets for construction, like ConTime
  operations     until construction.start + inputs.concession
}

list vehicles = [light, minibus, bus, heavy, haulage, abnormal]
// the gates come from the rows of the Gates table

What this model needed from the language

  • A monthly construction ruler beside a quarterly main ruler. The workbook keeps ConTime, ConCost and ConFin monthly and sums them into quarters in Timeline aggregation blocks. detail month plus monthly modules generate the same layout, and the aggregation rows are written for you.
  • Two-dimensional tables and loops. AADT is gate by vehicle class, read from an Excel Table. for g in inputs.active_gates, v in vehicles produces one row per pair, which matches the Rev sheet.
  • A period per gate. Each gate starts earning when its road section is finished. period open[g] gives each gate its own flag.
  • Scenario-driven structure. The three base cases change which gates exist. The scenario sets active_gates, and every loop that reads it changes shape.