Commit 6ba23982 authored by Tong Li's avatar Tong Li

Merge remote-tracking branch 'origin/master'

parents f89cd03f 0f35c8f4
......@@ -173,8 +173,11 @@ public class ScheduleParams {
populationSize = (int) Math.max(MIN_POPULATION_SIZE,
Math.min(MAX_POPULATION_SIZE, MIN_POPULATION_SIZE + totalOps * populationSizeCoeff));
int maxthead= Runtime.getRuntime().availableProcessors() - 1;
populationSize= populationSize / maxthead*maxthead;
int maxthead = Math.max(1, Runtime.getRuntime().availableProcessors() - 1);
if (populationSize >= maxthead) {
populationSize = populationSize / maxthead * maxthead;
}
populationSize = Math.max(MIN_POPULATION_SIZE, populationSize);
// 确保偶数(方便交叉)
// if (populationSize % 2 != 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment