clear;
N = [17, 20, 23];
s = [9, 10, 11];
% lamax = [41, 21, 8.5];
% lamin = [29, 15, 6.5];
% mumax = [4, 2.23, 0.72];
% mumin = [3.35, 1.81, 0.53];
opt = 3;
lam = [34, 19, 7];
lam1 = 1.1*lam;
lam2 = 0.9*lam;
mu = [3.75, 2.08, 0.67];
mu1 = 0.9*mu;
mu2 = 1.1*mu;
D = 0:0.05:1;
%Figure 1-1
for d = 1:length(D)
q(d) = ServiceQoS(N, s, lam, mu, opt, D(d));
end
for d = 1:length(D)
q1(d) = ServiceQoS(N, s, lam1, mu, opt, D(d));
end
for d = 1:length(D)
q2(d) = ServiceQoS(N, s, lam2, mu, opt, D(d));
end
mean_wait= sum(ServiceTime(N, s, lam, mu, opt)/opt);
fix = 0.6930;
figure;
plot(D,q, '-g','color',[0.50,0.70,0.30],'LineWidth',3); hold on
grid on
set(gca, 'FontSize',13,'FontWeight','normal','FontName','Times New Roman','GridAlpha', 0.25);
ylim([0, 1.1])
x = xlabel('QRL');
set(x,'FontName','Times New Roman','FontSize',14,'FontWeight','bold');
y = ylabel('QoS');
set(y,'FontName','Times New Roman','FontSize',14,'FontWeight','bold');
plot([0,1],[0.6930, 0.6930], '-k','color',[0.50,0.50,0.50],'LineWidth',3); hold on
plot([0.6045,0.6045],[0, 0.6930],'--k', 'LineWidth',1)
h = legend('{EUGF-based Method}','{Without considering QRL}','Location','northeast');
set(h,'Interpreter','latex','FontSize',13,'FontWeight','normal')
% Figure 1-2
% figure;
% [x, y] = meshgrid(1:16,0:0.05:1);
% a = 0:0.05:1;
% for i = 1:16
% for j = 1:21
% z(j,i) = ServiceQoS(N, [i, s(2), s(3)], lam, mu, opt, a(j));
% end
% end
%
% surf(x,y,z);
% A1 = xlabel('Number of Chargers');
% A2 = ylabel('QRL');
% A3 = zlabel('QoS');
% set(gca, 'FontSize',14,'FontWeight','normal','FontName','Times New Roman','GridAlpha', 0.4);
% zlim([0, 1.1])
% set(A1,'FontName','Times New Roman','FontSize',14,'FontWeight','bold')
% set(A2,'FontName','Times New Roman','FontSize',14,'FontWeight','bold')
% set(A3,'FontName','Times New Roman','FontSize',14,'FontWeight','bold')
% Figure 1-3
% figure;
% [lamA, d] = meshgrid(10:28,0:0.05:1);
% b = 0:0.05:1;
% t = 1;
% for i = 10:28
% for j = 1:21
% c(j,t) = ServiceQoS(N, s, [lam(1), i, lam(3)], mu, opt, b(j));
% end
% t = t + 1;
% end
%
% surf(lamA,d,c);
% A1 = xlabel('Arrival Rate');
% A2 = ylabel('QRL');
% A3 = zlabel('QoS');
% set(gca, 'FontSize',14,'FontWeight','normal','FontName','Times New Roman','GridAlpha', 0.4);
% zlim([0, 1.1])
% set(A1,'FontName','Times New Roman','FontSize',14,'FontWeight','bold')
% set(A2,'FontName','Times New Roman','FontSize',14,'FontWeight','bold')
% set(A3,'FontName','Times New Roman','FontSize',14,'FontWeight','bold')
% Figure 2-1 (Composition Operator Comparasion)
% figure;
%
% for d = 1:length(D)
% qsimave(d) = ServiceQoS(N, s, lam, mu, opt, D(d));
% end
%
% for d = 1:length(D)
% qweiave(d) = WeiAveQoS(N, s, lam, mu, opt, D(d));
% end
%
% for d = 1:length(D)
% qminave(d) = MinQoS(N, s, lam, mu, opt, D(d));
% end
%
% for d = 1:length(D)
% qmaxave(d) = MaxQoS(N, s, lam, mu, opt, D(d));
% end
%
% plot(D,qsimave, '-g','color',[0.50,0.70,0.30],'LineWidth',3); hold on
% plot(D,qweiave, '-b','color',[0.35,0.35,0.65],'LineWidth',3); hold on
% plot(D,qminave, '-r','color',[0.75,0.30,0.30],'LineWidth',3); hold on
% plot(D,qmaxave, '-k','color',[0.50,0.50,0.50],'LineWidth',3); hold on
%
% x = xlabel('QRL');
% set(x,'FontName','Times New Roman','FontSize',14,'FontWeight','bold')
% y = ylabel('QoS');
% set(y,'FontName','Times New Roman','FontSize',14,'FontWeight','bold')
% ylim([0, 1.1])
% h = legend('{Simple Average}','{Weighted Average}','{Minimum}','{Maximum}','Location','southwest');
% set(h,'Interpreter','latex','FontSize',14,'FontWeight','normal')
%
% grid on
% set(gca, 'FontSize',14,'FontName','Times New Roman','GridAlpha', 0.3);
% Figure 2-2
% figure;
% for d = 1:length(D)
% qd1(d) = TwoStations(N, s, lam, mu, opt, D(d));
% end
%
% plot(D, qd1, '-g','color',[0.50,0.70,0.30],'LineWidth',3); hold on
% ylim([0, 1.1])
% grid on
% set(gca, 'FontSize',14,'FontName','Times New Roman','GridAlpha', 0.3);
% x = xlabel('QRL');
% set(x,'FontName','Times New Roman','FontSize',14,'FontWeight','bold')
% y = ylabel('QoS');
% set(y,'FontName','Times New Roman','FontSize',14,'FontWeight','bold')
天天Matlab科研工作室
- 粉丝: 4w+
- 资源: 1万+
最新资源
- 【java毕业设计】篮球论坛系统源码(springboot+vue+mysql+说明文档+LW).zip
- 【java毕业设计】篮球竞赛预约平台源码(springboot+vue+mysql+说明文档+LW+LW).zip
- 文件上传下载(源码)-kaic.zip
- 【java毕业设计】垃圾分类网站源码(springboot+vue+mysql+说明文档+LW).zip
- robo3t-1.4.4 Windows版本
- 【java毕业设计】口腔管家平台源码(springboot+vue+mysql+说明文档+LW).zip
- 基于PHP和Bootstrap的实现学籍/学生信息管理系统+项目源码+文档说明
- jasperreports7.0.1版本的项目库及原厂demo
- 【java毕业设计】考研资讯平台源码(springboot+vue+mysql+说明文档+LW).zip
- 【java毕业设计】就业信息管理系统源码(springboot+vue+mysql+说明文档+LW).zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈