BehaviourComposer: ignore everything before this.
Begin micro-behaviour
Begin description:
This vaccinates those individuals with the highest number of acquaintances.
End description
Vaccinate most highly connected individuals
Begin NetLogo code:
substitute-text-area-for time-of-vaccination 1 substitute-text-area-for number-vaccinated the-fraction-vaccinated * the-initial-susceptible-population do-at-time time-of-vaccination [let population-sorted sort-by [[count link-neighbors] of ?1 > [count link-neighbors] of ?2] all-susceptibles repeat round number-vaccinated [let super-node first population-sorted set population-sorted but-first population-sorted add-behaviours-to super-node list-of-micro-behaviours "Intervention behaviours" []]]
End NetLogo code
Edit the text areas to change the time the vaccinations are performed and the number of individuals vaccinated.
Schedule non-targeted vaccination does not target the highly connected individuals.
This sorts the entire population by the number of acquaintances and adds the Intervention behaviours to the first number-vaccinated.
This was implemented by Ken Kahn on 3 February 2011.
BehaviourComposer: ignore everything after this.