optimal power flow by considering the nonsmooth cost curve using the meta-heuristic algorithm method, namely particle swarm optimization (PSO), in the 150 kV Sulselrabar electrical system. In this study, the PSO algorithm was used to optimize optimal power flow so that the cheapest generation price was obtained with a non-smooth cost curve while still considering the limitations of similarity and inequality. In this study, the PSO algorithm was used to optimize optimal power flow so that the cheapest generation price was obtained with a non-smooth cost curve while still considering the limitations of similarity and inequality. From the results of generation optimization using the particle swarm method, it produces the lowest generation costs compared to other methods, namely Rp. 93,498,916.10/hour to generate power of 270.14 MW with losses of 25.73 MW. The Particle Swarm Optimization (PSO) method is able to reduce the cost of generating the Sulselrabar system by Rp. 34,382,857.58 per hour, or 26.89%. From the results of generation optimization using the ant colony method, it resulted in a total generation cost of Rp. 94670335.98 per hour to generate power of 270,309 MW with losses of 25,91 MW. The ant colony method is able to reduce the cost of generating the Sulselrabar system by Rp. 33,211,437.70 per hour, or 25.98%. From the results of generation optimization using the Lagrange method, it resulted in a total generation cost of Rp. 117,121,631.08 per hour to generate power of 339.4 MW with losses of 25,016 MW. The Lagrange method is able to reduce the cost of generating the Sulselrabar system by Rp. 10,760,142.60 per hour, or 8.41%. The artificial intelligence method based on Particle Swarm Optimization (PSO) can well perform optimization of optimal power flow, based on the results of the analysis, which obtained the cheapest generation cost compared to the comparison methods, the Lagrange Method and the Ant Colony Artificial Intelligence Method.