|
From: Laszlo G. <gu...@la...> - 2002-09-20 16:01:51
|
At 11:39 AM 9/20/2002 -0400, Nick Collier wrote: >I can see how this would be a problem in if you used a HashMap / HashSet >in your model and expected to be able reproduce the order of in which >items are stored in the Map. However, I'm unclear about how this effects >the network lib and multiple occupancy space. Can you explain further? >There is a comment in the unordered Multiple occupancy space docs to the >effect that the order of objects in a single cell is undefined; the >implication being that you can't rely on the order. OK, I overlooked this comment. So did Yuri, whose model's behavior depended on it. But you're right, perhaps this is not a bug, but a feature. Not necessarily one 'hay modelers' would like, though. :-) I mean, if the modeler actually needs to sort through the agents (i.e., activating them in some way), this feature undermines replicability. As for the network library, edges are stored in HashMap's in DefaultNode. And since most models involve actually _doing_ something to your neighbors, people usually tend to do something like getOutEdges() and iterate through them. However, the _order_ in which they do may be important with respect to replicating the results. Again, this maybe just a warning issue. However, I feel like this might make modelers rather uneasy. That said, I still like HashMap's! ;-0) Gulya >thanks for the bug reports, > >Nick > >-- >Nick Collier >Social Science Research Computing >University of Chicago >http://repast.sourceforge.net |