电梯模拟课程设计实验报告
return 0; }
int e3()//楼梯外的队列入栈 { while(!s[nowfloor].QueueEmpty()&&renshu<MAXMAN) { n=s[nowfloor].DeQueue(); wait(25); n.inel(); renshu++; } return 0; }
int e6()//电梯上升 { cout<<clock()/TIME-delay/TIME<<","<<nexttime/TIME<<":"<<"电梯正在上升中 "<<endl; wait(30); callcar[nowfloor]=0; nowfloor++; callup[nowfloor-1]=0; cout<<clock()/TIME-delay/TIME<<","<<nexttime/TIME<<":"<<"电梯上升到了第"<<nowfloor<<"层"<<endl; callcar[nowfloor]=0; f=1; return 0; }
int e7()//电梯下降 { cout<<clock()/TIME-delay/TIME<<","<<nexttime/TIME<<":"<<"电梯正在下降中 "<<endl; wait(30); callcar[nowfloor]=0; nowfloor--; calldown[nowfloor+1]=0; cout<<clock()/TIME-delay/TIME<<","<<nexttime/TIME<<":"<<"电梯下降到了第"<<nowfloor<<"层"<<endl; f=1; callcar[nowfloor]=0; return 0; }
int e8()//静止 { cout<<clock()/TIME-delay/TIME<<","<<nexttime/TIME<<":"<<"电梯静止,现在的楼层是:"<<nowfloor<<endl;