pub struct DcAnalysisRequest {
pub monitored_branch_indices: Option<Vec<usize>>,
pub ptdf_bus_indices: Option<Vec<usize>>,
pub lodf_outage_branch_indices: Vec<usize>,
pub otdf_outage_branch_indices: Vec<usize>,
pub otdf_bus_indices: Option<Vec<usize>>,
pub n2_outage_pairs: Vec<(usize, usize)>,
pub pf_options: DcPfOptions,
pub sensitivity_options: Option<DcSensitivityOptions>,
}Expand description
Canonical request for a one-pass DC sensitivity workflow.
This computes DC power flow plus PTDF for a monitored branch set, and optionally includes OTDF, subset LODF, and batched N-2 sensitivities over the same monitored set.
Fields§
§monitored_branch_indices: Option<Vec<usize>>Branch indices to monitor for PTDF / LODF / N-2 results.
When None, all branches in network.branches are monitored.
ptdf_bus_indices: Option<Vec<usize>>Optional bus subset for PTDF output vectors.
When None, PTDF is returned for all buses. When Some, PTDF vectors
are returned only for the requested internal bus indices in the given order.
lodf_outage_branch_indices: Vec<usize>Explicit outage branches for subset LODF.
When empty, no LODF subset is computed.
otdf_outage_branch_indices: Vec<usize>Explicit outage branches for subset OTDF.
When empty, no OTDF subset is computed.
otdf_bus_indices: Option<Vec<usize>>Optional bus subset for OTDF output vectors.
When None, OTDF is returned for all buses. When Some, OTDF vectors
are returned only for the requested internal bus indices in the given order.
n2_outage_pairs: Vec<(usize, usize)>Explicit outage pairs for batched N-2 sensitivity computation.
When empty, no N-2 batch is computed.
pf_options: DcPfOptionsDC power flow options applied to the base solve.
sensitivity_options: Option<DcSensitivityOptions>Optional sensitivity options applied to PTDF / OTDF outputs.
When None, the sensitivity workflow derives its slack policy from
pf_options: headroom-slack solves use headroom-slack sensitivities,
otherwise the classic single-slack sensitivity formulation is used.
Implementations§
Source§impl DcAnalysisRequest
impl DcAnalysisRequest
Sourcepub fn all_branches() -> Self
pub fn all_branches() -> Self
Monitor all branches and compute only the base DC power flow + PTDF.
Sourcepub fn with_monitored_branches(monitored_branch_indices: &[usize]) -> Self
pub fn with_monitored_branches(monitored_branch_indices: &[usize]) -> Self
Monitor the requested branch set.
Sourcepub fn with_ptdf_buses(self, bus_indices: &[usize]) -> Self
pub fn with_ptdf_buses(self, bus_indices: &[usize]) -> Self
Restrict PTDF output to the requested internal bus indices.
Sourcepub fn with_lodf_outages(self, outage_branch_indices: &[usize]) -> Self
pub fn with_lodf_outages(self, outage_branch_indices: &[usize]) -> Self
Add a subset LODF request for the given outage branches.
Sourcepub fn with_otdf_outages(self, outage_branch_indices: &[usize]) -> Self
pub fn with_otdf_outages(self, outage_branch_indices: &[usize]) -> Self
Add a subset OTDF request for the given outage branches.
Sourcepub fn with_otdf_buses(self, bus_indices: &[usize]) -> Self
pub fn with_otdf_buses(self, bus_indices: &[usize]) -> Self
Restrict OTDF output to the requested internal bus indices.
Sourcepub fn with_n2_outage_pairs(self, outage_pairs: &[(usize, usize)]) -> Self
pub fn with_n2_outage_pairs(self, outage_pairs: &[(usize, usize)]) -> Self
Add a batched N-2 request for the given outage pairs.
Sourcepub fn with_pf_options(self, pf_options: DcPfOptions) -> Self
pub fn with_pf_options(self, pf_options: DcPfOptions) -> Self
Apply DC power flow options to the base solve.
Sourcepub fn with_sensitivity_options(
self,
sensitivity_options: DcSensitivityOptions,
) -> Self
pub fn with_sensitivity_options( self, sensitivity_options: DcSensitivityOptions, ) -> Self
Apply explicit sensitivity options to PTDF / OTDF outputs.
Trait Implementations§
Source§impl Clone for DcAnalysisRequest
impl Clone for DcAnalysisRequest
Source§fn clone(&self) -> DcAnalysisRequest
fn clone(&self) -> DcAnalysisRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DcAnalysisRequest
impl Debug for DcAnalysisRequest
Source§impl Default for DcAnalysisRequest
impl Default for DcAnalysisRequest
Source§fn default() -> DcAnalysisRequest
fn default() -> DcAnalysisRequest
Auto Trait Implementations§
impl Freeze for DcAnalysisRequest
impl RefUnwindSafe for DcAnalysisRequest
impl Send for DcAnalysisRequest
impl Sync for DcAnalysisRequest
impl Unpin for DcAnalysisRequest
impl UnsafeUnpin for DcAnalysisRequest
impl UnwindSafe for DcAnalysisRequest
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