![]() The second variation includes grass (green) in addition to wolves and sheep. This variation produces interesting population dynamics, but is ultimately unstable. To allow the population to continue, each wolf or sheep has a fixed probability of reproducing at each time step. Each step costs the wolves energy, and they must eat sheep in order to replenish their energy - when they run out of energy they die. In the first variation, wolves and sheep wander randomly around the landscape, while the wolves look for sheep to prey on. There are two main variations to this model. In contrast, a system is stable if it tends to maintain itself over time, despite fluctuations in population sizes. ![]() Such a system is called unstable if it tends to result in extinction for one or more species involved. This model explores the stability of predator-prey ecosystems. (For example, if you have multiple applets in differentĭirectories on the same web server, you may want to putĪ single copy of the NetLogoLite files in one central place andĬhange the archive= lines of all the HTML files to point In the HTML code to point to their actual locations. If the NetLogoLite files and your model are in differentĭirectories, you must modify the archive= and value= lines and ending with, and paste it into any HTMLįile you want. ![]() If you want, you can just take the HTML code beginning with You don't need to include everything in this file in your page. Though, so if it doesn't work from your hard drive, please try On some systems, you can test the applet locally on your computerīefore uploading it to a web server. (You can copy NetLogoLite.jar and įrom the directory where you installed NetLogo.) (WSP.nlogo), and the files NetLogoLite.jar and In order for this to work, this file, your model file Windows and Linux users may obtain the latest Java from Mac users must have Mac OS X 10.4 or higher. Java must be enabled in your browser settings. I'm trying to get one type of breed to evaluate all the agents in another breed, and choose which one it likes best based on its own preferences of the characteristics of the other breed.This page was automatically generated by NetLogo 5.0.5. Lets say i have two breeds, men and women. the women have random values for characteristics (variables generated at birth), lets say some value 0 to 10 for intelligence and attractiveness. The men have preferences (also variables generated at birth) about how much they care about those characteristics. The NetLogo Dictionary has a complete list of built-in instructions (i.e. I'd like the men to choose which woman they prefer most using a utility function, and move to them. Also note that the breeds-own command uses the plural form of the breed name.). user-defined turtle variables (also -own). ![]() Generate and characterize different breeds of agents using the breed functionality. example of declaring a new breed of agents. Specify agents-environment interactions through patch variable and. myself refers to the agent that is calling the current agent (it's probably the most confusingly named primitive in NetLogo).One problem is that your local variables pref-int and pref-att have the same name has the men-own variables.Women own to choose-mateīut netlogo doesn't seem to be able to access the variable values of women one I've referenced men with ask. It looks like you're using myself where you should be using self. However, of self is the same as some-variable, so you rarely use self. NetLogo automatically figures out who's variable you're referring to from the context. Set utiilty mans-pref-int * int + mans-pref-att * att So here are two ways to do what you're trying to do. Set utiilty ( of myself) * int + ( of myself) * att I prefer the myself version, but it's a matter of taste.Īlso, another observation. Its not a global attribute of a particular woman, but rather something specific to each man. to eat-weeds rabbit procedure gain 'weed-energy' by eating weeds if pcolor violet set pcolor black set energy energy + weed-energy end. Programming concepts: Agents, procedures, variables, ask, agentsets, breeds, synchronization. As such, I wouldn't recommend storing it as a woman-own variable. But I basically need something like: to take-money if turtle shape 'building institution' set money-held money-held + 1 end But I know that doesn't work.
0 Comments
Leave a Reply. |