No stop when running Netlogo Behaviorspace headless on Linux when using r extension

做~自己de王妃 提交于 2020-01-06 08:04:49

问题


I am running a simple netlogo behaviorspace experiment on a Linux cluster with calling R extension.

Here is the sample code:

extensions [r]    
to setup
      clear-all
      setup-patches
      setup-turtles
      reset-ticks
    end

    to setup-patches
      ask patches [ set pcolor green ]
    end

    to setup-turtles
      create-turtles number    ;; uses the value of the number slider to create turtles
      ask turtles [ setxy random-xcor random-ycor ]
    end

    to go
      if ticks >= 5 [ stop ]  ;; stop after 5 ticks
      move-turtles
      tick                    ;; increase the tick counter by 1 each time through
    end

    to move-turtles
      ask turtles [
        right random 360
        forward 1
      ]
    end

And I set up a BehaviorSpace experiment named count_turtles. Set the variables as ["number" 10]. And then I run the experiment on Linux as

NetLogo\ 6.0.4/netlogo-headless.sh \
--model model_test.nlogo \
--experiment count_turtles \ 
--table test.csv

However, it just keep running on Linux. But after I cut it I can get a proper test.csv. But it just doesn't stop by itself.

But when I run the same experiment on Windows it seems all good.

And if I remove the calling of r extension then it can stop properly. Once I called r extension then it does not stop by itself. But I tested the connection between netlogo and R it seems fine. I'm wondering why it does not stop by itself.

来源:https://stackoverflow.com/questions/52989780/no-stop-when-running-netlogo-behaviorspace-headless-on-linux-when-using-r-extens

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!