Ejemplo n.º 1
0
 void transferIn_OnEnter(ActionPoint sender, Load load)
 {
     load.Rotate((float)Math.PI, 0, 0);
     load.Release();
     sender.Release();
 }
Ejemplo n.º 2
0
        public void ShuttleOnArrived()
        {
            if (CurrentTask != null)
            {
                if (trackRail.Destination.Distance == 0) //workarround for experior bug...if the straight transport section is already at the correct location then the load will not be releasable from the action point but if shuttle moves to th position then it can be released...WTF
                {
                    MoveShuttle(ParentMultiShuttle.workarround);
                    return;
                }
                else if (trackRail.Destination.Distance == ParentMultiShuttle.workarround)
                {
                    var cl = ParentMultiShuttle.ConveyorLocations.Find(x => x.LocName == CurrentTask.Source);
                    if (cl != null && cl.Active)
                    {
                        cl.ActiveLoad.Switch(transferIn); //switch from rack to shuttleAP
                    }
                }

                if (trackRail.Destination.Distance == CurrentTask.SourcePosition && shuttleConveyor.Route.Loads.Count == 0) //Have arrived at the rack bin location
                {
                    MeshInfo boxInfo = new MeshInfo()
                    {
                        color    = CurrentTask.caseData.colour,
                        filename = Case_Load.GraphicsMesh,
                        length   = CurrentTask.caseData.Length,
                        width    = CurrentTask.caseData.Width,
                        height   = CurrentTask.caseData.Height
                    };

                    Case_Load boxLoad = new Case_Load(boxInfo)
                    {
                        Weight = CurrentTask.caseData.Weight,
                        //SSCCBarcode    = CurrentTask.LoadID,
                        Identification = CurrentTask.LoadID,
                        Case_Data      = CurrentTask.caseData //[BG] 23/03/15 Removed cast
                    };

                    Load.Items.Add(boxLoad);
                    ParentMultiShuttle.LoadCreated(new LoadCreatedEventArgs(boxLoad));

                    ChangeShuttleConvDirection(CurrentTask.Source.Side(), ShuttleConvDirRef.Loading);

                    if (CurrentTask.Source.LoadDepth() == 1)
                    {
                        boxLoad.Switch(enterPointDepth1);
                    }
                    else
                    {
                        boxLoad.Switch(enterPointDepth2);
                    }
                }
                else if (trackRail.Destination.Distance == ParentMultiShuttle.workarround && CurrentTask.DestPosition == 0 || trackRail.Destination.Distance == CurrentTask.DestPosition)
                {
                    if (CurrentTask.Destination.RackXLocation() == 0) //Have arrived at rack conveyor
                    {
                        var v = ParentMultiShuttle.ConveyorLocations.Find(x => x.LocName == CurrentTask.Destination);
                        if (v == null)
                        {
                            Core.Environment.Log.Write(string.Format("Destination {0} does not exist. Are you trying to drop at an infeed rack conveyor or pick from an outfeed rackconveyor", CurrentTask.Destination), Color.Red);
                            Core.Environment.Scene.Pause();
                        }
                        else if (v.Active)
                        {
                            Core.Environment.Log.Write("Shuttle can't drop off destination is blocked", Color.Red);
                            return;
                        }

                        shuttleAP.Release();
                    }
                    else
                    {
                        //ParentMultiShuttle.ArrivedAtRackLocation(new TaskEventArgs(CurrentTask,shuttleAP.ActiveLoad));
                        shuttleAP.ActiveLoad.Release();
                    }
                }
                else
                {
                    ChangeShuttleConvDirection(CurrentTask.Source.Side(), ShuttleConvDirRef.Loading);
                }
            }
        }
Ejemplo n.º 3
0
 void enterPointDepth1_OnEnter(ActionPoint sender, Load load)
 {
     load.Rotate((float)Math.PI, 0, 0);
     load.Release();
     sender.Release();
 }