|
From: Nick C. <vze...@ve...> - 2001-11-19 14:27:06
|
Hi, I'm just now replying to Gulya's queries about a hexagonal space. I never saw the original message, and just grabbed it from the archives. So, on your first question on whether a hexagonal space should be a descendant of Discrete2DSpace. The semantics of a Discrete2DSpace at least as it is defined in the current API revolve around whether the space is amenable to x, y coordinates and whether it is possible to choherently get a BaseMatrix (uchicago.src.collection.BaseMatrix) from such a space. The latter is obviously related to the former. If a hexagonal space can be thought of in terms of rows and columns then I'd descend from Discrete2DSpace, if not then something else. On VonNeumann and Moore, I don't think we can move these anywhere, although you are probably correct that these are incoherent for some Discrete2DSpaces. As parts of the public API they need to stay where they are. On your ideas about defining Grids and Torii via their neighborhood behavoir (e.g. Object2DMooreGrid), this is reasonable as far as client, that is, agent behavoir code is concerned. For those of you just tuning in, the idea here is that agent behavoir stays the same (i.e getNeighbors()) across a variety of spaces. My concern though is that now the setup code will have to change according to which space is required, and I'm not sure what is gained in the short term. You are correct about the long term though, tools with menus etc. I'm willing to make major additions and within reason some changes to the current space library. What would be nice is a new architecture along the lines of what you've been talking about that could be used in conjunction with the current one. The current space code could be deprecated, although perhaps not in the java sense, and users would be encouraged to use the new one. If you'd like to take the lead on this, feel free. Lastly, in order for the hexagonal space to be included in repast, you'll need to write some JUnit unit tests. Ask me and/or see the README and code in uchicago/src/sim/test for more info. These don't take long and allow me to sleep better at night. Nick -- Nick Collier Social Science Research Computing University of Chicago http://repast.sourceforge.net |