A pipeline looks like a line on a map, but a line is the wrong data structure for it. A line has two endpoints and no opinions. A pipeline has purposes, pressure envelopes, coating systems, protection criteria, inspection histories, and a legal obligation to remain continuous under every edit anyone makes to it. GenAnywhere therefore models a pipeline as a typed graph: nodes are facilities and connection points, edges are segments carrying declared purpose and physical properties, and a layer of integrity systems spans the graph enforcing rules that no single segment can satisfy alone. This article walks the entity model and the invariants that make it refuse to lie.
Segments carry purpose, not just geometry
The edge entity in GenAnywhere is the Segment, and its first field is not diameter or material but purpose: potable conveyance, gas transmission, product transmission, steam distribution, brine return, carbon dioxide conveyance. Purpose is generative. It selects the rule set that attaches to the segment — pressure envelope class, separation distances, coating and protection requirements, inspection interval — and it determines which renderers may draw the segment at all. A carbon dioxide line and a potable water line can share a corridor on the map while remaining entirely different citizens of the graph, because their purposes bind them to different invariant families. The dense rack of insulated lines running between blank absorber towers at a capture facility is exactly the case the purpose field exists for: geometrically near-identical pipes whose entire engineering difference is what they carry and what they promise.
Facilities are nodes with obligations
Where segments meet, GenAnywhere places Facility nodes: compressor and pump stations, metering sites, launcher and receiver barrels, valve sites, storage wellheads, and process plants. A Facility is not a point on a map; it is a bundle of obligations. A compression facility declares the envelope it can impose on each connected segment and the surge behavior it introduces on sudden shutdown. A storage facility declares injection and withdrawal ranges and the inventory reconciliation basis it uses. Because obligations live on the node, the graph can answer questions a line cannot: which facility is responsible for the pressure excursion at this station, which node's shutdown would orphan this reach, which metering point must exist for this custody transfer to be computable.
Crossings are edges with a method
The model distinguishes ordinary buried segments from Crossing entities, because a crossing is a segment plus a method plus a legal fact. A Crossing records its method — open cut, horizontal directional bore, conventional bore, tunnel, aerial span — its as-drilled profile where one exists, its casing and isolation arrangement, and the authority whose consent it embodies. This separation matters operationally: integrity rules that apply to buried coated steel do not apply identically inside a casing or a bore, and inspection access differs by method. A water transmission tunnel driven through granite, emerging at a concrete arch portal beside a blank valve house, is a Crossing whose method makes it inspectable by walking, and the graph records that fact so the renderer can offer an internal alignment view no buried segment could support.
Integrity systems span the graph
The fourth entity family is the IntegritySystem, and it is deliberately not attached to a single segment. Cathodic protection, coating programs, inline inspection schedules, and surge protection all operate across many segments and facilities at once, so GenAnywhere models them as spanning structures with their own coverage rules. A protection system declares the criterion it maintains and the segments it covers; the invariant is total coverage, so any new buried segment inserted into the graph must be claimed by a protection system before the edit commits. A surge protection system declares its vessels and set points; its invariant is margin, evaluated against the modeled transient on every connected reach. A yard of steel surge tanks and standpipes above blue manifolds is, in graph terms, a SurgeSystem node set whose margin invariant is re-evaluated whenever any pump curve or valve closure time upstream changes.
The invariants that make the graph refuse to lie
Four invariants run on every edit. Continuity: no segment may dangle; every edge terminates at a Facility or another Segment connection point, and a deletion that would orphan a reach is rejected with the orphaned set named. Envelope: the pressure class of every segment must contain the modeled operating and surge envelope imposed by all connected facilities, so adding a pump station upstream of an under-rated reach fails loudly at edit time rather than quietly at commissioning. Coverage: every buried segment belongs to exactly one protection system meeting its criterion, and every segment purpose with an inspection obligation belongs to exactly one inspection schedule. Reconciliation: inventory and line pack computed from the graph must close against measured values within the declared tolerance, turning imbalance into a model event with a station range attached.
Renderers and the asset pipeline
Because the graph is typed, renderers are projections rather than drawings. The alignment sheet renderer walks the graph in station order and emits the strip view with crossings expanded by method. The isometric renderer projects a Facility's connected edges with their purposes color-coded, which is why a capture facility rack reads instantly as a family of distinct citizens. The station map renderer flattens the graph to its nodes for control-room display. Assets — survey terrain, coating records, tool reports — attach to entities by identity, so a new pig run lands on the exact segments it inspected without anyone re-stationing anything by hand. The result is a model where the drawing is a consequence of the data, the data carries the obligations, and the obligations are enforced by invariants that fail at edit time, which is the only cheap time for them to fail.


Top comments (0)