【优化求解】基于吉萨金子塔建造优化算法 GPC求解最优
目标matlab代码
1 简介
吉萨金子塔建造优化算法(Giza Pyramids Construction,GPC)是于2020年提出的一种,新型智能优
化算法,其仿照金字塔建造的过程,具有寻优能力强,精度高的特点。
Nowadays, many optimization issues around us cannot be solved by precise methods or that
cannot be solved in a reasonable time. One way to solve such problems is to use metaheuristic
algorithms. Metaheuristic algorithms try to find the best solution out of all possible solutions in
the shortest time possible. Speed in convergence, accuracy, and problem-solving ability at high
dimensions are characteristics of a good metaheuristic algorithm. This paper presents a new
population-based metaheuristic algorithm inspired by a new source of inspiration. This algorithm
is called Giza Pyramids Construction (GPC) inspired by the ancient past has the characteristics of a
good metaheuristic algorithm to deal with many issues. The ancient-inspired is to observe and
reflect on the legacy of the ancient past to understand the optimal methods, technologies, and
strategies of that era. The proposed algorithm is controlled by the movements of the workers and
pushing the stone blocks on the ramp. This algorithm is compared with five standard and popular
metaheuristic algorithms. For this purpose, thirty different and diverse benchmark test functions
are utilized. The proposed algorithm is also tested on high-dimensional benchmark test functions
and is used as an application in image segmentation. The results show that the proposed
algorithm is better than other metaheuristic algorithms and it is successful in solving high-
dimensional problems, especially image segmentation.
2 部分代码
% Giza Pyramids Construction (GPC) Algorithm
% -------------------------------------------------
clc;
clear;
close all;
%% Problem Definition
CostFunction=@(x) Sphere(x); % Cost Function
nVar=30; % Number of Decision Variables
VarSize=[1 nVar]; % Decision Variables Matrix Size
VarMin=-5.12; % Decision Variables Lower Bound
VarMax= 5.12; % Decision Variables Upper Bound
%% Giza Pyramids Construction (GPC) Parameters
MaxIteration=1000; % Maximum Number of Iterations (Days of work)
nPop=20; % Number of workers
G = 9.8; % Gravity