Exemplo n.º 1
0
Arquivo: Mc.cs Projeto: RL-BB/WGPM
        public List <ushort> GetSpirilSpeed(Mc m1, Mc m2)
        {
            List <ushort> ssArr = new List <ushort>();
            //①找到工作煤车
            Vehicle car = m1.JobCar ? m1 : m2;

            ssArr.Add((ushort)((McDataRead)car.DataRead).SpiralSpeed1);
            ssArr.Add((ushort)((McDataRead)car.DataRead).SpiralSpeed1);
            ssArr.Add((ushort)((McDataRead)car.DataRead).SpiralSpeed1);
            ssArr.Add((ushort)((McDataRead)car.DataRead).SpiralSpeed1);
            return(ssArr);
        }
Exemplo n.º 2
0
Arquivo: Mc.cs Projeto: RL-BB/WGPM
        public Vehicle GetJobCar(Mc car1, Mc car2)
        {
            if (CokeRoom.StokingPlan.Count == 0)
            {
                return(car1);
            }
            int s1 = Math.Abs(((Mc)car1).DataRead.PhysicalAddr - Addrs.PRoomNumDic[CokeRoom.StokingPlan[0].RoomNum]);
            int s2 = Math.Abs(((Mc)car2).DataRead.PhysicalAddr - Addrs.PRoomNumDic[CokeRoom.StokingPlan[0].RoomNum]);

            car1.JobCar = (s1 <= s2) ? true : false;
            car2.JobCar = !car1.JobCar;
            Vehicle car = car1.JobCar ? car1 : car2;

            return(car);
        }