--- title: A grid lab in your browser emoji: 🌡️ colorFrom: blue colorTo: indigo sdk: static app_file: index.html pinned: false license: apache-2.0 short_description: Texas grid model, heat waves and hurricanes, in-browser custom_headers: cross-origin-embedder-policy: require-corp cross-origin-opener-policy: same-origin cross-origin-resource-policy: cross-origin --- # A grid lab in your browser AC optimal power flow for a 2,000-bus Texas grid model (Texas A&M's Texas2k, CC BY 4.0; synthetic, not ERCOT's network) on real heat-wave days and hurricane damage draws. GENCO, a neural network, proposes; physics certifies. Nothing runs on a server: this Space serves files and the page computes. GENCO runs as ONNX (onnxruntime-web); the AC power flow, the check and the exact solver run as Python compiled to WebAssembly (Pyodide), in a Web Worker. No licensed solver. The `custom_headers` above make the page cross-origin isolated, so WebAssembly threads work. The page makes four claims, each with its evidence in its "How it works" sheet: - **Real data:** a real day's ERA5 temperature anomaly, ERCOT load at the peak hour (EIA-930), wind and sun (ERA5) and Henry Hub gas price; 52 days of four Texas heat waves. Hurricanes: Harvey (2017) and Beryl (2024) on NOAA's HURDAT2 tracks, 600 stored damage draws each. The page opens on June 2023's ERCOT peak. - **In your browser:** your what-ifs are not sent anywhere (only the basemap tiles come from CARTO). - **Certified:** a point is certified when a full AC power flow of its dispatch meets every limit (ratings within 1%, voltages within 0.005 p.u., reactive and slack mismatches within 1 Mvar and 1 MW; base case only). None of the 181 certified answers was wrong against Ipopt, on what-ifs that included 30 where Ipopt found no dispatch. "Not certified" and "no dispatch found" are flags, not proofs. - **Quantified:** 90% split-conformal bands on line loading (90.5% coverage over all lines of unseen heat-dome what-ifs, 87-90% on the lines loaded above 90%; on real days, bands calibrated on 129 other hot days covered 84-87% and are marked indicative), and a hurricane Monte Carlo reports the share of draws without a dispatch with its 90% interval. ## What you can do - **One what-if.** The weather is a real heat-wave day, a hurricane (a storm, a track shift, a wind speed and new random damage) or up to three synthetic heat domes; sliders set demand, wind, sun, fuel prices and outages. The rail runs Predict (GENCO), Repair (AC power flow), Certify (a few linear steps, then a full AC check) and, only when the check cannot certify, an Exact step: the exact AC-OPF from GENCO's prediction, with a 30 s limit. - **Many what-ifs.** Four findings from exact solves done offline, each with a button that reruns it live: a real heat wave, a +8 °C dome scan, a hurricane's Monte Carlo. A study runs on a second engine in the browser; click a cell to open that what-if above. ## Model and results GENCO small, fine-tuned from its GOC 2000 checkpoint on Texas heat-wave and hurricane what-ifs (12 other storms; Harvey and Beryl never seen in training). With the fast correction: heat, 97.0% AC-feasible, 0.27% above the optimum, on the 1,484 of 1,500 unseen heat-dome what-ifs that have an exact optimum (synthetic domes, mostly at 0.6-0.75 of peak load); storms, 92.1% and 0.73%, on the 1,149 of 1,200 Harvey and Beryl what-ifs that have one. The model and the correction settings were chosen after seeing these test sets; the pre-registered hurricane test did not pass. Development notes, the file map, the data rebuild and the tests are in `DEV.md` (not part of the Space).