Skip to main content

Modified grasshopper optimization framework for optimal power flow solution


This paper proposes a modified grasshopper optimization algorithm (MGOA) to solve the optimal power flow (OPF) problem. The conventional GOA is a recent optimization technique that is conceptualized from the natural lifestyle of grasshopper including their movement and migration. The MGOA is based on modifying the mutation process in the conventional GOA in order to avoid trapping into local optima. Different single- and multi-objective functions are solved using the proposed optimization technique. These objective functions consist of quadratic fuel cost minimization, emission cost minimization, active power loss minimization, quadratic fuel cost and active power loss minimization, quadratic fuel cost minimization and voltage profile improvement, quadratic fuel cost minimization and voltage stability improvement, quadratic fuel cost minimization and emission minimization, quadratic fuel cost and power loss minimization, voltage profile and voltage stability improvement. The proposed technique is validated using standard IEEE 30-bus, IEEE 57-bus, and IEEE 118-bus test systems with thirteen case studies. Simulation results reveal the better performance and superiority of the proposed technique to solve various OPF problems compared with well-recognized evolutionary optimization techniques stated in the literature review.

This is a preview of subscription content, access via your institution.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18


A i :

The wind effects

a i, b i, c i :

Cost coefficient of the i-th generator

C :

Factor to reduce repulsion, comfort zone, and attraction zone

c 1 and c 2 :

Social behavior coefficients

d ij :

Distance between the i-th and j-th grasshoppers

\( \widehat{{d_{ij}}} \) :

Unit vector between the i-th and j-th grasshoppers

\( \widehat{{e_{\text{g}}}} \) :

Unit vector in the direction of earth center

\( \widehat{{e_{\text{w}}}} \) :

Unit vector in the direction of wind

f :

Attraction strength

g i(x, u):

Equality constraints

g :

The gravitational constant

G i :

The gravitational force

G ij, B ij :

Conductance and susceptance of the admittance matrix

h i(x, u):

Inequality constraints

j :

Number of subjects

i :

Teaching–learning cycle

k :

The population size for TLBO

K P, K Q, K V, K S :

Penalty factors of active, reactive power, voltage, and apparent power

K w :

Variable bandwidth

l :

Length of attraction

lbd, ubd :

Lower and upper limit in D-th dimension

L j :

Voltage stability local indicator of bus j

M j,i :

The average result of learner

N :

Population size (the number of individuals)


Number of buses


Number of shunt compensators


Number of generators


Number of generation buses


Number of buses


Number of shunt compensators


Number of generators


Number of generation buses

N par :

Dimension of a problem (GA problem)


Number of load buses


Number of transmission lines


The number of regulating transformers

o :

Constant drift

\( P_{{G_{1}}} \) :

Active power generation of slack bus

\( P_{{G_{1}}}^{\min},P_{{G_{1}}}^{\max} \) :

Active power generation limits of slack bus

\( P_{{G_{i}}}^{\min},P_{{{\text{G}}_{i}}}^{\max} \) :

Active power generation limits of bus i

P G, P D :

Active power generation and load demand, respectively

P loss, Q loss :

Active and reactive power transmission losses

\( {\text{PAR}}_{ {\rm max} } \), \( {\text{PAR}}_{ {\rm min} } \) :

Limits of pitch adjusting rate

p gd :

The complete outstanding position

\( p_{{N_{\text{par}}}} \) :

Chromosome encoded

p id :

The outstanding position of particle i


The probability of the selected chromosome

Q C :

Shunt VAR compensation

Q G, Q D :

Reactive power generation and load demand

\( Q_{{{\text{G}}_{i}}}^{\min},Q_{{{\text{G}}_{i}}}^{\max} \) :

Reactive power generation limits of the shunt VAR

r 1, r 2, and r 3 :

Random numbers lie in [0,1]

S i :

The social relationship interaction

\( S_{{{\text{l}}_{i}}},S_{ {\rm max} } \) :

Apparent power flow of ith line and its maximum

\( T_{i}^{ {\rm min} },T_{i}^{ {\rm max} } \) :

Upper and lower limits of regulating transformer i

T F :

The teaching factor

u :

Vector of the control variables

\( v_{id} \left({t + 1} \right) \) :

The existing position of particle i

\( V_{{{\text{L}}_{i}}}^{ {\rm min} },V_{{{\text{L}}_{i}}}^{ {\rm max} } \) :

Upper and lower limits of voltage magnitude load bus i

\( V_{{{\text{L}}_{i}}} \) :

Voltage magnitude at load bus i


Load bus voltage deviation

\( V_{{{\text{G}}_{i}}} \) :

Voltage magnitude at PV buses

w :

The inertia constant

x :

Vector of dependent variables or state variables

X i :

Position of i-th grasshopper

\( x_{id} (t) \) :

The existing position of particle i

\( X_{{i\_{\text{new}}}} \) :

Mutation vector

x max, x min :

State variable limits

Y ij :

Admittance matrix between bus i and bus j

γ i, β i, α i, ζ i, and λ i :

Coefficients of the i-th generator emission

Y ij :

Admittance matrix between bus i and bus j

γ i, β i, α i, ζ i, and λ i :

Coefficients of the i-th generator emission

θ :

Polar angle

δ ij :

Phase angle difference between buses i and j

\( \lambda_{{L_{ {\rm max} }}} \) :

Weighting factor of the Lmax with cost term

λ i :

Weighting factor of the emission with the cost term

λ VD :

Weighting factor of the VD term with the cost term


  1. Duman S, Güvenç U, Sönmez Y, Yörükeren N (2012) Optimal power flow using gravitational search algorithm. Energy Convers Manag 59:86–95

    Article  Google Scholar 

  2. Hazra J, Sinha A (2011) A multi-objective optimal power flow using particle swarm optimization. Int Trans Electr Energy Syst 21:1028–1045

    Google Scholar 

  3. Lee K, Park Y, Ortiz J (1985) A united approach to optimal real and reactive power dispatch. IEEE Trans Power Appar Syst 5:1147–1153

    Article  Google Scholar 

  4. Spall JC (2005) Introduction to stochastic search and optimization: estimation, simulation, and control, vol 65. Wiley, Hoboken

    MATH  Google Scholar 

  5. Back T (1996) Evolutionary algorithms in theory and practice: evolution strategies, evolutionary programming, genetic algorithms. Oxford University Press, Oxford

    MATH  Google Scholar 

  6. Hoos HH, Stützle T (2004) Stochastic local search: foundations and applications. Elsevier, Amsterdam

    MATH  Google Scholar 

  7. Kirkpatrick S (1984) Optimization by simulated annealing: quantitative studies. J Stat Phys 34:975–986

    MathSciNet  Article  Google Scholar 

  8. Talbi E-G (2009) Metaheuristics: from design to implementation, vol 74: Wiley, Hoboken

    Book  MATH  Google Scholar 

  9. Kanarachos A, Koulocheris D, Vrazopoulos H (2003) Evolutionary algorithms with deterministic mutation operators used for the optimization of the trajectory of a four-bar mechanism. Math Comput Simul 63:483–492

    MathSciNet  Article  MATH  Google Scholar 

  10. Gogna A, Tayal A (2013) Metaheuristics: review and application. J Exp Theor Artif Intell 25:503–526

    Article  Google Scholar 

  11. Yang X-S, Cui Z, Xiao R, Gandomi AH, Karamanoglu M (2013) Swarm intelligence and bio-inspired computation: theory and applications. Newnes, Amsterdam

    Book  Google Scholar 

  12. Avriel M (2003) Nonlinear programming: analysis and methods. Courier Corporation, North Chelmsford

    MATH  Google Scholar 

  13. Davis L (1991) Handbook of genetic algorithms. Van Nostrand Reinhold. ISBN-13: 978-0442001735

  14. Rechenberg I (1978) Evolutionsstrategien. In: Schneider B, Ranft U (eds) Simulationsmethoden in der Medizin und Biologie, vol 8. Springer, Berlin, Heidelberg, pp 83–114

    Chapter  Google Scholar 

  15. Koza JR (1992) Genetic programming: on the programming of computers by means of natural selection, vol 1. MIT Press, Cambridge

    MATH  Google Scholar 

  16. Simon D (2008) Biogeography-based optimization. IEEE Trans Evol Comput 12:702–713

    Article  Google Scholar 

  17. Storn R, Price K (1997) Differential evolution–a simple and efficient heuristic for global optimization over continuous spaces. J Global Optim 11:341–359

    MathSciNet  Article  MATH  Google Scholar 

  18. Wang Y, Li H-X, Huang T, Li L (2014) Differential evolution based on covariance matrix learning and bimodal distribution parameter setting. Appl Soft Comput 18:232–247

    Article  Google Scholar 

  19. Wang Y, Cai Z, Zhang Q (2011) Differential evolution with composite trial vector generation strategies and control parameters. IEEE Trans Evol Comput 15:55–66

    Article  Google Scholar 

  20. Wang Y, Cai Z, Zhang Q (2012) Enhancing the search ability of differential evolution through orthogonal crossover. Inf Sci 185:153–177

    MathSciNet  Article  Google Scholar 

  21. Shaheen AM, El-Sehiemy RA, Farrag SM (2016) Solving multi-objective optimal power flow problem via forced initialised differential evolution algorithm. IET Gener Transm Distrib 10:1634–1647

    Article  Google Scholar 

  22. Kirkpatrick S, Gelatt CD, Vecchi MP (1983) Optimization by simulated annealing. Science 220:671–680

    MathSciNet  Article  MATH  Google Scholar 

  23. Černý V (1985) Thermodynamical approach to the traveling salesman problem: an efficient simulation algorithm. J Optim Theory Appl 45:41–51

    MathSciNet  Article  MATH  Google Scholar 

  24. Erol OK, Eksin I (2006) A new optimization method: big bang–big crunch. Adv Eng Softw 37:106–111

    Article  Google Scholar 

  25. Rashedi E, Nezamabadi-Pour H, Saryazdi S (2009) GSA: a gravitational search algorithm. Inf Sci 179:2232–2248

    Article  MATH  Google Scholar 

  26. Kaveh A, Mahdavi V (2014) Colliding bodies optimization method for optimum discrete design of truss structures. Comput Struct 139:43–53

    Article  Google Scholar 

  27. Eberhart R, Kennedy J (1995) A new optimizer using particle swarm theory. In: Proceedings of the sixth international symposium on micro machine and human science, 1995. MHS’95, pp 39–43

  28. Adaryani MR, Karami A (2013) Artificial bee colony algorithm for solving multi-objective optimal power flow problem. Int J Electr Power Energy Syst 53:219–230

    Article  Google Scholar 

  29. Mirjalili S (2015) Moth-flame optimization algorithm: a novel nature-inspired heuristic paradigm. Knowl-Based Syst 89:228–249

    Article  Google Scholar 

  30. Gandomi AH, Alavi AH (2012) Krill herd: a new bio-inspired optimization algorithm. Commun Nonlinear Sci Numer Simul 17:4831–4845

    MathSciNet  Article  MATH  Google Scholar 

  31. Singh RP, Mukherjee V, Ghoshal S (2015) Particle swarm optimization with an aging leader and challengers algorithm for optimal power flow problem with FACTS devices. Int J Electr Power Energy Syst 64:1185–1196

    Article  Google Scholar 

  32. Suzuki M (2016) Adaptive parallel particle swarm optimization algorithm based on dynamic exchange of control parameters. Am J Oper Res 6:401

    Article  Google Scholar 

  33. Mirjalili S, Mirjalili SM, Lewis A (2014) Grey wolf optimizer. Adv Eng Softw 69:46–61

    Article  Google Scholar 

  34. Mohamed A-AA, Mohamed YS, El-Gaafary AA, Hemeida AM (2017) Optimal power flow using moth swarm algorithm. Electr Power Syst Res 142:190–206

    Article  Google Scholar 

  35. Rao RV, Savsani VJ, Vakharia D (2012) Teaching–learning-based optimization: an optimization method for continuous non-linear large scale problems. Inf Sci 183:1–15

    MathSciNet  Article  Google Scholar 

  36. Rao RV, Savsani VJ, Vakharia D (2011) Teaching–learning-based optimization: a novel method for constrained mechanical design optimization problems. Comput Aided Des 43:303–315

    Article  Google Scholar 

  37. Glover F (1989) Tabu search—part I. ORSA J Comput 1:190–206

    Article  MATH  Google Scholar 

  38. Glover F (1990) Tabu search—part II. ORSA J Comput 2:4–32

    Article  MATH  Google Scholar 

  39. Geem ZW, Kim JH, Loganathan G (2001) A new heuristic optimization algorithm: harmony search. Simulation 76:60–68

    Article  Google Scholar 

  40. Kashan AH (2009) League championship algorithm: a new algorithm for numerical function optimization. In: International conference of soft computing and pattern recognition, 2009. SOCPAR’09, pp 43–48

  41. Kashan AH (2011) An efficient algorithm for constrained global optimization and application to mechanical engineering design: league championship algorithm (LCA). Comput Aided Des 43:1769–1792

    Article  Google Scholar 

  42. Ghasemi M, Ghavidel S, Gitizadeh M, Akbari E (2015) An improved teaching–learning-based optimization algorithm using Lévy mutation strategy for non-smooth optimal power flow. Int J Electr Power Energy Syst 65:375–384

    Article  Google Scholar 

  43. Wolpert DH, Macready WG (1997) No free lunch theorems for optimization. IEEE Trans Evol Comput 1:67–82

    Article  Google Scholar 

  44. Saremi S, Mirjalili S, Lewis A (2017) Grasshopper optimisation algorithm: theory and application. Adv Eng Softw 105:30–47

    Article  Google Scholar 

  45. Holland JH (1992) Adaptation in natural and artificial systems: an introductory analysis with applications to biology, control, and artificial intelligence. MIT Press, Cambridge

    Book  Google Scholar 

  46. Hristakeva M, Shrestha D (2004) Solving the 0–1 knapsack problem with genetic algorithms. In: Midwest instruction and computing symposium

  47. Bingul Z, Sekmen A, Palaniappan S, Zein-Sabatto S (2000) Genetic algorithm applied to real time multiobjective optimization problems. In: IEEE SOUTHEASTCON, pp 95–103

  48. Mitchell M (1995) Genetic algorithms: an overview. Complexity 1:31–39

    Article  MATH  Google Scholar 

  49. Haupt RL, Haupt SE, Haupt SE (1998) Practical genetic algorithms, vol 2: Wiley, New York

    MATH  Google Scholar 

  50. Bajpai P, Kumar M (2010) Genetic algorithm–an approach to solve global optimization problems. Indian J Comput Sci Eng 1:199–206

    Google Scholar 

  51. Mitchell M (1998) An introduction to genetic algorithms. MIT Press, Cambridge

    MATH  Google Scholar 

  52. Yang X-S (2008) Firefly algorithm. Nat Inspired Metaheuristic Algorithms 20:79–90

    Google Scholar 

  53. Kennedy J, Eberhart RC (1995) Particle swarm optimization. In: Proceedings of IEEE international conference on neural networks IV

  54. Shi Y, Eberhart R (1998) A modified particle swarm optimizer. In: The 1998 IEEE international conference on evolutionary computation proceedings, 1998. IEEE World Congress on computational intelligence, pp 69–73

  55. Pandey S, Wu L, Guru SM, Buyya R (2010) A particle swarm optimization-based heuristic for scheduling workflow applications in cloud computing environments. In: 2010 24th IEEE international conference on advanced information networking and applications (AINA), pp 400–407

  56. Van Den Bergh F (2001) An analysis of particle swarm optimizers. University of Pretoria South Africa, Pretoria

    Google Scholar 

  57. Reyes-Sierra M, Coello CC (2006) Multi-objective particle swarm optimizers: a survey of the state-of-the-art. Int J Comput Intell Res 2:287–308

    MathSciNet  Google Scholar 

  58. He Y, Ma WJ, Zhang JP (2016) The parameters selection of PSO algorithm influencing on performance of fault diagnosis. In: MATEC Web of conferences, p 02019

  59. Yoshida H (1999) A particle swarm optimization for reactive power and voltage control considering voltage stability. In: Proceedings of IEEE international conference on intelligent system applications to power systems, 1999

  60. Ourique CO, Biscaia EC Jr, Pinto JC (2002) The use of particle swarm optimization for dynamical analysis in chemical processes. Comput Chem Eng 26:1783–1793

    Article  Google Scholar 

  61. Rao R, Patel V (2012) An elitist teaching-learning-based optimization algorithm for solving complex constrained optimization problems. Int J Ind Eng Comput 3:535–560

    Google Scholar 

  62. Varadarajan M, Swarup KS (2008) Solving multi-objective optimal power flow using differential evolution. IET Gener Transm Distrib 2:720–730

    Article  Google Scholar 

  63. Sivasubramani S, Swarup K (2011) Sequential quadratic programming based differential evolution algorithm for optimal power flow problem. IET Gener Transm Distrib 5:1149–1154

    Article  Google Scholar 

  64. Sivasubramani S, Swarup K (2011) Multi-objective harmony search algorithm for optimal power flow problem. Int J Electr Power Energy Syst 33:745–752

    Article  Google Scholar 

  65. Yuryevich J, Wong KP (1999) Evolutionary programming based optimal power flow algorithm. IEEE Trans Power Syst 14:1245–1250

    Article  Google Scholar 

  66. Abido MA (2003) Environmental/economic power dispatch using multiobjective evolutionary algorithms. IEEE Trans Power Syst 18:1529–1537

    Article  Google Scholar 

  67. He S, Wen J, Prempain E, Wu Q, Fitch J, Mann S (2004) An improved particle swarm optimization for optimal power flow. In: 2004 international conference on power system technology, 2004. PowerCon 2004, pp 1633–1637

  68. Kessel P, Glavitsch H (1986) Estimating the voltage stability of a power system. IEEE Trans Power Delivery 1:346–354

    Article  Google Scholar 

  69. Mahdad B, Srairi K (2015) Blackout risk prevention in a smart grid based flexible optimal strategy using Grey Wolf-pattern search algorithms. Energy Convers Manag 98:411–429

    Article  Google Scholar 

  70. Simpson SJ, McCaffery AR, Haegele BF (1999) A behavioural analysis of phase change in the desert locust. Biol Rev 74:461–480

    Article  Google Scholar 

  71. Rogers SM, Matheson T, Despland E, Dodgson T, Burrows M, Simpson SJ (2003) Mechanosensory-induced behavioural gregarization in the desert locust Schistocerca gregaria. J Exp Biol 206:3991–4002

    Article  Google Scholar 

  72. Topaz CM, Bernoff AJ, Logan S, Toolson W (2008) A model for rolling swarms of locusts. Eur Phys J 157:93–109

    Google Scholar 

  73. Lewis A (2009) LoCost: a spatial social network algorithm for multi-objective optimisation. In: IEEE Congress on evolutionary computation, 2009. CEC’09, pp 2866–2870

  74. Alsac O, Stott B (1974) Optimal load flow with steady-state security. IEEE Trans Power Appar Syst 3:745–751

    Article  Google Scholar 

  75. Yao X, Liu Y, Lin G (1999) Evolutionary programming made faster. IEEE Trans Evol Comput 3:82–102

    Article  Google Scholar 

  76. Zimmerman RD, Murillo-Sánchez CE, Thomas RJ (2011) MATPOWER: steady-state operations, planning, and analysis tools for power systems research and education. IEEE Trans Power Syst 26:12–19

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations


Corresponding author

Correspondence to Francisco Jurado.

Additional information

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.



See Tables 2, 3, 4, 5, 6, 7, 8, 9, 10 and 11.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Taher, M.A., Kamel, S., Jurado, F. et al. Modified grasshopper optimization framework for optimal power flow solution. Electr Eng 101, 121–148 (2019).

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI:


  • Modified grasshopper optimization technique
  • Optimal power flow
  • Power system optimization
  • Metaheuristic