The development of existing networks and their transformation in smart grids is a desiderate to be implemented in smart cities. The optimization of these networks, considering the rapid increase of consumption and integration of smallcapacity sources is required. Over time, more and more mathematical methods, and models for solving optimization problems have been developed. With the advent of computer processes and digitization, programs have been developed that can solve mathematical models and apply optimization methods to find an optimal solution quickly and efficiently. In this paper are presented two methods for solving the transportation problem with intermediate centers.