The ease of converting electricity into other energies has caused human activities to be highly dependent on it. Environmental issues, limited resources, unfair distribution of resources and the strong dependence of countries' economies on energy have caused more attention to be paid to optimizing the mix of electricity producing resources. Also, different goals are proposed in policy-making and comprehensive planning, which are in conflict with each other; so It’s important to optimize the composition of the energy production portfolio based on what purpose. In this research, the electricity generation portfolio is a combination of fossil, renewable and nuclear energy groups, and optimization is done using the genetic algorithm method with MATLAB software in single-objective (GA) and multi-objective (NSGA-II) modes. The comparison of optimization methods showed that the share of energies for single-objective optimization based on economic index is different from modes based on environmental index and Multi-purpose optimization. Through multi-objective optimization, a set of solutions is introduced, each of which fulfills one of the objectives at an acceptable level. In other words, achieving general optimal points is more likely than single-objective mode. single-objective optimization usually introduces local optimal points and leads to misguidance and moving away from the main goal.