pNeuma_simulator package

Subpackages

Submodules

Module contents

pNeuma_simulator.batch(seed: int, permutation: tuple, n_jobs: int, distributed: bool = True, stochastic: bool = True)[source]

Run a batch simulation with the given seed and permutation.

Parameters:
  • seed (int) – The seed for random number generation.

  • permutation (tuple) – A tuple containing the number of cars and motorcycles.

  • n_jobs (int) – Number of parallel jobs.

  • distributed (bool, optional) – Flag indicating if the simulation is distributed. Defaults to True.

  • stochastic (bool, optional) – Flag indicating if the simulation is stochastic. Defaults to True.

Returns:

A tuple containing the simulation results for cars and motorcycles.

Return type:

tuple

pNeuma_simulator.ring(t: int, n_cars: int, l_agents: list, ax: Axes) None[source]

Draw the ring animation for a given time step.

Parameters:
  • t (int) – The time step.

  • n_cars (int) – The number of cars in the dataset.

  • l_agents (list) – A list of agents at each time step.

  • ax (matplotlib.axes.Axes) – The matplotlib axes object to draw the animation on.