pub struct SimulationConfig {
pub n_scenarios: u32,
pub io_channel_capacity: usize,
}Expand description
Parameters controlling the SDDP simulation pipeline.
Construct this struct directly — all fields are public and there is no
builder or Default implementation. Every field must be set explicitly
to prevent silent misconfiguration.
§Examples
use cobre_sddp::simulation::SimulationConfig;
let config = SimulationConfig {
n_scenarios: 500,
io_channel_capacity: 32,
};
assert_eq!(config.n_scenarios, 500);
assert_eq!(config.io_channel_capacity, 32);Fields§
§n_scenarios: u32Total number of scenarios to simulate across all MPI ranks.
Scenarios are distributed statically across ranks using the same two-level distribution strategy as training (see simulation-architecture.md SS3.1). Must be at least 1.
io_channel_capacity: usizeBounded channel capacity for the background I/O thread.
Controls the maximum number of SimulationScenarioResult instances
that can be buffered in the channel between simulation threads and the
background I/O thread. When the channel is full, simulation threads
block until the I/O thread consumes a result, providing backpressure.
Larger values increase memory usage but allow the I/O thread more headroom to absorb bursts. Default in practice is 64.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SimulationConfig
impl RefUnwindSafe for SimulationConfig
impl Send for SimulationConfig
impl Sync for SimulationConfig
impl Unpin for SimulationConfig
impl UnsafeUnpin for SimulationConfig
impl UnwindSafe for SimulationConfig
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