• 季节优化算法(Seasons optimization algorithm,SOA)附matlab代码


    ✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。

     

    🍎个人主页:Matlab科研工作室

    🍊个人信条:格物致知。

    更多Matlab仿真内容点击👇

    智能优化算法  神经网络预测 雷达通信  无线传感器

    信号处理 图像处理 路径规划 元胞自动机 无人机

    ⛄ 内容介绍

    This paper introduces a new stochastic bio-inspired optimization algorithm, denoted as seasons optimization (SO) algorithm.This algorithm is inspired by the growth cycle of trees in diferent seasons of a year. It is an iterative and population-based algorithm working with a population of initial solutions known as a forest. Each individual in the forest is referred to as a tree. Until the termination conditions are satisfed, the trees in the forest are updated to a new generation by applying four operators similar to the trees’ life cycles in nature: renew, competition, seeding, and resistance. These operators hopefully cause the trees to converge towards the global optimum of the optimization problem. The efectiveness of the proposed SO algorithm is evaluated using multi-variable single-objective test problems and compared with several well-known baseline and state-of-the-art algorithms. The results show that the proposed algorithm outperformed its counterparts in terms of solution quality and fnding the global optimum on most benchmark functions.

    ⛄ 部分代码

    clear all;

    clc;

    close all

    %% Problem Statement

    ProblemParams.CostFuncName = 'F4';

    objFunc= 'F4';

    [fobj, lowerbound, upperbound, globalCost, dimension]=GetBenchmarkFunction(ProblemParams.CostFuncName);

    ProblemParams.CostFuncName=fobj;

    ProblemParams.lb=lowerbound;

    ProblemParams.ub=upperbound;

    ProblemParams.NPar = dimension;

    ProblemParams.gcost=globalCost;

    ProblemParams.VarMin =ProblemParams.lb;

    ProblemParams.VarMax = ProblemParams.ub;

    if numel(ProblemParams.VarMin)==1

        ProblemParams.VarMin=repmat(ProblemParams.VarMin,1,ProblemParams.NPar);

        ProblemParams.VarMax=repmat(ProblemParams.VarMax,1,ProblemParams.NPar);

    end

    ProblemParams.SearchSpaceSize = ProblemParams.VarMax - ProblemParams.VarMin;

    AlgorithmParams.NumOfTrees = 8;

    AlgorithmParams.NumOfYears = 50;

    AlgorithmParams.Pmin = 0.4;

    AlgorithmParams.Pmax = 0.6;

    %% Main Loop

    for year= 1:AlgorithmParams.NumOfYears

        

        p=AlgorithmParams.Pmax-(year/AlgorithmParams.NumOfYears)*(AlgorithmParams.Pmax-AlgorithmParams.Pmin);            %pr, ps and pw are in the range [0.4, 0.6]

        AlgorithmParams.RenewRate=p;

        AlgorithmParams.SeedingRate=p;

        AlgorithmParams.ColdThreshold=p;

        AlgorithmParams.CompetitionRate = p;

        

        

        %% Spring Season

        if (year==1)

            InitialTrees = CreateForest(AlgorithmParams, ProblemParams);

            Forest=InitialTrees;

            InitialCost = feval(ProblemParams.CostFuncName,InitialTrees);

            Forest(:,end+1) = InitialCost;

        else

            Forest = Renew(Forest, Seeds, AlgorithmParams, ProblemParams);

        end

        

        

        %% Summer Season  (Growth & Competition)

        [Forest] = Competition (Forest, AlgorithmParams, ProblemParams, year);

        

        %% Autumn Season

        Seeds = Seeding(Forest,AlgorithmParams, ProblemParams);

        s=size(Seeds,1);

        AlgorithmParams.s=s;

        

        %% Winter Season

        Forest = Resistance(Forest,AlgorithmParams, ProblemParams);

        

        Costs = Forest(:,end);

        MinimumCost(year) = min(Costs);

        

        fprintf('Minimum Cost in Iteration %d is %3.16f \n', year,MinimumCost(year));

        

    end  

    figure;

    subplot(121)

    func_plot(objFunc);

    title(objFunc)

    xlabel('x_1');

    ylabel('x_2');

    zlabel([objFunc,'( x_1 , x_2 )'])

    subplot(122)

    semilogy(MinimumCost,'LineWidth',3);

    xlabel('Iterations');

    ylabel('Best fitness obtained so far');

    legend('SOA');

    box on;

    axis tight;

    grid off;

    ⛄ 运行结果

    ⛄ 参考文献

    ​Emami, Hojjat. “Seasons Optimization Algorithm.” Engineering with Computers, vol. 38, no. 2, Springer Science and Business Media LLC, Aug. 2020, pp. 1845–65, doi:10.1007/s00366-020-01133-5.

    ❤️ 关注我领取海量matlab电子书和数学建模资料

    ❤️部分理论引用网络文献,若有侵权联系博主删除

  • 相关阅读:
    Unix系统用户下载内容存放位置
    智昊电气推出RCL-0923U型光伏并网点电压自动控制装置/分布式光伏并网点电压自动控制设备/电压控制器
    C++学习笔记(一)
    Clickhouse表引擎之MergeTree
    vue3+vite3+vant搭建移动端简易模版
    AutoDL上传数据详细步骤(自己用的步骤,可能没有其他大佬用的那么高级)
    matlab读取文件
    typescript47-函数之间的类型兼容性
    vulnhub Vegeta: 1
    java集合类史上最细讲解 - Map篇
  • 原文地址:https://blog.csdn.net/qq_59747472/article/details/127678401