setrevil.blogg.se

Breeds netlogo
Breeds netlogo






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. As such, I wouldn't recommend storing it as a woman-own variable. Programming concepts: Agents, procedures, variables, ask, agentsets, breeds, synchronization. to eat-weeds rabbit procedure gain 'weed-energy' by eating weeds if pcolor violet set pcolor black set energy energy + weed-energy end. Its not a global attribute of a particular woman, but rather something specific to each man. I prefer the myself version, but it's a matter of taste.Īlso, another observation. Set utiilty ( of myself) * int + ( of myself) * att

breeds netlogo breeds netlogo

Set utiilty mans-pref-int * int + mans-pref-att * att So here are two ways to do what you're trying to do. NetLogo automatically figures out who's variable you're referring to from the context. However, of self is the same as some-variable, so you rarely use self. It looks like you're using myself where you should be using self. 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.

#BREEDS NETLOGO PATCH#

Specify agents-environment interactions through patch variable and. example of declaring a new breed of agents. Generate and characterize different breeds of agents using the breed functionality.

user-defined turtle variables (also -own). Also note that the breeds-own command uses the plural form of the breed name.).

I'd like the men to choose which woman they prefer most using a utility function, and move to them. The NetLogo Dictionary has a complete list of built-in instructions (i.e. The men have preferences (also variables generated at birth) about how much they care about those characteristics. the women have random values for characteristics (variables generated at birth), lets say some value 0 to 10 for intelligence and attractiveness.

breeds netlogo

Lets say i have two breeds, men and women. 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.






Breeds netlogo