資源簡介
M/M/N 排隊系統(tǒng)(多服務(wù)員排隊系統(tǒng))的仿真(難度系數(shù):?????)
多服務(wù)員排隊系統(tǒng)在仿真上較單服務(wù)員排隊系統(tǒng)要復(fù)雜的多,在此先對該排隊系統(tǒng)作一些必要的假設(shè):
(1)顧客源是無窮的;
(2)排隊長度沒有限制;
(3)到達(dá)系統(tǒng)的顧客按先到先服務(wù)原則依次進入服務(wù);
(4)服務(wù)員在仿真過程中沒有休假;
(5)顧客到達(dá)時排成一隊,當(dāng)有服務(wù)臺空閑時進入服務(wù)狀態(tài);
按照顧客到達(dá)的時間概率分布為泊松分布,顧客服務(wù)時間的長短服從負(fù)指數(shù)分布,試完成M/M/1排隊系統(tǒng)的仿真。系統(tǒng)輸入為:泊松分布和負(fù)指數(shù)分布中的參數(shù),服務(wù)臺個數(shù),系統(tǒng)輸出是:平均等待時間、平均隊長、服務(wù)利用率。要求有輸入、輸出界面、顧客到達(dá)和離開的仿真過程表示。
這個資源可以直接運行
代碼片段和文件信息
function?varargout?=?MMN(varargin)
%MMN排隊系統(tǒng)??制作人:Tazen?Fee?2012年12月
%?MMN?M-file?for?MMN.fig
%??????MMN?by?itself?creates?a?new?MMN?or?raises?the?existing
%??????singleton*.
%
%??????H?=?MMN?returns?the?handle?to?a?new?MMN?or?the?handle?to
%??????the?existing?singleton*.
%
%??????MMN(‘CALLBACK‘hobjecteventDatahandles...)?calls?the?local
%??????function?named?CALLBACK?in?MMN.M?with?the?given?input?arguments.
%
%??????MMN(‘Property‘‘Value‘...)?creates?a?new?MMN?or?raises?the
%??????existing?singleton*.??Starting?from?the?left?property?value?pairs?are
%??????applied?to?the?GUI?before?MMN_OpeningFcn?gets?called.??An
%??????unrecognized?property?name?or?invalid?value?makes?property?application
%??????stop.??All?inputs?are?passed?to?MMN_OpeningFcn?via?varargin.
%
%??????*See?GUI?Options?on?GUIDE‘s?Tools?menu.??Choose?“GUI?allows?only?one
%??????instance?to?run?(singleton)“.
%
%?See?also:?GUIDE?GUIDATA?GUIHANDLES
%?Edit?the?above?text?to?modify?the?response?to?help?MMN
%?Last?Modified?by?GUIDE?v2.5?06-Dec-2012?08:32:20
%?Begin?initialization?code?-?DO?NOT?EDIT
gui_Singleton?=?1;
gui_State?=?struct(‘gui_Name‘???????mfilename?...
???????????????????‘gui_Singleton‘??gui_Singleton?...
???????????????????‘gui_OpeningFcn‘?@MMN_OpeningFcn?...
???????????????????‘gui_OutputFcn‘??@MMN_OutputFcn?...
???????????????????‘gui_LayoutFcn‘??[]??...
???????????????????‘gui_Callback‘???[]);
if?nargin?&&?ischar(varargin{1})
????gui_State.gui_Callback?=?str2func(varargin{1});
end
if?nargout
????[varargout{1:nargout}]?=?gui_mainfcn(gui_State?varargin{:});
else
????gui_mainfcn(gui_State?varargin{:});
end
%?End?initialization?code?-?DO?NOT?EDIT
%?---?Executes?just?before?MMN?is?made?visible.
function?MMN_OpeningFcn(hobject?eventdata?handles?varargin)
%?This?function?has?no?output?args?see?OutputFcn.
%?hobject????handle?to?figure
%?eventdata??reserved?-?to?be?defined?in?a?future?version?of?MATLAB
%?handles????structure?with?handles?and?user?data?(see?GUIDATA)
%?varargin???command?line?arguments?to?MMN?(see?VARARGIN)
%?Choose?default?command?line?output?for?MMN
handles.output?=?hobject;
pic2=imread(‘shouyintai.jpg‘);
set(handles.sever1‘CData‘pic2);
set(handles.sever2‘CData‘pic2);
set(handles.sever3‘CData‘pic2);
set(handles.sever4‘CData‘pic2);
global?N;
N=1;
global?g;
g=1;
global?h;
h=2;
global?Tmax;
Tmax=30;
global?vf;
vf=1;
%下面的代碼用于輸出圖像
global?Tey;
Tey=0;
global?Ley;
Ley=0;
global?Sey;
Sey=0;
global?Tx;
Tx=0;
%?Update?handles?structure
guidata(hobject?handles);
%?UIWAIT?makes?MMN?wait?for?user?response?(see?UIRESUME)
%?uiwait(handles.figure1);
%?---?Outputs?from?this?function?are?returned?to?the?command?line.
function?varargout?=?MMN_OutputFcn(hobject?eventdata?handles)?
%?varargout??cell?array?for?returning?output?args?(see?VARARGOUT);
%?hobject????handle?to?figure
%?eventdata??reserved?-?to?be?defined?in?a?future?version?of?MATLAB
%?handles????structure?with?handles?and?user?data?(see?GUIDATA)
%?Get?default?command?line?ou
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2013-02-02?23:13??MMN排隊\
?????文件????????4845??2012-12-03?21:43??MMN排隊\matlab.jpg
?????文件???????42336??2012-12-08?21:55??MMN排隊\MMN.asv
?????文件???????10511??2013-02-02?23:09??MMN排隊\MMN.fig
?????文件???????31598??2013-02-02?23:11??MMN排隊\MMN.m
?????文件?????????157??2013-02-02?23:20??MMN排隊\readme.txt
?????文件????????7744??2012-12-06?10:32??MMN排隊\shouyintai.jpg
評論
共有 條評論