Re: [netlogo-users] Problems with the "file-read" primitive in Netlogo 2.0.1
- Hi all!
My e-mail hasn't got lilibeth's original message yet, but thorston's reply did
We did a lot of work with GIS files at last weeks NetLogo workshop at the
Advanced Learning Center of Mesa State College (which was a blast, more on all
One of the big things we learned (and it took way too long to realize it), is
that there is a catastrophic bug in the file-read primitive of netlogo 2.0.1
that does not exist in 2.0.0.
We learned that while reading a largish text file (say a file that represents a
150 x 150 grid, organized into a single column of 3 digit integers), the file
would restart at the beginning over and over.
Here's a sample of the kind of code we used:
to read-map [ filename rows cols ]
locals [ temp-row temp-map ]
set temp-map  ; a global
[ set temp-row 
[ set temp-row lput file-read temp-row ]
set temp-map lput temp-row temp-map
This was paired with a procedure to display the data in the patches, that I
won't detail here.
Suffice it to say, that the code runs perfectly in netlogo 2.0.0, and does not
By using a test file that simply contained 150 x 150 numbers in sequence, then
coloring the result to show discontinuities, and especially to show when the
sequence started over at zero, we saw that the file read was set back to the
beginning from time to time, but may also have caught up with itself.
I was planning on testing the extent of the bug more, but seeing this, I decided
to just get the info out there.
Again, more on the GIS system later.
Hope this helps,
>>>>> "James" == gregortroll <gregortroll@...> writes:James> One of the big things we learned (and it took way too long to
James> realize it), is that there is a catastrophic bug in the
James> file-read primitive of netlogo 2.0.1 that does not exist in
James> I was planning on testing the extent of the bug more, but seeing
James> this, I decided to just get the info out there.
We know about this (see
e.g. http://groups.yahoo.com/group/netlogo-users/message/1916) and we'll
be fixing it for NetLogo 2.0.2, which we plan to release this week.
Seth Tisue / seth@... / (847) 467-2814
lead developer, NetLogo http://ccl.northwestern.edu/netlogo/
Center for Connected Learning and Computer-Based Modeling
School of Education and Social Policy / Department of Computer Science