pub struct SimulationSummary {
pub mean_cost: f64,
pub std_cost: f64,
pub min_cost: f64,
pub max_cost: f64,
pub cvar: f64,
pub cvar_alpha: f64,
pub category_stats: Vec<CategoryCostStats>,
pub deficit_frequency: f64,
pub total_deficit_mwh: f64,
pub total_spillage_mwh: f64,
pub n_scenarios: u32,
}Expand description
Aggregate simulation statistics computed after all scenarios complete.
Produced by MPI aggregation on rank 0 (simulation-architecture.md SS4.4)
and returned as the Ok value of fn simulate().
On non-rank-0 processes, mean_cost, std_cost, cvar, and
category_stats reflect only locally computed partial data; the
authoritative values are on rank 0 (SS4.4).
Fields§
§mean_cost: f64Mean total cost across all scenarios: mean_cost = (1/S) * sum(C_s for s in 1..=S).
std_cost: f64Sample standard deviation of total cost: std_cost = sqrt((1/(S-1)) * sum((C_s - mean_cost)^2 for s in 1..=S)).
min_cost: f64Minimum total cost across all scenarios.
max_cost: f64Maximum total cost across all scenarios.
cvar: f64CVaR (Conditional Value-at-Risk) at the configured confidence level cvar_alpha.
Mean of the worst (1 - cvar_alpha) fraction of scenario costs. See simulation-architecture.md SS4.1.
cvar_alpha: f64Confidence level used for CVaR computation. Must be in (0, 1).
category_stats: Vec<CategoryCostStats>Per-category cost statistics (mean, max, frequency) for each of the five cost categories.
deficit_frequency: f64Fraction of scenarios with at least one stage having deficit > 0.
total_deficit_mwh: f64Total deficit energy (MWh) summed across all scenarios and stages.
total_spillage_mwh: f64Total spillage energy (MWh) summed across all scenarios and stages.
n_scenarios: u32Number of scenarios simulated (across all ranks).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SimulationSummary
impl RefUnwindSafe for SimulationSummary
impl Send for SimulationSummary
impl Sync for SimulationSummary
impl Unpin for SimulationSummary
impl UnsafeUnpin for SimulationSummary
impl UnwindSafe for SimulationSummary
Blanket Implementations§
impl<T> Allocation for T
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> 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