You can edit almost every page by Creating an account and confirming your email.

Gradient-based repair differential evolution

From EverybodyWiki Bios & Wiki



File:Funcionamiendo del algoritmo G-DEmi.gif
G-DEmi applied to mixed-integer nonlinear programming problems shows its capacity to efficiently explore the discontinuous feasible regions (red lines).

The Algorithm G-Demi, an acronym for Gradient-based Differential Evolution for Mixed-Integer Nonlinear Programming, is a variant of the differential evolution designed to solve mixed-integer nonlinear programming problems (MINLP).[1] The presence of both continuous and discrete variables, along with constraints, leads to discontinuous feasible regions of varying sizes in the search space. Traditional evolutionary algorithms face difficulties with these problems due to their insensitivity in handling constraints, leading to the generation of many infeasible solutions. G-DEmi addresses this limitation by integrating a gradient-based repair method within the differential evolution framework. The aim of the repair method is to fix promising infeasible solutions in different subproblems using the gradient information of the constraint set.

G-DEmi

G-DEmi continuously improves a population of candidate solutions through an iterative cycle of generation, evaluation, and selection of trial vectors. In each iteration, new vectors are generated by combining existing solutions. They are evaluated based on their performance and repaired as necessary to satisfy the constraints.

Initial Population

The initial population Pg is generated by taking random values. For the real variables, random real values are generated, and for the integer variables, random integer values are generated, corresponding to the solution vector [x,y]. Subsequently, the objective function f(xg) and the degree of constraint violation G(xg) are evaluated.

Mutation and Crossover

For each target vector xg,i, a trial vector ug,i is generated using mutation and binomial crossover (rand/1/bin). The integer variables in ug,i are rounded before evaluating the vector in the objective function and constraints.

Evaluation and Selection

The trial vector is compared with its corresponding target vector, and the better one is selected according to the following feasibility rules:[2]

  1. Between two infeasible solutions, the one with lower constraint violation is preferred.
  2. If one solution is infeasible and the other one is feasible, the feasible solution is preferred.
  3. Between two feasible solutions, the one with better objective function value is preferred.

However, if the trial vector fails to improve its target but still has a lower objective function value (f(ug,i)<f(xg,i)), and no other vector of the same subproblem has been repaired in the current generation(𝐲g,iu𝐘), this trial vector is repaired.

Reparation and Improvement

The better solution between the repaired vector and its target vector is passed to the population of the next generation Pg+1. Through these steps, G-DEmi generates a new population in each generation.

The following pseudocode illustrates the algorithm:

   algorithm G-DEmi Framework
   input: NP, CR, F, kmax, Tmin, Evalmax
   output: The best solution so far
   initialize the population Pg
   evaluate f(xg) and G(xg) for each individual in Pg
   Eval1
   g1
   while Eval<Evalmax do
       Y
       for each individual xg,i in Pg do
           generate a trial vector ug,i
           round the integer variables in ug,i
           evaluate f(ug,i) and G(ug,i)
           if ug,i is better than xg,i then
               store ug,i into Pg+1
           elseif f(ug,i)<f(xg,i) and yg,iuY then
               repair ug,i 
               evaluate f(ug,i) and G(ug,i)
               if ug,i is better than xg,i then
                   store ug,i into Pg+1
               end if
               Y=Yyg,iu
           end if
           update Eval
       end for
       gg+1
   end while

Gradient-based Repair Method

File:Reparación en evolución diferencial.png
Solution Repair in G-DEmi

The gradient-based repair method is a crucial component of G-DEmi, designed to address infeasibility in trial vectors generated by differential evolution operators. This method focuses on independently exploring subproblems defined by integer variables. Specifically, to repair a vector with mixed variables [x,y], only the real variables x are modified while the integer variables y remain fixed.

The method repairs only those trial vectors u that satisfy two conditions: (i) they lost the tournament against their target vectors but have a better objective function value, and (ii) they belong to a subproblem y where no solution has been repaired in the current generation. These two conditions aim to promote the repair of trial vectors with higher potential and ensure that each subproblem is explored independently, avoiding the repair of similar solutions multiple times.

Definition of Constraint Violation

The constraint violation 𝐕(𝐱) is defined as a vector that contains the violation degree for each inequality g and equality h constraint in a given problem, for a particular solution vector 𝐱. Parameters n and m denote the number of inequality and equality constraints, respectively, and ϵ specifies the tolerance for equality constraints. The sign function sgn(h) preserves the sign of the equality violation.

𝐕(𝐱)=[max(g1(𝐱),0)max(gn(𝐱),0)sgn(h1)max(|h1(𝐱)|ϵ,0)sgn(hm)max(|hm(𝐱)|ϵ,0)]

The Gradient Matrix of Constraints

The gradient matrix of these constraints with respect to the N components of 𝐱, denoted as 𝐕(𝐱), is defined as:

𝐕(𝐱)=[g1(𝐱)x1g1(𝐱)x2g1(𝐱)xNgn(𝐱)x1gn(𝐱)x2gn(𝐱)xNh1(𝐱)x1h1(𝐱)x2h1(𝐱)xNhm(𝐱)x1hm(𝐱)x2hm(𝐱)xN]

Finite Difference Approximation

The forward finite difference approximation provides an estimate of these derivatives, defined as:

𝐕(𝐱)i,jfi(𝐱+Δx𝐞j)fi(𝐱)Δx

where Δx represents the step size and 𝐞j is a unitary vector of the same dimension as 𝐱, with a value of 1 for the j component and 0 for the rest.

Repair Procedure

This repair method aims to transform 𝐱 into a feasible solution, which involves adjusting the elements of the vector 𝐕(𝐱) to zero. Iteratively, a repaired vector 𝐱k+1 can be obtained using Newton-Raphson's method through the following equation, which represents a linear approximation of 𝐕(𝐱k) in the direction of the origin:

𝐱k+1=𝐱k𝐕(𝐱k)1𝐕(𝐱k)

However, it is common that the number of variables differs from the number of constraints. In this case, the 𝐕(𝐱k) matrix is non-invertible and the Moore-Penrose pseudoinverse must be used

𝐱k+1=𝐱k𝐕(𝐱k)+𝐕(𝐱k)

Where 𝐕(𝐱k)+ represents the pseudoinverse matrix of the gradient matrix 𝐕(𝐱k). A computationally efficient way of finding 𝐕(𝐱k)+ is by employing singular value decomposition.

Mixed Variables Repair

A mixed trial vector 𝐮=[𝐱uk,𝐲u]T is defined, where only the 𝐱uk component is updated during the iterative repair process. As a result, the constraint violation degree vector and the gradient matrix can be defined as:

𝐕(𝐮)=𝐕(𝐱uk,𝐲u)

𝐕(𝐮)=𝐕(𝐱uk,𝐲u)𝐱uk

The repair method follows these steps:

  Algorithm: Gradient-based repair method
  Input: 𝐮,kmax,Tmin
  Output: 𝐮
  Initialize k=1.
  While none of the stopping criteria is fulfilled:
    Calculate 𝐕(𝐱ku,𝐲u) 
    Calculate 𝐕(𝐱ku,𝐲u) 
    Remove zero elements of 𝐕(𝐱ku,𝐲u) and their corresponding values in 𝐕(𝐱ku,𝐲u).
    Calculate the pseudoinverse 𝐕(𝐱ku,𝐲u)+.
    Calculate 𝐱k+1u
    Update 𝐱uk𝐱uk+1.
    Update 𝐮=[𝐱ku,𝐲u]T.
    Increment kk+1.
  End While
  Stopping criteria:
  kkmax: Maximum number of iterations reached.
  𝐕=0: All elements of 𝐕 are equal to zero.
  TuTmin: Maximum absolute difference between 𝐱uk+1 and 𝐱uk is equal to or lower than Tmin.

Example of Mixed Variables Repair

This repair procedure can be illustrated by the following example. Consider a scenario with one inequality constraint and one equality constraint, as shown below:

g1(𝐱,y)=x12+x22+y2120

h1(𝐱,y)=x1+x2+y5.5=0

Suppose 𝐮=[2 1 1]T and an equality tolerance ϵ=1×1004. In the first iteration (where k=1), 𝐱1u=[2 1]T and 𝐲u=1. Therefore, the vectors 𝐕(𝐱1u,𝐲u) and 𝐕(𝐱1u,𝐲u) are computed as follows:𝐕(𝐱1u,𝐲u)=[max(6,0)max(1.5ϵ,0)]=[01.4999]𝐕(𝐱1u,𝐲u)=[g1(𝐱1u,𝐲u)x1g1(𝐱1u,𝐲u)x2h1(𝐱1u,𝐲u)x1h1(𝐱1u,𝐲u)x2]=[4211]As you can see, only h1(𝐱1u, 𝐲u) was violated. Therefore, the element of g1(𝐱1u, 𝐲u) needs to be removed from 𝐕(𝐱1u, 𝐲u) along with its corresponding values in 𝐕(𝐱1u, 𝐲u). This leads to 𝐕(𝐱1u, 𝐲u)=1.4999. Then, 𝐕(𝐱1u, 𝐲u) and its pseudoinverse 𝐕(𝐱1u, 𝐲u)+ are computed as follows:𝐕(𝐱1u,𝐲u)=[11]𝐕(𝐱1u,𝐲u)+=[0.50.5]Subsequently, the vector 𝐱2u is obtained as follows:𝐱2u=[21][0.50.5][1.4999]=[2.751.75]The updated vector 𝐕(𝐱2u,𝐲u) results in:𝐕(𝐱2u,𝐲u)=[max(0.3750,0)max(0ϵ,0)]=[00]As you can see, the values of (𝐱2u,𝐲u) satisfy all the constraints. Therefore, the trial vector has been successfully repaired, and its new values are 𝐮=[2.75 1.75 1]T.

References

  1. Molina-Pérez, Daniel; Portilla-Flores, Edgar Alfredo; Mezura-Montes, Efrén; Vega-Alvarado, Eduardo; Calva-Yañez, María Bárbara (2024-05-31). "Efficiently handling constraints in mixed-integer nonlinear programming problems using gradient-based repair differential evolution". PeerJ Computer Science. 10: e2095. doi:10.7717/peerj-cs.2095. ISSN 2376-5992. PMC 11157599 Check |pmc= value (help). PMID 38855217 Check |pmid= value (help).
  2. Deb, Kalyanmoy (2000-06-09). "An efficient constraint handling method for genetic algorithms". Computer Methods in Applied Mechanics and Engineering. 186 (2): 311–338. Bibcode:2000CMAME.186..311D. doi:10.1016/S0045-7825(99)00389-8. ISSN 0045-7825. Retrieved 2024-06-12.


This article "Gradient-based repair differential evolution" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:Gradient-based repair differential evolution. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.