# Optimization of the Contracted Electric Power by Means of Genetic Algorithms

^{*}

## Abstract

**:**

## 1. Introduction

- Charges for capacity or access, based on the amount of electrical power (€/kW) demanded from the grid and expected by the user to be guaranteed.
- Charges for active energy consumed, based on the cost of the price of the energy (€/kWh) demanded by the end user.
- Other charges, such as taxes, environmental commitments, penalties, etc.

## 2. Problem Description

## 3. Solution Method

- Population size: This parameter controls the sample size for each population. 100 individuals.
- Crossover operator and crossover rate: The crossover operator creates a new chromosome by combining parts of two (or more) parent chromosomes. In this paper, linear crossover, which consists of taking two chromosome (treating it as vectors) and creating a linear combination of this vectors as result, was used. The crossover rate used here was 0.8 (80%).
- Mutation operator and mutation rate: the mutation operator mutates a specific gene over the whole population, and prevents a population from converging to a local minimum by stopping the solution to become too close to one another. Although most of the search was performed by crossover, mutation can be vital to provide the diversity to the population. The mutation rate used here was 0.03 (3%).
- Selection mechanism: selectors are responsible for selecting a given number of individuals from the population, then obtaining survivors and offspring. The selection mechanism used here was the roulette-wheel selector, which is a fitness proportional selector that applies less selective pressure over than other strategies such as tournament selector.
- Termination condition: termination condition is the criteria to determine when the genetic algorithm should end. The termination condition used here was that the algorithm to stop its steady state. In our case, the algorithm stopped when it reached the 100th generation without improvement.

## 4. Empirical Study

#### 4.1. Case Study: A Spanish University

#### 4.2. Results and Discussion

## 5. Conclusions

## Author Contributions

## Funding

## Acknowledgments

## Conflicts of Interest

## References

- Jamasb, T.; Pollitt, M. Electricity market reform in the European Union: Review of progress toward liberalization and integration. Energy J.
**2005**, 26, 11–41. [Google Scholar] [CrossRef] - Joskow, P.L. Lessons Learned from the Electricity Market Liberalization; MIT Center for Energy and Environmental Policy Research, Massachusetts Institute of Technology: Cambridge, MA, USA, 2008. [Google Scholar]
- Gómez San Román, T. Electricity Economics: Regulation and Deregulation; Wiley-IEEE Press: Piscataway, NJ, USA, 2003. [Google Scholar]
- Conejo, A.J.; Carrión, M.; Morales, J.M. Decision Making Under Uncertainty in Electricity Markets; Springer: Berlin/Heidelberg, Germany, 2010; Volume 1. [Google Scholar]
- Fallah, S.; Deo, R.; Shojafar, M.; Conti, M.; Shamshirband, S. Computational intelligence approaches for energy load forecasting in smart energy management grids: State of the art, future challenges, and research directions. Energies
**2018**, 11, 596. [Google Scholar] [CrossRef] - Wu, Y.K. Comparison of pricing schemes of several deregulated electricity markets in the world. In Proceedings of the 2005 IEEE/PES Transmission and Distribution Conference and Exhibition: Asia and Pacific, Dalian, China, 18 August 2005; IEEE: Piscataway, NJ, USA, 2005; pp. 1–6. [Google Scholar]
- Ma, J. On-grid electricity tariffs in China: Development, reform and prospects. Energy Policy
**2011**, 39, 2633–2645. [Google Scholar] [CrossRef] - Fernández, M.; Zorita, A.; García-Escudero, L.; Duque, O.; Moríñigo, D.; Riesco, M.; Muñoz, M. Cost optimization of electrical contracted capacity for large customers. Int. J. Electr. Power Energy Syst.
**2013**, 46, 123–131. [Google Scholar] [CrossRef] - Berrie, T.W. Electricity Economics and Planning; Number 16; IET: Stevenage, UK, 1992. [Google Scholar]
- Glover, F.W.; Kochenberger, G.A. Handbook of Metaheuristics; Springer Science and Business Media: Berlin, Germany, 2006; Volume 57. [Google Scholar]
- Martí, R.; Pardalos, P.M.; Resende, M.G. Handbook of Heuristics; Springer: Berlin/Heidelberg, Germany, 2018. [Google Scholar]
- Goldberg, D.E. Genetic Algorithms; Pearson Education India: Chennai, India, 2006. [Google Scholar]
- Guerrero, M.; Montoya, F.G.; Baños, R.; Alcayde, A.; Gil, C. Community detection in national-scale high voltage transmission networks using genetic algorithms. Adv. Eng. Inf.
**2018**, 38, 232–241. [Google Scholar] [CrossRef] - Montoya, F.G.; Alcayde, A.; Arrabal-Campos, F.M.; Baños, R. Quadrature Current Compensation in Non-Sinusoidal Circuits Using Geometric Algebra and Evolutionary Algorithms. Energies
**2019**, 12, 692. [Google Scholar] [CrossRef] - Wilhelmstötter, F. JENETICS Library User’s Manual; Franz Wilhelmstötter: Wien, Austria, 2018. [Google Scholar]
- Kaya, H.; Gündüz-Öğüdücü, Ş. SAGA: A novel signal alignment method based on genetic algorithm. Inf. Sci.
**2013**, 228, 113–130. [Google Scholar] [CrossRef] - Lin, Q.; Li, J.; Du, Z.; Chen, J.; Ming, Z. A novel multi-objective particle swarm optimization with multiple search strategies. Eur. J. Oper. Res.
**2015**, 247, 732–744. [Google Scholar] [CrossRef] - Kar, A.K. Bio inspired computing—A review of algorithms and scope of applications. Expert Syst. Appl.
**2016**, 59, 20–32. [Google Scholar] [CrossRef] - Suganthi, S.; Devaraj, D.; Ramar, K.; Thilagar, S.H. An improved differential evolution algorithm for congestion management in the presence of wind turbine generators. Renew. Sustain. Energy Rev.
**2018**, 81, 635–642. [Google Scholar] [CrossRef] - Durillo, J.J.; Nebro, A.J. jMetal: A Java framework for multi-objective optimization. Adv. Eng. Softw.
**2011**, 42, 760–771. [Google Scholar] [CrossRef]

**Figure 1.**Spanish tariff structure (tariff 6.1. A: six periods for consumers with >1 kV and >450 kW).

**Figure 2.**Example of the contribution of surplus power and contracted electric power to final power cost.

**Figure 9.**Convergence history of feasible solutions obtained by the 50 independent runs of the genetic algorithm. Numer of executions in horizontal axis and fitness in vertical axis. Every run has a different color.

**Table 1.**Yearly prices of contracted electricity power and energy for tariff 6.1A (HV) in Spain. P1 is the most expensive period, while P6 is the cheapest one.

P1 | P2 | P3 | P4 | P5 | P6 | |
---|---|---|---|---|---|---|

Power (€/kW year) | 39.139427 | 19.586654 | 14.334178 | 14.334178 | 14.334178 | 6.540177 |

Energy (€/kWh) | 0.026674 | 0.019921 | 0.010615 | 0.005283 | 0.003411 | 0.002137 |

**Table 2.**Results obtained by the genetic algorithm, particle swarm optimization (PSO) and differential evolution (DE) (50 independent runs).

GA | PSO | DE | ||||
---|---|---|---|---|---|---|

Fitness (€) | Time (ms) | Fitness (€) | Time (ms) | Fitness (€) | Time (ms) | |

Min | 215,653.4 | 506 | 215,653.4 | 101 | 215,653.4 | 4073 |

Mean | 215,653.4 | 629 | 215,653.6 | 200 | 215,823.2 | 4491 |

Max | 215,653.4 | 1165 | 215,661.1 | 905 | 217,356.6 | 7487 |

Std. dev | 0.00 | 106 | 1.09 | 119 | 516.11 | 694 |

Solution | |||
---|---|---|---|

Genetic Algorithm | Real Electricity Bill | ||

Contracted power (P1 to P6) | [1729,1729,1729,1729,1729,1729] | [1900,1900,1900,1900,1900,2500] | |

Cost (€) | Power term | 187,196.82 | 209,634.91 |

Excess power | 28,456.60 | 13,988.33 | |

Total | 215,653.42 | 223,623.24 |

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Alcayde, A.; Baños, R.; Arrabal-Campos, F.M.; Montoya, F.G.
Optimization of the Contracted Electric Power by Means of Genetic Algorithms. *Energies* **2019**, *12*, 1270.
https://doi.org/10.3390/en12071270

**AMA Style**

Alcayde A, Baños R, Arrabal-Campos FM, Montoya FG.
Optimization of the Contracted Electric Power by Means of Genetic Algorithms. *Energies*. 2019; 12(7):1270.
https://doi.org/10.3390/en12071270

**Chicago/Turabian Style**

Alcayde, Alfredo, Raul Baños, Francisco M. Arrabal-Campos, and Francisco G. Montoya.
2019. "Optimization of the Contracted Electric Power by Means of Genetic Algorithms" *Energies* 12, no. 7: 1270.
https://doi.org/10.3390/en12071270