BehaviourComposer: ignore everything before this. Begin micro-behaviour Begin description:
This vaccinates those individuals with the highest number of acquaintances. End description
Begin NetLogo code: substitute-text-area-for number-vaccinated the-fraction-vaccinated * length population-sorted 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 ## Warning!Note that this will not work in NetLogo 6.0 or above. Use version 2 of this behaviour instead. ## VariantsEdit the text area to change the number of individuals vaccinated. ## Related behaviours
## How this worksThis sorts the entire population by the number of links and adds the ## HistoryThis was implemented by Ken Kahn on 3 February 2011. BehaviourComposer: ignore everything after this. |