Wall Assembly Optimizer

Ranking 572 wall assemblies by carbon, cost and comfort, and letting you build the winner in 3D.

4 min readOpen the live tool

What I shipped

CU Boulder’s BEST Center scored 572 wall assemblies on six metrics (carbon, energy, cost, R-value, sound, strength) in an Excel workbook. It worked if you knew which cells to touch, and it quietly got a few things wrong. Not the vibe.

I owned the rebuild end to end and shipped it as a production web app: pick a climate zone, weight what matters, get a ranked shortlist in milliseconds, then build the winner as a 3D wall. Try it live .

Pick a zone, weight what matters, and every assembly is scored with the best match on top.
572assemblies, 71 per zone
1e-12max gap from the workbook
154tests, server and client
~$13per month on Azure

How it works

The data never changes at runtime, so there’s no database. The workbook is extracted to JSON once, a FastAPI service holds all 572 rows in memory, and the Next.js front end is a static export. Every request is a pure function of its inputs.

Azure App Service, one B1 planBuild time, run onceBEST Center Tool.xlsxPerformance Data sheetextract_data.pyassemblies.json572 rows, name split into facetsloaded into memory at startupAPI web app · FastAPIrouters + Pydanticdomain/ (pure)scoring · comparison · wall mathno database, no writesSite web app · static filesNext.js 16 output: "export"API URL baked in at buildBrowserReact 19 · three.jsHTML, JSPOST /api/rankscores, bounds, weights
Two Azure web apps on one plan. After page load, only JSON crosses the network. A restart loses nothing.

Ranking is a weighted sum model: min–max normalize each metric, invert where lower is better, weight, sum. The engine is plain Python with no framework imports, which made the key test possible: match the workbook’s own results to 1e-12.

  1. 572all rowsheld in memory
  2. 71zone facetzone 5, no glazing
  3. ≤ 71thresholdscost ≤ $250, RSI ≥ 3…
  4. 0–1min–maxinvert ↓ metrics
  5. Σ wᵢxᵢweighted sumweights rescaled to 1
  6. #1…nsortby score, then name
Every endpoint, ranking and 3D alike, goes through one function: rank_assemblies().

Matching the workbook while fixing it

A port that silently disagrees with its source is worse than none. I kept the workbook’s behaviour exactly, except in three places where it was wrong, each pinned by a test.

WorkbookWhat went wrongWhat the API does
Weights must sum to 1Its own presets don't: 0.166667 × 6 = 1.000002 and 0.1667 × 6 = 1.0002, so two sheets score the same input differently.Accepts any non-negative weights and rescales them. A test asserts engine = workbook ÷ Σw.
Ranks with LARGE / MATCH / INDEXMATCH returns the first row with a score, so on a tie one wall is listed twice and the other vanishes.Sorts by (−score, name). Every wall appears once, in a stable order.
Comparison note “A is N% lower”Hard-coded on every row, even for higher-is-better metrics and rows where B wins.A real per-metric winner and a signed percentage difference.
Compare view: EIFS on 2x6 with batt against EIFS on concrete masonry with XPS, metric by metric
Compare: a real winner per metric, respecting whether higher or lower is better.

The 3D playground

Ranking says which wall. The playground shows what it does with windows in it: three.js via react-three-fiber, live carbon, cost and R-value, and export to GLB, STL, CSV or PNG.

Build a wall block by block. Switching zones changes the scenery and what the wall has to do.

The finding that surprised me most: glass on a fifth of the wall cuts its effective R-value by 76% (R-23.5 to R-5.5). A table of per-m² values hides that. In 3D, it’s obvious. Lowkey the biggest unlock of the whole project.

DGL 1.2×1.5 mDGL 1.2×1.5 m6.0 × 2.7 mzone 5 · fiber cement, 2x6, batt
Effective RSI
4.13 → 0.97
Carbon, kgCO₂e
192 → 369
Cost, USD
1,186 → 1,893
Load, kN
272 → 163
STC (estimate)
42.0 → 41.8
Two standard windows, 22% of the wall. ○ solid wall, ● with windows; each row is scaled to its larger value.

Shipping it

  • Cheap and warm. Both apps on one Azure App Service B1 plan, about $13 a month, with no cold starts.
  • Fail fast. The API refuses to start on a bad dataset, and a health check feeds a live status light.
  • Hardened. HSTS, a CORS allowlist, docs off in production, no leaked stack traces.

Results

Zone 5 under the five built-in profiles: fiber cement on 2x6 wins on carbon and cost; CMU with XPS wins when sound or strength matter.

ProfileDominant weightsTop pick in zone 5Score
Equalall at 1/6EIFS_CMU_XPS0.658
Carboncarbon 40%, energy 30%FiberCement_2x6_FGBatt0.852
Costcost 40%, RSI 20%FiberCement_2x6_FGBatt0.711
ThermalRSI 40%, STC 20%Limestone_2x6_SprayFoam0.615
AcousticSTC 50%EIFS_CMU_XPS0.722

Exact parity with the workbook, 154 tests across server and client, and a live link anyone can open. Shipped, tested, and honestly kind of a W.

Resources

  1. Weighted sum model | Wikipedia
  2. Multiple criteria decision analysis | Wikipedia
  3. Min–max normalization (feature scaling) | Wikipedia
  4. FastAPI
  5. Next.js
  6. three.js
  7. React Three Fiber
  8. Zustand
  9. Azure App Service overview | Microsoft Learn
  10. Wall Assembly Optimizer, live