Simulation of the AGATA spectrometer and coupling with ancillary detectors