您好,登錄后才能下訂單哦!
這篇“怎么用matlab代碼解決單目標優化問題”文章的知識點大部分人都不太理解,所以小編給大家總結了以下內容,內容詳細,步驟清晰,具有一定的借鑒價值,希望大家閱讀完這篇文章能有所收獲,下面我們一起來看看這篇“怎么用matlab代碼解決單目標優化問題”文章吧。
%_______________________________________________________________________________________% % Sea-Horse optimizer (SHO) % Developed in MATLAB R2018a % optimization problems. % Applied Intelligence %_______________________________________________________________________________________% clear all clc close all popsize=30; % Number of search agents Max_iter=100; % Maximum iteration F_name='F4'; % Name of the test function that can be from F1 to F23 (Table 2,3,4 in the paper) [LB,UB,Dim,fobj]=BenchmarkFunctions(F_name);% Load details of the selected benchmark function tic [ObjectiveFitness,ObjectivePosition,Convergence_curve,Trajectories,fitness_history, population_history]=SHO(popsize,Max_iter,LB,UB,Dim,fobj); time=toc; figure('Position',[454 445 694 297]); subplot(1,2,1); func_plot(F_name); title('Parameter space') xlabel('x_1'); ylabel('x_2'); zlabel([F_name,'( x_1 , x_2 )']) subplot(1,2,2); semilogy(1:Max_iter,Convergence_curve,'color','r','linewidth',2.5); title('Convergence curve'); xlabel('Iteration'); ylabel('Best score obtained so far') display(['The running time is:', num2str(time)]); display(['The best solution obtained by SHO is : ', num2str(ObjectiveFitness)]); display(['The best optimal sea horse of the objective funciton found by SHO is : ', num2str(ObjectivePosition)]);
以上就是關于“怎么用matlab代碼解決單目標優化問題”這篇文章的內容,相信大家都有了一定的了解,希望小編分享的內容對大家有幫助,若想了解更多相關的知識內容,請關注億速云行業資訊頻道。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。