I am using NetLogo and I want to read two types of data (for example "x" and "y") from a file for each agent in each time step (tick). Does anyone know how I can do this? Thank you in advance Here is the code:
breed [agents agent] agents-own [ need tax] to setup clear-all define-xy reset-ticks end to define-xy file-open "D:\\data\\xy.txt" while [not file-at-end?] [ let items read-from-string (word "[" file-read-line "]") crt 1 [ set xcor item 0 items set ycor item 1 items set label ycor ] ] file-close end to go tick if (ticks = 5) [ stop ] end
Now if I want to define two parameters that are tax and need that change each tick what should I do. I am a little bit confused.In the code above I can do a one time read from a file that has two columns. Thanks!