⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 replacement.m

📁 对多目标优化算法NSGA-II算法的改进
💻 M
字号:
function f = replacement(combination_pop,popsize)
    [N temp] = size(combination_pop);
    M = 2;
    V = 6;
    max_rank = max(combination_pop(:,M + V + 1));
    previous_index = 0;
    for i = 1 : max_rank
        current_index = max(find(combination_pop(:,M + V + 1) == i));
        if (current_index > popsize)
            remaining = popsize - previous_index;
            temp_pop = combination_pop(previous_index + 1 : current_index,:);
            [temp_pop_sort temp_pop_index] = sort(temp_pop(:,M + V + 2),'descend');
            for j = 1 : remaining
                f(previous_index + j,:) = temp_pop(temp_pop_index(j),:);
            end
        else
            f(previous_index + 1 : current_index,:) = combination_pop(previous_index + 1 : current_index,:);
        end
        previous_index = current_index;
    end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -