So in short you have two kinds agents which must each call a certain procedure, and this must all be done within a certain timestep, and the A agents must all be before the B agents for each procedure. This would be done using (1) anonyomous steppables [or if you must, sim.engine.MethodStep] and (2) the "ordering" facility in the schedule. You'd do this in your start() method:
Why are you doing a main? Why not just use doLoop?
SparseGrid2D is a representation of space. It has nothing to do with the schedule, which is a representation of time. So it won't make any difference.
> BTW: my agents are on a SparseGrid2D, when I retrieve them should I randomize their order or is it done automagically somewhere?