子rand_num=rand()%(G.vexnum-HosNum);//随机产生病人srand((unsigned)time(NULL));hold.DealTime=rand()%10;hold.OccurName=call_vex[rand_num].name;hold.Occur_GNum=call_vex[rand_num].Num;hold.AidNo=0;hold.EventType=0;hold.interval=-1;hold.Che_Num=-1;hold.Hos_Num=-1;EventList=InsertEvent(EventList,hold);for(CurrentTime=0;CurrentTime<=EndTime;){while(CurrentTime==GetEvent(EventList).DealTime){switch(GetEvent(EventList).EventType){case0:Event_Call();break;case1:Event_ArriveHome();break;case2:Event_ArriveHos();break;}}if(!kbhit()){Ambu_WaitTime();Display_All();Sleep((long)(2*delayMOD));CurrentTime++;}elseswitch(getch()){case'd':if(delayMOD==0);elsedelayMOD--;break;case'a':if(delayMOD==1000);elsedelayMOD++;break;case27:exit(0);case's':if(freqMOD==0);elsefreqMOD--;break;case'w':if(freqMOD==100);elsefreqMOD++;