Skip to main content

Module pmd

Module pmd 

Source
Expand description

The PowerModelsDistribution ENGINEERING model as JSON (“PMD JSON”).

The byte conventions follow PMD’s own print_file/parse_file pair: matrices as arrays of arrays read back via hcat (inner arrays are columns), Inf/NaN as null restored by field suffix (_ub/max to +Inf, _lb/min to -Inf, anything else NaN), enums as uppercase strings, kV and kW scales with angles in degrees, meters for lengths, per unit transformer impedances, and integer terminals with grounding as grounded plus rg/xg on the bus.

A multinetwork document (PMD’s make_multinetwork output, with "multinetwork": true and one network per time step under nw) is a time series rather than one network: parse_multinetwork reads it as a TimeSeries of networks, and crate::parse refuses it with a message that says so.

Modules§

math
The PowerModelsDistribution MATHEMATICAL model as JSON (pmd-math-json).

Structs§

PmdMathEmitOptions
The emission policy of the MATHEMATICAL writer.

Functions§

is_multinetwork
Whether the source’s primary document is a PMD multinetwork ENGINEERING model ("multinetwork": true). The check reads the one flag without building the document tree. A source that cannot be read, or is not a JSON object, is not one.
parse_multinetwork
Parse a PMD multinetwork ENGINEERING document into one MulticonductorNetwork per time step. Time points follow the document’s mn_lookup times, are labeled by their nw keys, and carry each step’s time_elapsed as their duration. The source is retained on the module, so a same format emission echoes the input bytes.