Research Article
An Improved Genetic Algorithm for Single-Machine Inverse Scheduling Problem
Algorithm 1
The code of the fitness evaluation mechanism.
if (oner1.sorted > oner2.sorted) then oner1 | else if (oner1.sorted == oner2.sorted) | If (oner1.fitness < oner2.fitness) then oner1 | else if (oner1.fitness == oner2.fitness) | { | cw1 += (float)oner1.Wi[] * Ci[]; | cw2 += (float)oner2.Wi[] * Ci[]; | } | if (cw1 < cw2) then cw1 |
|