Joint optimization of energy consumption and spectral efficiency for 5G/6G point-to-point networks