1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
use necsim_core_bond::{NonNegativeF64, OpenClosedUnitF64 as PositiveUnitF64};
use necsim_impls_std::event_log::recorder::EventLogConfig;
use necsim_plugins_core::import::AnyReporterPluginVec;

use crate::{
    args::config::{
        algorithm::Algorithm, partitioning::Partitioning, sample::Sample, scenario::Scenario,
    },
    cli::simulate::SimulationOutcome,
};

use super::super::BufferingSimulateArgsBuilder;

mod algorithm_scenario;
mod info;
mod launch;
mod partitioning;
mod reporter;
mod rng;

#[allow(clippy::too_many_arguments)]
pub(in super::super) fn dispatch(
    partitioning: Partitioning,
    event_log: Option<EventLogConfig>,
    reporters: AnyReporterPluginVec,

    speciation_probability_per_generation: PositiveUnitF64,
    sample: Sample,
    scenario: Scenario,
    algorithm: Algorithm,
    pause_before: Option<NonNegativeF64>,

    ron_args: &str,
    normalised_args: &mut BufferingSimulateArgsBuilder,
) -> anyhow::Result<SimulationOutcome> {
    reporter::dispatch(
        partitioning,
        event_log,
        reporters,
        speciation_probability_per_generation,
        sample,
        scenario,
        algorithm,
        pause_before,
        ron_args,
        normalised_args,
    )
}