ropensci / nlrx

nlrx NetLogo R
https://docs.ropensci.org/nlrx
GNU General Public License v3.0
77 stars 12 forks source link

observe a single netlogo run #81

Closed pndphd closed 1 year ago

pndphd commented 1 year ago

Hi, I am wondering if there is any way to monitor the progress of just a single netlogo run. For example, if I have a netlogo run that runs for 1000 ticks and, as each tick happens, it prints what tick it is on is there any way to have that increasing tick count displayed as the netlogo model runs if it was called from nlrx. Could the tick count be printed to the r command line, printed to some other terminal window, or could nlrx call netlogo not in a headless state? Thanks!

nldoc commented 1 year ago

Hi,

as explained here, print commands from NetLogo should be redirected to the R console. If you put for example print ticks in your go procedure, you should see the current tick be written directly to your R console. Basically, everything that gets printed to your NetLogo console should also be written to the R console when running via nlrx. Please note, this is only true for sequential execution. When you go for parallel execution things get more complicated. There are also some pointers on this topic in the documentation section I linked above.