Simulating orbital gravity with a prediction of trajectory (Multiple attractors)

Hello fellow programmers,
I saw this post about simulating orbital gravity : http://www.java-gaming.org/topics/orbital-mechanics-keplers/35771/msg/339215/view.html#msg339215
I’m trying myself to predict more-than-two-body attractions and I don’t really know which data structure I should use to achieve this result, I wanted to know which method you used at the time.
I also tought of only using scalar (something like a ‘gravity’ tension) in a grid.

Thanks in advance for your answers

tl;dr:I’m trying to predict the trajectory of a body with multiple attractors (a static one and multiple moving ones)