banner-nll

Think of what each line  will do in the program.  You will notice that there is a line containing the term bird-metabolism.  This will be user defined and will give the birds some energy to begin with.  You must create a slider to allow the user to set the metabolism.  Do that in the interface window.

You don’t have a shape called "birds" built yet so go to tools at the top of the window and  select the shapes editor.

This is the screen you will see:

Click on new and see this screen.  A word to all you graphic artists out there  -- simple is better.  The artistic ability of the program is not wonderful but there is a reason for  that.  Fancy graphics use up valuable memory and slow the program down.  Use basic shapes to draw a rough bird.  You can erase the last thing you do, or start over but try to keep it simple.  When you have completed the drawing, name it birds and click done. It will appear in the list of shapes.  Click done again and the window closes.  Now click setup in the interface window and  you should see a screen like this:.

birds102

If you select go the  moths will move and the screen will change shade but the birds won't move.  That  is because we have only created them and no given them anything to do.  What is it that we want them to do?  How are they going to catch moths?  Let's check  this in another model in the library entitled Wolf Sheep Predation.  As you study the code in wolf sheep predation notice that breeds are also  used in this program.  The setup is similar also.  We are interested in the wolves as they are the predators like our birds will be. Use edit, copy to copy the ask wolves over into your peppered moth model and place it in the go section just after the ask moths section.  It should look like this:

insert102

Continue this Lab


With Support from:

The NetLogo Learning Lab is part of modelingcomplexity.org, the home of the Mesa State College Center for Agent-Based Modeling.

This website is copyright by Mesa State College, 2004. All rights are reserved.

Some materials are adapted from the NetLogo User manual, and are copyright Wilensky, U. (1999). NetLogo.  Center for Connected Learning and Computer-Based Modeling. Northwestern University, Evanston, IL.