netlogo

NetLogo BehaviorSpace crashing when using R extension

最后都变了- 提交于 2019-12-02 10:21:02
I'm running a model of animal home ranges on my machine. I've added the R-extension to my NetLogo code to calculate minimum convex polygons for each home range. When I run the model in BehaviorSpace on multiple cores, NetLogo will simply disappear (i.e., stop running) after several time steps. I've tried it in 5.04 and 5.1 and the same happens. The model does run properly in BehaviorSpace if I choose 1 core instead of the 4 available on my machine. It also runs properly if I turn off the R-extension. Is there something I should be doing? I'd like to run it on a virtual machine with multiple

extension exception: 1944553 while applying raster netlogo gis

﹥>﹥吖頭↗ 提交于 2019-12-02 04:15:42
I am trying to load an ascii into Netlogo with apply-raster from the GIS extension. While I did this many times before (although not with this specific ascii), netlogo now throws the following error: extension exception: 1944553 error while observer running GIS:APPLY-RASTER I am not sure why this is happening. The ascii has a projection file with it (WKT), which should work fine: GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] The ascii itself has these parameters: ncols 1481 nrows 1314 xllcorner

Java error when trying to run NetLogo headlessly on a cluster

六月ゝ 毕业季﹏ 提交于 2019-12-02 02:58:15
I am attempting to run Netlogo headlessly using linux in order to send a job to a cluster. I have never used linux before, but I am attempting to follow the directions here ( http://netlogo-users.18673.x6.nabble.com/Running-NetLogo-Headless-in-Behaviorspace-Sample-code-td4862232.html ). My script is: #!/bin/bash #SBATCH -N 1 #SBATCH -n 1 #SBATCH -c 7 java -Xmx1024m -Dfile.encoding=UTF-8 -cp /opt/shared/netlogo/5.3.1-64/app/NetLogo.jar \ org.nlogo.headless.main \ --model /cluster/home/rfuda01/UM_model.nlogo \ --experiment UM \ --table /cluster/home/rfuda01/UM_test.csv In the output file, I am

Define home area-turtles?

别说谁变了你拦得住时间么 提交于 2019-12-02 02:34:55
I am very new to netlogo. I have searched every question here before I posted this. I have the following code which sprouts a given number of horses: ask n-of Number-horses patches with [grass? = "Yes"] [sprout-horses 1 [set color 25 ]] The person can change the number of horses using the slider but I would like each horse to have its own area/range/radius. They can only move within this radius/area and they cannot meet each other. From what I've read it's got something to do with the distance function? You can find a similar problem here which has examples too : Spacing agents in NetLogo

Define home area-turtles?

眉间皱痕 提交于 2019-12-02 01:36:30
问题 I am very new to netlogo. I have searched every question here before I posted this. I have the following code which sprouts a given number of horses: ask n-of Number-horses patches with [grass? = "Yes"] [sprout-horses 1 [set color 25 ]] The person can change the number of horses using the slider but I would like each horse to have its own area/range/radius. They can only move within this radius/area and they cannot meet each other. From what I've read it's got something to do with the

Not see through the walls

不羁的心 提交于 2019-12-01 22:36:51
问题 I am trying to model some building search in Netlogo, but now I am stuck, because I have no idea how to solve seeing through walls. My agent can see in cone lets say 60 degrees and 5 patches ahead. I can detect wall somewhere in my sight and i can detect other objects as well, problem is to detect if the obejct is behind wall or not. How can I solve it? Any ideas? 回答1: Here's a full working example. You can do some optimizations regarding which walls or patches need to be checked, rather than

read file lines with spaces into NetLogo as lists

时间秒杀一切 提交于 2019-12-01 20:13:20
How can I have file contents separated by spaces read into NetLogo as a list? For example, with a file containing data such as these: 2321 23233 2 2321 3223 2 2321 313 1 213 321 1 I would like to create lists such as these: a[2321,2321,2321,213] b[23233,3223,313,321] c[2,2,1,1] Well, here is a naive way to do it: let a [] let b [] let c [] file-open "data.txt" while [ not file-at-end? ] [ set a lput file-read a set b lput file-read b set c lput file-read c ] file-close It assumes the number of items in your file is a multiple of 3. You will run into trouble if it isn't. Edit: ...and here is a

read file lines with spaces into NetLogo as lists

人走茶凉 提交于 2019-12-01 20:08:44
问题 How can I have file contents separated by spaces read into NetLogo as a list? For example, with a file containing data such as these: 2321 23233 2 2321 3223 2 2321 313 1 213 321 1 I would like to create lists such as these: a[2321,2321,2321,213] b[23233,3223,313,321] c[2,2,1,1] 回答1: Well, here is a naive way to do it: let a [] let b [] let c [] file-open "data.txt" while [ not file-at-end? ] [ set a lput file-read a set b lput file-read b set c lput file-read c ] file-close It assumes the

How to read a .CSV file with netlogo?

為{幸葍}努か 提交于 2019-12-01 17:49:14
问题 I'm starting in netlogo these days, so I've got some problems that I didn't find how to solve them. I have to read a huge .csv file, got this code on the web: to openFile file-open "testeCsv.csv" set csv file-read-line set csv word csv "," ; add comma for loop termination let mylist [] ; list of values while [not empty? csv] [ let $x position "," csv let $item substring csv 0 $x ; extract item carefully [set $item read-from-string $item][] ; convert if number set mylist lput $item mylist ;

Turtles, patches and their moving sequentially from one patch to the next

北城以北 提交于 2019-12-01 14:38:56
Platfrom : NetLogo Question I want to move my flag specific 3 point A(-12 8) B(-5 12) C(6 4) -While travelling this point plot energy/time randomly decrease. -When reach C flag will die. I asked before and found this solution for moving. ( When turtle reached 2. point it will not stop ) - LINES1 - breed [cities city] breed [flag person] flag-own [target] to setup clear-all create-flag 1 [ set size 6 set shape "by" setxy -5 3 set target patch -10 5 face target ] < other commands > end to go ask flag-on patch -10 5 [ set target patch <next place you want it to go> face target ] ask flag with [