From: Nick C. <nic...@gm...> - 2008-12-19 16:53:33
|
It looks like the SimpleGridAdder is broken. Do you have the issue only when you use it? thanks, Nick On Dec 19, 2008, at 5:03 AM, Dave Murray-Rust wrote: > > On 17 Dec 2008, at 14:14, Nick Collier wrote: > >> The Context and any projections in contains should remain >> synchronized such that all items in the context are also in the >> grid, net, what have you. As I mentioned, we did fix an issue with >> context remove, but this may be unrelated. Can you say more about : >> >>> if I take a working model, and add a grid >>> to it, without locating any of the agents in the grid, then this >>> error >>> crops up. >> >> how are you adding the grid? Using the factory? What sort of >> GridAdder are you using? The intention is that when a Grid is added >> to a context, all the agents in the context are added to the Grid >> via the GridAdder. This requires some initial setup between the >> Grid and the Context but using the GridFactory to create the Grid >> takes care of that. >> > > where q is my context, adding these lines gives me NPEs on removing > agents: > > GridFactory factory = GridFactoryFinder.createGridFactory( null ); > Grid grid = factory.createGrid( "Test Grid", q, new > GridBuilderParameters( new StrictBorders(), new SimpleGridAdder(), > false, 10, 10 ) ); > q.addProjection( grid ); > > (and I don't explicitly move any of the agents in the Grid) > > Cheers, > dave > > > > > -- > The University of Edinburgh is a charitable body, registered in > Scotland, with registration number SC005336. > |