排队模型(matlab代码).docVIP

  • 14
  • 0
  • 约5.26千字
  • 约 5页
  • 2019-08-22 发布于江西
  • 举报
function out=MMSmteam(s,m,mu1,mu2,T) %M/M/S/m排队模型 %s——修理工个数 %m——机器源数 %T——时间终止点 %mu1——机器离开-到达时间服从指数分布 %mu2——修理时间服从指数分布 %事件表: % p_s——修理工空闲概率 % arrive_time——机器到达事件 % leave_time——机器离开事件 %mintime——事件表中的最近事件 %current_time——当前时间 %L——队长 %tt——时间序列 %LL——队长序列 %c——机器到达时间序列 %b——修理开始时间序列 %e——机器离开时间序列 %a_count——到达机器数 %b_count——修理机器数 %e_count——损失机器数 %初始化 arrive_time=exprnd(mu1,1,m); arrive_time=sort(arrive_time); leave_time=[]; current_time=0; L=0; LL=[L]; tt=[current_time]; c=[]; b=[]; e=[]; a_count=0; %循环 while min([arrive_time,leave_time])T current_time=min([arrive_time,leave_time]); tt=[tt,cu

文档评论(0)

1亿VIP精品文档

相关文档