#[non_exhaustive]pub struct AcOpfInstance {
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 bus_ids: Vec<BusId>,
pub reference_buses: Vec<usize>,
pub buses: AcBusData,
pub generators: AcGeneratorData,
pub branches: AcBranchData,
}Expand description
Matrix free AC OPF input data on the branch pi model.
A problem instance is complete numerical input for one problem family. It is separate from the source network, a matrix projection, a solver formulation, and a solution. Relaxations of AC OPF, the SOC forms included, consume this same instance; the relaxation is a formulation choice made downstream.
Units follow Units. Under Units::PerUnit, powers are per unit on
base_mva and admittances are per unit on the system base. Under
Units::Native, powers stay in MW/MVAr and every admittance vector is
scaled by base_mva, so power computed from admittances and per unit
voltages lands in MW/MVAr. Voltage magnitudes are per unit and angles are
radians in both systems.
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§bus_ids: Vec<BusId>Dense bus index to external bus ID.
reference_buses: Vec<usize>§buses: AcBusData§generators: AcGeneratorData§branches: AcBranchDataImplementations§
Source§impl AcOpfInstance
impl AcOpfInstance
pub fn n_generators(&self) -> usize
pub fn n_branches(&self) -> usize
Sourcepub fn vm_setpoints(&self) -> Vec<f64>
pub fn vm_setpoints(&self) -> Vec<f64>
Conventional voltage magnitude start: the case voltage, overwritten by each generator’s positive setpoint in generator column order (last wins), with a non-positive case voltage falling back to 1.0.
The result is not clamped to [vm_min, vm_max]; feasibility repair is
solver preparation and stays downstream.
Trait Implementations§
Source§impl Clone for AcOpfInstance
impl Clone for AcOpfInstance
Source§fn clone(&self) -> AcOpfInstance
fn clone(&self) -> AcOpfInstance
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more