Farsi / Persian
NetLogo Models Library:
Note: If you download the NetLogo application, every model in the Models Library is included.
This code example shows how to output information to an outside file directly from NetLogo code. All the data is written in human readable form using
The example creates 15 random turtles and opens a new text file of the user's choice. Each turtle has an internal variable,
value. Then every time
go runs, it will move the turtles randomly and change
value. The turtles' patch coordinates and
value variable are stored in the opened file. You should close the file when you are finished using the FILE-CLOSE button. The data file can be viewed afterwards using any text editor.
File Input Example