Agent based NetLogo Code simulation - netlogo

Is there any way to implement multiple robots in an environment with obstacles in NetLogo to reach their individual destinations with shortest path?

Related

How to set agents speed according to the road they are on?

I am working on a project using Anylogic and i was wondering if there is a way to set the agents speed according to the road they are on.
I am working with the GIS map, where I have some GIS regions which the car agent moves from one region to another through the moveTo() function. For this project I am using the Anylogic default routing provider.
I expected the agents to use the road's speed limits, but I realized they are moving with their "inicial speed" with a constant speed. Does anybody know how to set my cars speed according to the road they are on?
Thanks a lot!!

Turtle Movement Netlogo

I have a network of turltes that each share two links. At the start of each turn the turtles decide to cooperate or defect, which updates a beta distribution of likelihood of cooperation in the next tick. If the turtles fail to cooperate over n turns they no longer interact. Through this I am able to create clusters in the cooperation network.
Right now, I am trying to figure out how to make the turtles move closer together proportional to the weight of their ties. Is there code to do this? I have only been able to find example code for patches.
I think this model might have something similar to what you want:
http://modelingcommons.org/browse/one_model/3632#model_tabs_browse_procedures

Netlogo - Controlling specific sets of turtles

I am trying to develop a model to demonstrate a field principle I am trying to work with. I am having trouble finding information on how to control specific groups of turtles. Essentially I would like to make a grid of turtles and links that I can distort, relative to an objective coordinate grid, based upon the placement of a different type of turtle, like a particle interacting with a field?
Any suggestions would be greatly appreciated. Is it possible to write a command that only talks to specific turtles by their who value? for instance if i had a coordinate plane that went from -3,3 in both x and y, rendering 49 vertices, could I set up those first 49 turtles, and then spawn my particle turtles (lets say 3), which would be who 49,50, and 51. could I write a command specifically for those 3 turtles based upon their relations to the first 49 turtles?
I hope this question makes sense.

Netlogo multiple patch layer

Can I create multiple patch layers in Netlogo, instead of using several patch variables in one layer?
I'm trying to integrate different maps (geology, traffic, etc.) into the Netlogo environment. So far, I've defined multiple patch variables using patches-own command. But the maps I have are not always stackable. So if I can have separate patch layers for different maps, it would be clearer.
You can't make more patch layers. The structure of the NetLogo patch world is fixed.
But you might consider representing the information using turtles instead. You can sprout them, one per patch, or you could define several breeds of turtle, and have each patch sprout one of each breed. The order in which the breeds are defined will determine the layers' stacking order, and you can hide or show whole layers using hide-turtle and show-turtle. If you want the turtles to look just like patches, do set shape "square" (adjusting the size of the "square" shapes in the turtle shapes editor if necessary).

How to give turtles directional commands when moving along a drawn out network?

I want turtles to be able to flow along the paths I have drawn out for them. To do this I think it might be a reasonable idea to have a list in the u.i that allows the user to select a preordained direction of movement for that patch so the turtles know how to flow along the network. Has anyone else produced a model with this feature? If so would it be possible to give an example of the relevant source code for implementation into my own project?
I did something a while back where each patch had a direction variable that turtles set their heading to when on the patch.
Something like
patches-own[dir]
to go
ask turtles [set heading dir fd .1]
end