基于混洗遗传算法求解分布式系统中的任务调度附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电子书和数学建模资料


相关文章
|
21天前
|
机器学习/深度学习 算法 新能源
【优化调度】基于matlab粒子群算法求解水火电经济调度优化问题研究(Matlab代码实现)
【优化调度】基于matlab粒子群算法求解水火电经济调度优化问题研究(Matlab代码实现)
|
21天前
|
机器学习/深度学习 存储 并行计算
【无人机】基于MPC的无人机路径规划研究(Matlab代码实现)
【无人机】基于MPC的无人机路径规划研究(Matlab代码实现)
125 6
|
21天前
|
机器学习/深度学习 边缘计算 人工智能
【无人机】采用NOMA的节能多无人机多接入边缘计算(Matlab代码实现)
【无人机】采用NOMA的节能多无人机多接入边缘计算(Matlab代码实现)
|
21天前
|
机器学习/深度学习 传感器 运维
【电机轴承监测】基于matlab声神经网络电机轴承监测研究(Matlab代码实现)
【电机轴承监测】基于matlab声神经网络电机轴承监测研究(Matlab代码实现)
|
21天前
|
数据采集 算法 调度
【电力系统】基于matlab虚拟电厂内部负荷调度优化模型(matlab+yalmip+cplex)(Matlab代码实现)
【电力系统】基于matlab虚拟电厂内部负荷调度优化模型(matlab+yalmip+cplex)(Matlab代码实现)
|
21天前
|
传感器 并行计算 算法
【无人机编队】基于非支配排序遗传算法II NSGA-II高效可行的无人机离线集群仿真研究(Matlab代码实现)
【无人机编队】基于非支配排序遗传算法II NSGA-II高效可行的无人机离线集群仿真研究(Matlab代码实现)
|
21天前
|
存储 并行计算 算法
【图像压缩】在 MATLAB 中使用奇异值分解 (SVD) 进行图像压缩(Matlab代码实现)
【图像压缩】在 MATLAB 中使用奇异值分解 (SVD) 进行图像压缩(Matlab代码实现)
153 3
|
21天前
|
机器学习/深度学习 资源调度 算法
【电热数值计算】基于matlab IGBT有限元电热数值计算分析研究(Matlab代码实现)
【电热数值计算】基于matlab IGBT有限元电热数值计算分析研究(Matlab代码实现)
|
21天前
|
机器学习/深度学习 资源调度 算法
考虑实时市场联动的电力零售商鲁棒定价策略(Matlab代码实现)
考虑实时市场联动的电力零售商鲁棒定价策略(Matlab代码实现)
|
21天前
|
存储 算法 安全
【无人机】基于灰狼优化算法的无人机路径规划问题研究(Matlab代码实现)
【无人机】基于灰狼优化算法的无人机路径规划问题研究(Matlab代码实现)
117 0

热门文章

最新文章