Skip to main content

powerio_prob/
lib.rs

1//! Operating points, problem instances, and solutions for power system
2//! calculation families.
3//!
4//! A problem instance is distinct from a source network, matrix projection,
5//! solver formulation, and solution. This crate stays matrix free: sparse
6//! operators and the DC OPF bundle writer derived from these instances live
7//! in `powerio-matrix`, which depends on this crate.
8
9mod formats;
10pub(crate) mod goc3;
11pub mod instance;
12pub mod operating;
13mod reference;
14pub mod solution;
15mod update;
16
17pub use powerio_tx::BranchSusceptanceFormula;
18
19pub mod diagnostics;
20pub mod error;
21pub use error::{Error, Result};
22/// Unsupported implementation details shared with the top level PowerIO
23/// facade.
24///
25/// These items can change without notice and are not part of the
26/// `powerio-prob` API. Applications should call `powerio::parse` and
27/// `powerio::emit`.
28#[doc(hidden)]
29pub mod __internal {
30    #[doc(hidden)]
31    pub use crate::formats::{
32        __decode_opfdata_solution, __decode_pypsa_sequence, __emit_goc3_output,
33        __parse_goc3_output_buffer, __parse_goc3_problem_buffer, PypsaSequence,
34    };
35}
36pub use instance::{
37    AcBusSpecification, AcOpfInstance, AcOtsBranch, AcOtsInstance, AcOtsOptions, AcPfInstance,
38    AcScucInstance, ActiveConstraints, ActiveControlMode, BranchCurrentLimit, BranchSelection,
39    BranchSwitchingCost, ConstraintSelection, CurrentLimitPolicy, DcBusSpecification,
40    DcOpfInstance, DcPfInstance, IslandingPolicy, LinDist3FlowApplicability,
41    LinDist3FlowApplicabilityStatus, LinDist3FlowBuildOptions, LinDist3FlowNode,
42    LinDist3FlowOpfInstance, LinDist3FlowOrientedConductor, LinDist3FlowPfInstance,
43    LinDist3FlowPreparationAction, LinDist3FlowPreparationActionKind,
44    LinDist3FlowPreparationReport, LinDist3FlowReferencePolicy, LinDist3FlowReferenceProvenance,
45    LinDist3FlowReferenceState, LinDist3FlowReferenceVoltage, LinDist3FlowTopology,
46    LinDist3FlowUnsupported, McAcOpfInstance, McAcPfInstance, MulticonductorActiveConstraints,
47    Objective, ObjectiveTerm, PrescribedSourceBoundary, PrescribedSourceVoltage,
48    PrescribedTerminalPower, ScucActiveReserveZone, ScucBranchSwitchingCost, ScucContingency,
49    ScucDevice, ScucDeviceKind, ScucDevicePeriod, ScucEnergyCostBlock, ScucEnergyRequirement,
50    ScucInitialCommitment, ScucInputs, ScucRampLimits, ScucReactiveCapability,
51    ScucReactiveReserveZone, ScucReserveCosts, ScucReserveLimits, ScucShunt,
52    ScucStartupCostAdjustment, ScucStartupLimit, ScucTransformerControl, ScucViolationCosts,
53    SwitchingCost, TerminalCurrentBounds, ZeroImpedanceMerge, check_lindist3flow_applicability,
54    merge_zero_impedance_buses,
55};
56pub use operating::{
57    BalancedOperatingPointBuilder, BalancedOperatingPointFlag, BalancedOperatingPointQuantity,
58    MulticonductorOperatingPointBuilder, MulticonductorOperatingPointFlag,
59    MulticonductorOperatingPointQuantity, OperatingPoint, OperatingPointFlags,
60    OperatingPointValues,
61};
62pub use reference::ReferenceBuses;
63pub use solution::{
64    AcOpfSolution, AcOtsSolution, AcPfSolution, AcScucSolution, DcOpfSolution, DcPfSolution,
65    GeneratorDispatch, LinDist3FlowLimitCheck, LinDist3FlowLimitKind, LinDist3FlowOpfSolution,
66    LinDist3FlowOpfValues, LinDist3FlowPfSolution, McAcOpfSolution, McAcPfSolution, Producer,
67    Residuals, SCUC_DEVICE_OUTPUT_SERIES, SCUC_NETWORK_OUTPUT_SERIES, ScucDeviceOutputs,
68    ScucNetworkOutputs, Termination, ThreeWindingTransformerTerminalActivePower,
69    ThreeWindingTransformerTerminalPower, evaluate_lindist3flow_pf_limits,
70};
71pub use update::{
72    ActivePower, ActivePowerUnit, ApparentPower, ApparentPowerUnit, BalancedCalculationInstance,
73    CalculationUpdate, LoadAllocation, NetworkUpdate, OperatingPointUpdate, ReactivePower,
74    ReactivePowerUnit, UpdateChange, UpdateReport, UpdatedField, apply_bus_load_active_power,
75    apply_updates,
76};