#[non_exhaustive]pub struct AcPfPreparation {Show 17 fields
pub name: String,
pub n_buses: usize,
pub n_source_generators: usize,
pub n_source_branches: usize,
pub base_mva: f64,
pub units: Units,
pub skip_zero_impedance: bool,
pub correct_angle_difference_bounds: bool,
pub angle_difference_bounds: Option<AngleDifferenceBounds>,
pub bus_ids: Vec<BusId>,
pub bus_analysis_rows: Vec<usize>,
pub bus_source_rows: Vec<Option<usize>>,
pub specifications: Vec<PreparedAcBusSpecification>,
pub reference_buses: ReferenceBuses,
pub buses: AcPfBusData,
pub generators: AcPfGeneratorData,
pub branches: AcBranchData,
}Expand description
Matrix free AC power flow input on the branch pi model.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: String§n_buses: usize§n_source_generators: usize§n_source_branches: usize§base_mva: f64§units: Units§skip_zero_impedance: bool§correct_angle_difference_bounds: boolWhether PowerModels’ angle difference correction was applied.
angle_difference_bounds: Option<AngleDifferenceBounds>Which angle difference bounds angle_min and angle_max carry.
None only in a document written before the field existed, whose
correct_angle_difference_bounds says whether the pad was applied.
bus_ids: Vec<BusId>Dense bus index to external bus ID.
bus_analysis_rows: Vec<usize>Dense bus index to row in the star-lowered analysis network.
bus_source_rows: Vec<Option<usize>>Dense bus index to source bus row. A synthetic transformer star bus has no source row; a source bus specified as isolated has no dense row.
specifications: Vec<PreparedAcBusSpecification>Bus specifications in dense bus order. A synthetic transformer star
bus is a zero injection PQ junction. Source rows specified as isolated
are absent from the numerical rows but remain on the AcPfInstance.
reference_buses: ReferenceBuses§buses: AcPfBusData§generators: AcPfGeneratorData§branches: AcBranchDataImplementations§
Source§impl AcPfPreparation
impl AcPfPreparation
pub fn n_generators(&self) -> usize
Sourcepub fn calc_admittance_matrix(&self) -> YbusParts
pub fn calc_admittance_matrix(&self) -> YbusParts
The bus admittance matrix Y = G + jB of this preparation, in dense
bus order and the preparation’s admittance unit: every branch column’s
pi model block (AcBranchData::calc_branch_admittance) plus the bus
shunts buses.g_s + j buses.b_s. Every diagonal position is stored,
as an explicit zero where nothing stamps it.
It agrees with calc_admittance_matrix
over the analysis network, restricted to the prepared buses, but needs
no network view and no remapping from analysis rows.