swarm-modeling
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swarm-Modelling] ?Printing Grid2d arrays to a reportfile?


From: lpremo
Subject: [Swarm-Modelling] ?Printing Grid2d arrays to a reportfile?
Date: Thu, 4 Dec 2003 11:43:17 -0700
User-agent: Internet Messaging Program (IMP) 4.0-cvs

Dear modelers,

I'm an anthropology graduate student in the process of putting the final
touches on a swarm model that investigates early hominid food sharing.
To analyze the archaeological signatures left by the hominid foragers,
I've used an instance of Grid2d, called artifactGrid, to collect
artifact objects as they are deposited.  In order to collect data
concerning the spatial distribution of artifact quantities (see below),
I need to print the contents of artifactGrid (more specifically, the
artifactCount integer value of each grid cell) to my reportfile every
100 time steps during the simulation.  I have successfully written a
method, -showArtifacts, which prints the data of interest to my screen,
but I have failed to get the same data sent to my reportfile, which has
no problem collecting other data during the simulation.  If anyone has
experience printing Grid2d arrays to reportfiles, I would greatly
appreciate any hints or tips!

Here is a small sample of the data I'm trying to send to the reportfile;
integers refer to the number of artifacts present in each cell:

Contents of artifactGrid:
0 0 1 2 3 0 5
0 7 6 8 4 2 1
0 0 0 3 2 0 0
0 0 0 6 5 1 0
0 0 5 3 0 0 0 ...and so on

This seems to be one of the final coding obstacles keeping me from
collecting data for my dissertation, so, as you can imagine, I will be
extremely grateful to anyone who can provide some help in overcoming
it.  Thank you very much,

Luke Premo

Ph.D. Candidate
Department of Anthropology
University of Arizona



reply via email to

[Prev in Thread] Current Thread [Next in Thread]