Hi, everyone!
I'm using a small network where I use some nodes as sources and some are
targets. Now I want to implement a local routing algorithm.
Here are steps of the algorithm.
- walkers are placed on sources
- At each node, each walker chooses the next node of its neighbor's
- If all the neighboring nodes have not been visited, then the next
neighbor is chosen among the nodes that have not been visited.
- If all the neighboring nodes have been visited previously, then the
next node is chosen uniformly among all the neighbors. The walker is
forced to return to a previously visited node.
- With a small probability, the next node may be chosen uniformly among
all the neighboring nodes.
- If a cycle is detected, that is, if the walker is forced to return to
an already visited node.
- When the destination node is reached, stop
1 go
2 get-list-of-neighbors
3 select one-of from list of neighbors
check is-visited:
if yes: [remove from the list
check is-circle
if yes: Die
else go to setp 3]
4 else Move-to selected node
5 check is-target?
if yes: die
else add to list-of-visited and Go to step1
I'm new to NetLogo and doesn't know how to implement these steps. Please
help and guide me.
--
You received this message because you are subscribed to the Google Groups
"netlogo-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.