Community
Participate
Working Groups
Build Identifier: M20100211-1343 The source code generated by this metaABM file is incorrect. The function 'findRandomAvailableNeighbor() is called with improper arguments. The conditional construction may be incorrect as well. Reproducible: Always Steps to Reproduce: 1. Import the attached metaABM file into a new Escape project 2. Clean and build the project 3. Inspect the 'Second Movement' act of the Individual agent.
Created attachment 163187 [details] The metaabm file that produces the error File was renamed from '.metaabm' to '.txt' for upload; should be renamed for testing.
Created attachment 163188 [details] Java file with error as generated on my system
OK, here's the issue with the design: For selection, you have individual. This should be "location" (for rather obscure reasons, btw, in the demo model that will need to change to Place for the next update of AMF). That's because you're moving to a location, not an individual. It doesn't make sense to move to an individual, because they cannot be occupied. So this is a case not where the generation is wrong, but that it should never have been allowed to happen in the first place, because the model is wrong. Instead, the user should have been notified of a model design error. The solution I think is to add a check for such a movement. Here we would check to ensure that the location being moved to is actually the fill agent for the space in question. However, I'm not absolutely certain that that is the right course, as there may be cases where it would make sense to allow this.
Added logic for testing this mis-specification.