Heuristic compactness maximization algorithm for two-dimensional single-atom traps rearrangement