大规模装箱问题:蜣螂优化算法DBO求解二维装箱问题(MATLAB代码)

一、问题描述

装载率:所有选择的箱子的总面积与夹板面积之比

假设一共有300个箱子,如何设计算法,使得选择部分箱子放入80*80的甲板上,让甲板的装载率越大,要求箱子间不得重叠。

二、蜣螂优化算法求解二维装箱问题

蜣螂优化算法的目标函数是甲板的装载率

2.1部分代码

% -----------------------------------------------------------------------------------------------------------
% Dung Beetle Optimizer:                                            
%  Jiankai Xue & Bo Shen (2022) Dung beetle optimizer: a new meta-heuristic
% algorithm for global optimization. The Journal of Supercomputing, DOI:
% 10.1007/s11227-022-04959-6
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
close all
clear 
clc
SearchAgents_no=30; % Number of search agents
Function_name='F1'; % Name of the test function that can be from F1 to F23 (Table 1,2,3 in the paper)
Max_iteration=30; % Maximum numbef of iterations
% Load details of the selected benchmark function
[lb,ub,dim,fobj]=Get_Functions_details(Function_name);
[fMin,bestX,curve]=DBO(SearchAgents_no,Max_iteration,lb,ub,dim,fobj);
save bestX bestX
save curve curve
ResultList=PlotFigure(bestX);%货物的序号和长宽
save('result.txt','ResultList','-ascii');
figure
plot(curve,'g-','linewidth',3)
xlabel('迭代次数');
ylabel('装载率');
xlim([1 Max_iteration])
ylim([min(curve) max(curve)])
legend('DBO')

2.1部分结果

下图中甲板中,金黄色区域表示已经放置箱子,粉色区域表示闲置区域。

甲板平面的装载率:95.5469%

箱子的使用率:80%

三、完整MATLAB代码

大规模装箱问题:蜣螂优化算法DBO求解二维装箱问题(MATLAB代码)

最近更新

  1. TCP协议是安全的吗?

    2024-06-18 14:38:06       10 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-06-18 14:38:06       12 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-06-18 14:38:06       11 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-06-18 14:38:06       14 阅读

热门阅读

  1. 2024.6.17总结1113

    2024-06-18 14:38:06       7 阅读
  2. AI之Lambda index

    2024-06-18 14:38:06       7 阅读
  3. python中的结构

    2024-06-18 14:38:06       6 阅读
  4. 山东大学软件学院深度学习期末回忆版

    2024-06-18 14:38:06       8 阅读
  5. C# Socket通讯简单Demo

    2024-06-18 14:38:06       6 阅读
  6. 数据库分库分表

    2024-06-18 14:38:06       5 阅读
  7. MySQL触发器基本结构

    2024-06-18 14:38:06       5 阅读
  8. Cesium4Unreal - # 011A Http通信

    2024-06-18 14:38:06       5 阅读
  9. windows11 ssh 无法连接问题解决方法

    2024-06-18 14:38:06       6 阅读
  10. C语言、C++和C#的区别在什么地方?

    2024-06-18 14:38:06       6 阅读
  11. HTML 事件

    2024-06-18 14:38:06       6 阅读