  In this work, a computer optimization model has been developed that allows
one to load the initial observation data of supernovae 1a into a table and,
simply, by searching for the best fit between observations and theory, obtain
the values of the parameters of cosmological models. Naturally, the initial
data are redshifts z and apparent magnitudes m at the maximum brightness of
supernovae. For better fit between theory and observation, Pearson's Chi2
(Chi-squared) goodness-of-fit test was used. The results are obtained for the
LCDM model and, for comparison, the model with a zero cosmological constant. In
order to improve the fit between observed data and theory, the optimization is
carried out assuming that the absolute magnitude of supernovae is not constant,
but evolves with time. It is assumed that the dependence of the absolute
magnitude on the redshift is linear: M=M(z=0)+ez, where e is the evolution
coefficient of the absolute magnitude of type 1a supernovae.
