seed_infections_randomly#

seed_infections_randomly(model, ninfections=100)[source]#

Seed initial infections in random locations at the start of the simulation. This function randomly selects individuals from the population and seeds them with an infection, based on the specified number of initial infections.

Parameters:
  • model – The simulation model containing the population and parameters.

  • ninfections (int) – The number of initial infections to seed. Defaults to 100.

Returns:

The nodeids of the individuals seeded with an infection.

Return type:

ndarray