File size: 19,839 Bytes
a5687dc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a07c5a0
a5687dc
3356a32
a5687dc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90c4eda
a5687dc
 
 
90c4eda
 
a5687dc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3356a32
a5687dc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3356a32
a5687dc
 
 
 
 
3356a32
a5687dc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3356a32
a5687dc
 
 
 
 
3356a32
a5687dc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
---
license: mit
task_categories:
  - other
tags:
  - power-systems
  - optimal-power-flow
  - energy
  - power-grid-modeling
  - openstreetmap
  - us-eia
  - us-census
pretty_name: "GridSFM US Power Grid Models"
size_categories:
  - 100M<n<1G
---

# GridSFM US Power Grid Models

OPF-ready transmission network models for all 48 contiguous U.S. states and 6 multi-state regions, derived entirely from open data (OpenStreetMap + U.S. EIA + U.S. Census).

Each model is a self-contained JSON file compatible with [PowerModels.jl](https://github.com/lanl-ansi/PowerModels.jl) and MATPOWER-format tools. Models include bus-branch topology, line impedances, generator costs, hourly load allocation, DC warm-start voltage angles, and reactive compensation shunts.

**Tools & Viewer**: The Python loader ([`gridsfm_pg_loader.py`](https://github.com/microsoft/GridSFM/tree/main/power_grid)) and the interactive Data Viewer are available in the [GridSFM repository](https://github.com/microsoft/GridSFM/tree/main/power_grid).

## Citation

If you use this data, please cite:

```bibtex
@article{britto2026powergrid,
  title   = {Building Power Grid Models from Open Data: A Complete Pipeline from OpenStreetMap to Optimal Power Flow},
  author  = {Britto, Andrea and Spina, Thiago and Yang, Weiwei and Fowers, Spencer and Zhang, Baosen and White, Chris},
  year    = {2026},
  note    = {Microsoft Research}
}
```

## Coverage

**48 states** — all contiguous U.S. states (AL, AZ, AR, CA, CO, CT, DE, FL, GA, ID, IL, IN, IA, KS, KY, LA, ME, MD, MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ, NM, NY, NC, ND, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VT, VA, WA, WV, WI, WY).

**6 multi-state regions:**

| Region | States | Buses (approx.) |
|--------|--------|-----------------|
| `new_england` | CT, MA, ME, NH, RI, VT | ~640 |
| `pacific_nw` | OR, WA | ~1,100 |
| `desert_sw` | AZ, NV, UT | ~1,300 |
| `western` | AZ, CA, CO, ID, MT, NM, NV, OR, UT, WA, WY | ~5,100 |
| `eastern` | AL, AR, CT, DE, FL, GA, IA, IL, IN, KS, KY, LA, MA, MD, ME, MI, MN, MO, MS, NC, ND, NE, NH, NJ, NY, OH, OK, PA, RI, SC, SD, TN, VA, VT, WI, WV | ~21,700 |
| `pjm` | DE, IL, IN, KY, MD, MI, NC, NJ, OH, PA, TN, VA, WV | ~7,800 |

**Two operating hours per model:**
- `16h` — peak demand (4:00 PM, July 15 2024)
- `04h` — off-peak demand (4:00 AM, July 15 2024)

## File Structure

```
16h/
  alabama_model.json                 # Full model (topology + parameters + demand + shunts + DC warm-start)
  alabama_dc_results.json            # DC-OPF solution
  alabama_ac_results.json            # AC-OPF solution
  ...
  western_model.json                 # Multi-state region model
  western_dc_results.json
  western_ac_results.json
04h/
  ...                                # Same structure, off-peak hour
```

## Model File (`*_model.json`)

The primary artifact. A single JSON containing everything needed to run optimal power flow.

### Top-Level Metadata

| Field | Type | Description |
|-------|------|-------------|
| `name` | string | Model name (e.g., `"delaware"`) |
| `baseMVA` | float | System base power (always 100.0) |
| `per_unit` | bool | Always `true` — all values are in per-unit |
| `version` | string | Format version |
| `source_type` | string | `"matpower"` — format compatibility marker |
| `balancing_authority` | string | Primary BA serving this state (e.g., `"PJM"`) |
| `demand_source` | string | EIA data source and allocation fraction |
| `dispatch_method` | string | Generator dispatch method (`"merit_order"` or `"proportional"`) |
| `load_allocation_method` | string | How load was distributed to buses (`"census"` or `"per_ba_census"`) |
| `ba_coverage_pct` | float | Percentage of state capacity covered by detected BAs |
| `is_multi_state` | bool | Whether this is a multi-state region model |
| `target_datetime` | string | ISO 8601 timestamp for demand snapshot |

`storage` and `switch` are present but always empty (required by PowerModels.jl parser).

### `bus` — Transmission Buses

Keyed by string ID (non-sequential). One bus per voltage level per substation.

| Field | Type | Description |
|-------|------|-------------|
| `bus_i` | int | Bus number |
| `bus_type` | int | 1 = PQ, 2 = PV (generator), 3 = slack (reference) |
| `index` | int | Same as `bus_i` |
| `name` | string | Substation name from OSM |
| `area` | int | Network area |
| `zone` | int | Network zone |
| `base_kv` | float | Nominal voltage (kV) |
| `lat` | float | Latitude (WGS84) |
| `lon` | float | Longitude (WGS84) |
| `vm` | float | Voltage magnitude (p.u.) — initialized to 1.0 |
| `va` | float | Voltage angle (radians) — from DC-OPF warm-start |
| `vmax` | float | Upper voltage limit (p.u.) |
| `vmin` | float | Lower voltage limit (p.u.) |
| `pd` | float | Always 0.0 (loads are in the `load` section) |
| `qd` | float | Always 0.0 |

### `gen` — Generators

| Field | Type | Description |
|-------|------|-------------|
| `index` | int | Generator number |
| `gen_bus` | int | Bus this generator is connected to |
| `gen_status` | int | 1 = online, 0 = offline |
| `name` | string | Generator/plant name from OSM |
| `fuel_type` | string | Standardized fuel type (`"gas"`, `"nuclear"`, `"solar"`, `"wind"`, `"coal"`, `"hydro"`, etc.) |
| `pg` | float | Active power output (p.u.) — from DC warm-start dispatch |
| `pmax` | float | Maximum active power (p.u.) |
| `pmin` | float | Minimum active power (p.u.) |
| `qg` | float | Reactive power output (p.u.) |
| `qmax` | float | Maximum reactive power (p.u.) |
| `qmin` | float | Minimum reactive power (p.u.) |
| `vg` | float | Voltage setpoint (p.u.) |
| `mbase` | float | Machine base (MVA) |
| `model` | int | Cost model type (2 = polynomial) |
| `ncost` | int | Number of cost coefficients |
| `cost` | list | Cost polynomial `[c2, c1, c0]` where total_cost = c2·pg² + c1·pg + c0 (p.u.) |
| `apf` | float | Area participation factor |
| `startup` | float | Startup cost ($) |
| `shutdown` | float | Shutdown cost ($) |
| `ramp_10` | float | 10-minute ramp rate (p.u.) |
| `ramp_30` | float | 30-minute ramp rate (p.u.) |
| `ramp_agc` | float | AGC ramp rate (p.u.) |
| `ramp_q` | float | Reactive ramp rate (p.u.) |
| `startup_time` | float | Startup time (hours) |
| `min_up_time` | float | Minimum up time (hours) |
| `min_down_time` | float | Minimum down time (hours) |

**EIA-matched generators** also have:

| Field | Type | Description |
|-------|------|-------------|
| `fuel_type_eia` | string | Raw EIA fuel code (`"NG"`, `"SUN"`, `"NUC"`, etc.) |
| `prime_mover` | string | EIA prime mover code (`"CT"`, `"PV"`, `"ST"`, etc.) |
| `eia_plant_id` | string | EIA plant ID |
| `eia_generator_id` | string | EIA generator ID |
| `eia_match_score` | float | Match confidence (0–1) |
| `eia_match_distance_km` | float | Distance from OSM location to EIA plant (km) |
| `ref_us_eia` | string | EIA reference ID |
| `pmax_eia` | float | EIA nameplate capacity (p.u.) |
| `heat_rate_eia` | float | EIA heat rate (BTU/kWh) — thermal generators only |
| `capacity_factor` | float | Hourly capacity factor (solar/wind derating) |
| `pmax_nameplate` | float | Nameplate pmax before capacity factor derating (p.u.) |
| `qmax_nameplate` | float | Nameplate qmax before any adjustments (p.u.) |
| `qmin_nameplate` | float | Nameplate qmin before any adjustments (p.u.) |

**Injected generators** (from distant EIA plants with no OSM match) also have:

| Field | Type | Description |
|-------|------|-------------|
| `eia_injected` | bool | Always `true` — generator was injected, not matched to OSM |

### `branch` — Transmission Lines and Transformers

| Field | Type | Description |
|-------|------|-------------|
| `index` | int | Branch number |
| `f_bus` | int | From bus |
| `t_bus` | int | To bus |
| `br_r` | float | Series resistance (p.u.) |
| `br_x` | float | Series reactance (p.u.) |
| `b_fr` | float | From-side shunt susceptance (p.u.) |
| `b_to` | float | To-side shunt susceptance (p.u.) |
| `g_fr` | float | From-side shunt conductance (p.u.) |
| `g_to` | float | To-side shunt conductance (p.u.) |
| `br_status` | int | 1 = in service |
| `rate_a` | float | Long-term thermal rating (p.u.) |
| `rate_b` | float | Short-term rating (p.u.) |
| `rate_c` | float | Emergency rating (p.u.) |
| `angmin` | float | Minimum angle difference (radians) |
| `angmax` | float | Maximum angle difference (radians) |
| `tap` | float | Tap ratio (1.0 for lines; off-nominal for transformers) |
| `tap_min` | float | Minimum tap ratio |
| `tap_max` | float | Maximum tap ratio |
| `shift` | float | Phase shift angle (radians) |
| `transformer` | bool | `true` if this is a transformer |
| `circuit_key` | string | Internal circuit identifier |
| `length_km` | float | Line length in km (0.0 for transformers) |

**Transformer branches** also have:

| Field | Type | Description |
|-------|------|-------------|
| `transformer_hv_kv` | float | High-voltage side (kV) |
| `transformer_lv_kv` | float | Low-voltage side (kV) |

### `load` — Bus Loads

| Field | Type | Description |
|-------|------|-------------|
| `index` | int | Load number |
| `load_bus` | int | Bus this load is attached to |
| `pd` | float | Active power demand (p.u.) |
| `qd` | float | Reactive power demand (p.u.) |
| `status` | int | 1 = active |

### `shunt` — Reactive Compensation

Derived from DC-OPF solution to provide reactive power support for AC-OPF convergence. These are synthetic shunts — not from OSM or EIA.

| Field | Type | Description |
|-------|------|-------------|
| `index` | int | Shunt number |
| `shunt_bus` | int | Bus this shunt is attached to |
| `gs` | float | Shunt conductance (p.u.) — always 0.0 |
| `bs` | float | Shunt susceptance (p.u.) — positive = capacitor, negative = reactor |
| `status` | int | 1 = active |

### `dcline` — HVDC Lines

| Field | Type | Description |
|-------|------|-------------|
| `index` | int | DC line number |
| `f_bus` | int | From bus |
| `t_bus` | int | To bus |
| `br_status` | int | 1 = in service |
| `pf` / `pt` | float | Active power at from/to end (p.u.) |
| `qf` / `qt` | float | Reactive power at from/to end (p.u.) |
| `vf` / `vt` | float | Voltage at from/to end (p.u.) |
| `pmaxf` / `pmaxt` | float | Max active power at from/to (p.u.) |
| `pminf` / `pmint` | float | Min active power at from/to (p.u.) |
| `qmaxf` / `qmaxt` | float | Max reactive power at from/to (p.u.) |
| `qminf` / `qmint` | float | Min reactive power at from/to (p.u.) |
| `loss0` | float | Constant loss coefficient |
| `loss1` | float | Linear loss coefficient |
| `circuit_key` | string | Internal circuit identifier |
| `length_km` | float | Line length (km) |
| `model` / `ncost` / `cost` | | Cost model (same format as generators) |

### `_warm_start` — DC Warm-Start Metadata

Present only in the warm-start model files (`*_model.json` after AC-OPF applies shunts), not in the base model.

| Field | Type | Description |
|-------|------|-------------|
| `warm_start_applied` | bool | Whether DC solution was injected |
| `dc_objective` | float | DC-OPF optimal cost ($/h) |
| `dc_solved_level` | int | Relaxation level at which DC converged (0 = strict) |
| `vm_init` | float | Initial voltage magnitude used (always 1.0) |
| `n_dc_shunts` | int | Number of shunts derived from DC solution |
| `total_shunts` | int | Total shunts in model |

## Results Files

### DC Results (`*_dc_results.json`)

Linear DC-OPF solution. Does not solve for reactive power or voltage magnitudes.

| Field | Type | Description |
|-------|------|-------------|
| `formulation` | string | `"dc"` |
| `termination_status` | string | `"LOCALLY_SOLVED"` or `"LOCALLY_INFEASIBLE"` |
| `objective` | float | Total generation cost ($/h) |
| `solve_time` | float | Solver time (seconds) |
| `relaxation_level` | int | 0 = strict, 1–5 = progressively relaxed |
| `relaxation_label` | string | Short label (e.g., `"L0"`, `"AC1"`) |
| `relaxation_name` | string | Human-readable relaxation level (e.g., `"Strict"`) |
| `total_gen_mw` | float | Total generation (MW) |
| `total_load_mw` | float | Total load (MW) |
| `n_buses` / `n_branches` / `n_gens` / `n_loads` | int | Element counts |
| `n_shunts` | int | Number of shunts in model |
| `n_decommitted` | int | Generators decommitted by unit commitment |
| `solution` | dict | Per-element solutions (see below) |

**`solution.bus`**: `va` (voltage angle, rad), `vm` (always 1.0 for DC)

**`solution.gen`**: `pg` (active power, p.u.), `pg_cost` (generation cost, $/h)

**`solution.branch`**: `pf` (from-end active flow, p.u.), `pt` (to-end active flow, p.u.)

**`solution.dcline`**: `pf`, `pt`, `p_dc_cost`

### AC Results (`*_ac_results.json`)

Full nonlinear AC-OPF solution. Same top-level fields as DC results, plus:

| Field | Type | Description |
|-------|------|-------------|
| `n_interfaces` | int | Number of inter-BA interface constraints |

**`solution.bus`**: `va`, `vm` (solved voltage magnitude)

**`solution.gen`**: `pg`, `qg` (reactive power, p.u.), `pg_cost`

**`solution.branch`**: `pf`, `pt`, `qf`, `qt`

**`solution.dcline`**: `pf`, `pt`, `qf`, `qt`, `p_dc_cost`

## Interface Constraints

Models spanning multiple Balancing Authorities include an `interface` section with inter-BA transfer limits. Only present in multi-BA states/regions (31 of 54 datasets).

### `interface` — Inter-BA Transfer Limits

Keyed by string ID. Each entry describes one directional interface between two BAs.

| Field | Type | Description |
|-------|------|-------------|
| `name` | string | Interface name (e.g., `"PNM_to_SWPP"`) |
| `from_ba` | string | Source BA code |
| `to_ba` | string | Destination BA code |
| `branch_ids` | list | Branch IDs forming this interface |
| `n_lines` | int | Number of EHV lines in interface |
| `n_all_lines` | int | Total cross-BA lines (including lower voltage) |
| `limit` | float | Transfer limit (p.u.) |
| `limit_factor` | float | Fraction of total capacity used as limit |
| `limit_method` | string | `"known"` (NERC/WECC paths) or `"heuristic"` |
| `total_rate_a` | float | Sum of branch ratings (p.u.) |

## Quick Start

### Download from HuggingFace

```bash
pip install huggingface_hub
```

**Load a single model (no extra dependencies):**

```python
from huggingface_hub import hf_hub_download
import json

path = hf_hub_download(
    repo_id="microsoft/GridSFM_US_power_grid",
    filename="16h/texas_model.json",
    repo_type="dataset",
)
with open(path) as f:
    model = json.load(f)

print(f"Buses: {len(model['bus'])}")
print(f"Branches: {len(model['branch'])}")
print(f"Generators: {len(model['gen'])}")
print(f"Loads: {len(model['load'])}")
print(f"Total load: {sum(l['pd'] for l in model['load'].values()) * model['baseMVA']:.0f} MW")
```

**Using the GridSFM loader** (from [github.com/microsoft/GridSFM/power_grid](https://github.com/microsoft/GridSFM/tree/main/power_grid)):

```python
from gridsfm_pg_loader import GridSFM_PG_Loader

# With export_dir (optional): the entire dataset is automatically downloaded
# to this directory on init. Without it, files are stored in HuggingFace's cache.
loader = GridSFM_PG_Loader(
    "microsoft/GridSFM_US_power_grid",
    export_dir="./gridsfm_data",  # optional; pre-fetches everything here
)

# To skip the automatic download, use pre_fetch_all=False (lazy download on access)
# loader = GridSFM_PG_Loader(
#     "microsoft/GridSFM_US_power_grid",
#     export_dir="./gridsfm_data",
#     pre_fetch_all=False,
# )

# Case-insensitive; state abbreviations work too
model = loader.load_model("TX", hour="16h")
ac    = loader.load_ac_results("texas", hour="16h")
dc    = loader.load_dc_results("Texas", hour="16h")

# Export a single file to a specific path
loader.export_file("TX", "model", hour="16h", dest="./my_models/texas.json")

# Save a loaded (or modified) model dict back to JSON
loader.save_json(model, "./my_models/texas_modified.json")

# Discover what's available (fetched from dataset_metadata.json)
loader.list_regions()        # all 54 regions + states
loader.list_abbreviations()  # {"AL": "alabama", "TX": "texas", ...}
loader.list_hours()          # ["04h", "16h"]
loader.list_file_types()     # ["model", "ac_results", "dc_results"]

# Export the entire dataset to a local directory at any time
loader.export_all("./gridsfm_data")
```

**Download the entire dataset (~230 MB):**

```bash
hf download --repo-type dataset microsoft/GridSFM_US_power_grid --local-dir ./gridsfm_data
```

**Download a subset (one hour only):**

```bash
hf download --repo-type dataset microsoft/GridSFM_US_power_grid --include "16h/*" --local-dir ./gridsfm_data
```

### Load a model from local files

```python
import json

with open("16h/texas_model.json") as f:
    model = json.load(f)

print(f"Buses: {len(model['bus'])}")
print(f"Branches: {len(model['branch'])}")
print(f"Generators: {len(model['gen'])}")
print(f"Loads: {len(model['load'])}")
print(f"Shunts: {len(model['shunt'])}")
print(f"HVDC lines: {len(model['dcline'])}")
print(f"Total load: {sum(l['pd'] for l in model['load'].values()) * model['baseMVA']:.0f} MW")
```

### Run OPF with PowerModels.jl

```julia
using PowerModels, Ipopt

data = PowerModels.parse_file("16h/texas_model.json")
result = solve_ac_opf(data, Ipopt.Optimizer)
println("Objective: \$(result[\"objective\"])")
println("Status: \$(result[\"termination_status\"])")
```

## Data Sources

- **Topology**: [OpenStreetMap](https://www.openstreetmap.org/) power infrastructure (lines, substations, generators)
- **Generator data**: [U.S. EIA-860](https://www.eia.gov/electricity/data/eia860/) (capacity, fuel type, location), [U.S. EIA-923](https://www.eia.gov/electricity/data/eia923/) (heat rates)
- **Demand**: [U.S. EIA-930](https://www.eia.gov/electricity/gridmonitor/) (hourly BA-level demand)
- **Gas prices**: [Henry Hub spot price](https://www.eia.gov/dnav/ng/ng_pri_fut_s1_d.htm) via EIA API
- **Load allocation**: [U.S. Census](https://www.census.gov/) tract-level population as spatial proxy
- **BA boundaries**: [HIFLD Electric Planning Areas](https://services5.arcgis.com/HDRa0B57OVrv2E1q/arcgis/rest/services/Electric_Planning_Areas/FeatureServer/0) (ArcGIS FeatureServer)

## Per-Unit Convention

All power quantities use system base `baseMVA = 100 MVA`:
- Powers (pg, pd, pmax, rate_a, etc.): multiply by 100 to get MW or MVA
- Impedances (br_r, br_x): in per-unit on system base
- Voltages (vm, vmax, vmin): in per-unit on bus `base_kv`
- Angles (va, angmin, angmax): in radians
- Cost coefficients: scaled for per-unit pg (i.e., `cost[1]` is $/h per unit of pg in p.u.)

## Relaxation Levels

Models that don't converge at strict limits are progressively relaxed. For DC-OPF the solver tries L0 → L1 → … → L5. For AC-OPF the solver tries L0 → AC1 → L1 → … → L5; if AC1 alone doesn't solve it, its V/Q relaxation is kept as a base layer for L1–L5.

The OPF solver with relaxation support is available in the [GridSFM repository](https://github.com/microsoft/GridSFM/tree/main/power_grid). These models can be used directly as input.

| Level | Label | Description |
|-------|-------|-------------|
| 0 | L0 — Strict | Model as-is from pipeline |
| 1 | L1 — Widen angles | Branch angles widened to ±60° |
| 2 | L2 — Thermal headroom | Branch ratings ×1.2, angles ±60° |
| 3 | L3 — Aggressive | Branch ratings ×1.5, angles ±90°, pmin ×0.5 |
| 4 | L4 — Load shedding | Cap load at 70%, ratings ×1.5, angles ±90°, pmin = 0 |
| 5 | L5 — Full relaxation | Remove thermal limits, angles ±90°, V [0.85, 1.15], Q ×2.0, load cap 70%, pmin = 0 |
| AC1 | AC1 — Voltage + Q | Voltage [0.90, 1.10], Q limits ×1.5 (AC-OPF only) |

The `relaxation_level` and `relaxation_label` fields in results files indicate which level was needed.

## License

This data is released under the [MIT License](LICENSE).