#[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: ReferenceBuses,
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: ReferenceBuses§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 nodal_generator_data(&self) -> NodalAcGeneratorData
pub fn nodal_generator_data(&self) -> NodalAcGeneratorData
Project generator cost and bounds to bus space.
The bounds at a bus are the sum of the generator bounds, which is the
range the bus total can reach. The cost curves at a bus combine by the
parallel rule q = 1 / Σ(1/qᵢ), the curve that the least cost split of
the bus total follows. That combination is an approximation: it agrees
with generator space only while the split stays inside the bound of
each generator. A bus with one generator keeps that generator’s own
coefficients.
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 moreSource§impl Debug for AcOpfInstance
impl Debug for AcOpfInstance
Source§impl<'de> Deserialize<'de> for AcOpfInstance
impl<'de> Deserialize<'de> for AcOpfInstance
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for AcOpfInstance
impl PartialEq for AcOpfInstance
Source§fn eq(&self, other: &AcOpfInstance) -> bool
fn eq(&self, other: &AcOpfInstance) -> bool
self and other values to be equal, and is used by ==.