  As the number of complex organic molecules (COMs) detected in the
interstellar medium increases, it becomes important to place meaningful
constraints on the formation pathways of these species. The molecular cloud
SgrB2(N) is host to several hot molecular cores in the early stage of star
formation, where a great variety of COMs are detected in the gas phase. Because
of its exposure to the extreme conditions of the the Galactic center region,
SgrB2(N) is one of the best targets to study the impact of environmental
conditions on the production of COMs. Our main goal is to characterize the
physico-chemical evolution of SgrB2(N)'s sources in order to explain their
chemical differences and constrain their environmental conditions. The chemical
composition of SgrB2(N)'s hot cores, N2, N3, N4, and N5 is derived by modeling
their 3mm emission spectra extracted from the EMoCA imaging spectral line
survey performed with ALMA. We derive the density distribution in the envelope
of the sources based on the masses computed from the ALMA dust continuum
emission maps. We use the radiative transfer code RADMC-3D to compute
temperature profiles based on the COM rotational temperatures derived from
population diagrams. We use published results of 3D RMHD simulations of
high-mass star formation to estimate the time evolution of the sources
properties. We employ the chemical code MAGICKAL to compute time-dependent
chemical abundances in the sources and investigate how physical properties and
environmental conditions influence the production of COMs. We find that
chemical models with a cosmic-ray ionization rate of 7e-16s-1 best reproduce
the abundances with respect to methanol of ten COMs observed toward
SgrB2(N2-N5). We also show that COMs still form efficiently on dust grains with
minimum dust temperatures in the prestellar phase as high as 15K, but that
minimum temperatures higher than 25K are excluded.
