Struct djinn::Manager [] [src]

pub struct Manager<S: Simulation, C: Redis> {
    pub population: Population<S, C>,
    // some fields omitted
}

Manages a simulation and coordinates a set of workers.

Fields

Methods

impl<S: Simulation, C: Redis> Manager<S, C>
[src]

Reset the manager. This unregisters all workers and queues.

Run the simulation for n_steps. This will spawn the population across available workers and begin sending them synchronized commands to step through the simulation.

Register a reporter function to be called every n_steps.

It receives a Population which can be used to query agents, compute aggregate statistics, etc, and a Redis connection that can be used, for example, to send reports via pubsub.

Spawn an agent.

Spawn multiple agents.

Get the number of workers.