Introduction to NetLogo

Course given at the Bachelor degree in Mathematics "Epistémologie del Sciences", 22-28/4/2018 Université de Guyane

Exercises:

  1. Variations of the percolation model. What happens if the water can only percolate downward? (directed percolation).

  2. Infection models: patches can be infected or healthy, they can be infected by neighbours and may die/become immune (SIR model) or recover (SIS model). What happens if one introduces an incubation period?

  3. Same infection model but with turtles, that can also move. How does the movement influence the spreading of the infection? How does it depends on the amount of movement (i.e., local displacements vs. flight travels)?

  4. Vector-borne diseases: two species of patches/turtles: people and flies, flies can bite infected people and become carrier, and then infect other people. People do not move (either standing turtles or patches) but flies do.

  5. Forest fires: trees can burn and ignite other trees: what happens if there is a wind? What is the critical tree density? (a variation of the percolation model)

  6. Model a traffic jam on a highway: cars have a speed, and advance according to their speed, but if there is no place the speed is reduced. If there is space speed increases up to a limit. How does the average traffic speed depend on the density of cars? Look for shock waves.

  7. Stochastic integration: compute the value of pi by throwing dots (turtles) at random in a square, and computing how many of them fall into an inscribed circle.

  8. Random walk and diffusion: have a great number of turtles starting from the same point and going downward with some lateral movement. Compute the histogram of positions in time.

  9. Cannon game: implement a cannon that fires turtles towards a target. One can vary the charge (speed) and the angle. Implement the equation of motion using a simple Euler approach and a small time interval.

  10. Bouncing ball: same as before but with bouncing

  11. Two balls linked by a spring. Draw their trajectories for different initial velocities.

  12. Motion of a planet around the Sun. Try to find Keplerian ellipses.

  13. Trail: a turtle moves and leaves a scent (pheromone) on patches. The pheromone diffuse and evaporates.

  14. Ant in a maze: compare different strategies (go straight when possible, always try to turn to left, do a random motion...) with the same maze: which ant arrives first to some point (e.g. borders)?

  15. Draw a compound umbel inflorenscence https://en.wikipedia.org/wiki/Inflorescence: start with a turtle, which draws a segment. Then this turtle duplicates and each of them turns a bot and draws a segment half as long, and so on.

  16. Develop models for other types of inflorencences https://en.wikipedia.org/wiki/Inflorescence