Expand description
MG-RAVENS, the LANL CIM-derived microgrid interchange schema (https://github.com/lanl-ansi/MG-RAVENS), across both electrical models.
One token, ravens-json, names the format. The balanced profile, the
register the upstream MATPOWER converter writes, is read and written by
powerio-tx and parses to a BalancedNetwork. The multiconductor
profile, the register the upstream OpenDSS converter writes, is read and
written by powerio-dist and parses to a MulticonductorNetwork. The
two readers each refuse the other’s profile. This adapter is where they
meet: parse reads the profile from the document
(powerio_core::cim::ravens::detect_profile) and hands the source to
the crate that owns it, so a caller need not know which register a file
uses. The powerio facade routes the token here.
A document carrying both profiles’ classes is refused with
PARSE.RAVENS.MIXED_PROFILE. Reading such a document into an
IntegratedNetwork, with the balanced
classes as the transmission module and the per-phase classes as feeders,
is the follow-up this adapter is placed for.
Enums§
- Profile
- The profile a document’s classes select.
- Ravens
Module - A parsed MG-RAVENS document: the module of whichever network kind its profile selects.
Constants§
- BALANCED_
MARKERS - Classes only the balanced profile uses: the MATPOWER converter’s settings record, polynomial costs, and two-end transformers.
- MULTICONDUCTOR_
MARKERS - Classes only the multiconductor profile uses: per-phase equipment, transformer tanks, per-length impedance matrices, and wire catalogs.
- NAMESPACE
- The namespace both profiles derive deterministic mRIDs under.
- TOKEN
- The format token both profiles share.
Functions§
- detect_
profile - The profile of MG-RAVENS JSON text, from decoded
Ravens.cimObjectTypevalues and the schema’s class containers. Object names and ordinary string properties do not select a profile. Malformed or excessively nested JSON defaults to the balanced route, whose reader reports the JSON error; the decoder keeps its depth limit. - parse
- Parse an MG-RAVENS document into the module its profile selects. The
source is declared
ravens-jsonon the way in, so an extension or an alias the caller passed does not matter; the module retains the source for the byte exact echo on a same format write. - profile_
of - The profile of a source’s primary document.