Build an Epidemic Model (part 7 of 8)

Tagged:

Previous: Immunity (part 6 of 8)

Monitoring the Situation

So just how do you know if there are fewer red agents then there were before? It would be useful to monitor this by showing the number of red agents while the simulation is running. Grab a Monitor block from the Setup and Run tab and drop it in the Setup section of the canvas. Change the name of the Monitor to Infections.

From the Turtles drawer (My Blocks palette), get a Count Turtles With block and attach it to the right side of the Monitor block.

Grab an = block from the Logic tab and attach it to the Count Turtles With block. Fill in the left side of the = block with the Color trait from the Traits tab and the right side with Red from the Colors tab.

Look at the Runtime view and run your model. There is now a Monitor telling you how many Infected agents are currently out there.

Next: Part 8 of 8 - Graphing Back To Top