Rule-based autocorrection of Piping and Instrumentation Diagrams (P&IDs) on graphs
Lukas Schulze Balhorn, Niels Seijsener, Kevin Dao, Minji Kim, Dominik P. Goldstein, Ge H. M. Driessen, Artur M. Schweidtmann
TL;DR
This work tackles repetitive, error-prone revision of P&IDs by proposing a deterministic, rule-based autocorrection framework built on graph representations of P&IDs aligned to the DEXPI standard. It converts DEXPI P&IDs to graphs using a pyDEXPI implementation, then applies 33 engineering-rule graphs to detect and correct missing or erroneous substructures via subgraph isomorphism with conditional constraints. In a case study using a representative DEXPI P&ID, the method achieved 100% accuracy on five exemplar rules and delivered corrections in milliseconds, highlighting potential for real-time engineering support. The study discusses tradeoffs with scalability and explainability, and suggests hybrid approaches combining rule-based and ML techniques to scale while preserving determinism and safety.
Abstract
A piping and instrumentation diagram (P&ID) is a central reference document in chemical process engineering. Currently, chemical engineers manually review P&IDs through visual inspection to find and rectify errors. However, engineering projects can involve hundreds to thousands of P&ID pages, creating a significant revision workload. This study proposes a rule-based method to support engineers with error detection and correction in P&IDs. The method is based on a graph representation of P&IDs, enabling automated error detection and correction, i.e., autocorrection, through rule graphs. We use our pyDEXPI Python package to generate P&ID graphs from DEXPI-standard P&IDs. In this study, we developed 33 rules based on chemical engineering knowledge and heuristics, with five selected rules demonstrated as examples. A case study on an illustrative P&ID validates the reliability and effectiveness of the rule-based autocorrection method in revising P&IDs.
