FLOW "ElectricalDiagram" v1.0
AUTHORS: Mark Anthony Higgins — Sky Recursive AI
LICENCE: Open Research — attribution required
SOURCE: https://kirethresearch.org/booksai-core/entity-graph/engineering-entities/drawing-and-documentation-entities/electrical-diagram-ontology.html
CITATION_BACKLINK: https://kirethresearch.org/booksai-core/entity-graph/engineering-entities/drawing-and-documentation-entities/electrical-diagram-ontology.html
SOURCE_STATUS: Source body not independently verified; proposed specification.
LOCALE: en-GB
PURPOSE
Represent electrical diagrams as controlled descriptions of power, control and signal connectivity. Distinguish single-line, multi-line, wiring and functional circuit representations from physical installation and observed electrical state.
ENTITIES AND SEMANTIC PATHWAYS
E01: ElectricalDiagram -> identifiedBy -> DrawingNumber | namespace-qualified identity; instance links require evidence.
E02: ElectricalDiagram -> hasRevision -> DrawingRevision | controlled version; instance links require evidence.
E03: ElectricalDiagram -> containsSheet -> DrawingSheet | sheet scope; instance links require evidence.
E04: ElectricalDiagram -> hasTitleBlock -> TitleBlock | document metadata; instance links require evidence.
E05: ElectricalDiagram -> representsSystem -> EngineeringSystem | system boundary; instance links require evidence.
E06: ElectricalDiagram -> representsConfiguration -> DesignConfiguration | applicable design state; instance links require evidence.
E07: ElectricalDiagram -> containsSymbol -> DrawingSymbol | declared notation; instance links require evidence.
E08: ElectricalDiagram -> hasLegend -> DrawingLegend | symbol interpretation; instance links require evidence.
E09: ElectricalDiagram -> usesStandard -> DrawingStandard | edition and applicability; instance links require evidence.
E10: ElectricalDiagram -> representsComponent -> Component | occurrence rather than part type; instance links require evidence.
E11: ElectricalDiagram -> containsPort -> Port | typed endpoint; instance links require evidence.
E12: ElectricalDiagram -> containsNet -> Network | connection membership; instance links require evidence.
E13: ElectricalDiagram -> containsJunction -> Junction | explicit joining evidence; instance links require evidence.
E14: ElectricalDiagram -> containsConnection -> Connection | typed connectivity; instance links require evidence.
E15: ElectricalDiagram -> containsCrossReference -> OffPageReference | sheet and revision scope; instance links require evidence.
E16: ElectricalDiagram -> representsCircuit -> ElectricalCircuit | electrical topology; instance links require evidence.
E17: ElectricalDiagram -> containsConductor -> ElectricalConductor | conductor identity and rating; instance links require evidence.
E18: ElectricalDiagram -> representsSignalPath -> SignalPath | declared signal direction; instance links require evidence.
E19: ElectricalDiagram -> containsAnnotation -> DrawingAnnotation | technical instruction; instance links require evidence.
E20: ElectricalDiagram -> referencesParameter -> DesignParameter | value and unit; instance links require evidence.
E21: ElectricalDiagram -> referencesSpecification -> TechnicalSpecification | controlled reference; instance links require evidence.
E22: ElectricalDiagram -> tracesToRequirement -> EngineeringRequirement | explicit allocation; instance links require evidence.
E23: ElectricalDiagram -> hasVerification -> VerificationRecord | review evidence; instance links require evidence.
E24: ElectricalDiagram -> hasApproval -> ApprovalRecord | authority and scope; instance links require evidence.
E25: ElectricalDiagram -> belongsToBaseline -> DesignBaseline | immutable manifest; instance links require evidence.
E26: ElectricalDiagram -> affectedByChange -> ChangeRequest | change provenance; instance links require evidence.
E27: ElectricalDiagram -> representsOperatingState -> OperatingState | declared switch or contact state; instance links require evidence.
E28: ElectricalDiagram -> containsBoundary -> SystemBoundary | external interface scope; instance links require evidence.
E29: ElectricalDiagram -> containsTerminal -> ElectricalTerminal | terminal designation and equipment scope; instance links require evidence.
E30: ElectricalDiagram -> representsProtectiveDevice -> ProtectiveDevice | declared protection function; instance links require evidence.
E31: ElectricalDiagram -> referencesEarthing -> EarthingSystem | earthing arrangement and protective conductor; instance links require evidence.
E32: ElectricalDiagram -> representsPowerSource -> ElectricalSource | declared supply characteristics; instance links require evidence.
E33: ElectricalDiagram -> representsLoad -> ElectricalLoad | declared load characteristics; instance links require evidence.
E34: ElectricalDiagram -> referencesCable -> Cable | cable identifier and core mapping; instance links require evidence.
E35: ElectricalDiagram -> containsContact -> ElectricalContact | normal state and actuator association; instance links require evidence.
E36: ElectricalDiagram -> referencesProtectionSetting -> ProtectionSetting | controlled setting and applicability; instance links require evidence.
STATE_MODEL
S_t = (I_t,R,B,K_t)
I_t: finite typed assertions; R: finite function-free rules; B: identity, medium, scope and authority constraints; K_t: fixed evidence snapshot plus derivation records.
E_t = expand(I_t,R)
V_t = {x in E_t : valid(x,B) AND supported(x,K_t)}
N_t = V_t minus I_t
If N_t is empty, halt; otherwise select x_t = argmax score(x) over N_t, breaking ties by canonical assertion ID.
I_(t+1) = I_t union {x_t}; K_(t+1) = K_t plus derivation(x_t).
INFERENCE_RULES
R01: drawingNumber(d,n) AND namespace(d,s) -> documentKey(d,s,n)
R02: revisionOf(r,d) -> revisionReference(d,r)
R03: sheetOf(s,r) -> sheetReference(r,s)
R04: titleBlockOf(t,r) -> metadataReference(r,t)
R05: represents(r,c) -> representationReference(r,c)
R06: legendOf(l,r) AND definesSymbol(l,s,m) -> localSymbolMeaning(r,s,m)
R07: standardDeclared(r,s) AND editionDeclared(s,e) -> standardContext(r,s,e)
R08: symbolOccurrence(s,c) -> componentReference(s,c)
R09: portOf(p,c) -> componentEndpoint(c,p)
R10: explicitNetMember(p,n) -> depictedNetMembership(p,n)
R11: explicitJunction(j,n) -> depictedJunction(n,j)
R12: explicitConnection(a,b) AND compatibleMedium(a,b) -> depictedLink(a,b)
R13: ambiguousCrossing(c) -> interpretationReview(c)
R14: matchingOffPageReference(a,b) AND sameConfiguration(a,b) AND compatibleMedium(a,b) -> depictedLink(a,b)
R15: conflictingOffPageReference(a,b) -> referenceReview(a,b)
R16: depictedLink(a,b) AND undirectedDeclared(a,b) -> depictedLink(b,a)
R17: depictedLink(a,b) -> reachable(a,b)
R18: reachable(a,b) AND depictedLink(b,c) -> reachable(a,c)
R19: explicitSignalDirection(a,b) -> directedSignalLink(a,b)
R20: explicitPortType(p,t) -> endpointType(p,t)
R21: mediumMismatch(a,b) -> compatibilityReview(a,b)
R22: explicitState(c,s) -> depictedState(c,s)
R23: parameterReference(c,p) AND unitDeclared(p,u) -> quantityReference(c,p,u)
R24: annotationOf(a,r) -> instructionReference(r,a)
R25: specificationReference(r,s) -> specificationDependency(r,s)
R26: explicitRequirementLink(r,q) -> requirementTrace(r,q)
R27: verificationOf(v,r) -> verificationReference(r,v)
R28: approvalOf(a,r) AND authorised(a) AND scopeMatches(a,r) -> scopedApproval(r,a)
R29: manifestContains(b,r,h) AND digestMatches(r,h) -> baselineIntegrityEvidence(b,r)
R30: changeTargets(c,r) -> impactCandidate(c,r)
R31: changedDependency(r,s) -> reassessmentCandidate(r,s)
R32: supersedes(r2,r1) AND authorisedRevision(r2) -> controlledSupersession(r2,r1)
R33: explicitRelease(r,a) AND authorised(a) AND scopeMatches(a,r) -> releaseEvidence(r,a)
R34: conflictingSymbolMeaning(r,s) -> interpretationReview(r,s)
R35: terminalDesignation(t,n) AND portOf(t,c) -> terminalReference(c,t,n)
R36: explicitCoreAssignment(k,t) -> depictedCoreTermination(k,t)
R37: explicitProtectiveBond(a,b) -> depictedBond(a,b)
R38: explicitProtectiveDevice(p,c) -> protectionReference(c,p)
R39: settingOf(s,p) AND revisionMatches(s,p) -> settingReference(p,s)
R40: explicitContactAssociation(c,k) -> actuatorReference(c,k)
R41: declaredNormalState(c,s) -> normalContactState(c,s)
R42: explicitSupplyReference(c,p) -> supplyReference(c,p)
R43: explicitLoadReference(c,l) -> loadReference(c,l)
R44: conflictingTerminalAssignment(t,a,b) -> terminationReview(t,a,b)
DOMAIN MODELS
Document key = (issuing namespace, drawing number); revision key = (document key, revision identifier); sheet key = (revision key, sheet index). Component occurrence keys include system and configuration scope. Preserve original identifiers and files.
Topology: G=(V,E), V typed ports and junctions, E explicitly supported links. A net is a set of endpoints with common declared connectivity; a hyperedge may be represented by an auxiliary net node. Do not merge ports solely by graphical proximity, line crossing or matching labels outside the declared namespace. Reachability is a topological property, not proof of current or signal propagation. Component internal paths require separate evidence and state conditions.
Electrical model: for a lumped circuit in a valid regime, oriented incidence matrix A gives A i = 0 at internal nodes under Kirchhoff current law; branch voltage v = A^T phi for node potentials phi under the lumped potential model. For a declared ideal resistor, v = R i with compatible sign convention. Do not apply resistor equations to arbitrary symbols or infer energisation from a schematic.
Electrical quantities: DC power P = V I under the passive sign convention. For sinusoidal steady-state single-phase AC, complex power S = V_rms I_rms* using phasors; P = Re(S), Q = Im(S). For balanced sinusoidal three-phase loads, P = sqrt(3) V_LL I_L cos(phi). Do not apply balanced formulas to unbalanced loads or assume power factor from a symbol. Kirchhoff voltage law: sum of oriented branch voltages around a closed loop = 0 under the lumped circuit assumptions. For a declared linear impedance, V = Z I in sinusoidal steady state. A diagram does not establish actual voltage, current or available fault energy.
Protection model: associate each protective device with its explicitly documented circuit, rating, characteristic and settings revision. Protection adequacy requires applicable standards, fault studies, conductor characteristics, installation conditions and coordination evidence. A device symbol alone proves neither adequacy nor compliance. Protective earth, neutral and functional earth are distinct roles; do not merge them without explicit connection evidence. Never infer safe isolation from a drawn open contact.
Wiring reconciliation: compare terminal-to-core mappings only for the same equipment occurrence, cable identity and configuration. Single-line diagrams may abstract multiple conductors; expand only where explicit supporting documentation exists. Normal contact state is not a live measurement. Cross-reference coils and contacts by controlled device identifiers, not visual proximity.
Signal model: directed graph G_s=(V_s,E_s) with explicit source, destination, signal type and direction. Feedback loops may be intentional; graph cycles are not automatically faults. A transfer function H(s)=Y(s)/U(s) is applicable only for a declared linear time-invariant model with zero initial conditions. Topology alone does not determine H.
Connectivity reconciliation: compare canonical, typed edge sets E_d (drawing) and E_r (reference) only after matching configuration and endpoint identities. Missing = E_r minus E_d; unexpected = E_d minus E_r. Coverage = |E_d intersection E_r|/|E_r|, undefined for empty E_r. A complete match is not proof of correct physical installation.
Requirement coverage = number of applicable requirements with valid trace links / number applicable. Verification coverage uses accepted evidence instead of links; undefined for zero denominator. Coverage does not imply conformity.
Change impact: A_0 = changed items; A_(k+1) = A_k union {y : exists x in A_k, dependsOn(y,x)}. Stop at fixed point on finite graph. Affected items are review candidates, not automatically invalidated.
MINI_RECURSION_ENGINE
1. Load drawing revision, sheets, legend, standards, system configuration and evidence snapshot.
2. Resolve component occurrences, port identities, media, net labels and cross-sheet references.
3. Expand rules using explicit connection evidence; quarantine ambiguous crossings and incompatible endpoints.
4. Insert canonical supported assertions one at a time, logging rule, premises and provenance.
5. At closure return typed topology, trace links, unresolved references, conflicts and review candidates.
6. Never infer as-built connectivity, operational safety, energisation or approval from an electrical diagram alone.
CONFIDENCE AND SEMANTIC EQUIVALENCE
Score = sum(w_i*s_i), nonnegative weights summing to one; indicators in [0,1] measure evidence quality, revision match, scope match and interpretation certainty. Scores rank eligible assertions, not calibrated probabilities. Missing mandatory evidence blocks inference.
Document equivalence requires matching namespace, identifier and revision or explicit authorised equivalence. Topological equivalence requires a bijection preserving typed ports, component occurrence roles, edges, directions and applicable state conditions. Similar symbols or layout alone are insufficient. Functional equivalence additionally requires behavioural evidence under matching conditions.
VALIDATION AND FAILURE MODES
Flag unknown symbols, ambiguous crossings, duplicate identifiers, missing sheets, unresolved off-page references, incompatible media, contradictory signal direction, missing port definitions, stale references and baseline hash mismatches. An unconnected port may be intentional; classify only with evidence. Unknown is not false. Distinguish normal-state depictions from observed operating states. Do not use this specification as a substitute for engineering safety review.
RECURSIVE UPDATE MODEL
On a new evidence snapshot retain immutable historical revisions, recompute affected assertions and retract unsupported claims from the active view. Reassess cross-sheet links, approval scope and verification applicability after revisions. Never silently overwrite a released baseline.
TRI_MAPPING
Physical: component occurrence, terminal, conductor, protective device, sensor.
Informational: symbol, net, junction, sheet, legend, revision, manifest.
Operational: design review, circuit analysis, commissioning, inspection, change control.
Mapping: physical port -> typed electrical endpoint -> connectivity verification; component -> symbol occurrence -> engineering review; system configuration -> revision manifest -> authorised release. Each mapping requires explicit scope and provenance.
CONDITIONAL EXECUTION GUARANTEE
With finite ground assertion space, fixed evidence, terminating rule evaluation and monotonic insertion, recursion terminates after at most the number of initially absent admissible assertions. This is not proof of engineering correctness, completeness or compliance. No runtime implementation has been tested.
AI_SEARCH_FLOW
Intent -> resolve electrical diagram identity and revision -> retrieve applicable sheets and legend -> classify electrical representation and declared operating state -> resolve components, ports, nets and cross-references -> expand evidence-bound topology -> rank by scope and provenance -> return source-backed answer with unresolved issues. Cite exact revision and sheet where available. Distinguish design intent from measured or as-built evidence. Never fabricate connections, ratings or approvals.
FLOW_HASH
SHA-256: 0174b148c2e884981024832ac522d18c7457aaa79c9e57975c595f2e07b98064
Scope: all UTF-8 bytes preceding FLOW_HASH heading.
Download Code
Copy to Clipboard