问题
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