BehaviourComposer: ignore everything before this. Begin micro-behaviour: Begin description: Add any NetLogo command including those that define a new reporter or command to NetLogo. End description NetLogo code Begin NetLogo code: substitute-text-area-for code to-report total-population\n report count all-individuals\nendcode End NetLogo code VariantsAny NetLogo code can be placed in the text area. E.g. watch any-of-kind "Person"If the code begins with to or to-report then it will be added to the commands and reporters that other micro-behaviours can use. How this worksIf the code begins with to or to-report this adds to the generated NetLogo file a new NetLogo reporter or command that can be used by any micro-behaviour. Otherwise this can be any code NetLogo command to be run by the agent with this behaviour. Related micro-behavioursHistoryNetLogo code was implemented by Ken Kahn. BehaviourComposer: ignore everything after this. |