Rufineer v0.43.0
Account
Browse the docs

Example 7 of 13

Coral Bay Solar 94 MWp

Based on coral-bay-solar-model.xlsx

A Mexican solar project with a peso or dollar loan, an FX forecast built from inflation differentials, lenders who size debt on P50 and P99 at the same time, and returns shown in dollars, pesos and real dollars. The whole calculation sits on one 505-row sheet. 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/coralbay/.

Workbook
10 sheets; the model is one sheet of 505 rows by 209 columns
Timeline
Development from Jan 2018 (12 months), FC Jan 2019, 3 months construction, COD Apr 2019, 25 years; monthly before COD, six-monthly after
Plant
94.3 MWp, PVSYST P50 1,985.5 kWh/kWp direct, 1,615 after an 81.4% performance ratio; tariff USD 35/MWh escalating 1.5%
Capital
USD 745.87/kW (EPC 708.58 plus 5% development), USD 70.3m in total; 80% debt, 16-year tenor
Outputs
Project IRR pre-tax 5.4% (USD), 9.9% (MXN), 3.8% (real); equity IRR 9.3%; LCOE USD 40.1/MWh
Rebuild shown
8 files, 166 lines

Where each sheet goes

Workbook sheetsRufineer
Financial Model (timing, macro, operations, capex, revenue, opex, debt, tax, returns)model.rfn, energy.rfn, capex.rfn, operations.rfn, debt.rfn, returns.rfn
Summary Pagethe dashboard in returns.rfn
PVSYST, Helioscopethe P50 input and pvalue for P90 and P99
Cost Detailthe EPC sheet of coralbay_inputs.xlsx
Inverter Replacementone level(…) line
Notesdoc comments and @source tags
Annual Model, PVWatts, Mexico Exchange Rate (empty)not needed

Source 8 files shown, 166 lines

model.rfn
model "Coral Bay Solar 94 MWp" {
  currency   USD
  currency   MXN
  display    thousands
  data       "coralbay_inputs.xlsx"
  sheets     one                  // the original keeps everything on one sheet
}

timeline {
  start          2018-01-01
  development    12m
  construction   3m
  operations     25y
  step           month until operations.start, then half
}

/// Peso forecast from purchasing-power parity, times the real change
fx MXN/USD = ppp(17.53, local: inputs.macro.mx_cpi, foreign: inputs.macro.us_cpi)
           * grow(inputs.macro.real_fx_change)

What this model needed from the language

  • Two lender cases at once. Debt is the lowest of 80% of cost, P50 CFADS at 1.35x and P99 CFADS at 1.00x. cash.cfads under p99 builds the P99 cash flows on a parallel sheet.
  • A unit chosen by a switch. The loan is in pesos or dollars. Declaring its lines in ccy makes every conversion follow the switch.
  • Statistics in the inputs. P90 and P99 come from the P50 and a 6% uncertainty through pvalue, which matches the workbook to the decimal.
  • A fee that includes itself. Development is 5% of a total that includes development. A function does the algebra, so there is no loop.
  • A levelised provision. The Inverter Replacement sheet becomes one level line with its NPV proof built in.
  • One sheet. sheets one keeps the single-sheet layout the modeller chose, with modules as titled sections.