60 likes | 136 Views
Week 14 DO NOW QUESTIONS. You have been asked by a leader of your community to think about how a sudden increase in fuel price (gas= $12/gal) will affect traffic patterns and use of public transit. You decide to model this situation in NetLogo . What are some of your first steps?
E N D
You have been asked by a leader of your community to think about how a sudden increase in fuel price (gas= $12/gal) will affect traffic patterns and use of public transit. You decide to model this situation in NetLogo. What are some of your first steps? • Create a setup procedure. • Decide what are the key decisions and behavior changes that might occur. • Decide what to include in your model and what to ignore. • Decide what turtles-own variables to create. • B c and d • Stockpile gasoline.
In a burned-out building, you find a scrap of paper with only the top part of a NetLogo program as below. Breed [humans human] Breed [non-humans non-human] Humans-own [ alive? Have-ammo? Agentset-of-friends] Non-humans-own [ #-eaten am-I-intact? Need-brains?….. What do you think the modeler was attempting to model? • You can’t tell from only the custom variables. • Looks like a model of a Zombie Apocalypse. • A model of an epidemic or ecological system. • All of the above.
Iteration means doing (almost) the same thing over and over. Computer models automate this work and allow us to see the changes that occur as things change after many operations. Which of the following is NOT iteration? • Ask n-of 100 turtles [ set color color + who] • Repeat 1000 [set global-counter global-counter + 2] • Create-turtles 500 [ setxy random 12 random 12] • Let name “ralph” • Breed [cows cow] • D and e
After you create a model it is valuable to reflect whether you have appropriately captured the behavior of the real-world system that you are modeling. The process of building a model often helps you understand what does and what doesn’t matter. What steps can you take to see if your model is accurate? • Create sliders for key variables to see if changing them produces reasonable effects. • Run the model many times with different settings • Show the model to domain experts and get their feedback • All of the above
Assume word size 32 x 32. Which of the following will result in way more than 20 turtles. • Create-turtles 20 [ forward 13] • Create-turtles 2 [ forward 5 hatch 10 [ forward 5]] • Ask n-of 20 patches [ sprout 1 [ set color red]] • Ask one-of turtles [ hatch 20 [ setxy random-xcor random-ycor]] ;assuming there is one turtle. • Repeat 20 [ask patches [sprout 1]]