Large-scale optimization of 5G integrated terrestrial and non-terrestrial network