Conformance

Which IEC standards cim-kit implements, which CGMES profiles it supports, and what is verified against the published ENTSO-E conformity models on every build.

Standards#

StandardRole
IEC 61970-301:2020 + AMD1:2022CIM base semantics (CIM17)
IEC 61970-501:2006RDFS profile representation — the code-generation input
IEC 61970-552:2016CIM/XML: identity, headers, difference models
IEC TS 61970-600-1/-2:2021CGMES 3.0 profile set
CGMES 2.4.15The profile set in production use across Europe

Profiles: EQ, OP, SC, EQBD, SSH, TP, SV, DL, GL, DY and the header vocabulary in both vintages, plus TPBD in CGMES 2.4.15.

VintageFeatureNamespaceClassesAttributesEnumsProfiles
CGMES 3.0cgmes3 (default)CIM100 + eu4433,6245111
CGMES 2.4.15cgmes2cim16 + entsoe4013,5394812

What is verified#

Against the published ENTSO-E conformity corpora, on every build with the corpus present. Corpus-backed tests skip cleanly when the corpus is absent, so a fresh clone is green.

Reading and writing#

CheckAgainstResult
Read31 CGMES 3.0 model sets, 361 files, 250,698 objects0 diagnostics
Read52 CGMES 2.4.15 archives, 273,144 objects0 errors, 9 recovered namespace mistakes
ReadENTSO-E's 100 QoCDC model sets (real TSO exports, conformant and not)All read, vintage detected; the three broken-on-purpose files named, not fatal
Element censusAll 361 CGMES 3.0 files, and 225 files of the 95 clean QoCDC setsClass for class, rdf:ID/rdf:about style for style
Identifier censusEvery re-exported filerdf:ID/rdf:about values letter for letter
Value census951,340 values: every self-consistent CGMES 3.0 model set plus one CGMES 2.4.15 archiveValue text for text (2.62637E-05 is not rewritten as 0.0000262637)
Model round-tripEvery conformity model, by profile and as its original file setNo value lost
Well-formednessEvery written documentNamespaces resolved, no duplicate attribute, XML 1.0 Char production
Difference modelsBoth vintagesRead, applied and written back, class replacement included
Computed differencesA change set derived from two model statesApplying it reproduces the target
AssemblyDatasets built separately, then mergedSame content_id as loading the files in sequence
Vintage detectionBoth corpora, vintage taken from the documentsCorrect pairing raises no CIM0021; a mismatch is reported at the root element

Validation and RDF#

CheckAgainstResult
ValidationThe whole corpusFindings pinned; a new one fails the build
Merge conflictsEvery model setPinned by location; only the two 24-hour time-series directories conflict
RDF export1.67M triples, whole-model and per profileValid N-Triples
SHACL (cargo xtask shacl, pyshacl, CI)Every CGMES 3.0 profile that carries data, in every model set, with ENTSO-E's shapesConforms, apart from findings in the models themselves (details). A profile without data is no data; a run that validates nothing fails
Syntax limitsValues and identifiersUnrepresentable characters stripped and reported (CIM0019); absolute-IRI identifiers written as rdf:about; identifiers with no valid form reported (CIM0020)

CGMES 2.4.15 is exported but not shape-validated: all ten shapes files ENTSO-E publishes for it are invalid SHACL (nine have property shapes with two sh:path values, one a constraint with two sh:in), so a conforming engine refuses them. cargo xtask shacl --vintage cgmes2 runs in CI and pins that set as unusable.

Independent implementations#

cargo xtask crossvalidate runs, in pinned containers, implementations that share none of cim-kit's code or approach — the check a round trip cannot provide:

ToolInputMust hold
PowSyBl (Java; RDF4J + SPARQL)Published files and a cim-kit re-export: four assembled CGMES 3.0 configurations and the CGMES 2.4.15 MicroGrid archiveIdentical networks — every identifiable-type count, both bus views, SHA-256 over every identifier
rdflib (Python)The RDF exportParses as a graph; literals carry the profile's XSD types

Removing one cim:Breaker from a published equipment file changes the digest, drops the switch count from 28 to 27 and raises the bus count from 14 to 15.

Robustness and build#

CheckResult
Mutation: every truncation, 1,631 single-byte corruptions, every region deletionNo panic; every truncation refused, the dataset unchanged (cargo-fuzz targets for longer runs on nightly)
Malformed inputMarkup nested in a value stays out of it; objects without identifier stay distinct; absolute-IRI references resolve; a broken document's report is bounded and says where it stopped
Profile boundEvery vintage fits ProfileMask, profile bits pinned distinct
Command line and examplesRun against published models in CI; output checked by xmllint
Streamscim diff redirected and with --out: byte-identical
Feature matrixEvery supported feature combination builds, lints and compiles its doctests
PortabilityLibrary builds for wasm32-unknown-unknown
Documentation linksREADME anchors resolve; zola build fails on a broken site link

Deliberate deviations#

ENTSO-E's RDF-Syntax User Guide §2.3 states that the published schemas deviate from W3C and from IEC 61970-501. Five deviations in the vocabularies and in real exports are handled explicitly:

DeviationHandling
SSH marks all 45 classes it touches Description except Equipment, declared concrete as the carrier for inServiceRead from the hierarchy: a profile that marks Switch and ACLineSegment as descriptions annotates equipment, not introduces it
A class instantiated where its own profile calls it abstractTreated as defined there
A file sets attributes its header does not declare (e.g. Terminal.ConnectivityNode in a 2.4.15 boundary file)Value written back where it came from; reported as CIM0010
A header under-declares its profiles (an Equipment file naming only EquipmentCore/3/1 while carrying LoadArea)A class the write set does not mention is introduced (rdf:ID) by the file carrying it
An rdf:ID that is not an XML NCName (rdf:ID="7d06eea0-…", no leading underscore)Repaired, and always reported as CIM0004

Not in scope#

  • Power flow, state estimation, topology processing.
  • A general RDF store, SPARQL engine or OWL reasoner.
  • Running SHACL — the export is made for an external engine.
  • Reading RDF back; CIM/XML is the exchange format.
  • GUI and diagram rendering; DL and GL data are exposed.
  • IEC 62325 market profiles and IEC 61968 message envelopes.
  • Bindings for other languages; the library is wasm32-clean with one mandatory dependency.

Licensing#

The crate is MIT OR Apache-2.0.

The RDFS vocabularies the generated code derives from are published by ENTSO-E and the UCA International Users Group under the Apache License 2.0; generated files carry that attribution. The IEC standard documents are not redistributed, and nothing in the build or test pipeline depends on them.

The ENTSO-E conformity test models are licensed CC BY-SA 4.0 and owned by ENTSO-E; they are a local and CI test corpus only, never redistributed with the crate.

Sources#