Expand description
Typed balanced network models and format implementations.
Readers and writers cover MATPOWER .m, PowerModels JSON, PSS/E .raw,
PowerWorld .aux, pandapower JSON, PyPSA CSV, egret JSON, PSLF .epc,
PSS/E RAWX 35, PowSybl XIIDM and JIIDM 1.0 through 1.17, CIM CGMES 2.4.15 and 3.0,
Surge JSON,
and DeepMind OPFData JSON. PowerWorld .pwb, OPFData files, and the IEEE
Common Data Format are read
only. GO Challenge 3 defines a calculation and therefore parses only
through the top level powerio::parse, which returns its declared
AcScucInstance or AcScucSolution. .pwd display files parse through
the facade’s parse, which returns powerio.GeoLayer.
Each reader produces a BalancedNetwork. The top level powerio facade
owns universal parsing and emit; this component crate supplies the typed
transmission implementation.
A reader that retains source text can return those bytes when writing the same format. Matrix and problem instance builders live in separate crates.
use powerio_core::Source;
use powerio_tx::{parse, parse_format_id};
let src = "\
function mpc = example
mpc.version = '2';
mpc.baseMVA = 100;
mpc.bus = [
\t1\t3\t0\t0\t0\t0\t1\t1\t0\t230\t1\t1.1\t0.9;
\t2\t1\t0\t0\t0\t0\t1\t1\t0\t230\t1\t1.1\t0.9;
];
mpc.branch = [
\t1\t2\t0.01\t0.1\t0\t0\t0\t0\t0\t0\t1\t-360\t360;
];
";
let source = Source::from_memory("example.m", src.as_bytes().to_vec())?
.with_format(parse_format_id("matpower")?);
let module = parse(source)?;
assert_eq!(module.value().buses().len(), 2);Re-exports§
pub use contingency::AutomaticOrder;pub use contingency::AutomaticSpec;pub use contingency::AutomaticTarget;pub use contingency::BranchRef;pub use contingency::Change;pub use contingency::ChangeOp;pub use contingency::ChangeUnit;pub use contingency::ContingencyAction;pub use contingency::ContingencyCase;pub use contingency::ContingencyParsed;pub use contingency::ContingencyResolution;pub use contingency::ContingencySet;pub use contingency::Expanded;pub use contingency::InterfaceMember;pub use contingency::JoinName;pub use contingency::MonitorScope;pub use contingency::MonitorStatement;pub use contingency::MonitoredParsed;pub use contingency::MonitoredResolution;pub use contingency::MonitoredSet;pub use contingency::PsseEquipmentIndex;pub use contingency::ResolvedCase;pub use contingency::ResolvedComponent;pub use contingency::ResolvedInterface;pub use contingency::ResolvedVoltageScope;pub use contingency::RetainedStatement;pub use contingency::SelectorGroup;pub use contingency::SkipRule;pub use contingency::Subsystem;pub use contingency::SubsystemParsed;pub use contingency::SubsystemSelector;pub use contingency::SubsystemSet;pub use contingency::UnresolvedAction;pub use contingency::UnresolvedMonitor;pub use contingency::UnresolvedMonitorReason;pub use contingency::UnresolvedReason;pub use dc::BranchSusceptanceFormula;pub use diagnostics::EmitFamily;pub use error::Error;pub use error::Result;pub use format::routing::Detection;pub use format::routing::JSON_CLASSES;pub use format::routing::JsonClass;pub use format::routing::classify_json_bytes;pub use format::routing::classify_json_text;pub use format::routing::parse_distribution_format;pub use format::routing::parse_transmission_format;pub use format::EmitOptions;pub use format::PwdDisplay;pub use format::PwdSubstation;pub use format::SOURCE_FORMAT_NAMES;pub use format::TargetFormat;pub use format::emit;pub use format::emit_with_options;pub use format::parse;pub use format::parse_format_id;pub use format::parse_target_format;pub use gen_cost::GenCostPatch;pub use gen_cost::GenCostPolicyReport;pub use gen_cost::MissingGenCostPolicy;pub use gen_cost::parse_gen_cost_csv;pub use geo::Canvas;pub use geo::CoordinateSpace;pub use geo::CoordsKind;pub use geo::ElementKey;pub use geo::GeoApplyReport;pub use geo::GeoFeature;pub use geo::GeoGeometry;pub use geo::GeoLayer;pub use geo::GeoMeta;pub use geo::GeoParsed;pub use geo::GeoTarget;pub use geo::Location;pub use geo::apply_substation_points;pub use geo::to_geo_layer_from_aux_substations;pub use geo::to_geo_layer_from_pwd;pub use geo::to_lonlat_from_pwd_mercator;pub use indexed::ConnectivityReport;pub use indexed::IndexCore;pub use indexed::IndexedNetwork;pub use network::AcDcConverterControlMode;pub use network::ActivePowerControl;pub use network::Area;pub use network::BalancedNetwork;pub use network::BoundaryLine;pub use network::BoundaryLineGeneration;pub use network::Branch;pub use network::BranchCharging;pub use network::BranchCurrentRatings;pub use network::BranchRatingSet;pub use network::BranchSolution;pub use network::Bus;pub use network::BusBreakerBus;pub use network::BusId;pub use network::BusType;pub use network::BusbarSection;pub use network::CalculatedBus;pub use network::CaseMetadata;pub use network::ComponentAlias;pub use network::ComponentMetadata;pub use network::ConnectivityNode;pub use network::CurveStyle;pub use network::DEFAULT_BASE_FREQUENCY;pub use network::DcBusbar;pub use network::DcConverterOperatingMode;pub use network::DcConverterUnit;pub use network::DcGround;pub use network::DcLine;pub use network::DcNode;pub use network::DcPolarity;pub use network::DcSeriesDevice;pub use network::DcSwitch;pub use network::DcSwitchKind;pub use network::DcTerminal;pub use network::DcTopologicalNode;pub use network::DetailedConnectivity;pub use network::DroopCurve;pub use network::DroopCurveSegment;pub use network::ExternalIdentifier;pub use network::Extras;pub use network::GenCaps;pub use network::GenCost;pub use network::Generator;pub use network::GeneratorEnergySource;pub use network::Hvdc;pub use network::HvdcConverter;pub use network::HvdcConverterKind;pub use network::HvdcConvertersMode;pub use network::Impedance;pub use network::InternalConnection;pub use network::Junction;pub use network::LineCommutatedConverter;pub use network::LineCommutatedConverterOperatingMode;pub use network::LineCommutatedConverterReactiveModel;pub use network::Load;pub use network::LoadVoltageModel;pub use network::LoadingLimits;pub use network::MinMaxReactiveLimits;pub use network::OmittedField;pub use network::OmittedFieldName;pub use network::OperationalLimitGroup;pub use network::ReactiveCapabilityCurve;pub use network::ReactiveCapabilityCurvePoint;pub use network::ReactiveLimits;pub use network::Shunt;pub use network::ShuntBlock;pub use network::SolverParams;pub use network::SourceFormat;pub use network::StaticVarCompensator;pub use network::StaticVarCompensatorRegulationMode;pub use network::Storage;pub use network::Subnetwork;pub use network::Substation;pub use network::Switch;pub use network::SwitchKind;pub use network::SwitchedShuntControl;pub use network::SwitchedShuntMode;pub use network::TapChanger;pub use network::TapChangerKind;pub use network::TapChangerRegulationMode;pub use network::TapChangerStep;pub use network::TemporaryLimit;pub use network::Terminal;pub use network::TerminalReference;pub use network::TieLine;pub use network::TopologyEndpoint;pub use network::TopologyKind;pub use network::TopologySwitch;pub use network::Transformer3W;pub use network::TransformerControl;pub use network::TransformerControlMode;pub use network::VoltageLevel;pub use network::VoltageSourceConverter;pub use network::Winding;pub use network::calc_series_admittance_of;pub use network::repair_values;
Modules§
- contingency
- PSS/E contingency description files (
.con). - dc
- Conventions shared by DC network models and matrix builders.
- diagnostics
- The codes this crate emits, and the registry gates over them.
- error
- format
- Parsing and emission for supported case formats, all meeting at
BalancedNetwork. - gen_
cost - geo
- Typed coordinate metadata for the balanced model, and the standalone
geographic document (
GeoLayer) that carries coordinates as a file of their own. - indexed
IndexedNetwork: the dense-indexed analysis view over aBalancedNetwork.- network
- Format neutral balanced network model.
Structs§
- Diagnostic
- One coded user facing finding.
- Diagnostic
Code - Stable dotted identity of one diagnostic.
- Normalize
Options - Options for
BalancedNetwork::to_normalized_with_options. - Normalize
Source Rows - Row provenance for one normalize pass: for each dense position in the
IndexedNetworkview of the normalized network, the row of the same element family in the source network.Nonemarks an element the pipeline synthesized, which has no source row. - Normalized
Network - Output of
BalancedNetwork::to_normalized_with_options. - Selector
- Which buses a
subsetkeeps: inclusive ranges over area, zone, base kV, and bus number, ANDed together. An unset (None) filter matches every bus, soSelector::defaultselects the whole network.
Enums§
- Diagnostic
Severity - Severity of one user facing finding.
- Error
Category - Coarse classification of an
Error, for callers that map onto their own taxonomy. Defined inpowerio-coreso every crate in the workspace projects onto the same five tokens. Coarse projection of an operation failure for bindings and exit statuses.
Constants§
- POWER_
MODELS_ ANGLE_ BOUND_ PAD - Default branch angle difference bound used by PowerModels parse time repair.
- VERSION
- The powerio crate version, for provenance fields written by downstream crates whose own version can drift from the core’s.
Functions§
- correct_
angle_ difference_ bounds - Correct one branch angle difference interval using the same ±60 degree
rule as PowerModels’
correct_voltage_angle_differences!.