Пример #1
0
 public void supervise()
 {
     if (!statusFlag.flagOrdered)
     {
         robotAgentOrdered = null;
         for (int index = 0; index < limitedAreainReady.Length; index++)
         {
             for (int pos = 0; pos < RegistrationAgent.robotAgentRegisteredList.Count; pos++)
             {
                 RobotAgent robotAgent = RegistrationAgent.robotAgentRegisteredList.ElementAt(pos).Value;
                 if (robotAgent.statusFlag.atReadyArea == true && robotAgent.statusFlag.flagProcess == false)
                 {
                     robotAgentOrdered = robotAgent;
                     robotAgent.statusFlag.flagProcess = true;
                     statusFlag.flagOrdered            = true;
                     robotAgent.requestRobotGotoCheckInDocking();
                     break;
                 }
             }
         }
     }
     else
     {
         //reset statusFlag.flagOrdered=false;
         ResetFlagOrderToReadyArea(robotAgentOrdered.robotInfo.loc);
     }
 }