pub trait SimulationModel: Send + Sync {
// Required methods
fn name(&self) -> &'static str;
fn generate_path(
&self,
rng: &mut MonteCarloRng,
time_horizon: &TimeHorizon,
path_id: usize,
) -> SimulationPath;
// Provided method
fn generate_antithetic_path(
&self,
rng: &mut MonteCarloRng,
time_horizon: &TimeHorizon,
path_id: usize,
) -> SimulationPath { ... }
}Expand description
Trait for simulation models
Required Methods§
Sourcefn generate_path(
&self,
rng: &mut MonteCarloRng,
time_horizon: &TimeHorizon,
path_id: usize,
) -> SimulationPath
fn generate_path( &self, rng: &mut MonteCarloRng, time_horizon: &TimeHorizon, path_id: usize, ) -> SimulationPath
Generate a single simulation path
Provided Methods§
Sourcefn generate_antithetic_path(
&self,
rng: &mut MonteCarloRng,
time_horizon: &TimeHorizon,
path_id: usize,
) -> SimulationPath
fn generate_antithetic_path( &self, rng: &mut MonteCarloRng, time_horizon: &TimeHorizon, path_id: usize, ) -> SimulationPath
Generate an antithetic path for variance reduction