Libraries‎ > ‎Epidemics‎ > ‎

Report all with state

BehaviourComposer: ignore everything before this.
Short sentence that describes this behaviour
Begin micro-behaviour
Begin description:
Define a NetLogo reporter of the individuals in a specified state.

Report susceptibles

Begin NetLogo code:
substitute-text-area-for columns: 20 state-name susceptible
substitute-text-area-for columns: 20 reporter-name all-susceptibles

to-report reporter-name
   let state "state-name"
   report all-individuals with [my-state = state or my-next-state = state]
end
End NetLogo code

Variants

You can edit the text areas to define other state reporters.

How this works

This adds a reporter to NetLogo that reports all individuals whose current state (or next state) is a specified value.

History

Ken Kahn implemented this on 3 February 2011.

BehaviourComposer: ignore everything after this.
Comments