Research Article
Diversity Controlling Genetic Algorithm for Order Acceptance and Scheduling Problem
Algorithm 2
Survival selection.
Algorithm Survival Selection | Sort individuals in by fitness descending; | Set | Initialize a Boolean array needRemove[] = false, ; | For to | If needRemove[] continue; | For to | If needRemove[] continue; | If fitness of individual > fitness of individual continue; | If | needRemove[] = true; | ; | If (number of individuals in and needRemove[] = false) | Add individual to | While (number of individuals in ) | Randomly generate a new individual and add it to |
|