资源简介
排队论 离散事件系统仿真 排队论 离散事件系统仿真排队论 离散事件系统仿真排队论 离散事件系统仿真排队论 离散事件系统仿真排队论 离散事件系统仿真排队论 离散事件系统仿真排队论 离散事件系统仿真
代码片段和文件信息
// Event.cpp: implementation of the Event class.
//
//////////////////////////////////////////////////////////////////////
#include “Event.h“
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
Event::Event()
{
NextEventPtr=NULL;
IsExecutable=UNEXECUTABLE;
memset(name020);
EventToString();
}
Event::~Event()
{
}
//construction function
/*
Event::Event(int InCustomerIndexint InTimeint InTypeEvent * InNextEventPtr)
{
CustomerIndex=InCustomerIndex;
Time=InTime;
Type=InType;
NextEventPtr=NULL;
IsExecutable=UNEXECUTABLE;
memset(name020);
EventToString();
}*/
Event::Event(int InCustomerIndexint InTimeint InTypeEvent * InNextEventPtrint InIsExecutable)
{
CustomerIndex=InCustomerIndex;
Time=InTime;
Type=InType;
NextEventPtr=NULL;
IsExecutable=InIsExecutable;
memset(name020);
EventToString();
}
Event::Event(int InCustomerIndexint InTimeint InTypeEvent * InNextEventPtrint InIsExecutableint InQueueLengthint InEndOfWaitTime)
{
CustomerIndex=InCustomerIndex;
Time=InTime;
Type=InType;
NextEventPtr=NULL;
IsExecutable=InIsExecutable;
memset(name020);
EventToString();
QueueLength=InQueueLength;
EndOfWaitTime=InEndOfWaitTime;
}
void Event::EventToString()
{
switch(Type)
{
case EVENT_ARRIVE_1:sprintf(name“%s““arrive at level 1“);break;
//name=“arrive at level 1“;break;
case EVENT_ARRIVE_2:sprintf(name“%s““arrive at level 2“);break;
//name=“arrive at level 2“;break;
case EVENT_ARRIVE_3:sprintf(name“%s““arrive at level 3“);break;
//name=“arrive at level 3“;break;
case EVENT_LEVEL_1_FINISH:sprintf(name“%s““finish at level 1“);break;
//name=“finish at level 1“;break;
case EVENT_LEVEL_2_FINISH:sprintf(name“%s““finish at level 2“);break;
//name=“finish at level 2“;break;
case EVENT_LEVEL_3_FINISH:sprintf(name“%s““finish at level 3“);break;
//name=“finish at level 3“;break;
case EVENT_WAIT_1:sprintf(name“%s““wait at level 1“);break;
case EVENT_WAIT_2:sprintf(name“%s““wait at level 2“);break;
case EVENT_WAIT_3:sprintf(name“%s““wait at level 3“);break;
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2010-05-18 14:49 code_1414\
目录 0 2010-05-18 14:35 code_1414\Debug\
文件 2270 2010-05-18 11:06 code_1414\Event.cpp
文件 1443 2010-05-18 11:09 code_1414\Event.h
文件 4236 2010-05-18 11:10 code_1414\FEL.cpp
文件 858 2010-05-18 10:52 code_1414\FEL.h
文件 13576 2010-05-18 14:34 code_1414\Queue.cpp
文件 3521 2010-04-01 14:43 code_1414\Queue.dsp
文件 533 2010-04-01 12:45 code_1414\Queue.dsw
文件 99328 2010-05-18 14:35 code_1414\Queue.ncb
文件 49664 2010-05-18 14:35 code_1414\Queue.opt
文件 995 2010-05-18 14:35 code_1414\Queue.plg
评论
共有 条评论