The designing of multidimensional deterministic and stochastic models of populations dynamics with regard to the relations of competition and mutualism, and migration is described. The model examples in three-dimensional and four-dimensional cases are considered, qualitative and numerical investigation of models is carried out. The transition to the corresponding multidimensional nondeterministic models defined by stochastic differential equations is made. The stability analysis of stationary states is performed. The structure of multidimensional models with competition and mutualism is described with regard to the properties of the Fokker–Planck equations and the formulated rules for the transition to stochastic differential equations in the Langevin form. Numerical experiments for the studied models are carried out using the developed software package. Algorithms for generating trajectories of the Wiener process and multipoint distributions, as well as modifications of the Runge–Kutta method, are used. The comparative analysis of deterministic and stochastic models is carried out. The conditions under which stochastization has a little effect on the stability of the system are studied. Some formulations of population dynamics optimal control problems in models are proposed. The results can be applied in problems of synthesis, optimal control and stability analysis of generalized models of interconnected communities dynamics. © Springer Nature Switzerland AG 2020.