Methodology
What happens between “describe your property” and “here's your recommendation” — and what this demo deliberately simplifies.
The model in one paragraph
OffGridIQ is a techno-economic comparison engine. For a given property it (1) screens six residential technologies against hard feasibility rules, (2) sizes the solar options with a Grey Wolf Optimizer against a 25-year net-present-value objective, (3) prices every surviving option with a discounted-cashflow LCOE model, and (4) ranks them with a transparent weighted score that follows the user's stated priority — lowest cost, lowest carbon, or balanced. Every exclusion, assumption and sub-score is surfaced in the UI; nothing is a black box.
1 · Feasibility rules (exclude, don't down-score)
A technology that cannot physically work on a property is excluded with a reason, not scored low: rooftop options need private roof access and a minimum usable area; small wind needs open exposure (asked explicitly) and ≥ 5 m/s average wind, because turbine power scales with the cube of wind speed; micro-hydro is gated entirely on the user confirming a year-round watercourse, since no climate dataset can reveal one. An apartment without roof access is steered toward the heat pump and a community-solar note instead of being shown an impossible PV system.
2 · Sizing as an optimization problem
The PV and PV + battery options are not looked up from a table — their sizes are decided by a Grey Wolf Optimizer (Mirjalili et al., 2014) running in the browser. For cost-led priorities, the objective is the levelized cost of consumption: the 25-year NPV of the system plus residual grid imports minus export credit, per kWh the household consumes. Undersizing leaves you buying expensive grid power; oversizing buys panels that mostly export at a low feed-in rate — so the optimum is a genuine interior solution. For the carbon priority, the objective flips to maximum avoided CO₂, with the budget ceiling enforced as a penalty term — the same technique the thesis used for its zero loss-of-load-hours constraint. The search is seeded, so results are deterministic and reproducible.
The battery hybrid additionally holds at least three-quarters of a day of autonomy, which is why it prices higher per kWh than bare PV: it is the resilience option, and the model says so rather than hiding it.
3 · Economics: the thesis LCOE, ported
The discounted-cashflow core follows the MSc thesis' compute_lcoe.m methodology: LCOE = NPV(costs) / NPV(energy served) over a 25-year project life at a fixed 7% real discount rate. Costs include CAPEX, annual O&M (PV 1.5%/yr, battery 0.8%/yr), one mid-life battery replacement at year 12 for 80% of battery CAPEX, full end-of-life replacement of shorter-lived kit, and a residual-value credit for useful life left at the horizon. The PV-served energy share degrades 0.5%/yr; steadier sources are held flat. Thermal options (heat pump, solar water heating) report a levelized cost per kWh of heat served, and the UI labels them as such.
4 · Scoring
Each option receives three 0–100 sub-scores on fixed anchors: cost (LCOE anchored $0.05–$0.45/kWh, payback anchored 4–25 years), carbon (annual CO₂ avoided vs the local grid intensity, anchored at 2.5 t/yr), and suitability (site resource quality × how much of the load the installation covers). The user's priority sets the weights (cost-led 55/15/30, carbon-led 15/55/30, balanced 35/35/30). Options above the chosen budget tier remain visible but cannot take the headline slot.
Data sources — representative values, by design
This demo runs entirely offline: all climate and cost figures are representative values baked into the build, cross-checked against public sources (NASA POWER climatology, Global Solar Atlas, ~2025 residential cost benchmarks) but deliberately not fetched live, so the demo can never stall on an API. The production OffGridIQ app replaces exactly this layer with live per-coordinate data (NASA POWER, Open-Meteo) behind the same interface.
| City | Köppen | GHI kWh/m²/d | Wind m/s | Grid $/kWh | Grid kgCO₂/kWh |
|---|---|---|---|---|---|
| Barcelona | Csa | 4.6 | 4 | 0.25 | 0.19 |
| Istanbul | Csa/Cfa | 4.2 | 5.2 | 0.11 | 0.42 |
| Islamabad | Cwa | 5 | 2.8 | 0.18 | 0.4 |
Cost benchmarks: PV $1.20/W, battery $400/kWh, small turbine $9,000, micro-hydro $8,000, heat pump $5,000, solar water heater $3,500 — hardware × 1.4 balance-of-system/labour uplift. All estimates, not quotes.
Relation to the MSc thesis
This tool extends my MSc thesis, which used a Grey Wolf Optimizer in MATLAB to minimize the LCOE of off-grid solar architectures — PV + battery, parabolic-trough collector + thermal storage + battery, and hybrids — across three Köppen climate zones under a zero loss-of-load-hours constraint. The demo carries over the three load-bearing ideas: the NPV/LCOE formulation (ported faithfully), GWO as the sizing engine (reimplemented in TypeScript, seeded for reproducibility), and constraint handling via penalty terms. What changed is the setting: grid-tied residential rather than off-grid, a self-consumption model in place of hourly dispatch, and a multi-technology comparison layer on top of the optimizer.
The full application behind this demo adds live climate data (NASA POWER / Open-Meteo), a Köppen classifier, off-grid readiness scoring, and per-region cost books — this demo intentionally trades that breadth for offline reliability.