Yard layouts that know what connects to what: 50 MW of GB300 plant from an ontology
The site-placement tool in sd-dc places yard plant around a hall, tests the layout against a rule list, and costs the cable and pipe it needs. Until this week the links came from a list typed into each layout file. Move the plant and the list still pointed at the old partners; add a generator and nothing noticed it had no feeder. Connections now come from an ontology written once per project, and the engine re-pairs plant for every layout it tests.
What the ontology holds
Classes of plant, and relations between classes with a multiplicity, a link kind and the ports at each end:
"relations": [
{"view": "electrical", "from": "Transformer", "to": "Power train",
"multiplicity": "1:1", "service": "LV feeder", "kind": "LV-5000A",
"from_port": "lv", "to_port": "tx"}
]
For each layout the engine:
- finds the members of each class, by catalogue type, tag, site point or fixed object;
- pairs them: 1:1 relations to minimise total rectilinear distance, N:1 to
the nearest partner, or to equal shares where the relation says
balanced; - writes a link between the named ports, routes it on tray at the
tray_zheight around plinths, and costs it as conductor mass times cost per kg plus length times cost per metre.
A new rule type, ontology, fails a layout where a relation doesn't hold:
an empty class, an unconnected member, a "one" end with two partners, or a
missing port. ontology_diagram.py draws the same file as diagrams, one per
view.

ontology_diagram.py from example-gb300-50mw/ontology.json. Two bars mean exactly one; a crow's foot means one or many.The cooling plant is the mechanical view of the same file. Dry coolers feed
facility water pump plants N:1 with assign: balanced, so each of the six
pump plants takes six coolers; chillers feed chilled water pump plants the
same way; each pump plant runs one pipe pair to its hall entry; the bulk fuel
tanks feed generators 1:N.

ontology.json.The worked example
example-gb300-50mw/ is synthetic. Only the rack figure is published: a
GB300 NVL72 rack at 135 kW with about 90 % of its heat to liquid, from
Lenovo Press LP2357.
The site, plant sizes, clearances and unit costs are invented, and
build_config.py writes every JSON file from one script.
| Quantity | Value |
|---|---|
| Racks | 370 × 135 kW = 49.95 MW |
| Heat to liquid, to air | 44.96 MW, 4.99 MW |
| Lineups (transformer, generator, power train) | 24 |
| Dry coolers, facility water pump plants | 36, 6 |
| Chillers, chilled water pump plants | 4, 2 |
| Plant items placed | 124 |
| Ontology classes, relations | 15, 13 |
| Links generated for each layout | 172 |
No layout file in the example contains a link. Rule G-03 reports
13 relations hold, 364 connections for each layout.
Three layouts against 14 rules
The rules are five must (no overlap, inside the fence by 8 m, the
ontology holds, every feeder routed, a 6 m delivery route to the dock) and
nine feasibility checks: plant clearances, a perimeter loop and a clear
zone at the dock. Two of the clearances are for cooling plant: dry coolers
and chillers 6 m from the hall (G-11) and 12 m from any generator (G-12). In
layout C the worst pairs measure 7.0 m and 31.1 m.
| Layout | LV 5,000 A feeder, m | Conductor, t | Cooling pipe, m | Cooling pipe cost | Total cost (nominal US$) |
|---|---|---|---|---|---|
| A. Transformer and generator rows set back from the hall | 1,440 | 274.7 | 1,089 | 1,208,260 | 5,868,334 |
| B. Each lineup in a line behind its power train | 612 | 125.2 | 1,089 | 1,208,260 | 4,101,009 |
| C. Anneal and descent from B | 408 | 85.1 | 972 | 1,051,660 | 3,476,401 |
Cooling pipe is the four water link kinds (DN150, DN350, DN250, DN400), measured as route length; each is costed as a supply and return pair.

placement.py evaluate --plot writes to out/.All three pass all 14 rules. A to C saves 189.6 t of conductor, 69 % of A's. Rates are invented: the costs rank layouts, they aren't an estimate.
The search varied seven numbers: five shared by the 24 lineups and two by the six cooling groups. It moved each transformer beside the end of its power train, brought the generators 5.8 m nearer the hall, and pushed the pump plants and dry coolers towards the end walls as far as the range allows. Pairing is redone for every candidate, so the template never says which transformer feeds which power train.
How I checked it
I copied the tool off my laptop and re-ran it on a second machine:
python3 ../placement.py evaluate project.json --layout layout-A-rows.json
python3 ../placement.py evaluate project.json --layout layout-B-inline.json
python3 ../placement.py evaluate project.json --layout out/C-search.layout.json
python3 -m pytest tests -q # 23 passed
Costs and conductor masses match the committed results exactly. Then I
deleted GEN-N7 from layout B:
FAIL must G-03 Generator > Power train (LV 5,000 A standby): PT-N7 has no Generator
evaluate exits 1. Clearances are exact shapely distances;
freecad_verify.py re-measures them on FreeCAD solids, but I didn't run it
for this example.
What was wrong along the way
The example README and my first draft both said the search tested 798
layouts. The log, out/tested_log.csv, has 796 search rows (one start, 765
annealing, 30 descent), 525 passing. Steps that change nothing or fail a
require expression aren't logged, so the last step number, 900,
overstates the count.
Limits
- The search isn't exhaustive. Four annealing seeds ended between 3,476,401 and 3,682,983, so C is a good layout, not a proven best.
- The ontology checks that connections exist at the right multiplicity. It doesn't check redundancy: nothing says the hall survives the loss of a lineup.
- Only LV feeders are routed around plant on tray. Cooling pipe, MV, fuel and fibre take rectilinear routes that ignore obstacles.
- Pairing uses distance between plant centres, not routed length.
- Cooling pipe is costed but not checked for hydraulics: no pressure drop, pump head or pipe sizing against flow.
- No crane rule is applied in this example, though the tool has one.