This paper presents a master-slave methodology for solving the problem regarding the operation of photovoltaic distributed generation (PV DG) systems in electrical distribution networks. The master stage generates potential active power dispatch configurations for three solar panels over a 24-hour period using the population genetic algorithm (PGA), the particle swarm optimizer (PSO), and the Monte Carlo algorithm (MCA). The slave stage is entrusted with evaluating the objective function and the constraints of each configuration provided by the master stage, utilizing the power flow based on the successive approximations method. To validate the effectiveness of the methodology, a 69-node test system from the literature is employed. This system has been adapted to the demand and generation conditions of the city of Medellín, Colombia. The model proposed in this work aims to minimize power losses and reduce <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$CO_{2}$</tex> emissions from a single-objective perspective. The results obtained demonstrate the effectiveness of the PGA algorithm the compared to the PSO and the MCA.