【优化求解】基于利希滕贝格优化算法(LOA)求解单目标问题matlab源码

1 算法介绍

Optimization is an essential tool to minimize or maximize functions, obtaining optimal results on costs, mass, energy, gains, among others. Actual problems may be multimodal, nonlinear, and discontinuous and may not be minimized by classical analytical methods that depend on the gradient. In this context, there are metaheuristic algorithms inspired by natural phenomena to optimize real engineering problems. No algorithm is the worst or the best, but more efficient for a given problem. Thus, a new nature-inspired algorithm called Lichtenberg Optimization Algorithm (LA) is applied in this study to solve a complex inverse damage identification problem in mechanical structures built by composite material. To verify the performance of the new algorithm, both LA and Finite Element Method (FEM) were used to identify delamination damage and the results were compared to other algorithms such as Genetic Algorithm (GA) and SunFlower Optimization (SFO). LA was shown to be a powerful damage identification tool since it was able to detect damage even in particular situations like noisy response and low damage severity.

2 部分代码

%   LICHTENBERG ALGORITHM (LA) FOR NONLINEAR UNCONSTRAINED
%                     OPTIMIZATION 
%
%
% Copyright (c) 2020, Jo茫o Luiz Pereira and Guilherme Ferreira Gomes
% All rights reserved.
%
%
% Please cite this algorithm as:
%
% Pereira, J.L.J., Chuman, M., Cunha Jr, S.S. and Gomes, G.F. (2020), 
% "Lichtenberg optimization algorithm applied to crack tip identification
% in thin plate-like structures", Engineering Computations, 
​
​
%% Initialization
​
clear all
close all
clc
format long
tic
​
set(0,'DefaultAxesFontName', 'Times New Roman')
set(0,'DefaultAxesFontSize', 14)
set(0,'DefaultTextFontname', 'Times New Roman')
set(0,'DefaultTextFontSize', 26)
​
% Bounds
UB = [5 5];          %upper bounds
LB = [-5 -5];        %lower bounds
d = length(LB);      %problem dimension
​
% LA Parameters
pop = 20;          %Population size
n_iter = 100;      %Max number os iterations
Np = 100000;       %Number of Particles (If 3D, better more than 10000)
S_c = 1;           %Stick Probability: Percentage of particles that can don麓t stuck in the
                   %cluster. Between 0 and 1. Near 0 there are more aggregate, the density of
                   %cluster is bigger and difusity is low. Near 1 is the opposite. 
Rc = 150;          %Creation Radius (if 3D, better be less than 80, untill 150)
refinement = 0.2;  %use after running the algorithm once.
M = 0;             %M = 1 creates new Lichtenberg figures in each iteration, M=0 use same figure (fast convergence);
x0 = (LB+UB)/2;    %Initial Point (only for first population)
disp_plot = 1;     %if = 1, display LA figure for 2d problems.
​
%Some objective test functions 
Fun1 = @(x)  100*(x(2)-x(1)^2)^2+(1-x(1))^2;                                    % rosenbrok (1,1)
Fun2 = @(x) (1.5-x(1)*(1-x(2)))^2+(2.25-x(1)*(1-x(2)^2))^2;                     % beale's (3,0.5)
Fun3 = @(x)  x(1)^2 +x(2)^2 +x(3)^2;                                            % Schwefel (0,0,0)
Fun4 = @(x)  100*(x(2)-x(1)^2)^2+(1-x(1))^2 + 100*(x(3)-x(2)^2)^2+(1-x(2))^2;   % rosenbrok (1,1,1)
​
Fun = Fun1;
​
[x,fval,iter,state,population]=LA_optimization(Fun,d,pop,x0,Np,S_c,Rc,M,LB,UB,refinement,n_iter,disp_plot);
​
% Convergence view
figure,
semilogy(state(:,d+2))
xlabel('Iterations')
ylabel('Objective')
​
​
toc
%end of the program

3 仿真结果

 

 

4 参考文献

[1] Pereira J , MB Francisco, Jr S , et al. A powerful Lichtenberg Optimization Algorithm: A damage identification case study[J]. Engineering Applications of Artificial Intelligence, 2021, 97:104055.

5 代码下载

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值