GLOBALGRID2050 / EXPLORE CODE

Part of: Explore Code / Grid network and substations / globalgrid2050 / testcode/202609060528/atlas/cartridges

Substation Intelligence and 4 more files

A JavaScript file in the cartridges folder of GlobalGrid2050 that maps elizabeth line and london underground, using haversine and SHA-256, and uses data from the ventus-grid-engine, data-federation-map-for-GlobalGrid2050-all-repos and spiders repositories.

699 lines of JavaScript and HTML from globalgrid2050, in 5 files. Topic: Grid network and substations. Section 368 of 2044.

Cut 2026-12-06T03:07:51+00:00. A copy for reading; the repository at the stated commit is the source.

In the State lines below, domain stage, users and canonical status are rule-based first approximations from code and path evidence (rules explore-agent-rules-v1), not observed facts: the rules.

In this section

  1. Substation Intelligence geodesy · globalgrid2050 / testcode/202609060528/atlas/cartridges/202609060528-substation-intelligence.js lines 4865–5420
  2. Particles — 12 Substations Line Page render · globalgrid2050 / testcode/particles/12-substations-line-142743/index.html lines 1–33
  3. Particles — 21 Substations Line Page render · globalgrid2050 / testcode/particles/21-substations-line-335499/index.html lines 1–33
  4. Particles — 30 Substations Line Page render · globalgrid2050 / testcode/particles/30-substations-line-185459/index.html lines 1–33
  5. Wafer Development Environment — Voltage Drop Page render · globalgrid2050 / testcode/wafer-development-environment/202609170042-voltage-drop/index.html lines 1–44

Substation Intelligence

A JavaScript file in the cartridges folder of GlobalGrid2050 that maps elizabeth line and london underground, using haversine and SHA-256, and uses data from the ventus-grid-engine, data-federation-map-for-GlobalGrid2050-all-repos and spiders repositories.

Set aside from the main view: 100% of its lines are the same as apps/substation-finder/Si/202609060537-substation-intelligence.js (code-generator), which stays. (near-copy-of, proposed by families.py). 99% of lines shared with Substation Intelligence; read that one first. All set-aside files, with reasons. Nothing was deleted.

Evidence
  • line-jaccard 0.9971 to code-generator@3897d83efcd0259d21dce87704b0c33118fe2c2e apps/substation-finder/Si/202609060537-substation-intelligence.js:1-5427 fd8aeb8a8884da62dc50991d5f4bf8cc48b33c43
  • sha256 20bedcfc3a9037568e1bd9568512928a0a4781eaa0158ae62e2b46d4b3065db5
  • target sha256 afc18391911f8ab467480aa8f22fd30467de554c76c58101956f9fec49ad9449
  • group of 3 (identity.json near-copy edges >= 0.9)
  • canonical rule: reachable, newest stamp, core repo, most lines

geodesyglobalgrid2050 / testcode/202609060528/atlas/cartridges/202609060528-substation-intelligence.js · lines 4865–5420 of 5420 · version 2026-09-06 05:28 (continued from section 361) · Not reached from any entry point (candidate for review) · pattern restoreLayers (shared by 2 files)

What it does
It maps elizabeth line, london underground, UK metros trams and hs2. Defines 232 functions or classes, including close, open, dockLayers, restoreLayers, show. Side effects: changes the web page (DOM); reads or writes files; makes network requests; uses storage (browser storage, DuckDB or Parquet).
Why it exists in the grid workflow
Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow. Domain terms in the code: 400kV, 275kV, 132kV, 66kV, 33kV, 11kV.
Inputs & outputs
In: data source: ventus-grid-engine data; data source: data-federation-map-for-globalgrid2050-all-repos data; data source: spiders data; GeoJSON file elizabeth_line.geojson; GeoJSON file london_underground.geojson; GeoJSON file uk_metros_trams.geojson; GeoJSON file hs2.geojson; JSON file style.json. Out: CSV file gridatlas-polygon-vertices.csv; downloaded file gridatlas-polygon-; downloaded file gridatlas-polygon-vertices.csv; downloaded file gridatlas-; downloaded file globalgrid2050-map-; browser storage (setItem); interactive map; canvas drawing. Coordinate systems named: WGS84 / EPSG:4326. Voltage levels named: 400kV, 275kV, 132kV, 66kV, 33kV, 11kV.
What it achieves
It restores layers (`restoreLayers`), saves outline (`saveOutline`) and reads outline (`readOutline`). Its `snapLines` function gives line features whose first and last vertices are moved onto the nearest substation point within tolerance; other geometry unchanged from line features and substation point features (VEDIC: snap line ends to substations). Its code works with 400 kV and 100 MVA. It responds to fullscreenchange, webkitfullscreenchange and click events.
Why it matters
No other file in the estate was found to import it.
Application
globalgrid2050 · testcode/202609060528/atlas/cartridges · script
VEDIC
SNAP LINE ENDS TO SUBSTATIONS (GG2050-VEDIC-000106): GridAtlas / Substations · Geospatial data processing. line_features, substation_point_features → Line features whose first and last vertices are moved onto the nearest substation point within tolerance; other geometry unchanged.
VEDIC
MEASURE (GG2050-VEDIC-000001): GridAtlas / Geodesy · Mathematics / Spherical geometry. coordinate_pair, coordinate_pair → distance_km
VEDIC
REPRESENT (GG2050-VEDIC-000002): GridAtlas / Geodesy · Computer science / Geometry processing. geojson_geometry → coordinate_pair_or_null
Uses
Spider Full Po Test (estate URL), Data — Grid Studies Public Page (estate URL)
Used by
mentioned in Geodesy (comment link)
Produces
close, open, dockLayers, restoreLayers, show, clearValues, validOutline, saveOutline, readOutline, clearOutline, analyzeOutline, fail
Defines here
normalise, ready, eligible, unitCount, cleanText, attributionText, generationText, looksBlank, mapHandle, pdfEscape, buildMapPdf, captureMapJpeg, finish, grab, pdfFileStamp, pad, wrapPdfText, savePdf, install
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 testcode/202609060528/atlas/cartridges/202609060528-substation-intelligence.js:4865-5420 · blob a4d79e151fc9f1a2b632f53187a97278a5ad843c · GitHub at these lines
State
achieves: code · context: readme_derived · stage: output · effects: dom, filesystem, network, storage · domain stage: experimental · users: ICP_grid_engineer · canonical: duplicate_candidate
return `
#${STATUS_ID}{position:absolute;left:50%;top:14px;transform:translateX(-50%);
  z-index:5;max-width:min(92vw,420px);padding:7px 11px;border-radius:4px;
  background:rgba(6,18,21,.93);border:1px solid #21454b;color:#9fb3ba;
  font:11px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.04em;
  text-align:center;pointer-events:auto}
#${STATUS_ID}[data-kind="failed"]{border-color:#7a4a4a;color:#d0a9a9}
#${STATUS_ID} button{display:block;margin:7px auto 0;padding:4px 12px;
  background:#0a1a1d;border:1px solid #2f6f75;border-radius:3px;color:#bfe9ee;
  font:inherit;text-transform:uppercase;letter-spacing:.06em;cursor:pointer}
#${STATUS_ID} button:hover{border-color:#5fbdc2}
@media (prefers-reduced-motion:no-preference){
  #${STATUS_ID}[data-kind="waiting"]{animation:ga-status-pulse 2.4s ease-in-out infinite}
}
@keyframes ga-status-pulse{0%,100%{opacity:.72}50%{opacity:1}}`;
},
versionLedger(LEDGER_ID) {
return `
#${LEDGER_ID}{margin-top:6px;font:11px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace}
#${LEDGER_ID} > button{display:block;width:100%;padding:6px 8px;background:#0a1a1d;
  border:1px solid #2f6f75;border-radius:3px;color:#8fb3b8;font:inherit;
  letter-spacing:.06em;text-transform:uppercase;cursor:pointer;text-align:left}
#${LEDGER_ID} > button:hover{border-color:#5fbdc2;color:#bfe9ee}
#${LEDGER_ID} .vl-body{display:none;margin-top:5px;padding:8px;border:1px solid #1d3238;
  border-radius:3px;background:rgba(6,18,21,.94);max-width:min(88vw,300px);
  max-height:min(56vh,380px);overflow:auto;overscroll-behavior:contain}
#${LEDGER_ID}[data-open="1"] .vl-body{display:block}
#${LEDGER_ID} .vl-row{padding:4px 0;border-bottom:1px solid #142226}
#${LEDGER_ID} .vl-head{display:flex;justify-content:space-between;gap:8px}
#${LEDGER_ID} .vl-ver{color:#bfe9ee;font-weight:bold}
#${LEDGER_ID} .vl-status{margin-left:5px;color:#ff9b73;font-size:9px;font-weight:bold}
#${LEDGER_ID} .vl-when{color:#5f7a80;font-size:10px}
#${LEDGER_ID} .vl-scope{color:#9fb3ba;font-size:10px;line-height:1.4;margin-top:1px}
#${LEDGER_ID} .vl-reason{color:#df9b83;font-size:9px;line-height:1.35;margin-top:2px}
#${LEDGER_ID} .vl-note{margin:7px 0 0;color:#6f8288;font-size:10px;line-height:1.45}`;
},
mobileTray(TRAY_ID) {
return `
#${TRAY_ID}{display:flex;gap:4px;font:11px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace}
#${TRAY_ID} button{min-height:44px;padding:6px 10px;background:#0a1a1d;
  border:1px solid #2f6f75;border-radius:3px;color:#8fb3b8;font:inherit;
  letter-spacing:.06em;text-transform:uppercase;cursor:pointer}
#${TRAY_ID} button[aria-pressed="true"]{border-color:#5fbdc2;color:#bfe9ee;
  background:rgba(0,255,255,0.08)}
#${TRAY_ID} button[disabled]{opacity:.45;cursor:default}
.map-controls.gm-tools-collapsed > .map-ctrl-btn{display:none}`;
},
gbConditions(GB_ID) {
return `
#${GB_ID}{margin-top:6px;font:11px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace}
#${GB_ID} > button{display:block;width:100%;padding:6px 8px;background:#0a1a1d;
  border:1px solid #2f6f75;border-radius:3px;color:#8fb3b8;font:inherit;
  letter-spacing:.06em;text-transform:uppercase;cursor:pointer;text-align:left}
#${GB_ID} > button:hover{border-color:#5fbdc2;color:#bfe9ee}
#${GB_ID} .gb-body{display:none;margin-top:5px;padding:8px;border:1px solid #1d3238;
  border-radius:3px;background:rgba(6,18,21,.94);max-width:min(88vw,260px);
  max-height:min(52vh,340px);overflow:auto;overscroll-behavior:contain}
#${GB_ID}[data-open="1"] .gb-body{display:block}
#${GB_ID} .gb-row{display:flex;justify-content:space-between;gap:8px;
  padding:2px 0;border-bottom:1px solid #142226}
#${GB_ID} .gb-k{color:#7d8f95}
#${GB_ID} .gb-v{color:#bfe9ee;font-weight:bold}
#${GB_ID} .gb-v em{color:#5f7a80;font-style:normal;font-weight:normal;font-size:10px}
#${GB_ID} .gb-note{margin:7px 0 0;color:#6f8288;font-size:10px;line-height:1.45}
#${GB_ID} .gb-note.gb-point{color:#9fb3ba;border-top:1px solid #142226;padding-top:6px}
#${GB_ID} .gb-note.gb-point b{color:#d8a76a}
#${GB_ID} .gb-more{display:block;margin-top:7px;color:#5fbdc2;font-size:10px;
  text-decoration:none;letter-spacing:.04em}
#${GB_ID} .gb-more:hover{text-decoration:underline}`;
},
sldPanel(PANEL_ID) {
return `
/* Top RIGHT, below the search box. The Atlas keeps its own tool buttons down
   the left edge -- EXPORT CSV, RADIUS SEARCH, ZONE DRAW, MEASURE -- and a
   panel on that side covers them, and the search bar occupies 72-96px inside
   the map container on the right, so the panel clears it at 112px. Both offsets
   were measured on the live map: no headless test catches a collision with a
   component the panel knows nothing about. */
#${PANEL_ID}{position:absolute;right:14px;top:112px;bottom:14px;z-index:11;width:310px;
  max-width:calc(100% - 28px);box-sizing:border-box;overflow:auto;font:11px/1.5 'Courier New',monospace;
  color:#cfe9ee;background:rgba(2,8,11,.93);border:1px solid #0b5f63;border-radius:5px;
  padding:11px 12px;box-shadow:0 0 22px rgba(0,255,255,.14);backdrop-filter:blur(3px);display:none}
#${PANEL_ID}[data-open="true"]{display:block}
#${PANEL_ID} h4{margin:0 0 2px;font-size:10px;letter-spacing:.09em;color:#5fbdc2;text-transform:uppercase;
  display:flex;align-items:center;gap:7px}
#${PANEL_ID} .sld-beta{font-size:8px;padding:1px 4px;border-radius:2px;background:#3a2f12;
  color:#e0b050;border:1px solid #6a5320}
#${PANEL_ID} .sld-site{color:#fff;font-size:12px;font-weight:bold;margin:2px 0 8px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#${PANEL_ID} h4.sld-drag{cursor:grab;user-select:none;touch-action:none}
#${PANEL_ID} h4.sld-drag:active{cursor:grabbing}
#${PANEL_ID} .sld-min{margin-left:auto}
#${PANEL_ID} .sld-min,#${PANEL_ID} .sld-close{cursor:pointer;background:#050a0d;
  border:1px solid #2f6f75;color:#5fbdc2;font:inherit;font-size:12px;line-height:1;
  min-width:44px;height:44px;border-radius:3px;padding:0 5px}
#${PANEL_ID} .sld-min:hover{color:#bfe9ee;border-color:#5fbdc2}
#${PANEL_ID} .sld-close:hover{color:#ff8f8f;border-color:#ff5d5d}
#${PANEL_ID}[data-min="true"] > *:not(h4){display:none}
#${PANEL_ID}[data-min="true"]{width:auto;padding:7px 9px;
  box-shadow:0 0 14px rgba(95,189,194,.25)}
#${PANEL_ID}[data-min="true"] h4{margin:0}
#${PANEL_ID}[data-min="true"] .sld-min{border-color:#5fbdc2;color:#bfe9ee}
#${PANEL_ID} .sld-to{color:#8b9aa1;font-size:9.5px;margin:-6px 0 8px}
#${PANEL_ID} .sld-target{margin:0 0 9px;padding:7px 8px;border:1px solid #1d3238;
  border-radius:3px;background:#050a0d}
#${PANEL_ID} .sld-target-row{display:flex;justify-content:space-between;align-items:baseline}
#${PANEL_ID} .sld-target-row b{color:#e0b050;font-variant-numeric:tabular-nums}
#${PANEL_ID} .sld-basis{display:flex;align-items:center;gap:6px;margin-top:5px}
#${PANEL_ID} .sld-basis span{color:#8b9aa1;font-size:10px;white-space:nowrap}
#${PANEL_ID} .sld-basis select{flex:1}
#${PANEL_ID} .sld-danger{margin-top:6px;color:#ff5d5d;font-size:9px;line-height:1.5;
  border-left:2px solid #ff5d5d;padding-left:6px}
#${PANEL_ID} .sld-fitted{margin-top:6px;color:#8b9aa1;font-size:9px;line-height:1.5}
#${PANEL_ID} .sld-fitted b{color:#6fb582}
#${PANEL_ID} .sld-fitted b.sld-off{color:#ff5d5d}
#${PANEL_ID} .sld-ratio-note{margin-top:6px;color:#d9b45f;font-size:9px;line-height:1.5;
  border-left:2px solid #8b6c28;padding-left:6px}
#${PANEL_ID} .sld-tabs{display:flex;gap:5px;margin-bottom:8px}
#${PANEL_ID} .sld-tabs button{flex:1;background:#050a0d;border:1px solid #1d3238;color:#7f939a;
  font:inherit;font-size:9px;padding:4px;cursor:pointer;border-radius:3px;text-transform:uppercase}
#${PANEL_ID} .sld-tabs button[data-on="true"]{color:#5fbdc2;border-color:#5fbdc2}
#${PANEL_ID} .sld-grid{display:grid;grid-template-columns:1fr 62px;gap:3px 7px;align-items:center}
#${PANEL_ID} label{color:#8b9aa1;font-size:10px}
#${PANEL_ID} input,#${PANEL_ID} select{width:100%;background:#050a0d;border:1px solid #1d3238;
  color:#d8dee6;font:inherit;font-size:10px;padding:2px 4px;border-radius:2px}
#${PANEL_ID} input:focus,#${PANEL_ID} select:focus{outline:1px solid #5fbdc2}
#${PANEL_ID} .sld-out{margin-top:9px;padding-top:8px;border-top:1px solid #10262b;
  display:grid;grid-template-columns:1fr auto;gap:2px 8px}
#${PANEL_ID} .sld-out b{color:#e0b050;font-variant-numeric:tabular-nums}
#${PANEL_ID} .sld-out .lit{color:#5fbdc2}
#${PANEL_ID} .sld-warn{margin-top:7px;color:#d9963c;font-size:9px;line-height:1.45}
#${PANEL_ID} .sld-caveat{margin-top:7px;padding-top:7px;border-top:1px solid #10262b;
  color:#68797f;font-size:9px;line-height:1.5}
#${PANEL_ID} .sld-caveat b{color:#8b9aa1}
#${PANEL_ID} .sld-hint{margin-top:6px;color:#5f7a80;font-size:9px;line-height:1.45}
#${PANEL_ID} .sld-finance{margin-top:9px;border-top:1px solid #214047;padding-top:7px}
#${PANEL_ID} .sld-finance summary{min-height:32px;display:flex;align-items:center;cursor:pointer;
  color:#d9b45f;font-weight:bold;letter-spacing:.05em;user-select:none}
#${PANEL_ID} .sld-fin-grid{display:grid;grid-template-columns:1fr 76px;gap:3px 7px;align-items:center}
#${PANEL_ID} .sld-fin-section{grid-column:1/-1;margin-top:7px;padding-top:5px;
  border-top:1px solid #10262b;color:#5fbdc2;font-size:9px;text-transform:uppercase}
#${PANEL_ID} .sld-fin-grid input[type="checkbox"]{width:24px;justify-self:end}
#${PANEL_ID} .sld-fin-out{margin:8px 0;padding:7px;background:#050a0d;border:1px solid #1d3238;
  display:grid;grid-template-columns:1fr auto;gap:2px 8px}
#${PANEL_ID} .sld-fin-out b{color:#d9b45f;font-variant-numeric:tabular-nums;text-align:right}
#${PANEL_ID} .sld-fin-note{margin:6px 0;color:#8b9aa1;font-size:9px;line-height:1.5}
@media (max-width:700px){#${PANEL_ID}{width:auto;left:8px;right:8px;top:96px;bottom:8px}}
@media (pointer:coarse){
  #${PANEL_ID} .sld-tabs button,#${PANEL_ID} input,#${PANEL_ID} select,
  #${PANEL_ID} .sld-finance summary{min-height:44px}
}`;
},
fullscreenLayers() {
return `.gridatlas-fs-layers{position:absolute !important;left:0;right:0;bottom:0;
      max-height:42vh;overflow:auto;z-index:9;background:rgba(2,8,11,.94);
      border-top:1px solid #0b5f63;backdrop-filter:blur(3px)}`;
}
});
})();
(() => {
'use strict';
const GENERATION = '202609012045';
const PINS = (window.__GRIDATLAS_MODULES__ || {}).pinnedProducts || null;
const PRODUCT_ID = 'connection-points.v3';
const PRODUCT = PINS ? PINS.url(PRODUCT_ID) : null;
const REQUIRED_SCHEMA = 'data-grid-gb.connection-points.v3';
const QUOTED_METRIC = 'three_phase_rms_break_current_ka';
const QUOTED_METRIC_LABEL = 'three-phase RMS break current';
const DEG = Math.PI / 180;
const state = {
schema: 'gridatlas.substation-intelligence.v2',
generation: GENERATION,
product: PRODUCT,
loaded: false,
points: 0,
located: 0,
product_schema: null,
quoted_metric: QUOTED_METRIC,
failures: []
};
window.__GRIDATLAS_NETWORK__ = state;
const GEODESY = (window.__GRIDATLAS_MODULES__ || {}).geodesy;
if (!GEODESY) throw new Error("substation-intelligence requires the geodesy module");
const distanceKm = GEODESY.distanceKm;
const NOISE = /\b(SUBSTATION|SUB STATION|SUBSTN|GRID|SUPPLY|POINT|GSP|NATIONAL|POWER|STATION|WIND|FARM|WINDFARM|OFFSHORE|ONSHORE|EXTENSION|400KV|275KV|132KV|66KV|33KV|11KV|NGET|SSE|SP|SHE)\b/g;
function normalise(name) {
return String(name || '').toUpperCase()
.replace(/[^A-Z0-9 ]/g, ' ').replace(NOISE, ' ')
.split(/\s+/).filter(Boolean).join(' ');
}
const byName = new Map();
const located = [];
const published = [];
const ready = (async () => {
try {
if (!PRODUCT) throw new Error('the pinned-products module is not composed, '
+ 'so this cartridge has no pinned ref to read and will not guess one');
const response = await fetch(PRODUCT, { cache: 'no-cache' });
if (!response.ok) throw new Error('HTTP ' + response.status);
const text = await response.text();
const seal = await PINS.verify(PRODUCT_ID, text);
state.product_pin = seal;
if (seal.state === 'MISMATCH') {
state.failures.push(seal.detail
+ '; refusing to answer from bytes this composition has not seen');
return false;
}
const product = JSON.parse(text);
state.product_schema = product?.schema || null;
if (product?.schema !== REQUIRED_SCHEMA) {
state.failures.push('schema is ' + String(product?.schema)
+ ', this cartridge answers only ' + REQUIRED_SCHEMA);
return false;
}
for (const point of product.connection_points || []) {
const key = normalise(point.name);
if (key && !byName.has(key)) byName.set(key, point);
published.push(point);
if (point.location) located.push(point);
}
state.points = (product.connection_points || []).length;
state.located = located.length;
state.counts = product.counts || null;
state.join = product.join || null;
state.source = product.source || null;
state.loaded = true;
return true;
} catch (error) {
state.failures.push('network product: ' + String(error?.message || error));
return false;
}
})();
state.ready = ready;
state.byName = (name) => state.loaded
? (byName.get(normalise(name)) || null) : null;
state.location_join_is_unverified = true;
state.nearest = (lon, lat, options) => {
if (!state.loaded) return null;
const minimumKv = options?.minimumKv ?? 0;
const limit = options?.limit ?? 1;
const found = [];
for (const point of located) {
if (Math.max(...point.voltages_kv) < minimumKv) continue;
found.push({ point, km: distanceKm(lon, lat, point.location.lon, point.location.lat) });
}
found.sort((a, b) => a.km - b.km);
return limit === 1 ? (found[0] || null) : found.slice(0, limit);
};
state.coverage = (minimumKv) => {
if (!state.loaded) return null;
const floor = Number(minimumKv) || 0;
const eligible = (point) => Array.isArray(point.voltages_kv)
&& point.voltages_kv.length
&& Math.max(...point.voltages_kv) >= floor;
const inBand = published.filter(eligible);
const seen = located.filter(eligible);
return {
minimum_kv: floor,
published: inBand.length,
located: seen.length,
unlocated: inBand.length - seen.length,
basis: 'counted from the connection-points payload this session fetched'
};
};
state.summarise = (name, options) => {
const point = state.byName(name);
if (!point) return null;
const connectionKv = options && Number(options.connectionKv);
const units = (options && options.units) || null;
const unitCount = (field) => {
if (!units) return null;
const value = Number(units[field]);
return Number.isFinite(value) ? value : null;
};
const transformerUnits = unitCount('transformers');
const circuitUnits = unitCount('circuits');
const parts = [];
if (circuitUnits !== null) {
parts.push(circuitUnits + (circuitUnits === 1 ? ' circuit' : ' circuits'));
} else if (point.circuits) {
parts.push(point.circuits + (point.circuits === 1 ? ' circuit' : ' circuits'));
}
if (transformerUnits !== null) {
parts.push(transformerUnits
+ (transformerUnits === 1 ? ' transformer' : ' transformers'));
} else if (point.transformers) {
parts.push(point.transformers + ' transformer winding connections at the site '
+ '(a transformer whose windings are both here is published at each of them, '
+ 'so this is not a count of machines)');
}
const rating = point.circuit_winter_rating_mva;
if (rating) {
parts.push('circuit winter ratings across the site '
+ rating.min.toLocaleString('en-GB')
+ '\u2013' + rating.max.toLocaleString('en-GB') + ' MVA');
}
const byVoltage = point.fault_current_by_voltage || null;
let peak = point.fault_current?.peak || null;
let faultScope = 'site';
let faultKv = null;
if (Number.isFinite(connectionKv) && byVoltage) {
const key = Object.keys(byVoltage)
.find(k => Math.abs(Number(k) - connectionKv) < 0.5);
if (key && byVoltage[key]?.peak) {
peak = byVoltage[key].peak;
faultScope = 'bus';
faultKv = Number(key);
}
}
const metric = peak?.metrics?.[QUOTED_METRIC];
if (metric) {
parts.push(QUOTED_METRIC_LABEL + ' ' + metric.min.toFixed(1) + '\u2013'
+ metric.max.toFixed(1) + ' ' + metric.unit
+ (faultScope === 'bus'
? ' at the ' + faultKv + ' kV busbars'
: ' across every busbar at this site')
+ ' over ' + peak.scenarios + ' peak-demand rows'
+ (peak.locations?.length ? ' at ' + peak.locations.length
+ (peak.locations.length === 1 ? ' bus' : ' buses') : '')
+ (peak.winters?.length
? ' (' + peak.winters[0] + ' to ' + peak.winters[peak.winters.length - 1] + ')'
: ''));
}
if (point.reactive_compensation?.units) {
parts.push(point.reactive_compensation.units + ' reactive compensation units');
}
if (point.planned_changes) {
const years = point.planned_change_years || [];
parts.push(point.planned_changes + ' changes published for '
+ (years.length ? years[0] + '\u2013' + years[years.length - 1] : 'later years'));
}
if (!parts.length) return null;
const voltages = point.voltages_kv || [];
const siteWide = voltages.length > 1;
const busLocations = point.fault_current?.peak?.locations || [];
return {
site_code: point.site_code,
transmission_owner: point.transmission_owner,
voltages_kv: voltages,
site_wide: siteWide,
bus_locations: busLocations,
fault_scope: faultScope,
fault_kv: faultKv,
scope_label: faultScope === 'bus'
? ('Fault current is quoted at the ' + faultKv + ' kV busbars, the '
+ 'voltage this connection is made at. Circuit counts, ratings, '
+ 'transformers and planned changes remain site-wide across the '
+ voltages.slice().sort((a, b) => b - a).join('/') + ' kV buses here')
: (siteWide
? ('Site-wide published envelope across the '
+ voltages.slice().sort((a, b) => b - a).join('/') + ' kV buses at this site, '
+ 'not a value for any one bus')
: ('Published for this site, which carries one voltage: '
+ (voltages[0] || '?') + ' kV')),
sentence: parts.join(' \u00b7 '),
metric_named: QUOTED_METRIC_LABEL,
metrics_not_interchangeable: 'Appendix D publishes eight current '
+ 'metrics and they are not interchangeable; this is one published '
+ 'breaker-duty metric, and switchgear carries several relevant '
+ 'ratings besides it.',
attribution: 'NESO Electricity Ten Year Statement 2025, appendices B and D, '
+ 'via Ventusltd/data-grid-gb',
not_an_assessment: 'Published parameters. Not a statement about whether '
+ 'any project can connect here.'
};
};
})();
;(() => {
document.documentElement.classList.add('testcode-arrival');
const style=document.createElement('style');style.textContent=`
 @media screen {
 .testcode-arrival #gridatlas-menu-bar{position:fixed!important;top:0!important;left:0!important;right:0!important;width:100%!important;min-height:54px!important;box-sizing:border-box;z-index:5000!important}
 .testcode-arrival .maplibregl-popup-content p{font-size:12px!important;line-height:1.5!important}
 html.testcode-arrival, .testcode-arrival body{height:100%;overflow:hidden}
 .testcode-arrival .dashboard{height:100dvh!important;min-height:0!important;padding:0!important;gap:0!important}
 .testcode-arrival .map-container,.testcode-arrival #map-container{position:fixed!important;inset:54px 0 0!important;width:100%!important;height:auto!important;min-height:0!important;border:0!important;border-radius:0!important}
 .testcode-arrival #map{position:absolute!important;inset:0!important;width:100%!important;height:100%!important}
 .testcode-arrival .search-bar-wrapper{position:fixed!important;top:64px!important;left:16px!important;right:auto!important;width:340px!important;max-width:calc(100vw - 32px)!important;display:flex!important;gap:6px!important;z-index:3100!important}
 .testcode-arrival .search-bar-wrapper>div{min-width:0!important;flex:1!important;width:auto!important}
 .testcode-arrival .search-bar-wrapper input{min-width:0!important;width:100%!important;height:48px!important;font:16px system-ui!important}
 .testcode-arrival #search-results{left:0!important;right:0!important;width:100%!important;min-width:0!important;box-sizing:border-box;white-space:normal}
 .testcode-arrival .maplibregl-popup{position:fixed!important;left:16px!important;top:124px!important;right:auto!important;bottom:72px!important;width:340px!important;max-width:340px!important;transform:none!important;z-index:2100!important;display:flex!important}
 .testcode-arrival .maplibregl-popup-content{width:100%!important;max-height:100%!important;overflow:auto!important;box-sizing:border-box;font-size:13px!important}
 .testcode-arrival .maplibregl-popup-tip{display:none!important}
 .testcode-arrival .maplibregl-popup.gridatlas-min{bottom:auto!important;height:auto!important;max-height:64px!important}
 .testcode-arrival .scada-wrapper{position:fixed!important;right:12px!important;top:124px!important;bottom:72px!important;width:min(420px,calc(100vw - 24px))!important;max-height:calc(100dvh - 196px)!important;overflow:auto!important;z-index:4000!important;background:#08151cf5!important;display:block!important}
 .testcode-arrival .scada-wrapper[data-gridatlas-collapsed="1"]{display:none!important}
 .testcode-arrival #testcode-fit{position:fixed;right:12px;top:64px;min-height:44px;padding:8px 12px;color:#bdfaff;background:#08151cf2;border:1px solid #37656b;z-index:3200;font:14px system-ui;cursor:pointer}
 .testcode-arrival .testcode-identity{font-size:10px;bottom:16px;left:16px;right:auto}
 @media(max-width:700px){
 .testcode-arrival .search-bar-wrapper{left:12px!important;width:calc(100vw - 24px)!important;max-width:none!important}
 .testcode-arrival .maplibregl-popup{left:12px!important;right:12px!important;top:auto!important;bottom:70px!important;width:auto!important;max-width:none!important;height:40dvh!important;max-height:40dvh!important}
 .testcode-arrival #testcode-fit{top:120px;min-height:44px}
 .testcode-arrival .maplibregl-popup.gridatlas-min{top:auto!important;bottom:70px!important;height:auto!important}
 .testcode-arrival .testcode-identity{bottom:8px;font-size:9px}
 }
 }
 `;document.head.append(style);
})();
(()=>{
const registry=window.__GRIDATLAS_MODULES__ ||= {};
function cleanText(value) {
return String(value == null ? '' : value).replace(/\s+/g, ' ').trim();
}
function attributionText(doc) {
var node = doc.querySelector('.custom-map-attrib');
return cleanText(node && node.textContent)
|| 'Data © OpenStreetMap contributors | © CARTO | EV data © Open Charge Map';
}
function generationText() {
var atlas = window.__GRIDATLAS_ATLAS__;
var generation = (atlas && atlas.generation)
|| (document.documentElement && document.documentElement.dataset
&& document.documentElement.dataset.gridatlasGeneration);
return generation ? 'generation ' + generation : '';
}
function looksBlank(canvas) {
try {
var probe = document.createElement('canvas');
probe.width = 40; probe.height = 40;
var context = probe.getContext('2d');
context.drawImage(canvas, 0, 0, 40, 40);
var data = context.getImageData(0, 0, 40, 40).data;
for (var i = 3; i < data.length; i += 4) if (data[i] !== 0) return false;
return true;
} catch (_) {
return false;
}
}
function mapHandle() {
var map = window.__GRIDATLAS_V9_MAP__;
if (map && map.getCanvas) return map;
return (window.map && window.map.getCanvas) ? window.map : null;
}
function pdfEscape(text) {
return String(text == null ? '' : text)
.replace(/\\/g, '\\\\')
.replace(/\(/g, '\\(')
.replace(/\)/g, '\\)')
.replace(/[^\x20-\x7e]/g, '');
}
function buildMapPdf(jpegBinary, pixelWidth, pixelHeight, heading, leftFoot, rightFoot) {
if(!Number.isInteger(pixelWidth)||!Number.isInteger(pixelHeight)||pixelWidth<1||pixelHeight<1)throw Error('The map has no drawable dimensions.');
var pageW = pixelWidth;
var pageH = pixelHeight;
var unit = Math.max(1, Math.min(pageW, pageH) / 520);
var band = Math.round(Math.min(pageH * 0.14, 46 * unit));
var headSize = Math.round(13 * unit);
var footSize = Math.round(8 * unit);
var pad = Math.round(14 * unit);
var maxChars=Math.max(8,Math.floor((pageW-2*pad)/(footSize*1.1)));
var footerLines=[...wrapPdfText(leftFoot,maxChars),...wrapPdfText(rightFoot,maxChars)];
var lineHeight=Math.ceil(footSize*1.45),footerHeight=footerLines.length*lineHeight+pad;
var footerCommands=footerLines.map((text,i)=>'BT /F1 '+footSize+' Tf 0.86 0.93 0.94 rg '+pad+' '+(footerHeight-pad-i*lineHeight)+' Td ('+pdfEscape(text)+') Tj ET');
var content = [
'q', pageW + ' 0 0 ' + pageH + ' 0 0 cm', '/Im0 Do', 'Q',
'q', '/GsA gs', '0.02 0.06 0.07 rg',
'0 ' + (pageH - band) + ' ' + pageW + ' ' + band + ' re f',
'0 0 ' + pageW + ' ' + footerHeight + ' re f', 'Q',
'BT /F1 ' + headSize + ' Tf 1 1 1 rg ' + pad + ' ' + (pageH - pad - headSize)
+ ' Td (' + pdfEscape(heading) + ') Tj ET',
...footerCommands
].join('\n');
var objects = [
'<< /Type /Catalog /Pages 2 0 R >>',
'<< /Type /Pages /Kids [3 0 R] /Count 1 >>',
'<< /Type /Page /Parent 2 0 R /MediaBox [0 0 ' + pageW + ' ' + pageH + ']'
+ ' /Resources << /XObject << /Im0 5 0 R >> /Font << /F1 6 0 R >>'
+ ' /ExtGState << /GsA 7 0 R >> >> /Contents 4 0 R >>',
'<< /Length ' + content.length + ' >>\nstream\n' + content + '\nendstream',
'<< /Type /XObject /Subtype /Image /Width ' + pixelWidth + ' /Height ' + pixelHeight
+ ' /ColorSpace /DeviceRGB /BitsPerComponent 8 /Filter /DCTDecode /Length '
+ jpegBinary.length + ' >>\nstream\n' + jpegBinary + '\nendstream',
'<< /Type /Font /Subtype /Type1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >>',
'<< /Type /ExtGState /ca 0.55 >>'
];
var out = '%PDF-1.4\n%\u00e2\u00e3\u00cf\u00d3\n';
var offsets = [];
var i;
for (i = 0; i < objects.length; i += 1) {
offsets.push(out.length);
out += (i + 1) + ' 0 obj\n' + objects[i] + '\nendobj\n';
}
var xref = out.length;
out += 'xref\n0 ' + (objects.length + 1) + '\n0000000000 65535 f \n';
for (i = 0; i < offsets.length; i += 1) {
out += ('0000000000' + offsets[i]).slice(-10) + ' 00000 n \n';
}
out += 'trailer\n<< /Size ' + (objects.length + 1) + ' /Root 1 0 R >>\n'
+ 'startxref\n' + xref + '\n%%EOF\n';
var bytes = new Uint8Array(out.length);
for (i = 0; i < out.length; i += 1) bytes[i] = out.charCodeAt(i) & 0xff;
return { bytes: bytes, pageW: pageW, pageH: pageH };
}
function captureMapJpeg(doc, then) {
var map = mapHandle(),settled=false,timer;
var finish=function(url,canvas){if(settled)return;settled=true;clearTimeout(timer);if(map&&map.off&&grab)map.off('render',grab);then(url,canvas);};
timer=setTimeout(function(){finish(null,null);},10000);
var canvas = doc.querySelector('.maplibregl-canvas')
|| (map && map.getCanvas ? map.getCanvas() : null);
if (!canvas) { finish(null, null); return; }
var grab = function () {
var url = null;
try { url = canvas.toDataURL('image/jpeg', 0.92); } catch (_) { url = null; }
if (!url || url.indexOf('data:image/jpeg') !== 0 || looksBlank(canvas)) {
finish(null, canvas);
return;
}
finish(url, canvas);
};
if (map && map.once && map.triggerRepaint) {
map.once('render', grab);
map.triggerRepaint();
} else {
grab();
}
}
function pdfFileStamp() {
var d = new Date();
var pad = function (n) { return (n < 10 ? '0' : '') + n; };
return d.getUTCFullYear() + pad(d.getUTCMonth() + 1) + pad(d.getUTCDate())
+ pad(d.getUTCHours()) + pad(d.getUTCMinutes());
}
function wrapPdfText(value,maxChars){
const text=String(value??'').replace(/\u00a9/g,'(c)').replace(/[\u00b7\u2013\u2014]/g,'-').replace(/[^\x20-\x7e]/g,' ').replace(/\s+/g,' ').trim();
const lines=[];let line='';
for(const word of text.split(' ')){let rest=word;while(rest.length>maxChars){if(line){lines.push(line);line='';}lines.push(rest.slice(0,maxChars));rest=rest.slice(maxChars);}if(!rest)continue;if(line.length+rest.length+1>maxChars){lines.push(line);line=rest;}else line+=(line?' ':'')+rest;}
if(line)lines.push(line);return lines;
}
function savePdf(doc,button){
if(button.disabled)return;button.disabled=true;button.textContent='Building map PDF...';
captureMapJpeg(doc,function(data,canvas){
button.disabled=false;
if(!data){button.textContent='Map capture unavailable - redraw and try again';return;}
try{
const binary=atob(data.slice(data.indexOf(',')+1));
const built=buildMapPdf(binary,canvas.width,canvas.height,'GlobalGrid2050 - Grid Atlas map',attributionText(doc),generationText()+' - '+new Date().toISOString().slice(0,16).replace('T',' ')+' UTC');
const url=URL.createObjectURL(new Blob([built.bytes],{type:'application/pdf'})),anchor=doc.createElement('a');
anchor.href=url;anchor.download='globalgrid2050-map-'+pdfFileStamp()+'.pdf';doc.body.append(anchor);anchor.click();anchor.remove();
setTimeout(()=>URL.revokeObjectURL(url),30000);button.textContent='PDF saved - '+built.pageW+' x '+built.pageH+' native pixels';
}catch(error){button.textContent='PDF could not be created: '+error.message;}
});
}
function install(){
if(document.getElementById('gridatlas-export-pdf'))return true;
const sibling=document.getElementById('gridatlas-export-image')||[...document.querySelectorAll('#gridatlas-menu-bar button[data-gm-export]')].find(button=>/save an image/i.test(button.textContent));if(!sibling)return false;
const button=document.createElement('button');button.id='gridatlas-export-pdf';button.type='button';button.dataset.gmExport='pdf';
button.textContent='Save map as PDF';button.title='Download the visible map at native resolution, with source credits and release identity';button.style.minHeight='44px';button.setAttribute('aria-live','polite');
button.addEventListener('click',()=>savePdf(document,button));sibling.before(button);return true;
}
registry.mapPdf=Object.freeze({schema:'gridatlas.map-pdf.v1',buildMapPdf,wrapPdfText,install});
if(typeof document!=='undefined'&&!install()){
const observer=new MutationObserver(()=>{if(install())observer.disconnect();});observer.observe(document.documentElement,{childList:true,subtree:true});
setTimeout(()=>observer.disconnect(),120000);
}
})();

Particles — 12 Substations Line Page

A web page in the testcode folder of GlobalGrid2050 covering substations. Published at https://globalgrid2050.com/testcode/particles/12-substations-line-142743/.

renderglobalgrid2050 / testcode/particles/12-substations-line-142743/index.html · lines 1–33 of 33 · Entry point

What it does
It draws substations. Side effects: changes the web page (DOM).
Why it exists in the grid workflow
Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow. Domain terms in the code: substations.
Inputs & outputs
Out: web page.
Downstream impact
It is itself an entry point, published at https://globalgrid2050.com/testcode/particles/12-substations-line-142743/.
What it achieves
Its code works with 100 kW.
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · testcode/particles/12-substations-line-142743 · page
Uses
Wafer Development Environment — Real Systems Page (iframe)
Used by
none found
Produces
none declared
Defines here
none
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 testcode/particles/12-substations-line-142743/index.html:1-33 · blob 52b3967bcb34b385763ee3bcddff1c8a97be07e3 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: output · effects: dom · domain stage: experimental · users: ICP_grid_engineer · canonical: production_core
<!doctype html><html lang="en-GB"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>Particles iteration 12</title><style>body{margin:0;background:#000;color:#ccc;font:15px/1.5 ui-monospace,Consolas,monospace}main{max-width:1400px;margin:0 auto;padding:0 0 24px}h1,p,table,pre,small{margin-left:16px;margin-right:16px}h1{font-size:18px;color:#f2f2f2;margin:0 0 4px}img{width:100%;height:auto;display:block;background:#000;margin:16px 0 6px}small{color:#8a8a8a}a{color:#61d6d6}co  … [line shortened here: 514 characters; full line on GitHub]
<iframe src="../../wafer-development-environment/202609180245-real-systems/?draw=substations" title="the wafer drawing a real system" style="width:100%;height:92vh;border:0;background:#000"></iframe>
<p><small>Above: the wafer drawing <code>substations</code> with its own particles, live (iteration 12: system 12 mod 9 of the tour, line 142743 by the formula 1 + floor(frac(n/φ) × 342,795)); type <code>release</code>, then any button. Below: what the swarm measured in this run.</small></p>
<h1>Iteration 12: substations drawn on the wafer; line 142743; 67,108,864 particles under two laws; the Underground, 341 stops; scope tests 4 of 9 tests; 0 failed</h1>
<p>testcode/particles/12-substations-line-142743 · machine-made on the MSI at 20260918T0740Z by <a href="https://github.com/Ventusltd/particle-physics-drawing-engine">particle-physics-drawing-engine</a> · <a href="../">all iterations</a></p>
<p>Same-sized particles, positions computed from the address by a named law, nothing stored. Left: one spiral. Right: a stack of layers of 262,144 slots, angle by whole-number arithmetic.</p>
<img src="spiral-vs-stack.png" alt="spiral versus stack">
<small>67,108,864 particles; spiral 16.27 s, stack 19.41 s; cells lit 823,777 / 824,320</small>
<p style="margin-top:24px">A network from the typed command <code>draw underground</code>: topology from Transport for London's open data, drawn as the same particles under an eight-direction schematic law. No map artwork.</p>
<img src="underground.png" alt="the Underground as particles">
<small>11 lines, 341 stops, 314 edges, 6,335 particles. Powered by TfL Open Data. Contains OS data © Crown copyright and database rights 2016 and Geomni UK Map data © and database rights 2019.</small>
<h2 style="font-size:16px;margin-top:28px">Generated layers, regenerated and hashed on this machine</h2>
<table><tr><th>layer</th><th>size</th><th>hash of every line</th><th>time</th></tr><tr><td>layer 1</td><td>262,144 slots</td><td><code>eb7d6b7a1a0b8b7e…</code></td><td>0.68 s</td></tr><tr><td>layer 16</td><td>262,144 slots</td><td><code>b989530a3b25eb0c…</code></td><td>0.69 s</td></tr><tr><td>layer 64</td><td>262,144 slots</td><td><code>cf3849b416d8fc1c…</code></td><td>0.68 s</td></tr><tr><td>laye  … [line shortened here: 499 characters; full line on GitHub]
<h2 style="font-size:16px;margin-top:28px">Scope status</h2>
<pre style="white-space:pre-wrap;color:#aaa"># Scope status 2026-09-18T07:40:49Z

Ran 4 of 9 tests; 0 failed. Tests marked NOT YET BUILT have no script yet (T1 needs a person with the phone).

| test | what | status | run | last line |
|---|---|---|---|---|
| T1 | a physical iPhone draws one layer | **NOT YET BUILT** |  | `` |
| T2 | exactness of the angle law | **PASS** | exit 0, 0.1 s | `PASS: limit 0.25 px within one layer` |
| T3 | cross-device positions within a pixel | **NOT YET BUILT** |  | `` |
| T4 | generator determinism: a layer regenerates identically | **PASS** | exit 0, 1.3 s | `DNA: regenerated 262144 of 262144 slots on Windows-11-10.0.26200-SP0; MATCH 7e8e65dc0ae61eec... vs 7e8e65dc0ae61eec...` |
| T5 | address to source in one request | **NOT YET BUILT** |  | `` |
| T6 | a law missing a fact refuses by name | **NOT YET BUILT** |  | `` |
| T7 | sixteen layers served from the workstation's second drive | **NOT YET BUILT** |  | `` |
| B1 | spiral and stack side by side | **PASS** | exit 0, 4.0 s | `{"layers": 4, "particles_per_layer": 65536, "particles": 262144, "spiral": {"cells_lit": 262144, "peak_per_cell": 1, "se` |
| B2 | a network from a typed command (the Underground) | **PASS** | exit 0, 2.0 s | `{"command": "draw underground", "source": "https://api.tfl.gov.uk/Line/Mode/tube + /Line/&lt;id>/Route/Sequence/all", "attr` |
</pre>
<small>This page charts measured facts. It is not a design tool; above 100 kW a chartered electrical engineer signs.</small>
</main></body></html>

Particles — 21 Substations Line Page

A web page in the testcode folder of GlobalGrid2050 covering substations. Published at https://globalgrid2050.com/testcode/particles/21-substations-line-335499/.

renderglobalgrid2050 / testcode/particles/21-substations-line-335499/index.html · lines 1–33 of 33 · Entry point

What it does
It draws substations. Side effects: changes the web page (DOM).
Why it exists in the grid workflow
Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow. Domain terms in the code: substations.
Inputs & outputs
Out: web page.
Downstream impact
It is itself an entry point, published at https://globalgrid2050.com/testcode/particles/21-substations-line-335499/.
What it achieves
Its code works with 100 kW.
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · testcode/particles/21-substations-line-335499 · page
Uses
Wafer Development Environment — Real Systems Page (iframe)
Used by
none found
Produces
none declared
Defines here
none
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 testcode/particles/21-substations-line-335499/index.html:1-33 · blob 38bc6db09a6b6904d77228dc8f7cf2b9ed247158 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: output · effects: dom · domain stage: experimental · users: ICP_grid_engineer · canonical: production_core
<!doctype html><html lang="en-GB"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>Particles iteration 21</title><style>body{margin:0;background:#000;color:#ccc;font:15px/1.5 ui-monospace,Consolas,monospace}main{max-width:1400px;margin:0 auto;padding:0 0 24px}h1,p,table,pre,small{margin-left:16px;margin-right:16px}h1{font-size:18px;color:#f2f2f2;margin:0 0 4px}img{width:100%;height:auto;display:block;background:#000;margin:16px 0 6px}small{color:#8a8a8a}a{color:#61d6d6}co  … [line shortened here: 514 characters; full line on GitHub]
<iframe src="../../wafer-development-environment/202609180245-real-systems/?draw=substations" title="the wafer drawing a real system" style="width:100%;height:92vh;border:0;background:#000"></iframe>
<p><small>Above: the wafer drawing <code>substations</code> with its own particles, live (iteration 21: system 21 mod 9 of the tour, line 335499 by the formula 1 + floor(frac(n/φ) × 342,795)); type <code>release</code>, then any button. Below: what the swarm measured in this run.</small></p>
<h1>Iteration 21: substations drawn on the wafer; line 335499; 67,108,864 particles under two laws; the Underground, 341 stops; scope tests 4 of 9 tests; 0 failed</h1>
<p>testcode/particles/21-substations-line-335499 · machine-made on the MSI at 20260918T2340Z by <a href="https://github.com/Ventusltd/particle-physics-drawing-engine">particle-physics-drawing-engine</a> · <a href="../">all iterations</a></p>
<p>Same-sized particles, positions computed from the address by a named law, nothing stored. Left: one spiral. Right: a stack of layers of 262,144 slots, angle by whole-number arithmetic.</p>
<img src="spiral-vs-stack.png" alt="spiral versus stack">
<small>67,108,864 particles; spiral 20.22 s, stack 26.61 s; cells lit 823,777 / 824,320</small>
<p style="margin-top:24px">A network from the typed command <code>draw underground</code>: topology from Transport for London's open data, drawn as the same particles under an eight-direction schematic law. No map artwork.</p>
<img src="underground.png" alt="the Underground as particles">
<small>11 lines, 341 stops, 314 edges, 7,372 particles. Powered by TfL Open Data. Contains OS data © Crown copyright and database rights 2016 and Geomni UK Map data © and database rights 2019.</small>
<h2 style="font-size:16px;margin-top:28px">Generated layers, regenerated and hashed on this machine</h2>
<table><tr><th>layer</th><th>size</th><th>hash of every line</th><th>time</th></tr><tr><td>layer 1</td><td>262,144 slots</td><td><code>eb7d6b7a1a0b8b7e…</code></td><td>0.66 s</td></tr><tr><td>layer 16</td><td>262,144 slots</td><td><code>b989530a3b25eb0c…</code></td><td>0.64 s</td></tr><tr><td>layer 64</td><td>262,144 slots</td><td><code>cf3849b416d8fc1c…</code></td><td>0.62 s</td></tr><tr><td>laye  … [line shortened here: 499 characters; full line on GitHub]
<h2 style="font-size:16px;margin-top:28px">Scope status</h2>
<pre style="white-space:pre-wrap;color:#aaa"># Scope status 2026-09-18T23:41:00Z

Ran 4 of 9 tests; 0 failed. Tests marked NOT YET BUILT have no script yet (T1 needs a person with the phone).

| test | what | status | run | last line |
|---|---|---|---|---|
| T1 | a physical iPhone draws one layer | **NOT YET BUILT** |  | `` |
| T2 | exactness of the angle law | **PASS** | exit 0, 0.1 s | `PASS: limit 0.25 px within one layer` |
| T3 | cross-device positions within a pixel | **NOT YET BUILT** |  | `` |
| T4 | generator determinism: a layer regenerates identically | **PASS** | exit 0, 1.3 s | `DNA: regenerated 262144 of 262144 slots on Windows-11-10.0.26200-SP0; MATCH 7e8e65dc0ae61eec... vs 7e8e65dc0ae61eec...` |
| T5 | address to source in one request | **NOT YET BUILT** |  | `` |
| T6 | a law missing a fact refuses by name | **NOT YET BUILT** |  | `` |
| T7 | sixteen layers served from the workstation's second drive | **NOT YET BUILT** |  | `` |
| B1 | spiral and stack side by side | **PASS** | exit 0, 4.3 s | `{"layers": 4, "particles_per_layer": 65536, "particles": 262144, "spiral": {"cells_lit": 262144, "peak_per_cell": 1, "se` |
| B2 | a network from a typed command (the Underground) | **PASS** | exit 0, 1.9 s | `{"command": "draw underground", "source": "https://api.tfl.gov.uk/Line/Mode/tube + /Line/&lt;id>/Route/Sequence/all", "attr` |
</pre>
<small>This page charts measured facts. It is not a design tool; above 100 kW a chartered electrical engineer signs.</small>
</main></body></html>

Particles — 30 Substations Line Page

A web page in the testcode folder of GlobalGrid2050 covering substations. Published at https://globalgrid2050.com/testcode/particles/30-substations-line-185459/.

renderglobalgrid2050 / testcode/particles/30-substations-line-185459/index.html · lines 1–33 of 33 · Entry point

What it does
It draws substations. Side effects: changes the web page (DOM).
Why it exists in the grid workflow
Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow. Domain terms in the code: substations.
Inputs & outputs
Out: web page.
Downstream impact
It is itself an entry point, published at https://globalgrid2050.com/testcode/particles/30-substations-line-185459/.
What it achieves
Its code works with 100 kW.
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · testcode/particles/30-substations-line-185459 · page
Uses
Wafer Development Environment — Real Systems Page (iframe)
Used by
none found
Produces
none declared
Defines here
none
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 testcode/particles/30-substations-line-185459/index.html:1-33 · blob 61b374396f791e831fc9e756c52d11ccd4f31b8d · GitHub at these lines
State
achieves: name · context: readme_derived · stage: output · effects: dom · domain stage: experimental · users: ICP_grid_engineer · canonical: production_core
<!doctype html><html lang="en-GB"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>Particles iteration 30</title><style>body{margin:0;background:#000;color:#ccc;font:15px/1.5 ui-monospace,Consolas,monospace}main{max-width:1400px;margin:0 auto;padding:0 0 24px}h1,p,table,pre,small{margin-left:16px;margin-right:16px}h1{font-size:18px;color:#f2f2f2;margin:0 0 4px}img{width:100%;height:auto;display:block;background:#000;margin:16px 0 6px}small{color:#8a8a8a}a{color:#61d6d6}co  … [line shortened here: 514 characters; full line on GitHub]
<iframe src="../../wafer-development-environment/202609180245-real-systems/?draw=substations" title="the wafer drawing a real system" style="width:100%;height:92vh;border:0;background:#000"></iframe>
<p><small>Above: the wafer drawing <code>substations</code> with its own particles, live (iteration 30: system 30 mod 9 of the tour, line 185459 by the formula 1 + floor(frac(n/φ) × 342,795)); type <code>release</code>, then any button. Below: what the swarm measured in this run.</small></p>
<h1>Iteration 30: substations drawn on the wafer; line 185459; 67,108,864 particles under two laws; the Underground, 341 stops; scope tests 4 of 9 tests; 0 failed</h1>
<p>testcode/particles/30-substations-line-185459 · machine-made on the MSI at 20260919T0840Z by <a href="https://github.com/Ventusltd/particle-physics-drawing-engine">particle-physics-drawing-engine</a> · <a href="../">all iterations</a></p>
<p>Same-sized particles, positions computed from the address by a named law, nothing stored. Left: one spiral. Right: a stack of layers of 262,144 slots, angle by whole-number arithmetic.</p>
<img src="spiral-vs-stack.png" alt="spiral versus stack">
<small>67,108,864 particles; spiral 17.0 s, stack 19.65 s; cells lit 823,777 / 824,320</small>
<p style="margin-top:24px">A network from the typed command <code>draw underground</code>: topology from Transport for London's open data, drawn as the same particles under an eight-direction schematic law. No map artwork.</p>
<img src="underground.png" alt="the Underground as particles">
<small>11 lines, 341 stops, 314 edges, 9,434 particles. Powered by TfL Open Data. Contains OS data © Crown copyright and database rights 2016 and Geomni UK Map data © and database rights 2019.</small>
<h2 style="font-size:16px;margin-top:28px">Generated layers, regenerated and hashed on this machine</h2>
<table><tr><th>layer</th><th>size</th><th>hash of every line</th><th>time</th></tr><tr><td>layer 1</td><td>262,144 slots</td><td><code>eb7d6b7a1a0b8b7e…</code></td><td>0.65 s</td></tr><tr><td>layer 16</td><td>262,144 slots</td><td><code>b989530a3b25eb0c…</code></td><td>0.65 s</td></tr><tr><td>layer 64</td><td>262,144 slots</td><td><code>cf3849b416d8fc1c…</code></td><td>0.65 s</td></tr><tr><td>laye  … [line shortened here: 499 characters; full line on GitHub]
<h2 style="font-size:16px;margin-top:28px">Scope status</h2>
<pre style="white-space:pre-wrap;color:#aaa"># Scope status 2026-09-19T08:40:50Z

Ran 4 of 9 tests; 0 failed. Tests marked NOT YET BUILT have no script yet (T1 needs a person with the phone).

| test | what | status | run | last line |
|---|---|---|---|---|
| T1 | a physical iPhone draws one layer | **NOT YET BUILT** |  | `` |
| T2 | exactness of the angle law | **PASS** | exit 0, 0.1 s | `PASS: limit 0.25 px within one layer` |
| T3 | cross-device positions within a pixel | **NOT YET BUILT** |  | `` |
| T4 | generator determinism: a layer regenerates identically | **PASS** | exit 0, 1.3 s | `DNA: regenerated 262144 of 262144 slots on Windows-11-10.0.26200-SP0; MATCH 7e8e65dc0ae61eec... vs 7e8e65dc0ae61eec...` |
| T5 | address to source in one request | **NOT YET BUILT** |  | `` |
| T6 | a law missing a fact refuses by name | **NOT YET BUILT** |  | `` |
| T7 | sixteen layers served from the workstation's second drive | **NOT YET BUILT** |  | `` |
| B1 | spiral and stack side by side | **PASS** | exit 0, 4.0 s | `{"layers": 4, "particles_per_layer": 65536, "particles": 262144, "spiral": {"cells_lit": 262144, "peak_per_cell": 1, "se` |
| B2 | a network from a typed command (the Underground) | **PASS** | exit 0, 1.9 s | `{"command": "draw underground", "source": "https://api.tfl.gov.uk/Line/Mode/tube + /Line/&lt;id>/Route/Sequence/all", "attr` |
</pre>
<small>This page charts measured facts. It is not a design tool; above 100 kW a chartered electrical engineer signs.</small>
</main></body></html>

Wafer Development Environment — Voltage Drop Page

A web page in the testcode folder of GlobalGrid2050. Published at https://globalgrid2050.com/testcode/wafer-development-environment/202609170042-voltage-drop/.

renderglobalgrid2050 / testcode/wafer-development-environment/202609170042-voltage-drop/index.html · lines 1–44 of 44 · version 2026-09-17 00:42 · Entry point

What it does
It draws its content. Side effects: changes the web page (DOM).
Why it exists in the grid workflow
Domain stage experimental (path word 'testcode'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow.
Inputs & outputs
In: form fields (user input). Out: web page.
Downstream impact
Used directly by 6 files: Testcode — Wafer Development Environment Page (globalgrid2050, https://globalgrid2050.com/testcode/wafer-development-environment/); GlobalGrid2050 Homepage Before Four Nests (globalgrid2050, https://globalgrid2050.com/homepage-before-four-nests-20260925.html); Homepage Versions — Before Refresh Page (globalgrid2050, https://globalgrid2050.com/homepage_versions/20260922-before-refresh/); Homepage V123 (globalgrid2050, https://globalgrid2050.com/homepage_versions/homepage_v123.html); and 2 more. Reached from 115 other entry points, including GlobalGrid2050 Historical Builds (globalgrid2050, https://globalgrid2050.com/historical_builds.html); Homepage V037 (globalgrid2050, https://globalgrid2050.com/homepage_versions/homepage_v037.html); Homepage V038 (globalgrid2050, https://globalgrid2050.com/homepage_versions/homepage_v038.html). It is itself an entry point, published at https://globalgrid2050.com/testcode/wafer-development-environment/202609170042-voltage-drop/.
What it achieves
No statement of purpose was found in the file, a README line naming it, or its name.
Why it matters
Loaded by the Wafer Development Environment page at https://globalgrid2050.com/testcode/wafer-development-environment/ and 5 other pages.
Application
globalgrid2050 · testcode/wafer-development-environment/202609170042-voltage-drop · page
Uses
GlobalGrid2050 — Testcode Style Sheet (stylesheet), Wafer Development Environment — Estate (script src), Pilot Rules (script src), Pilot (script src)
Used by
linked from Testcode — Wafer Development Environment Page (link), linked from GlobalGrid2050 Homepage Before Four Nests (link), linked from Homepage Versions — Before Refresh Page (link), linked from Homepage V123 (link), linked from Homepage V124 (link), linked from Homepage V125 (link)
Produces
none declared
Defines here
none
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 testcode/wafer-development-environment/202609170042-voltage-drop/index.html:1-44 · blob c2742c783a66f3a19fb2667598c8e0de0ac64234 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: output · effects: dom · domain stage: experimental · users: none · canonical: production_core
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover, maximum-scale=5">
<meta name="color-scheme" content="dark">
<title>202609170042-voltage-drop</title>
<meta name="wafer-data" content="../shared/">
<meta name="wafer-start" content="run voltage-drop.voltageDropVolts {&quot;currentA&quot;:120,&quot;lengthM&quot;:250,&quot;resistanceOhmPerKm&quot;:0.32,&quot;powerFactor&quot;:0.95,&quot;phases&quot;:&quot;three&quot;}">
<link rel="stylesheet" href="style.css">
</head>
<body>

<canvas id="stage" aria-label="Every permanently numbered line of code in the estate, placed by its own number."></canvas>

<header id="bar">
  <span id="wordmark">THE LINE WAFER</span>
  <span id="count" class="dim">loading the numbered database…</span>
</header>

<form id="beam" autocomplete="off">
  <input id="a" inputmode="numeric" pattern="[0-9]*" placeholder="line number" aria-label="line number to fly to">
  <input id="b" inputmode="numeric" pattern="[0-9]*" placeholder="connect to…" aria-label="second line number to connect to">
  <button id="go" type="submit">FLY</button>
</form>

<section id="panel" hidden>
  <button id="close" type="button" aria-label="close">✕</button>
  <div id="panelbody"></div>
</section>

<footer id="foot">
  <span id="prov" class="dim">provenance loading</span>
  <span id="hint" class="dim">drag to steer · pinch or scroll to focus the beam · tap a line</span>
  <a id="proofs" href="proof/">check every claim on this page</a>
</footer>

<noscript><p class="dim" style="padding:1rem">This surface is drawn from the numbered database at run time, so it needs JavaScript. Nothing here is typed into the page.</p></noscript>

<script type="module" src="app.mjs"></script>
<script src="pilot-rules.js"></script>
<script type="module" src="pilot.mjs"></script>
</body>
</html>