netlogo

Multi-Nomial Logit / Modelling Choice [Netlogo]

只谈情不闲聊 提交于 2019-12-11 02:26:35
问题 I have used multinomial logit model as the probability function to model the choice for a particular set of agents, my problem comes at the end when I have calculated the Probabilities which are P1, P2, and P3 and how I can use these to actually model the choice. My idea was to use something like the lotterywinning example from the modellibrary, but the problem is that in this case the Probabilities are not set but change for each tick and even though P1 has the lowest chance to occur it can

Detecting a mouse click / mouse up in NetLogo

孤人 提交于 2019-12-11 02:26:20
问题 Using mouse-down? for mouse actions in NetLogo often results in the action happening too many times. For example, if you want to let users click to create new turtles, you could hook a forever button up to a procedure like: to add-turtle if mouse-down? [ crt 1 [ setxy mouse-xcor mouse-ycor ] ] end The problem is that this usually results in many turtles being created per click. I'd like to do something like: to add-turtle if mouse-clicked? [ crt 1 [ setxy mouse-xcor mouse-ycor ] ] end Where

Controlling lives of turtles in NetLogo

为君一笑 提交于 2019-12-11 02:25:29
问题 For a project, I'm developping a simulation in NetLogo dealing with rabies diseases in dogs and humans. I have some turtles-humans with dogs that can be vaccinated or not. At the beginning I create a dog with rabie and, in according to the fase (1 or 2) of the disease, it can spread the disease to other dogs with a probability. At the end the dog can die either for paralysis (if a probability is higher than 75%) or for other complications. Here's the code: http://pastebin.com/esR75G3T In the

How to select up to a maximum number of turtles using roulette wheel selection

China☆狼群 提交于 2019-12-11 02:07:56
问题 In my model the turtles have two sexes where the males have two potential tactics. The females count the number of males in a set radius. I want the females to weight their probability of selecting from the group of males (without replacement) depending on the relative frequency of the two male tactics. I already have the code for the probability of selecting from the males ( matingPoolProbAnad and matingPoolProbRes ) but I don't know how to implement it, though the rnd extension seems the

Effectively deactivating specific links between specific agents and breeds in a social network

谁说我不能喝 提交于 2019-12-11 01:47:40
问题 A social network of agents of different ages is set up in NetLogo similarly to the following, which results in a circle of agents connected by links. The overall purpose of these links is to represent contact between those links. The model simulates the spread of infection through the network. Agents begin as susceptible, with the possibility of becoming infected if they come into contact with an infectious link neighbour. I want to model for example the isolation or quarantine of an infected

How to link actions of agents?

两盒软妹~` 提交于 2019-12-11 01:44:40
问题 I am trying to program the simulation with 3 sets of agents - A,B,C. The point is that the agents from the set A can choose to DO the action or NOT. If they decide to NOT do the action, the simulation stops. When they decide to DO the action, simulation continues to the next step, where the agents from the set B can also decide to DO the action or not. The same is here. And the agents from the set C, can also decide to DO the action or NOT, but here, the simulation in both cases stops. Here

Rotating a turtle through cone of vision

元气小坏坏 提交于 2019-12-11 01:34:55
问题 I wish to write to where I have a cone-of-vision cone angle for the turtle. And I rotate the turtle through the cone-of-vision. Therefore, first it's heading the start of cone-of-vision and with a increment of 0.05 degree it changes till it reaches the end of cone-of-vision let max-head heading + (cone-angle / 2) set heading subtract-headings heading (zero-dash / 2) while[(subtract-headings heading max-head ) < 0] [ set heading heading + .05 ;wait 0.1 ] The above code I wrote isnt correct.

How to modify spatial extent of a landscape

风格不统一 提交于 2019-12-11 01:19:42
问题 I created a landscape that it is possible to modify at each simulation by changing paramaters in the interface. For my simulated landscapes, I considered that one patch = 100 m² . For the moment, the spatial extent of my landscape is 0.3 km² (51 patches x 51 patches x 100) if I didn't make a mistake. Ideally, I would like to have a spatial extent of 10 000 km² . I made some tests and obtained an internal error when I specified max-pxcor = 1000 , max-pycor = 1000 and patch size = 1 pixel in

Using time:go-until in NetLogo time extension

吃可爱长大的小学妹 提交于 2019-12-11 00:48:54
问题 Using the NetLogo time extension on NetLogo 5.1.0 and Windows 8.1, I would like a simulation to stop either at a specific date, or after a specific period of time. time:go-until should work for this according to the documentation on https://github.com/colinsheppard/time/#discrete-event-scheduler, but I can't figure out how to use it correctly. Here's what I have so far: extensions [time] globals[ start-time current-time ] to setup clear-all reset-ticks set start-time time:create "2011-01-01"

Selecting values from bounded normal distribution in NetLogo

烈酒焚心 提交于 2019-12-10 22:56:53
问题 I'm trying to have NetLogo draw values from a bounded random normal distribution following the recommendation in a previous question in stackoverflow NetLogo : How to make sure a variable stays in a defined range? Specifically I'm asking the model to create a circular home range that varies in size according to empirical data set homerange patches in-radius ((sqrt (( random-normal-in-bounds [ 54.4 35.8 19 151 ] * 1000000)/ pi))/ 100) to-report random-normal-in-bounds [mid dev mmin mmax] let