Genetic Algorithms Application to Electric Power Systems

With the opening of the power industry to competition, the power system structure is changing. According to these changes, power system operation, planning, and control need modifications. In the past, utilities had to produce power to satisfy their customers with objective to minimize costs and all demand/reserve were met. However, it is not necessary in a restructured system. Under new structure, generation companies schedule their generators with objective to maximize their own profit without regard for system social benefit. Power and reserve prices become important factors in decision process.


Introduction
The economic operation problem in electric power systems involves the scheduling of both thermal and hydro generating units to minimize the cost of supplying the power requirements of the system over a certain period under specified system constraints.
With the opening of the power industry to competition, the power system structure is changing. According to these changes, power system operation, planning, and control need modifications. In the past, utilities had to produce power to satisfy their customers with objective to minimize costs and all demand/reserve were met. However, it is not necessary in a restructured system. Under new structure, generation companies schedule their generators with objective to maximize their own profit without regard for system social benefit. Power and reserve prices become important factors in decision process.
The optimal scheduling of thermal generating units in the electrical power system is called thermal UC. The Unit Commitment Problem (UCP) is the problem of selecting the generating units to be in service during a scheduling period and for how long. The committed units must meet the system load and reserve requirements at minimum operating cost, subject to a variety of constraints. To solve the UCP, another crucial problem must simultaneously be solved; the economic dispatch problem.
The Economic Dispatch Problem (EDP) is the optimal allocation of the load demand among the running units while satisfying the power balance equations and the unit's operating limits [1][2][3].
The UCP is obtained by considering many factors, including: decision-making arenas. NN have claimed intriguing successes in pattern-recognition applications, but have generally performed less than impressively in optimization settings. SA, TS and GA have the attractive feature of assured convergence under appropriate assumptions.
In the following section a brief description of the applicability of the GA for the UCP is presented:

Genetic algorithms application to the UCP
Genetic Algorithms (GAs) have become increasingly popular in recent years in science and engineering disciplines [31][32][33][34]. The GA, as a powerful tool to achieve global optima, has been successfully used for the solution of this complex optimization problem. Several papers have been published in solving the UCP using the GA .
The solution coding is the most important point in applying the GA to solve any optimization problem. Coding could be in a real or a binary form. Coded strings of solutions are called "chromosomes." A group of these solutions (chromosomes) are called population. Moving from one population of chromosomes to a new population is set by selection, together with a set of genetic operators of crossover, mutation and inversion. Since the UCP lends itself to the binary coding in which zero denotes the OFF state and a one represents the ON state, all published works used the binary coding. A candidate solution is a string whose length is the product of the number of generating units and the scheduling periods.
Fitness function is the second issue in solving the UCP using GA. In the literature the fitness function is constructed as the summation of the operating costs and penalty terms for constraints violations.
A basic advantage of the GA solution is that it can be easily converted to work on parallel computers. A disadvantage of the GA is that, since they are stochastic optimization algorithms, the optimality of the solution they provide cannot be guaranteed. However, the results reported indicate good performance of the method.
The following is a summary of a literature survey on solving the UCP using the GA : In 1994, D. Dasgupta et al. [35] presented a paper, which discusses the application of GA to solve the short term UCP. In this work, the problem is considered as a multi-period process and a simple GA is used for commitment scheduling. Each chromosome is encoded in the form of a position-dependent gene (bit string) representing the status of units available in the system, (on/off), at a specific time period. The fitness function is formulated by using a weighted sum of the objective function, and values of the penalty function based on the number of constraints violated and the extent of these violations.
Hong-Tzer Yang, Pai-Chuan Yang and Ching-Lien Huang, 1995, [36], proposed an innovative GA (GA) approach to solve the thermal UCP in power generation industry through a constraint satisfaction technique. Due to a large variety of constraints to be satisfied, the solution space of the UCP is highly nonconvex, and therefore the UCP cannot be solved efficiently by the standard GA.
Hong-Tzer Yang, Pai-Chuan Yang and Ching-Lien Huang [37] modified their previous algorithm [36]. Ramp rate constraints on the units being started up or shut down are tackled in the economic dispatch subprogram by limiting the associated maximum available capacities for generating. The proposed approach is shown to be well amenable to parallel implementation.
In 1995, X. Ma et al. [38] presented a new approach based on the GA to solve the UCP. The coding scheme used was the binary coding. A forced mutation operator was adopted to correct the solutions (or chromosomes) that do not satisfy the load demand and reserve constraints. The fitness function was constructed from the objective function and penalty terms for constraints violation. S. A. Kazarlis et al. [39], 1996, presented a GA solution to the UCP. The coding was implemented in a binary form. Fitness function was constructed from the objective function and penalty terms of constraints violation. A nonlinear transformation was used for fitness function scaling. With the technique of the varying quality function, the GA finally manages to locate the exact global optimum.
In 1996, P. C. Yang et al. [40] presented a practical approach for using the GA to solve the UCP. The implemented algorithm deals with the constraints in a different manner. The proposed algorithm, along with SA and LR is applied to solve a Taiwan power system consisting of 38-unit over a 24-hour period. With a reasonable computation time, the cost of the solution obtained by the GA approach was found to be the lowest among the three methods (GA, SA and LR).
S. O. Orero [41], 1996, proposed an enhanced GA approach for the UCP. The major difference between this approach and the previous ones is that it incorporates what was called 'a sequential decomposition logic', to provide a faster search mechanism. In this approach, the selection, mutation, and crossover operators are restricted to a single time interval. An advantage of this approach is that any constraints, which are already satisfied, cannot be violated later in the sequence. G. B. Sheble' et al. [42], 1996, presented a paper to discuss the applicability of the GA approach to the UCP and the EDP. The first half of the paper presented the problems that the author has faced, when applying the GA to the UCP. The two main problems encountered when using a GA with penalty methods are the crossover operator can introduce new constraints violations that were not in either parent, and the problem of selecting penalty values for satisfying the five considered constraints is hopeless. These two problems resulted in each generation of population members having a similar fitness or similar UC schedule cost as the preceding generation. In the second half of the paper an algorithm of solving the EDP using GA is implemented and successfully tested and compared with the lambda iteration method.
Maifeld, T.T. and Sheble, G.B. [43], presented a new UC scheduling algorithm. The proposed algorithm consists of using a GA with domain specific mutation operators. The proposed algorithm can easily accommodate any constraint that can be true hosted. Robustness of the proposed algorithm is demonstrated by comparison to a Lagrangian relaxation UC algorithm on three different electric utilities.
Arroyo, J.M, Conejo, A. and Jimenez, N. [44], addressed the UCP with a new idea of implementing an interior point GA conducted through heuristics to get a near optimal solution to the problem. The modeling framework provided was less restrictive than the frameworks provided by other approaches such as dynamic programming or Lagrangian relaxation. The CPU time requirement to solve problems of realistic size was moderate.

www.intechopen.com
In 1997, Mantawy, A.H., Abdel-Magid, Y.L. and Selim, S.Z. [45], presented a new GA approach to solve the UCP in electric power systems. In the proposed algorithm, coding the UCP solution is based on mixing binary and decimal representations. A fitness function is constructed from the total operating cost of the generating units without penalty terms. Genetic operators are implemented to enhance the search speed and to save memory space. The UCP is divided into two subproblems a combinatorial optimization problem and a nonlinear programming problem. The former is solved using the proposed GA while the latter problem is solved via a quadratic programming routine.
Mantawy, A.H., Abdel-Magid, Y.L. and Selim, S.Z. [46], presents an improved algorithm to the one in [143]. To improve the fine-tuning capabilities of the GA and escape from entrapment in local minimum, a special mutation operator based on a local search algorithm is designed. The new operator enhanced the speed of convergence and improved the quality of solution.
Zhao Hongwei, Yi Liangting, Wang Buyun, Cheng Gang and Yang Haiping [47], presented a revised GA for UCP. The model adjusts the parameters of GA automatically with the population evolution and different chromosomes. A new convergence rule is also given to enhance the convergence speed with global optimum reserved.
Hong-Tzer Yang, Pai-Chuan Yang and Ching-Lien Huang [48], proposed a parallel GA approach to solving the thermal UCP by using a constraint handling technique. The proposed topology of dual-direction ring is shown to be well amenable to parallel implementation of the GA for the UCP.
Zhu Mingyu, Cen Wenhui, Wang Mingyou and Zhang Peichao [49], proposed an enhanced GA to solve the UCP. The new features of the proposed algorithm include chromosome mapping, problem specific operators and local search technique. Significant improvements have been achieved with this implantation.
In 1999, Juste, K.A., Kita, H., Tanaka, E. and Hasegawa, J. [50] proposed algorithm to employ the evolutionary programming (EP) technique, in which populations of contending solutions are evolved through random changes, competition, and selection. The practical implementation of this procedure yielded satisfactory results.
F [50] proposed modification to counter the drawbacks of the GA which are their slow processing speed and their solution inconsistency. The method proposes a sequential UC implementation. It decouples a 24-hour UCP into 24 individual scheduling problems. The proposed modified GA algorithm was successfully tested with 6 generators system. Christiansen, J.C., Dortolina, C.A. and Bermudez, J.P. [52] presented a new implementation of GA to solve the UCP. The proposed algorithm includes the basic GA operators (cross over and mutation) besides five particular operators that proved to be very useful in order to obtain faster and more accurate solutions lowering the possibility of reaching local optimums.
In January 2002, Senjyu, T., Yamashiro, H., Uezato, K. and Funabashi, T. [53] present a new approach for thermal UCP. To handle the UCP constraints, some cording methods have been proposed. However, these methods require computation time. To overcome these problems, a new genetic operator based on unit characteristic classification and intelligent techniques generating initial populations are introduced.
In February 2002, Swarup, K.S. and Yamashiro, S. [54] presented a solution methodology of UCP using GA. Problem specific operators are proposed for the satisfaction of time dependent constraints. Problem formulation, representation and the simulation results for a 10 generator-scheduling problem are presented Haoyong Chen Xifan Wang [55] presented a new cooperative co-evolutionary algorithm (CCA) for UCP. CCA is an extension of the traditional GA (GA), which appears to have considerable potential for formulating and solving more complex problems by explicitly modeling the coevolution of cooperating species. This method combines the basic ideas of Lagrangian relaxation technique (LR) and GA to form a two-level approach.
In November 2002, Arroyo, J.M. and Conejo, A.J. [56] addressed the UCP of thermal units. This paper proposed a novel repair GA conducted through heuristics to achieve a near optimal solution to this problem. This optimization technique is directly parallelizable.
In August 2003, Mashhadi, H.R. and Shanechi, H.M. Lucas, C. [57] proposed an improved GA to solve the UCP. In order to improve the convergence of the GA, a new local optimizer for the UCP based on Lamarck theory in the evolution, has been proposed. This local optimizer, which tries to improve the fitness of one chromosome in the population, effectively uses the information generated in calculating the fitness.

Hybrid algorithms
Hybrid algorithms are also well known techniques for solving engineering problems. Hybrid algorithms try to make use of the merits of different methods. Hence, the aim is to improve the performance of algorithms that are based on a single method. The main objective of proposing an algorithm as a hybrid of two or more methods is to speed up the convergence and/or to get better quality of solutions than that obtained when applying the individual methods.
The following survey is divided into two parts: hybrid algorithms without the GA and hybrid algorithms with the GA

Hybrid algorithms with the GA
Many AI and classical optimization techniques have been hybridized with the GA to solve the UCP. The following is a summary of these algorithms: In 1994, Gerald B. Sheble' et al. [62] presented a genetic-based UCP algorithm. The algorithm uses the ES to satisfy some of the UCP constraints. The advantage of the algorithm is that the EDP routine is only used with the initialization and mutation subroutines. Since the mutation is a technique that changes a small percentage of the on/off status of the generating unit schedule, the only times ED is needed is for the hours where a mutation has occurred. An adaptive mutation operator is used.
In 1995, S. O. Orero et al. [65] proposed an algorithm to incorporate a PL scheme in a hybrid GA to solve the UCP. In the GA coding process, the solution string length is the product of the scheduling period T, and the number of generating units N. Accordingly; the search space of the GA is then equal to TxN 2 which is a very large number. Due to this problem, a premature convergence of the GA search has occurred. To counteract this problem, a method of decomposition was proposed to limit the GA search space to N 2 .
Mantawy, A.H., Abdel-Magid, Y.L. and Selim, S.Z. [68] presented a new algorithm based on integrating GA, TS and SA methods to solve the UCP. The core of the proposed algorithm is based on GAs. TS is used to generate new population members in the reproduction phase of the GA. A SA method is used to accelerate the convergence of the GA by applying the SA for all the population members. A new implementation of the GA is introduced. In the TS part of the proposed algorithm, a simple short-term memory procedure is used to counter the danger of entrapment at a local optimum, and the premature convergence of the GA. A simple cooling schedule has been implemented to apply the SA test in the algorithm.
Chuan-Ping Cheng, Chih-Wen Liu and Chun-Chang Liu [70][71][72] presented an application of a combined GA and LR methods for the UCP (LRGA). The proposed LRGA incorporates GA into LR method to update the Lagrangian multipliers and improve the performance of LR method in solving combinatorial optimization problems such as the UCP.
Mantawy, A.H., Abdel-Magid, Y.L. and Selim, S.Z. [67] presented a new algorithm based on integrating GA and TS to solve a fuzzy UCP model. The core of the proposed algorithm is based on the GA while TS is used to generate new population members in the reproduction phase of the GA. The uncertainties in the load demand and the spinning reserve constraints are formulated in a fuzzy logic (FL) frame. A fitness function is constructed from the total operating cost of the generating units with penalty term related fuzzy spinning reserve and load demand membership functions. In the TS part of the proposed algorithm, a simple short-term memory procedure is used to counter the danger of entrapment at a local optimum, and the premature convergence of the GA.
Mantawy, A.H [71] presented a fuzzy model for the UCP. The model takes the uncertainties in the forecasted load demand and the spinning reserve constraints in a fuzzy frame. The genetic algorithm (GA) approach is then used to solve the proposed fuzzy UCP model. In the implementation for the GA, coding of the UCP solutions is based on mixing binary and decimal representations. A fitness function is constructed from the total operating cost of the generating units plus a penalty term determined due to the fuzzy load and spinning reserve membership functions.
Gwo-Ching Liao and Ta-Peng Tsao. [73], introduced a hybrid GA/fuzzy system and tabu search method (GAFS-TS) for solving short-term thermal generating UCP. This system makes three important improvements to the GA. First, it generates a set of feasible UC schedules and then put the solution to TS. The GAFS has good global optima search capabilities, but poor local optima search capabilities. The TS method has good local optima search capabilities.

Unit Commitment Problem formulation
The Unit Commitment Problem (UCP) is the problem of selecting the generating units to be in service during a scheduling period and for how long. The committed units must meet the system load and reserve requirements at minimum operating cost, subject to a variety of constraints. The Economic Dispatch Problem (EDP) deals with the optimal allocation of the load demand among the running units while satisfying the power balance equations and units operating limits [1].
The solution of the UCP using artificial intelligence techniques requires three major steps:  A problem statement or, system modeling,  Rules for generating trial solutions, and  An efficient algorithm for solving the EDP.
Problem Statement: Modeling of power system components affecting the economic operation of the system is the most important step when solving the UCP. The degree of details in components modeling varies with the desired accuracy and the nature of the problem under study. The basic components of a power system include generating power stations, transformer, transmission network, and system load.
This work is concerned with thermal generating units scheduling. Hence it is assumed that the network is capable of transmitting the power generated to the load centers without neither losses nor network failures. This means that the network is assumed to be perfectly reliable. Consequently, the following basic engineering assumptions are made [1][2][3]:  The network interchange between the system under study and other systems is fixed. In the UCP under consideration, one is interested in a solution, which minimizes the total operating cost during the scheduling time horizon while several constraints are satisfied.
The objective function and the constraints of the UCP are described in Sections 3.1 and 3.2.

The objective function
The objective function of the UCP is represented by the total operating cost of thermal generating units, which contains two major parts; the production costs and the start-up costs.

The production cost
The major component of the operating cost, for thermal and nuclear units, is the power production cost of the committed units. The production cost is mainly the cost of fuel input per hour, while maintenance and labor contribute only to a small extent. Conventionally the unit production cost is expressed as a quadratic function of the unit output power as follows:

The start-up cost
The second component of the operating cost is the start-up cost. The start-up cost is attributed to the amount of energy consumed to bring the unit "ON" line. The start-up cost depends upon the down time of the unit. This can vary from maximum value, when the unit is started from cold state, to a much smaller value, where the unit was recently turned off.
Calculation of the start-up cost depends also on the treatment method for the thermal unit during down time periods. There are two methods for unit treatment during the OFF hours; the cooling method and the banking method.
The former method allows the boiler of the unit to cool down and then reheat back up to the operating temperature when recommitted on line.
In the latter method, the boiler operating temperature is maintained during the OFF time using an additional amount of energy.
The cooling method is used in the present work, due to its practicability when applied to real power systems. In this work, the start-up cost, for a unit i at time t, based on the cooling method, is taken in a more general form as follows: Accordingly, the overall operating cost of the generating units in the scheduling time horizon (i.e. objective function of the UCP) is

The constraints
The UCP is subject to many constraints depending on the nature of the power system under study. The constraints, which are taken into consideration in this work, may be classified into two main groups: system constraints and unit constraints.

System constraints
The system constraints, sometimes called coupling constraints, include also two categories: the load demand and the spinning reserve constraints.

Load demand constraints
The load demand constraint is the most important constraint in the UCP. It basically means that the generated power from all committed units must meet the system load demand. This is formulated in the so-called balance equation as follows:

Spinning reserve constraint
The spinning (operating) reserve is the total amount of generation capacity available from all units synchronized (spinning) on the system minus the present load demand. It is important to determine the suitable allocation of spinning reserve from two points of view: the reliability requirements and the economic aspects.

100
There are various methods for determining the spinning reserve [1,20,34,52]: The reserve is computed as a percentage of the forecasted load demand, or It is determined such that the system can make up for a loss of the highest rating unit in a given period of time, or Determination of the reserve requirements as a function of the system reliability, which is evaluated on a probabilistic basis.
The most commonly used approach is computing the reserve as a given prespecified amount, which is a percentage of the forecasted load demand, i.e.

Unit constraints
The constraints on the generating units (sometimes called local constraints) are described as follow:

Generation limits
The generation limits represent the minimum-loading limit below which it is not economical to load the unit, and the maximum loading limit above which the unit should not be loaded. These constraints could be formulated in a mathematical form as follows:

Units initial status constraint
The status of unit (e.g. hours of being ON or OFF) before the first hour in the proposed schedule is an important factor to determine whether its new status violates the minimum up/down constraints. Also, the initial status of the unit affects the start-up cost calculations.

Crew constraints
If the plant consists of two or more units, they cannot be turned ON at the same time due to some technical conditions or manpower availability.

Unit availability constraint
Due to some abnormal conditions, e.g. forced outage or maintenance of a unit, the unit may become unavailable. The unit may also be forced in service to increase reliability or stability of the system, hence the unit becomes must run or fixed at a certain output. Otherwise the unit is available. The availability constraint specifies the unit to be in one of the following different situations; unavailable, must run, available, or fixed output (MW).

Units derating constraint
During the lifetime of a unit its performance could be changed due to many conditions, e.g. aging factor, the environment, etc. These conditions may cause derating of the generating unit. Consequently, the unit maximum and minimum limits are changed.

The economic dispatch problem
The economic dispatch problem (EDP) is an essential problem when solving the UCP. Once a trial solution is generated, the corresponding operating cost of this solution is calculated by solving the EDP. Consequently, using an efficient and fast algorithm for modeling and solving the EDP improves the quality of the UCP solution, and therefore, the performance of the overall UCP algorithm.
In brief, the EDP for a one-hour in the scheduling time horizon could be formulated as the minimization of the summation of production costs of the committed units in this hour subjected to the load demand and unit limits constraints as follows: Subject to: Since the EDP is formulated in a quadratic function, the EDP is solved using a quadratic programming routine.

Overview
Genetic algorithms (GAs) have been developed by John Holland, his colleagues, and his students at the University of Michigan in the early 1970's [3,5,[122][123][124][125][126][127][128]. GAs have become increasingly popular in recent years in science and engineering disciplines. GAs have been quite successfully applied to optimization problems like wire routing, scheduling, adaptive control, game playing, cognitive modeling, transportation problems, traveling salesman problems, optimal control problems, etc.
GAs are general-purpose search techniques based on principles inspired from the genetic and evolution mechanisms observed in natural systems and populations of living beings. Their basic principle is the maintenance of a population of solutions to a problem (genotypes) in the form of encoded information individuals that evolve in time.
GAs are search methods based on the mechanics of natural selection and natural genetics. They combine survival of the strongest among string structures with a structured, yet random, information exchange. In every generation, a new set of artificially developed strings is produced using elements of the strongest of the old; an occasional new element is experimented with for enhancement. Although random in nature, genetic algorithms are not random search. They efficiently utilize historical information to predict new search points with expected improved performance. Furthermore, they are not fundamentally restricted by assumptions about the search space (assumptions concerning continuity, existence of derivatives uni-modality, and other matters). The genetic algorithm is an example of an optimization procedure that utilizes random choice as a mechanism to control the search through a coding of a parameter space.
GAs require the parameters of the optimization problem to be coded as a finite length string over some finite alphabet. In many optimization methods we migrate from a single point in the search space to the next using a transition rule to determine the next point. This point-topoint method is dangerous because it may lead to locating local minima (maxima) in multimodal (many peaked) search spaces. On the other hand, GAs work from a population of strings at the same time, climbing several peaks in parallel; hence, reducing the possibility of locating a false peak over methods that go point to point. The mechanics of a genetic algorithm are extremely simple, only involving copying strings and swapping partial strings.
A simple genetic algorithm that produces satisfactory results in many applications problems must have five components: A genetic representation for potential solution to the problem; "solution coding" A way to create an initial population of potential solutions; "Initialization" An evaluation function that plays the role of the environment, rating solutions in terms of their "fitness function", Values for various parameters that the GA uses (e.g. population size, probabilities of applying genetic operators, etc.); "parameters settings and selection"

Solution coding
GAs require the natural parameters set of the optimization problem to be coded as a finitelength string over some finite alphabet. Coding is the most important point in applying the GA to solve any optimization problem. Coding could be in a real or a binary form. Coded strings of solutions are called "chromosomes". A group of these solutions (chromosomes) are called population.
In this step, a coding scheme is selected to code the parameter subject to optimization. This will allow access to parameter features that are not apparent using the parameter default code. This access will allow more freedom and resolution for modifying the parameter features to arrive at the optimal solution.

Fitness function
The fitness function is the second important issue in solving optimization problems using GAs. It is often necessary to map the underlying natural objective function to a fitness function through one or more mappings. The first mapping is done to transform the objective function into a maximization problem rather than minimization to suit the GA concepts of selecting the fittest chromosome, which has the highest objective function.
A second important mapping is the scaling of the fitness function values. Scaling is an important step during the search procedures of the GA. This is done to keep appropriate levels of competition throughout a simulation. Without scaling, early on there is a tendency for a few superindividuals to dominate the selection process. Later on, when the population has largely converged, competition among population members is less strong and simulation tends to wander. Thus, Scaling is a useful process to prevent both the premature convergence of the algorithm and the random improvement that may occur in the late iterations of the algorithm. There are many methods for scaling such as linear, sigma truncation, and power law scaling [4]. Linear scaling is the most commonly used and will be discussed in details in Section 5.3. In the sigma truncation method, population variance information to preprocess raw fitness values prior to scaling is used. It is called sigma (  ) truncation because of the use of population standard deviation information; a constant is subtracted from raw fitness values as follows: In equation (5.1) the constant c is chosen as a reasonable multiple of the population standard deviation and negative results ( ' f <0) are arbitrarily set to 0. Following sigma truncation, fitness scaling can proceed as described without the danger of negative results.

Genetic algorithms operators
There are usually three operators in a typical GA; reproduction, crossover and mutation

www.intechopen.com
Reproduction is a process in which individual strings are copied according to their pay-off function values, which can be thought of as a measure of profit, utility or goodness that we want to maximize. This means that copying strings according to their fitness values will give strings with higher fitness value a higher probability of generating one or more offspring in the following generation. So the reproduction operator is simply makes one or more copies of any individual that posses a high fitness value in the current generation to the next generation; otherwise, the individual is eliminated from the solution pool.
Crossover is the second operator (also known as the "recombination"). This operator selects two individuals within the generation and a crossover site and performs a swapping operation of the string bits to the right hand side of the crossover site of both individuals. The crossover operator serves two complementary search functions. First, it provides new points for further testing within the hyperplanes already represented in the population. Second, crossover introduces representatives of new hyperpalnes into the population, which is not represented by either parent structure. Thus, the probability of a better performing offspring is greatly enhanced.
Mutation is the third operator. This operator acts as a background operator and is used to explore some of the unvisited points in the search space by randomly flipping a "bit" in a population of strings. Since frequent application of this operator would lead to a completely random search, a very low probability is usually assigned to its activation. Mutation is needed because, although reproduction and crossover effectively search and recombine information contained in the strings, occasionally they may fail and lose some potentially useful genetic material (1 or 0 at particular locations in the case of binary coding). In artificial genetic systems, the mutation operator protects against such an irrecoverable loss. In the simple GA, mutation is the occasional (with small probability) random alteration of the value of a string position. When used randomly with reproduction and cross over, it is a guaranty against early loss of important notions.

Parameters settings and selection
Based on the results of the fitness evaluation step, certain individuals of the population are selected for further processing. The selection is based on a predetermined threshold of fitness level. The selection of chromosomes for applying various GA operators is based on their scaled fitness function in accordance to the roulette wheel selection rule. The roulette wheel slots are sized according to the accumulated probabilities of reproducing each chromosome.
The search for the optimal GA parameters setting is a very complex task. To achieve good performance of the GA, many experiments for the system under study must be performed to get the most suitable parameters for a specific problem. An adaptive scheme to control the probability rate of performing the crossover and mutation operators is designed.
The crossover rate controls the frequency with which the crossover operator is applied. The higher the crossover rate, the more quickly new structures are introduced into the population. If the crossover rate is too high, high-performance structures are discarded faster than selection can produce improvements. If the crossover rate is too low, the search may stagnate due to the lower exploration rate.
Mutation is a secondary search operator, which increases the variability of the population. A low level of mutation serves to prevent any given bit position from remaining forever converged to a single value in the entire population, and consequently increases the probability of entrapment at local minima. A high level of mutation yields an essentially random search, which may lead to very slow convergence.

Constraints handling (Repair mechanism)
Constraints handling techniques for the GAs can be grouped into a few categories. One way is to generate a solution without considering the constraints but to include them with penalty factors in the fitness function.
Another category is based on the application of a special repair algorithm to correct any infeasible solution so generated.
The third approach concentrates on the use of special representation mappings (decoders), which guarantee (or at least increase the probability of) the generation of a feasible solution or the use of problem-specific operators, which preserve feasibility of the solutions. However, due to applying the crossover and mutation operations the some constraints might be violated. A mechanism to restore the feasibility is applied according to the problem under study.

Merits and demerits
The GA technique has the following advantages:


GAs work with a coding of the parameters of the function they optimize, not the parameters themselves.  GAs search from a group (population) of points, not a single point.  GAs use penalty (objective function) information, not auxiliary knowledge such as derivatives or other information.  GAs use probabilistic transition rules, not deterministic rules.
The followings are some of the shortcomings of the GA technique:  GA's do not work for large problems due to stochastic algorithm  Its convergence depend on problem specific parameters that are not clearly defined  It suffers from convergence and computational requirements

A general Genetic algorithm
A genetic search starts with a randomly generated initial population within which each individual is evaluated by means of a fitness function. Individuals in this and subsequent generations are duplicated or eliminated according to their fitness values. Further generations are created by applying GA operators. This eventually leads to a generation of high performing individuals.
The followings are the major steps of a basic general GA for any optimization problem: Step 1. Select a suitable coding of the parameters in the problem under study.
Step 2. Initialize a population of chromosomes.
Step 3. Evaluate each chromosome in the population.
Step 4. Create new chromosomes by mating current chromosomes; apply mutation and recombination as the parent chromosomes mate.
Step 5. Delete members of the population to make room for the new chromosomes.
Step 6. Evaluate the new chromosomes and insert them into the population.
Step 7. If the termination criterion is satisfied, stop and return the best chromosomes; otherwise, go to Step (3).

Overview
Many GA implementations for the UCP are proposed in the literature. They differ from each other in three respects. First, the UCP solution coding which could be binary or real or mix between binary and real representations. Second, the fitness function could include, in addition to total operating cost, penalty terms for constraints violations or without penalty terms. Third, the GA operators are also differing from one implementation to another. Some algorithms used the basic GA operators only, while others used special operators in order to enhance the solution and speed up the convergence.
Generally speaking the GA for the UCP starts by coding the variables, randomly selecting several initial values, calculating the resultant objective function by solving the EDP based on the UCP decision variables, selecting a subset of the initially selected variables based on highest savings, cross mating the coded locations and mutating the resultant code to arrive at a better solution.
The major steps of the GA as applied to the UCP could be summarized as follows (Fig (5.1)):  Creating an initial population by randomly generating a set of feasible solutions (chromosomes). In the following sections, the implementations of the different components of the GA for the UCP are presented.

Solution coding
Since the UCP lends itself to the binary coding in which a zero denotes the OFF state and a one represents the ON state, most of the published works used the binary coding [129][130][131][132][133][134][135][136][137][138][139][140]. The UCP solution is represented by a binary matrix (U) of dimension TxN (Fig.(5.2-a)). A candidate solution in the GA could then be represented by a string whose length is the product of the scheduling periods and the number of generating units TxN. In the GA a number of these solutions, equal to the population size (NPOP), is stored. The required storage size is then equal to NPOPxTxN, which is a large value even for a moderate size system.
Generate randomly the initial population of the GA , and let it be the current population Calculate the objective function for the current population members, by solving the EDP.
Calculate and scale the fitness functions for the current population members. Another method of coding presented is based on a mix between a binary number and its equivalent decimal number [141][142]. Each column vector of length T in the solution matrix (which represents the operation schedule of one unit) is converted to its equivalent decimal number. The solution matrix is then converted into one row vector (chromosome) of N decimal numbers, (U1, U2,....UN); each represents the schedule of one unit as shown in Fig.(5.2-b). Typically the numbers U1, U2, ..,UN are integers ranging between 0 and  N 21 . Accordingly, a population of size NPOP can be stored in a matrix of dimension NPOPxN as arbitrarily shown in Fig.(5.2-c). Hence, the proposed method requires only 1/T of the storage required if a normal binary coding is used.

Fitness function
Unlike the previous solutions of the UCP using GA [129-140], the fitness function is taken as the reciprocal of the total operating cost in (3.1), where all new generated solutions are feasible.
The fitness function is then scaled to prevent the premature convergence. Linear scaling is used. This requires a linear relationship between the original fitness function (f) and the scaled one ( s f ) as follows [4]:  

Selection
The selection of chromosomes for applying various GA operators is based on their scaled fitness function in accordance to the roulette wheel selection rule. The roulette wheel slots are sized according to the accumulated probabilities of reproducing each chromosome.

Crossover
To speed up the calculations, the crossover operation is performed between two chromosomes in their decimal form. A two points crossover operation is used. The following steps are applied to perform the crossover operation: Select two parents according to the roulette wheel rule.
Select randomly two positions in the two chromosomes.
Exchange the bits between the two selected positions in the two parents to produce two children (Fig. (5.3)).
Decode the two children into their binary equivalent and check for reserve constraints violation.
If the reserve constraints are not satisfied apply the repair mechanism (described in Section 4.6) to restore feasibility of the produced children.

Mutation
The crossover operation explained in the last section is not enough for creating a completely new solution. The reason is that it exchanges the schedule of units as black boxes among different chromosomes without applying any changes in the schedules of the units themselves.
Two new types of mutation operators are introduced to create changes in the units' schedules [141][142]. The mutation operation is applied after reproducing all the new population members. It is done by applying the probability test to the members of the new population one by one. The mutation operation is then applied to the selected chromosome. The details of the two mutation operators are described in the following sections.

Mutation operator (1)
The first mutation operator is implemented as follows: 1. Select a chromosome as explained before and decode it into its binary equivalent. 2. Pick randomly a unit number and a time period. 3. Apply the rules in Section 2.4 to reverse the status of this unit keeping the feasibility of the unit constraints related to its minimum up/down times. 4. For the changed time periods, check the reserve constraints. 5. If the reserve constraints are violated, apply the proposed correction mechanism and go to the next step, otherwise go to the next step. 6. Decode the modified solution matrix from binary to decimal form and update the new population.

Mutation operator (2)
The second mutation operator is based on a local search algorithm to perform fine-tuning on some of the chromosomes in the new generated population. The selection of chromosomes for applying this type of mutation could be random or based on the roulette wheel method.
1. The local search algorithm steps are described in details as follows: 2. Decode the selected chromosome into its binary form.
3. Sort the time periods in a descending order according to the difference between the committed units capacity and the load demand. 4. Identify the time periods at which the committed units capacity is greater than 10% above the load plus the desired reserve. These time periods have a surplus of committed power capacity. 5. At the time periods of surplus capacity, sort the committed units in an ascending order according to their percentage loading. 6. Identify the units that have a percentage loading less than 20% above their minimum output limits. These units are the costlier units among the committed units in the respective time periods, since they are lightly loaded. 7. Take the time periods, according to their order found in (2) and consider switching off the underloaded units one at a time, according to their order. 8. Check the feasibility of the solution obtained. If it is feasible, go to Step (8), otherwise go to Step (6). 9. Calculate the objective function of the solution obtained by solving the economic dispatch problem for the changed time periods. 10. Decode the new solution obtained to its decimal equivalent and replace the old one in the new population.

Adaptive GA operators
The search for the optimal GA parameters setting is a very complex task. To achieve good performance of the GA, an adaptive scheme to control the probability rate of performing the crossover and mutation operators is designed.
The crossover rate controls the frequency with which the crossover operator is applied. The higher the crossover rate, the more quickly new structures are introduced into the population. If the crossover rate is too high, high-performance structures are discarded faster than selection can produce improvements. If the crossover rate is too low, the search may stagnate due to the lower exploration rate. In our implementation, the crossover rate is initialized with a high value (typically between 0.6 and 0.8) and is then decreased during the search according to the convergence rate of the algorithm (decrement value is 0.01).
Mutation is a secondary search operator, which increases the variability of the population. A low level of mutation serves to prevent any given bit position from remaining forever converged to a single value in the entire population, and consequently increases the probability of entrapment at local minima. A high level of mutation yields an essentially random search, which may lead to very slow convergence. To guide the search, the mutation rate starts at a low value (between 0.2 and 0.5) then it is incremented by 0.01 as the algorithm likely converged to a local minimum.

Numerical examples
In order to test the proposed algorithm, three systems are considered. Preliminary experiments have been performed on the three systems to find the most suitable GA parameters settings. The following control parameters have been chosen after running a number of simulations: population size=50, initial value of crossover rate=0.8, decrement value of crossover=0.01, initial value of mutation rate=0.2, increment value of mutation=0.01, local search mutation rate=0.1, elite copies=2, and the maximum number of generations=1000.
Different experiments were carried out to investigate the effect of the local search mutation on the results. It was found that the proposed algorithm with local search performs better than the simple GA without local search , in terms of both solution quality and number of iterations.

Summary
GA is one of the most powerful techniques for solving optimization problems and the UCP as well. The major components of the GA as applied to the UCP, which are different from one implementation to another, are: First, the UCP solution coding which could be binary, real or mix between binary and real representations. Second, the fitness function, which is basically, the total operating costs with or without adding penalty terms for constraints violations. Third, the GA operators: reproduction, crossover and mutation in addition to special operators that might be used to improve the solution speed and quality.
Discussions of the available GA implementations, as applied to the UCP, are summarized.
A complete GA implementation as applied to the UCP is presented. The features of the presented algorithm are: First, the UCP solution is coded using a mix between binary and decimal representations. Second, the fitness function is based only on the total operating cost and no penalties are included. Third, to improve the fine local tuning capabilities of the proposed GA, a special mutation operator based on a local search procedure, is designed.

Nomenclature
The following notations are used throughout the thesis: