資源簡介
關于單服務臺排隊模型的仿真作業...........
代碼片段和文件信息
//?sm1.cpp?:?定義控制臺應用程序的入口點。
//
#include?
#include?
#include?
#include?
#include?
using?namespace?std;
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#endif
//?唯一的應用程序對象
using?namespace?std;
unsigned?long?GetArrivePeriod(){
double?u?=?(double)rand()/(double)RAND_MAX;
return?ceil(-15.0*log(u));
}
unsigned?long?GetServePeriod(){
double?u?=?(double)rand()/(double)RAND_MAX;
return?ceil(-6.0*log(u));
}
int?main(int?argc?char**?argv)
{
srand(time(0));
unsigned?long?maxTimeclock=0;
unsigned?long?cat=0;
long?serveTime=0;
unsigned?long?leftTime?=?0;
long?idlTime?=?0;
unsigned?long?prveArriveTime?=?0;
unsigned?long?prveServeTime?=?0;
unsigned?long?prveLeftTime?=?0;
unsigned?long?prveIDLTime?
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????3978??2010-04-20?09:13??MM1Simulation\MM1.cpp
?????文件???????4358??2010-04-20?09:16??MM1Simulation\MM1Simulation.dsp
?????文件????????549??2010-04-20?09:09??MM1Simulation\MM1Simulation.dsw
?????文件??????33792??2010-04-20?09:16??MM1Simulation\MM1Simulation.ncb
?????文件??????48640??2010-04-20?09:16??MM1Simulation\MM1Simulation.opt
?????文件????????905??2010-04-20?09:14??MM1Simulation\MM1Simulation.plg
?????文件??????97704??2010-04-20?09:14??MM1Simulation\Release\MM1.obj
?????文件?????135168??2010-04-20?09:14??MM1Simulation\Release\MM1Simulation.exe
?????文件????2265840??2010-04-20?09:14??MM1Simulation\Release\MM1Simulation.pch
?????文件??????33792??2010-04-20?09:14??MM1Simulation\Release\vc60.idb
?????目錄??????????0??2010-04-20?09:14??MM1Simulation\Release
?????目錄??????????0??2010-04-20?09:16??MM1Simulation
-----------?---------??----------?-----??----
??????????????2624726????????????????????12
評論
共有 條評論