Netlogo BehaviorSpace - exporting histogram at specific tick

64 views Asked by At

Wondering if anyone knows how to export the data from a histogram plot at a specific tick e.g. tick 40?

Previously I have successfully exported histogram data at the end of each run by typing the following in the 'Final commands' box within BehaviorSpace: export-plot "Bus times" (word "/mnt/HA/groups/WalkingDistTests/bus_"random-float 1.0".csv") but I can't figure out where I would type a similar command for a mid-simulation export e.g., if ticks = 40 .

I'd like to do this in BehaviorSpace, if possible, to make it easier to modify the directory path for where I want to file saved.

Any ideas would be super appreciated!

1

There are 1 answers

1
Steve Railsback On

Certainly, you can just put that statement in the GO procedure, probably at the end and before the tick statement:

if ticks = 40 [export-plot ... ]

Also: your life will be easier if you include the BehaviorSpace run number in the export file name, instead of a random number. Replace "random-float 1.0" with behaviorspace-run-number. Then you will know which run produced which file.