Hi,
I am new to NetLogo and am quite confused on how to model turtle movement. I have a landscape that consists of different landcover types: roads, residential areas, forests, and open fields. Each landcover type has its own resistance to movement value, where high values denote high resistance to movement (i.e. lower probability of stepping into that patch) and low values denote low resistance to movement:
Forest - 1 (green)
Open Field - 2 (yellow)
Roads - 4 (grey)
Medium density residential - 9 (orange)
High density residential - 10 (red)
I added some noise to the resistance values using this line of code:
set resistance resistance + random-float 1.0which gave me the following landscape: (linked to this question - this is a zoomed in version to show the resistance values for each patch).
I want my turtles to move down patches of lower resistance while maintaining a global direction towards forest patches. I used the downhill function and some random choice of movement using a probability variable q:
to moveUsing this doesn't seem to work very well because the turtles will move back to a previous patch if the resistance of its neighbors is higher. I would like them to continuously maintain a forward direction. Is there a way to make the turtles not go back to a patch they already visited?
Thanks!
Hi,
Just a couple of quick thoughts.
It makes use of the diffuse command, rather than random numbers to smooth out a distribution. You would need to make changes in order to have your different region types, and also have things go downhill.
ask patches with [ count turtles-here > 0 ] [ set resistance 100 ]
Under that scenario it might be possible for a turtle to get trapped.
Note: Opening a model in the Models Library
In NetLogo open the Models Library by using the menu Files => Models Library, or the shortcut Cmd-M on MacOS, Ctrl-M on other systems.
Then type your search term into the search bar in the lower left of the window.
For example if you type ‘hill climbing example’ you will get 2 examples. Only one will have the name “Hill Climbing Example”
[ the other example shows the same model with a nice visualization technique]
If you double click on the item Hill Climbing Example the model should open.
Aaron
--
Aaron Brandes, Software Developer
Center for Connected Learning and Computer-Based Modeling
--
You received this message because you are subscribed to the Google Groups "netlogo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
netlogo-user...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/netlogo-users/c88aa1c0-12cf-42a3-9d95-6c35871c5989n%40googlegroups.com.