public CarLine Delete(byte agvnum) { CarLine carline = null; for (int i = 0; i < dockCount; i++) { if (dockQueue[i] == agvnum) { dockQueue[i] = 0; beforeEnterLine[i] = 0; dockingCount--; if (waitingQueue.Count > 0) { //此处不需要添加到停靠队列dockQueue中,当检测到进入停靠队列地标时,会在add中加入,与待装停靠不一样 carline = new CarLine(); carline.agvNum = waitingQueue[0].agvNum; carline.dockNum = i + 1; carline.lineNum = dockLine[i]; beforeEnterLine[i] = waitingQueue[0].lineNum; waitingQueue.RemoveAt(0); } break; } } return(carline); }
public CarLine Add(byte agvnum, byte line) { CarLine carline = null; if (dockingCount < dockCount) { for (int i = 0; i < dockCount; i++) { if (dockQueue[i] != 0) { dockQueue[i] = agvnum; beforeEnterLine[i] = line; carline = new CarLine(); carline.agvNum = agvnum; carline.dockNum = i + 1; carline.lineNum = dockLine[carline.dockNum - 1];//可能返回0,在调用此函数返回后需要判断线路是否为0 dockingCount++; break; } } } else { waitingQueue.Add(new AGVNumLine(agvnum, line)); } return(carline); }
public CarLine Delete(byte agvnum) { CarLine carline = null; for (int i = 0; i < dockCount; i++) { if (dockQueue[i] == agvnum) { dockQueue[i] = 0; //outDockLine[i] = 0;此时还没用 dockingCount--; if (waitingQueue.Count > 0) { //此处需要添加到停靠队列dockQueue中,当检测到已经进入到停靠队列地标时,与充电停靠不一样 carline = new CarLine(); carline.agvNum = waitingQueue[0]; carline.dockNum = i + 1; carline.lineNum = dockLine[i];//可能返回0,在调用此函数返回后需要判断线路是否为0 dockQueue[i] = carline.agvNum; waitingQueue.RemoveAt(0); dockingCount++; } break; } } return(carline); }
public CarLine Delete(byte agvnum) { CarLine carline = null; for (int i = 0; i < dockCount; i++) { if (dockQueue[i] == agvnum) { dockQueue[i] = 0; //outDockLine[i] = 0;此时还没用 dockingCount--; if (waitingQueue.Count>0) { //此处需要添加到停靠队列dockQueue中,当检测到已经进入到停靠队列地标时,与充电停靠不一样 carline = new CarLine(); carline.agvNum = waitingQueue[0]; carline.dockNum = i + 1; carline.lineNum = dockLine[i];//可能返回0,在调用此函数返回后需要判断线路是否为0 dockQueue[i] = carline.agvNum; waitingQueue.RemoveAt(0); dockingCount++; } break; } } return carline; }
public CarLine Add(byte agvnum) { CarLine carline = null; if(dockingCount < dockCount) { for (int i = 0; i < dockCount; i++) { if (dockQueue[i]==0) { dockQueue[i] = agvnum; carline = new CarLine(); carline.agvNum = agvnum; carline.dockNum = i + 1; carline.lineNum = dockLine[i];//可能返回0,在调用此函数返回后需要判断线路是否为0 dockingCount++; break; } } } else { waitingQueue.Add(agvnum); } return carline; }
public CarLine Delete(byte agvnum) { CarLine carline = null; for (int i = 0; i < dockCount; i++) { if (dockQueue[i] == agvnum) { dockQueue[i] = 0; beforeEnterLine[i] = 0; dockingCount--; if (waitingQueue.Count > 0) { //此处不需要添加到停靠队列dockQueue中,当检测到进入停靠队列地标时,会在add中加入,与待装停靠不一样 carline = new CarLine(); carline.agvNum = waitingQueue[0].agvNum; carline.dockNum = i + 1; carline.lineNum = dockLine[i]; beforeEnterLine[i] = waitingQueue[0].lineNum; waitingQueue.RemoveAt(0); } break; } } return carline; }
public CarLine Add(byte agvnum, Int16 line) { CarLine carline = null; if (dockingCount < dockCount) { for (int i = 0; i < dockCount; i++) { if (dockQueue[i] != 0) { dockQueue[i] = agvnum; beforeEnterLine[i] = line; carline = new CarLine(); carline.agvNum = agvnum; carline.dockNum = i + 1; carline.lineNum = dockLine[carline.dockNum - 1];//可能返回0,在调用此函数返回后需要判断线路是否为0 dockingCount++; break; } } } else { waitingQueue.Add(new AGVNumLine(agvnum,line)); } return carline; }