Exemplo n.º 1
0
        void theMultishuttle_OnArrivedAtOutfeedRackConvPosB(object sender, RackConveyorArrivalEventArgs e)
        {
            DCICaseData caseData = e._caseLoad.Case_Data as DCICaseData;

            //If destination is a drop station ("D") there will be no new StartTransportTelegram so continue and create a elevator task
            if (BaseDCIController.GetLocFields(caseData.Destination, PSDSRackLocFields.ConvType) == "D")
            {
                if (e._elevator.CurrentTask == null || (e._elevator.CurrentTask != null && !e._elevator.CurrentTask.RelevantElevatorTask(e._caseLoad)))
                {
                    string level = BaseDCIController.GetPSDSLocFields(caseData.Destination, PSDSRackLocFields.Level);

                    // create an elevator task
                    string aisle = e._locationName.AisleNumber().ToString().PadLeft(2, '0');
                    char   side  = (char)ExtensionMethods.Side(e._locationName);

                    ElevatorTask et = new ElevatorTask(null, e._caseLoad.Identification)
                    {
                        SourceLoadB      = e._locationName,
                        DestinationLoadB = string.Format("{0}{1}{2}{3}A", aisle, side, level, (char)ConveyorTypes.Drop), // aasyyxz: a=aisle, s = side, yy = level, x = input or output, Z = loc A or B e.g. 01R05OA
                        DropIndexLoadB   = caseData.DropIndex,
                        LoadCycle        = Cycle.Single,
                        UnloadCycle      = Cycle.Single,
                        Flow             = TaskType.Outfeed
                    };

                    string elevatorName = string.Format("{0}{1}", side, aisle);
                    theMultishuttle.elevators.First(x => x.ElevatorName == elevatorName).ElevatorTasks.Add(et);
                }
            }
        }
Exemplo n.º 2
0
        void theMultishuttle_OnArrivedAtOutfeedRackConvPosA(object sender, RackConveyorArrivalEventArgs e)
        {
            DCICaseData caseData = e._caseLoad.Case_Data as DCICaseData;

            caseData.Current = FormatRackConvLocation(e._locationName, ConveyorTypes.OutfeedRack); //Update the location

            if (BaseDCIController.GetLocFields(caseData.Destination, PSDSRackLocFields.ConvType) == "D")
            {
                string sendMessage = controller.CreateTelegramFromLoad(TelegramTypes.TUNotification, e._caseLoad);
                controller.SendTelegram(sendMessage); //Always Send a notification at location A

                //Combine a task with an existing task but only if the final destination is a drop station because if destination is the rack conveyor then we need to wait for another message from the WMS
                if (e._elevator.CurrentTask != null && e._rackConveyor.LocationB.Active && !e._elevator.CurrentTask.RelevantElevatorTask(e._rackConveyor.LocationB.ActiveLoad))
                {
                    string aisle     = e._elevator.AisleNumber.ToString().PadLeft(2, '0');
                    string level     = BaseDCIController.GetLocFields(caseData.Destination, PSDSRackLocFields.Level);
                    string destLoadA = string.Format("{0}{1}{2}{3}A", aisle, (char)ExtensionMethods.Side(e._locationName), level, (char)ConveyorTypes.Drop);

                    //Create the task but do not add it to elevator tasks list
                    ElevatorTask et = new ElevatorTask(e._caseLoad.Identification, null)
                    {
                        SourceLoadA          = e._locationName,
                        DestinationLoadA     = destLoadA,
                        SourceLoadAConv      = theMultishuttle.GetConveyorFromLocName(e._locationName),
                        DestinationLoadAConv = theMultishuttle.GetConveyorFromLocName(destLoadA),
                        Elevator             = e._elevator
                    };

                    //This task should just be added and not combined as the combining is now done later
                    //TODO: Make it so that direct outfeed loads still work
                    et.CreateNewDoubleLoadCycleTask(et, e._rackConveyor.LocationB.ActiveLoad.Identification);
                }
            }
            else
            {
                string sendMessage = controller.CreateTelegramFromLoad(TelegramTypes.TUReport, e._caseLoad);
                controller.SendTelegram(sendMessage); //Always Send a notification at location A
            }
        }
Exemplo n.º 3
0
        void theMultishuttle_OnArrivedAtShuttle(object sender, TaskEventArgs e)
        {
            Case_Load   caseLoad = (Case_Load)e._load;
            DCICaseData caseData = caseLoad.Case_Data as DCICaseData;

            string aisle = BaseDCIController.GetBinLocField(caseData.Source, BinLocFields.Aisle);

            if (aisle == "" && ((ShuttleTask)e._task).Source.Length > 2) //If you cannot get the aisle from the bin location, then get from the task instead
            {
                string checkAisle = ((ShuttleTask)e._task).Source.Substring(0, 2);
                int    result;
                if (int.TryParse(checkAisle, out result))
                {
                    aisle = checkAisle;
                }
            }

            caseData.Current = string.Format("MSAI{0}LV{1}SH01", aisle, ((ShuttleTask)e._task).Level.ToString().PadLeft(2, '0'));

            string sendMessage = controller.CreateTelegramFromLoad(TelegramTypes.TUNotification, caseLoad);

            controller.SendTelegram(sendMessage);
        }