Skip to main content

AcOpfInstance

Struct AcOpfInstance 

Source
#[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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional 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: AcBranchData

Implementations§

Source§

impl AcOpfInstance

Source

pub fn n_generators(&self) -> usize

Source

pub fn n_branches(&self) -> usize

Source

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

Source§

fn clone(&self) -> AcOpfInstance

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AcOpfInstance

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for AcOpfInstance

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for AcOpfInstance

Source§

fn eq(&self, other: &AcOpfInstance) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for AcOpfInstance

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for AcOpfInstance

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V