seed_infections_in_patch#

seed_infections_in_patch(model, ipatch, ninfections=1)[source]#

Seed initial infections in a specific patch of the population at the start of the simulation. This function randomly selects individuals from the specified patch and sets their infection timer to the mean infection duration, effectively marking them as infected. The process continues until the desired number of initial infections is reached.

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

  • ipatch (int) – The identifier of the patch where infections should be seeded.

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

Return type:

None

Returns:

None