pub struct DcPfSolution {
pub theta: Vec<f64>,
pub branch_p_flow: Vec<f64>,
pub slack_p_injection: f64,
pub solve_time_secs: f64,
pub total_generation_mw: f64,
pub slack_distribution: HashMap<usize, f64>,
pub p_inject_pu: Vec<f64>,
pub island_ids: Vec<usize>,
}Expand description
Result of a DC power flow computation.
Fields§
§theta: Vec<f64>Bus voltage angles in radians (indexed by internal bus order).
branch_p_flow: Vec<f64>Real power flow on each branch in per-unit (positive = from->to).
slack_p_injection: f64Slack bus real power injection in per-unit.
solve_time_secs: f64Solve time in seconds.
total_generation_mw: f64Total system generation in MW (only populated for headroom-slack solves).
slack_distribution: HashMap<usize, f64>Per-bus slack absorption: internal bus index -> MW absorbed. Non-empty only when headroom slack is used.
p_inject_pu: Vec<f64>Effective real power injection at each bus in per-unit (full bus order).
For non-slack buses this is the actual RHS used in the solve: scheduled Pg − Pd plus Gs shunt losses, PST phantom injections, two-terminal HVDC schedules, MTDC converter injections, and any distributed-slack shares. For the slack bus it is the back-calculated KCL value from branch flows.
Use this field — not bus_p_injection_pu() — when reporting or
post-processing injection balance, because bus_p_injection_pu() omits
the correction terms above and will not balance against branch flows once
those features are active.
island_ids: Vec<usize>Island assignment for each bus (indexed by internal bus index).
island_ids[i] is the island index for bus i.
Trait Implementations§
Source§impl Clone for DcPfSolution
impl Clone for DcPfSolution
Source§fn clone(&self) -> DcPfSolution
fn clone(&self) -> DcPfSolution
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DcPfSolution
impl Debug for DcPfSolution
Source§impl<'de> Deserialize<'de> for DcPfSolution
impl<'de> Deserialize<'de> for DcPfSolution
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>,
Auto Trait Implementations§
impl Freeze for DcPfSolution
impl RefUnwindSafe for DcPfSolution
impl Send for DcPfSolution
impl Sync for DcPfSolution
impl Unpin for DcPfSolution
impl UnsafeUnpin for DcPfSolution
impl UnwindSafe for DcPfSolution
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more