Nonlinear models of the interconnected communities population dynamics are considered taking into account migration and competition. Formulations of optimal control problems are proposed for models with migration flows. The control quality criterion for a three-dimensional migration-population model is considered in the framework of optimal control problems with phase and mixed constraints. Computer research of nonlinear models with migration flows allowed us to obtain the results of numerical experiments on trajectory search and parameter estimation. To solve optimal control problems, we used numerical optimization methods and intelligent symbolic computing algorithms. These algorithms are based on the application of numerical optimization methods in combination with methods for generating control functions. The transition to the corresponding stochastic model with migration flows and optimal control is performed. In the stochastic case, the method of constructing self-consistent stochastic models is used. A comparative analysis of deterministic and stochastic models is carried out. The effects typical for controlled three-dimensional models with migration flows are revealed. Specialized software packages are used as tools for researching of models and solving of optimal control problems. These software packages implement algorithms for constructing trajectories, parametric optimization algorithms, and generating control functions, as well as numerical solutions of stochastic systems of differential equations. The obtained results can be used in problems of computer modeling of ecological, demographic and socio-economic systems, as well as in the problems of synthesis, optimal control and stability analysis of multidimensional stochastic models describing migration flows. © 2020 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). CEUR Workshop Proceedings (CEUR-WS.org)