2022年智能算法之凌日搜索算法(TS),原理公式详解,附matlab代码

本文主要是介绍2022年智能算法之凌日搜索算法(TS),原理公式详解,附matlab代码,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

ad39d062513ec4ff091fbe23504b3cf6.png

凌日搜索算法(Transit SearchTS)是一种新型元启发式优化算法,该算法基于著名的系外行星探测方法,具有寻优能力强、进化能力强、搜索速度快的特点。该成果于2022年发表在知名SCI期刊Results in Control and Optimization上。目前在谷歌学术上有着很高的被引量,共被引32次。

8bd29ec12043bf91b4627621f155858c.png

通过太空望远镜的数据库,使用凌日技术已经发现了3800多颗行星,由于凌日法在天体物理学中的高效率和它的能力,它已被用于制定一种优化技术。在凌日算法中,通过研究恒星在一定时间间隔内接收到的光,检测其光度的变化,如果接收到的光量减少,则表明有一颗行星从恒星前方经过。

在凌日搜索算法结构中,定义了两个参数:主星数(ns)和信噪比(SN)。根据经纬仪模型确定经纬仪的经纬仪参数。此外,噪声是利用在凌日外获得的观测值的标准差估计的。凌日搜索算法的实施分为五个阶段,即星系阶段、凌日阶段、行星阶段、邻居阶段和开发阶段。

算法原理

(1)星系阶段

在此阶段,算法首先选择一个星系。为此,在搜索空间中随机选择一个位置作为星系中心。一旦确定了这个位置,就有必要确定银河系的可居住区。为了做到这一点,先评估ns*SN随机区域LR,最后,选择其中具有最佳适应度的20%ns选定的区域有可能成为生命的宿主,算法的下一步开始就从这些区域开始,数学公式如下: 

在上面提到的公式中,  代表星系的中心位置。此外,Lr是搜索空间中的一个随机位置。在0到1之间有两个系数,分别表示一个随机数(c1)和一个随机向量(c2),表示优化问题的变量数量大小。

(2)凌日阶段

为了探测凌日,有必要重新测量从星星接收到的光量,以探测其可能减少的接收光信号。算法中LS及其对应的适应度(fs)M1M2两种含义。如果目标是使用恒星的位置来确定和更新行星的位置,则使用M1。如果目标是确定从恒星接收到的亮度并对其进行更新,则使用M2。相应地,在M2的情况下,LS的变化意味着一个新的规格的光信号,而在M1的情况下,LS的变化意味着星星的位置的变化。根据观测者接收到的光谱(和观测者与恒星之间的距离,可以估计出恒星的光度,小的距离导致接收到更多的光子。恒星的光度数学公式如下: 

其中,LiRi为星号i的光度和阶数,公式表达了望远镜到星号i的距离。望远镜的位置LT在算法开始时随机选取,优化时不改变。

(3)行星阶段

如果观测到凌日,则在算法中实现行星阶段。在这一阶段,首先确定被探测行星的初始位置。考虑到观察者接收到的光来自恒星,所以当行星经过恒星和望远镜之间时,这种光的数量就会减少。可以确定被探测行星(LZ)的初始位置,数学公式如下: 

其中参数RL表示亮度比。系数c8也有一个01之间的随机值。利用恒星和望远镜两个相对位置的平均值,确定当前位置在恒星和望远镜之间的行星的位置。

(4)邻居阶段

如果当前观测的恒星没有凌日现象,则将研究该恒星之前探测到的行星附近的行星。如果它的邻居比当前的行星有更好的条件,它将被该恒星当前的行星所取代。首先,利用计算邻域(Lz)的初始位置,同时考虑其宿主星(LSnew)和随机位置(LR)。然后,由方程式确定相邻行星(LN)的最终位置。 

其中区域参数z的值是随机数123,系数c11c12处理01之间的随机数。同样,c13c14分别是一个随机数和一个介于-11之间的向量。

(5)开发阶段

在之前的阶段,为每颗恒星确定最佳的行星。正如前面提到的,发现一颗行星本身并不重要。事实上,有必要研究这颗行星的特性和适合生命生存的条件。在此阶段,将表示LP的新定义。换句话说,LP在当前阶段(LE)指的是行星的特征(如密度、物质、大气等)。然后,通过添加新的知识(K),将行星的最终特征修改SN(j= 1SN)使用方程式。在这个阶段,每颗恒星的最佳行星是LE

其中,c150~2之间的随机数,c160~1之间的随机数,c17是一个介于01之间的随机向量。参数P表示1(ns*SN)之间的随机幂。在这个方程中,ck是一个随机数(1234),表示知识索引。

 果展示

以为CEC2005函数集为例,进行结果展示:

f6faf334d36da28c04fd2faae7108d22.png

05069467e76efc459c54810e612cfe7b.png

53be4030ef7b06478431b64c2114f6c6.png

729e8c47e10d164eeb9dc1dd3735ba2b.png

d7c11967df3263091c0cf6dabeb74973.png

 MATLAB核心代码

function [Bests] = TransitSearch (CostFunction,Vmin,Vmax,nV,ns,SN,maxcycle)
%% Initialization
Empty.Location = [];
Empty.Cost = inf;
Galaxy_Center = repmat (Empty, 1, 1);
region = repmat (Empty, ns*SN, 1);
selected_regions = repmat (Empty, ns, 1);
Stars = repmat (Empty, ns, 1);
Stars_sorted = zeros(ns,1);
Ranks = 1:1:ns;
Stars_Ranks = zeros(ns,1);
Luminosity = zeros(ns,1);
Star_RanksNormal = zeros(ns,1);
Distance = zeros(ns,1);
Transit0 = zeros(ns,1);
SN_P = repmat (Empty, SN, 1);
Bests=region;
if length(Vmin) ~= nVVmin=Vmin*ones(1,nV);Vmax=Vmax*ones(1,nV);
end
%% Galaxy Phase
% Initial Location of The Center of the Galaxy
Galaxy_Center.Location = unifrnd(Vmin,Vmax,1,nV);
Galaxy_Center.Cost = CostFunction(Galaxy_Center.Location);
% Galactic Habitate Zone of the Galaxy
for l = 1:(ns*SN)zone = randi(2);if zone ==1difference = rand().*(Galaxy_Center.Location)-(unifrnd(Vmin,Vmax,1,nV));elsedifference = rand().*(Galaxy_Center.Location)+(unifrnd(Vmin,Vmax,1,nV));endNoise = ((rand(1,nV)).^3).*(unifrnd(Vmin,Vmax,1,nV));region(l).Location = Galaxy_Center.Location + difference - Noise;region(l).Location = max(region(l).Location, Vmin);region(l).Location = min(region(l).Location, Vmax);region(l).Cost = CostFunction(region(l).Location);
end
% Selection of Stars from the Galactic Habitate Zone of the Galaxy
[Sort,index]=sort([region.Cost]);
for i = 1:nsselected_regions(i) = region(index(1,i));for k = 1:SNzone = randi(2);if zone ==1difference = rand().*(selected_regions(i).Location)-rand().*(unifrnd(Vmin,Vmax,1,nV));elsedifference = rand().*(selected_regions(i).Location)+rand().*(unifrnd(Vmin,Vmax,1,nV));endNoise = ((rand(1,nV)).^3).*(unifrnd(Vmin,Vmax,1,nV));new.Location = selected_regions(i).Location + difference - Noise;new.Location = max(new.Location, Vmin);new.Location = min(new.Location, Vmax);new.Cost = CostFunction(new.Location);if new.Cost < Stars(i).CostStars(i) = new;endend
end
% Initial Location of the Best Planets (Start Point: Its Star)
Best_Planets = Stars;
% Specification of the Best Planet
[Sort,index]=sort([Best_Planets.Cost]);
Best_Planet = Best_Planets(index(1,1));
% Telescope Location
Telescope.Location = unifrnd(Vmin,Vmax,1,nV);
% Determination of the Luminosity of the Stars
for i = 1:nsStars_sorted(i,1) = Stars(i).Cost;
end
Stars_sorted = sort (Stars_sorted);
for i = 1:nsfor ii = 1:nsif Stars(i).Cost == Stars_sorted(ii,1)Stars_Ranks(i,1) = Ranks(1,ii);Star_RanksNormal(i,1) = (Stars_Ranks(i,1))./ns;endendDistance(i,1) = sum((Stars(i).Location-Telescope.Location).^2).^0.5;Luminosity(i,1) = Star_RanksNormal(i,1)/((Distance(i,1))^2);
end
Luminosity_new = Luminosity;
Stars2 = Stars;
%% Loops of the TS Algorithm
for it = 1:maxcycle%% Transit PhaseTransit = Transit0;Luminosity = Luminosity_new;for i = 1:nsdifference = (2*rand()-1).*(Stars(i).Location);Noise = ((rand(1,nV)).^3).*(unifrnd(Vmin,Vmax,1,nV));Stars2(i).Location = Stars(i).Location + difference - Noise;Stars2(i).Location = max(Stars2(i).Location, Vmin);Stars2(i).Location = min(Stars2(i).Location, Vmax);Stars2(i).Cost = CostFunction(Stars2(i).Location);endfor i = 1:nsStars_sorted(i,1) = Stars2(i).Cost;endStars_sorted = sort (Stars_sorted);for i = 1:nsfor ii = 1:nsif Stars2(i).Cost == Stars_sorted(ii,1)Stars_Ranks(i,1) = Ranks(1,ii);Star_RanksNormal(i,1) = (Stars_Ranks(i,1))./ns;endendDistance(i,1) = sum((Stars2(i).Location-Telescope.Location).^2).^0.5;Luminosity_new(i,1) = Star_RanksNormal(i,1)/((Distance(i,1))^2);if Luminosity_new(i,1) < Luminosity(i,1)Transit (i,1) = 1;      % Has transit been observed?  0 = No; 1 = YesendendStars = Stars2;%% Location Phase (Exploration)for i = 1:nsif Transit (i,1) == 1% Determination of the Location of the PlanetLuminosity_Ratio = Luminosity_new(i,1)/Luminosity(i,1);Planet.Location = (rand().*Telescope.Location + Luminosity_Ratio.*Stars(i).Location)./2;for k = 1:SNzone = randi(3);if zone ==1new.Location = Planet.Location - (2*rand()-1).*(unifrnd(Vmin,Vmax,1,nV));elseif zone ==2new.Location = Planet.Location + (2*rand()-1).*(unifrnd(Vmin,Vmax,1,nV));elsenew.Location = Planet.Location + (2.*rand(1,nV)-1).*(unifrnd(Vmin,Vmax,1,nV));endnew.Location = max(new.Location, Vmin);new.Location = min(new.Location, Vmax);%                             new.Cost = CostFunction(new.Location);SN_P(k) = new;endSUM = 0;for k = 1:SNSUM = SUM+SN_P(k).Location;endnew.Location = SUM./SN;new.Cost = CostFunction(new.Location);if new.Cost < Best_Planets(i).CostBest_Planets(i) = new;endelse  % No Transit observed: Neighbouring planetsNeighbor.Location = (rand().*Stars(i).Location + rand().*(unifrnd(Vmin,Vmax,1,nV)))./2;for k = 1:SNzone = randi(3);if zone ==1Neighbor.Location = Neighbor.Location - (2*rand()-1).*(unifrnd(Vmin,Vmax,1,nV));elseif zone ==2Neighbor.Location = Neighbor.Location + (2*rand()-1).*(unifrnd(Vmin,Vmax,1,nV));elseNeighbor.Location = Neighbor.Location + (2.*rand(1,nV)-1).*(unifrnd(Vmin,Vmax,1,nV));endNeighbor.Location = max(Neighbor.Location, Vmin);Neighbor.Location = min(Neighbor.Location, Vmax);Neighbor.Cost = CostFunction (Neighbor.Location);SN_P(k) = Neighbor;endSUM = 0;for k = 1:SNSUM = SUM+SN_P(k).Location;endNeighbor.Location = SUM./SN;Neighbor.Cost = CostFunction (Neighbor.Location);if Neighbor.Cost < Best_Planets(i).CostBest_Planets(i) = Neighbor;endend
end
%% Signal Amplification of the Best Planets (Exploitation)for i = 1:nsfor k = 1:SNRAND = randi(2 );if RAND ==1Power = randi(SN*ns);Coefficient = 2*rand();Noise = ((rand(1,nV)).^Power).*(unifrnd(Vmin,Vmax,1,nV));elsePower = randi(SN*ns);Coefficient = 2*rand();Noise = -((rand(1,nV)).^Power).*(unifrnd(Vmin,Vmax,1,nV));end%                         new.Location = (rand().*Best_Planets(i).Location) - Coefficient.*Noise;chance = randi(2);if chance ==1new.Location = Best_Planets(i).Location - Coefficient.*Noise;elsenew.Location = (rand().*Best_Planets(i).Location) - Coefficient.*Noise;endnew.Location = max(new.Location, Vmin);new.Location = min(new.Location, Vmax);new.Cost = CostFunction(new.Location);%                         new.Cost = CostFunction(new.Location);if new.Cost < Best_Planets(i).CostBest_Planets(i) = new;endendif Best_Planets(i).Cost < Best_Planet.CostBest_Planet = Best_Planets(i);endend% ResultsBests(it)=Best_Planet;
end
end

参考文献

[1] Mirrashid M, Naderpour H. Transit search: An optimization algorithm based on exoplanet exploration[J]. Results in Control and Optimization, 2022, 7: 100127.

完整代码获取方式:后台回复关键字:

TGDM101

这篇关于2022年智能算法之凌日搜索算法(TS),原理公式详解,附matlab代码的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/520497

相关文章

springboot+redis实现订单过期(超时取消)功能的方法详解

《springboot+redis实现订单过期(超时取消)功能的方法详解》在SpringBoot中使用Redis实现订单过期(超时取消)功能,有多种成熟方案,本文为大家整理了几个详细方法,文中的示例代... 目录一、Redis键过期回调方案(推荐)1. 配置Redis监听器2. 监听键过期事件3. Redi

Springboot配置文件相关语法及读取方式详解

《Springboot配置文件相关语法及读取方式详解》本文主要介绍了SpringBoot中的两种配置文件形式,即.properties文件和.yml/.yaml文件,详细讲解了这两种文件的语法和读取方... 目录配置文件的形式语法1、key-value形式2、数组形式读取方式1、通过@value注解2、通过

Java 接口定义变量的示例代码

《Java接口定义变量的示例代码》文章介绍了Java接口中的变量和方法,接口中的变量必须是publicstaticfinal的,用于定义常量,而方法默认是publicabstract的,必须由实现类... 在 Java 中,接口是一种抽象类型,用于定义类必须实现的方法。接口可以包含常量和方法,但不能包含实例

自定义注解SpringBoot防重复提交AOP方法详解

《自定义注解SpringBoot防重复提交AOP方法详解》该文章描述了一个防止重复提交的流程,通过HttpServletRequest对象获取请求信息,生成唯一标识,使用Redis分布式锁判断请求是否... 目录防重复提交流程引入依赖properties配置自定义注解切面Redis工具类controller

Java线程池核心参数原理及使用指南

《Java线程池核心参数原理及使用指南》本文详细介绍了Java线程池的基本概念、核心类、核心参数、工作原理、常见类型以及最佳实践,通过理解每个参数的含义和工作原理,可以更好地配置线程池,提高系统性能,... 目录一、线程池概述1.1 什么是线程池1.2 线程池的优势二、线程池核心类三、ThreadPoolE

使用Redis实现会话管理的示例代码

《使用Redis实现会话管理的示例代码》文章介绍了如何使用Redis实现会话管理,包括会话的创建、读取、更新和删除操作,通过设置会话超时时间并重置,可以确保会话在用户持续活动期间不会过期,此外,展示了... 目录1. 会话管理的基本概念2. 使用Redis实现会话管理2.1 引入依赖2.2 会话管理基本操作

mybatis-plus分表实现案例(附示例代码)

《mybatis-plus分表实现案例(附示例代码)》MyBatis-Plus是一个MyBatis的增强工具,在MyBatis的基础上只做增强不做改变,为简化开发、提高效率而生,:本文主要介绍my... 目录文档说明数据库水平分表思路1. 为什么要水平分表2. 核心设计要点3.基于数据库水平分表注意事项示例

Nginx服务器部署详细代码实例

《Nginx服务器部署详细代码实例》Nginx是一个高性能的HTTP和反向代理web服务器,同时也提供了IMAP/POP3/SMTP服务,:本文主要介绍Nginx服务器部署的相关资料,文中通过代码... 目录Nginx 服务器SSL/TLS 配置动态脚本反向代理总结Nginx 服务器Nginx是一个‌高性

Python容器转换与共有函数举例详解

《Python容器转换与共有函数举例详解》Python容器是Python编程语言中非常基础且重要的概念,它们提供了数据的存储和组织方式,下面:本文主要介绍Python容器转换与共有函数的相关资料,... 目录python容器转换与共有函数详解一、容器类型概览二、容器类型转换1. 基本容器转换2. 高级转换示

HTML5的input标签的`type`属性值详解和代码示例

《HTML5的input标签的`type`属性值详解和代码示例》HTML5的`input`标签提供了多种`type`属性值,用于创建不同类型的输入控件,满足用户输入的多样化需求,从文本输入、密码输入、... 目录一、引言二、文本类输入类型2.1 text2.2 password2.3 textarea(严格