Skip to main content

Module instance

Module instance 

Source
Expand description

The public calculation instances.

A problem instance is complete typed input for one problem family, distinct from the source network, a matrix projection, a solver formulation, and a solution. Every instance shares its reusable electrical network as a cheap owning handle — cloning an instance clones no network table — and exposes a borrowed network() accessor. Fields are private, so the sharing strategy can change without a public break.

The instances are DcPfInstance, AcPfInstance, DcOpfInstance, AcOpfInstance, AcOtsInstance, McAcPfInstance, McAcOpfInstance, LinDist3FlowOpfInstance, LinDist3FlowPfInstance, and AcScucInstance. Power flow instances carry partial boundary specifications; OPF instances carry typed Objective terms and active constraint selections by stable element identity, with the numerical limits staying on the network.

Re-exports§

pub use scuc_inputs::ScucActiveReserveZone;
pub use scuc_inputs::ScucBranchSwitchingCost;
pub use scuc_inputs::ScucContingency;
pub use scuc_inputs::ScucDevice;
pub use scuc_inputs::ScucDeviceKind;
pub use scuc_inputs::ScucDevicePeriod;
pub use scuc_inputs::ScucEnergyCostBlock;
pub use scuc_inputs::ScucEnergyRequirement;
pub use scuc_inputs::ScucInitialCommitment;
pub use scuc_inputs::ScucInputs;
pub use scuc_inputs::ScucRampLimits;
pub use scuc_inputs::ScucReactiveCapability;
pub use scuc_inputs::ScucReactiveReserveZone;
pub use scuc_inputs::ScucReserveCosts;
pub use scuc_inputs::ScucReserveLimits;
pub use scuc_inputs::ScucShunt;
pub use scuc_inputs::ScucStartupCostAdjustment;
pub use scuc_inputs::ScucStartupLimit;
pub use scuc_inputs::ScucTransformerControl;
pub use scuc_inputs::ScucViolationCosts;

Modules§

scuc_inputs
Source neutral inputs for an AC security constrained unit commitment calculation.

Structs§

AcOpfInstance
The AC optimal power flow instance: the shared network, the typed objective, and the active generator capability, voltage, thermal, and angle constraint selections.
AcOtsBranch
One physical branch as the switching instance sees it, in branch table order.
AcOtsInstance
The AC optimal transmission switching instance: an AC optimal power flow base, whose network supplies the candidate branches and their initial statuses, plus the switching options.
AcOtsOptions
The switching options of an AcOtsInstance.
AcPfInstance
The AC power flow instance: the shared network plus one AcBusSpecification per bus.
AcScucInstance
The AC security constrained unit commitment instance: the shared balanced network plus the Challenge 3 formulation inputs.
ActiveConstraints
The active constraint families of a balanced OPF instance.
BranchCurrentLimit
An explicit current magnitude limit at a branch’s two terminals, per unit on the system MVA base and each terminal bus’s nominal voltage. None is unbounded, not zero. Source current ratings are never read as these.
BranchSwitchingCost
The cost of changing one branch’s status, in objective units. Only a change against the initial topology costs anything: opening an initially closed branch costs open_cost, closing an initially open one close_cost.
DcOpfInstance
The DC optimal power flow instance: the shared network, the typed objective, the active constraint selections, the selected DC branch susceptance formula, and the reference conditions the network states.
DcPfInstance
The DC power flow instance: the shared network plus per bus boundary specifications and the selected branch susceptance formula.
LinDist3FlowApplicability
Structured findings and topology evidence from the formulation front end.
LinDist3FlowBuildOptions
Semantic choices used while creating a LinDist3Flow instance.
LinDist3FlowNode
One retained voltage node, identified independently of dense row order.
LinDist3FlowOpfInstance
Matrix-free LinDist3Flow OPF instance.
LinDist3FlowOrientedConductor
One line conductor in a deterministic source-rooted orientation.
LinDist3FlowPfInstance
Fixed-dispatch LinDist3Flow instance.
LinDist3FlowPreparationAction
One source component and the prepared representation chosen for it.
LinDist3FlowPreparationReport
Complete provenance for a LinDist3Flow preparation pass.
LinDist3FlowReferenceState
Complete immutable phasor reference in topology node order.
LinDist3FlowReferenceVoltage
One reference voltage phasor in polar SI coordinates.
LinDist3FlowTopology
The source-covered conductor graph used by the formulation.
McAcOpfInstance
The multiconductor AC optimal power flow instance: the shared network, the typed per phase objective, and the active terminal voltage, conductor, and per phase generator constraint selections.
McAcPfInstance
The multiconductor AC power flow instance.
MulticonductorActiveConstraints
The active constraint families of a multiconductor OPF instance.
Objective
The complete typed objective of one OPF instance: a sum of terms.
PrescribedSourceBoundary
Complete borrowed source boundary: V(terminal) - V(reference) is the stated phasor. None means earth; a named reference is on bus and does not imply a connection to earth. Every phase current has an equal opposite contribution at the reference.
PrescribedSourceVoltage
One source’s prescribed phasor parameters, keyed to its network source. This record does not carry the bus or voltage reference. Use McAcPfInstance::source_boundary for the complete borrowed boundary.
PrescribedTerminalPower
One load’s prescribed terminal power: the load’s stated per phase complex power, keyed by the load’s name and its terminal map. Watts and vars, as the network states them.
SwitchingCost
The opening and closing cost of one branch.
TerminalCurrentBounds
The two terminal current bounds of one branch, per unit; None is unbounded.
ZeroImpedanceMerge
What one merge did: which buses now name which surviving bus, and which branches the merge removed.

Enums§

AcBusSpecification
One bus of an AC power flow problem, the standard partial specification. Powers are MW and MVAr, voltage magnitudes per unit, angles degrees, as the network states them.
ActiveControlMode
One equipment control that is active for the calculation, by element name.
BranchSelection
Which physical branches may change status, by stable branch identity (the payload uid, else branches:{row}).
ConstraintSelection
Which elements of one constraint family are active, by stable element identity (the payload uid, else {table}:{row}; buses by their id).
CurrentLimitPolicy
Which branch current limits the instance carries. Current limits are separate from the MVA thermal limits the base AC OPF selects.
DcBusSpecification
One bus of a DC power flow problem: what the calculation is told, never what it solves.
IslandingPolicy
Whether the final topology may split an AC island of the initial topology. An AC island is a set of energized buses joined by in-service branches; HVDC lines do not join islands, and a bus with no in-service branch is an island of its own.
LinDist3FlowApplicabilityStatus
Whether applicability checks permit instance construction.
LinDist3FlowPreparationActionKind
One auditable preparation decision.
LinDist3FlowReferencePolicy
Selection of the fixed phasors used to form LinDist3Flow coefficients.
LinDist3FlowReferenceProvenance
Origin of the fixed voltage reference.
LinDist3FlowUnsupported
How aggressively the distribution network may be prepared for the LinDist3Flow formulation.
ObjectiveTerm
One typed objective term.

Functions§

check_lindist3flow_applicability
Check the current strict LinDist3Flow boundary without constructing an instance. Findings are stable diagnostics; callers can display all of them before deciding whether to transform the network.
merge_zero_impedance_buses
Merge every group of buses joined by in service branches with zero series impedance (r == 0 and x == 0, self loops and off-nominal transformers excluded) into that group’s smallest bus id, rewriting every element reference and dropping the merged buses and the zero impedance branches.