基于混洗遗传算法求解分布式系统中的任务调度附matlab代码

简介: 基于混洗遗传算法求解分布式系统中的任务调度附matlab代码

✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。

🍎个人主页:Matlab科研工作室

🍊个人信条:格物致知。

更多Matlab仿真内容点击👇

智能优化算法       神经网络预测       雷达通信      无线传感器        电力系统

信号处理              图像处理               路径规划       元胞自动机        无人机

⛄ 内容介绍

Distributed systems such as Grid- and Cloud Computing provision web services to their users in all of the world. One of the most important concerns which service providers encounter is to handle total cost of ownership (TCO). The large part of TCO is related to power consumption due to inefficient resource management. Task scheduling module as a key component can has drastic impact on both user response time and underlying resource utilization. Such heterogeneous distributed systems have interconnected different processors with different speed and architecture. Also, the user application which is typically presented in the form of directed acyclic graph (DAG) must be executed on this type of parallel processing systems. Since task scheduling in such complicated systems belongs to NP-hard problems, existing  heuristic approaches are no longer efficient. Therefore, the trend is to apply hybrid metaheuristic approaches. In this paper, we extend a meta-heuristic shuffled genetic-based task  scheduling algorithm to minimize total execution time, makespan, of user application. In this regard, we take benefit of other heuristics such as Heterogeneous Earliest Finish Time (HEFT) approach to generate smart initial population by applying a new shuffle operator which makes a fortune to explore feasible and promising individuals in the search space. We also conduct other genetic operators in right way to produce final near to optimal solution. To reach concrete results we have conducted several scenarios. Our proposed algorithm outperforms in term of average makespan compared with other existing approaches such as HEFT versions and QGARAR.

⛄ 部分代码

%% Shuffled Genetic Algorithm for Task Scheduling based on:

% Hosseini, M. (2018). A new Shuffled Genetic-based Task

%Scheduling Algorithm in Heterogeneous Distributed Systems.

% Journal of Advances in Computer Research, 9(4), 19-36.

clc

clear

close all

%%

global nVM nTask DAG extP0 extP1 extP2 c

nVM=3; % Number of Hetergenous Virtual Machines

c=ones(nVM)-eye(nVM);  % communication time between servers

nTask=11; % Number of Tasks

DAG=[0 12 14 0 0 0 0 0 0 0 0  % Directed Acyclic Graph

    0 0 0 8 15 11 0 0 0 0 0

    0 0 0 0 0 0 13 0 0 0 0

    0 0 0 0 0 0 0 11 0 0 0

    0 0 0 0 0 0 0 8 0 0 0

    0 0 0 0 0 0 0 0 7 12 0

    0 0 0 0 0 0 0 0 0 14 0

    0 0 0 0 0 0 0 0 0 0 15

    0 0 0 0 0 0 0 0 0 0 7

    0 0 0 0 0 0 0 0 0 0 10

    0 0 0 0 0 0 0 0 0 0 0];

extP0=[7 10 5 6 10 11 12 10 8 15 8]; %Execution Time on Processor1

extP1=[9 9 7 8 8 13 15 13 9 11 9];

extP2=[8 14 6 7 6 15 18 7 10 13 10];

Wbar=[8 11 6 7 8 13 15 10 9 13 9]; % Average Computation Cost

npop=20; % population size

maxIter= 100; % maximum number of generation

%% The first generation:

population=INITp(npop);

%% Genetic optimization:

for iter=1:maxIter

   for i=1:npop

       cost(i)=MAPPER(population{i});

       fitness(i)=1/cost(i);

   end

   for i=1:npop

       probs(i)=fitness(i)/sum(fitness);

   end

   [val,idx]=sort(cost);

   best=population{idx(1)};

   min_cost=val(1);

   disp(['Generation ',num2str(iter),' ... min cost= ',num2str(min_cost)]);

   plot(iter,min_cost,'ko');

   hold on

   pause(0.000001)

   for i=1:npop

       if i<= 0.2 * npop

           newPopulation{i}=population{idx(i)};

       else

           id1=randsrc(1,1,[1:npop;probs]); % Roullete wheel

           id2=randsrc(1,1,[1:npop;probs]);

           parent1=population{id1};

           parent2=population{id2};

           newPopulation{i}=crossover_mutation(parent1,parent2);

       end

   end

   population=newPopulation;

end

final_solution=best

makespan_genetic=val(1)

makespan_Level=MAPPER(1:11)

makespan_rankd=MAPPER([1 2 3 4 7 6 5 8 9 10 11])

makespan_ranku=MAPPER([1 3 2 7 6 4 5 8 10 9 11])

⛄ 运行结果

⛄ 参考文献


⛄ 完整代码

❤️部分理论引用网络文献,若有侵权联系博主删除
❤️ 关注我领取海量matlab电子书和数学建模资料


相关文章
|
10天前
|
算法 定位技术 计算机视觉
【水下图像增强】基于波长补偿与去雾的水下图像增强研究(Matlab代码实现)
【水下图像增强】基于波长补偿与去雾的水下图像增强研究(Matlab代码实现)
|
10天前
|
算法 机器人 计算机视觉
【图像处理】水下图像增强的颜色平衡与融合技术研究(Matlab代码实现)
【图像处理】水下图像增强的颜色平衡与融合技术研究(Matlab代码实现)
|
10天前
|
机器学习/深度学习 算法 机器人
使用哈里斯角Harris和SIFT算法来实现局部特征匹配(Matlab代码实现)
使用哈里斯角Harris和SIFT算法来实现局部特征匹配(Matlab代码实现)
|
10天前
|
机器学习/深度学习 编解码 算法
基于OFDM技术的水下声学通信多径信道图像传输研究(Matlab代码实现)
基于OFDM技术的水下声学通信多径信道图像传输研究(Matlab代码实现)
|
10天前
|
机器学习/深度学习 算法 机器人
【水下图像增强融合算法】基于融合的水下图像与视频增强研究(Matlab代码实现)
【水下图像增强融合算法】基于融合的水下图像与视频增强研究(Matlab代码实现)
|
10天前
|
新能源 Java Go
【EI复现】参与调峰的储能系统配置方案及经济性分析(Matlab代码实现)
【EI复现】参与调峰的储能系统配置方案及经济性分析(Matlab代码实现)
|
10天前
|
机器学习/深度学习 数据采集 测试技术
基于CEEMDAN-VMD-BiLSTM的多变量输入单步时序预测研究(Matlab代码实现)
基于CEEMDAN-VMD-BiLSTM的多变量输入单步时序预测研究(Matlab代码实现)
|
10天前
|
机器学习/深度学习 算法 自动驾驶
基于导向滤波的暗通道去雾算法在灰度与彩色图像可见度复原中的研究(Matlab代码实现)
基于导向滤波的暗通道去雾算法在灰度与彩色图像可见度复原中的研究(Matlab代码实现)
|
21天前
|
编解码 运维 算法
【分布式能源选址与定容】光伏、储能双层优化配置接入配电网研究(Matlab代码实现)
【分布式能源选址与定容】光伏、储能双层优化配置接入配电网研究(Matlab代码实现)
117 12
|
21天前
|
人工智能 数据可视化 网络性能优化
【顶级SCI复现】虚拟电厂的多时间尺度调度:在考虑储能系统容量衰减的同时,整合发电与多用户负荷的灵活性研究(Matlab代码实现)
【顶级SCI复现】虚拟电厂的多时间尺度调度:在考虑储能系统容量衰减的同时,整合发电与多用户负荷的灵活性研究(Matlab代码实现)

热门文章

最新文章

下一篇
开通oss服务