Skip to main content

Module cim

Module cim 

Source
Expand description

CIM vocabulary shared by the adapters that speak it: CGMES in powerio-tx, distribution CIM in powerio-dist, and MG-RAVENS, whose balanced profile lives in powerio-tx, whose multiconductor profile lives in powerio-dist, and whose two profiles meet in powerio-tnd.

Those crates depend on this one and not on each other, so whatever two of them must agree on is stated once here: how a stable identifier derives from an object’s class and name, how CIM phase kinds map onto wire coordinate terminal names, and which classes mark each MG-RAVENS profile.

Modules§

ravens
MG-RAVENS, the LANL CIM-derived microgrid interchange schema: one JSON document of name-keyed hash tables nested under the CIM class hierarchy. Its two profiles share the token and the top level shape and differ in the classes they use, so the profile follows the content.

Functions§

deterministic_mrid
A UUID version 5 identifier for kind:name under namespace, a URL naming the adapter that writes it. Same inputs give the same id, so a canonical write is byte stable and two writes of one case diff only where the case changed. The CGMES and distribution CIM writers derive their ids the same way under their own namespaces.
expand_phase_code
Expand a PhaseCode.<code> or OrderedPhaseCodeKind.<code> value into its letters: ABCN gives A, B, C, N, and s12N (or the s1s2N spelling) gives s1, s2, N. Letters outside the kind are skipped.
phase_terminal
The wire coordinate terminal name (an OpenDSS node number) of a CIM SinglePhaseKind letter: A, B, C, and N are terminals 1 to 4, and the split phase secondaries s1 and s2 are terminals 1 and 2.
terminal_phase
The CIM SinglePhaseKind letter of a terminal name: the node numbers 1 to 4, and the letter names a, b, c, n in either case that BMOPF terminal conventions use. Split phase collapses onto A and B. Any other name has no phase kind, and a writer reports it.