Research Article

Dichotomous Binary Differential Evolution for Knapsack Problems

Algorithm 2

DBDE for knapsack problem.
Input: Population size, NP; Crossover probability, CR1 and CR2; Maximum number of objective function evaluations, MaxFEs
  ()    Randomly initialize population with NP individuals
  ()    for    do
  ()     if   is an infeasible individual  then
  ()      Execute Algorithm 1 for ratio-greedy repair
  ()     end if
  ()     Evaluate the objective function value
  ()    end for
  ()    FEs = NP
  ()    while  FEs < MaxFEs  do
  ()  for    do
  ()   Randomly select two individuals and from population
  ()   Execute the dichotomous mutation to generate a mutate individual
  ()   Execute the dichotomous crossover to generate a trial individual
  ()   if   is an infeasible individual  then
  ()    Execute Algorithm 1 for ratio-greedy repair
  ()   end if
  ()   Evaluate the objective function value
  ()   if    then
  ()    
  ()   end if
  ()  end for
  ()  FEs = FEs + NP
  () end while
Output: Optimal individual with the maximum profit value