Our main objective is to evaluate the performance of a new method to optimize the energy management of a production system composed of six cogeneration units using artificial intelligence. The optimization criterion is economic and environmental in order to minimize the total fuel cost, as well as the reduction of polluting gas emissions such as COx, NOx and SOx. First, a statistical model has been developed to determine the power that the cogeneration units can provide. Then, an economic model of operation was developed: fuel consumption and pollutant gas emissions as a function of the power produced. Finally, we studied the energy optimization of the system using genetic algorithms (GA), and contribute to the research on improving the efficiency of the studied power system. The GA has a better optimization performance, it can easily choose satisfactory solutions according to the optimization objectives, and compensate for these defects using its own characteristics. These characteristics make GA have outstanding advantages in iterative optimization. The robustness of the proposed algorithm is validated by testing six cogeneration units, and the obtained simulation results of the proposed system prove the value and effectiveness of GA for efficiency improvement as well as operating cost minimization.