public virtual TaskStatus OnUpdate()
        {
            MerchantActor merchant           = this.Merchant;
            ActionPoint   bookingActionPoint = merchant.BookingActionPoint;

            if (Object.op_Equality((Object)bookingActionPoint, (Object)null))
            {
                return((TaskStatus)1);
            }
            bookingActionPoint.RemoveBooking((Actor)merchant);
            merchant.BookingActionPoint = (ActionPoint)null;
            return((TaskStatus)2);
        }
Example #2
0
        //[Browsable(false)]
        //protected FixPoint LeftFixPoint {
        //    get {
        //        return leftFixPoint;
        //    }
        //}

        //[Browsable(false)]
        //protected FixPoint RightFixPoint {
        //    get {
        //        return rightFixPoint;
        //    }
        //}

        #endregion

        #region Methods

        public override void InsertActionPoint(ActionPoint ap)
        {
            if (TransportSection == null)
            {
                return;
            }

            TransportSection.Route.InsertActionPoint(ap);
            ap.Routing = true;
            ap.Visible = true;

            this.apUser = ap;
        }
Example #3
0
        private void Car1Leaving_OnEnter(ActionPoint sender, Load load)
        {
            if (currentJob?.JobType != TransferCarJob.JobTypes.PickDrop)
                return;

            car1Done = true;

            if (car1Done)
            {
                currentJob = null;
                NextJob();
            }
        }
Example #4
0
        public SorterChute(SorterChuteInfo info)
            : base(info)
        {
            settings = info;
            EndFixPoint.OnSnapped     += EndFixPoint_Snapped;
            StartFixPoint.OnSnapped   += StartFixPoint_Snapped;
            StartFixPoint.OnUnSnapped += StartFixPoint_UnSnapped;

            chutePoint            = TransportSection.Route.InsertActionPoint(0);
            chutePoint.OnEnter   += chutePoint_OnEnter;
            readyTimer            = new Timer(1);
            readyTimer.OnElapsed += readyTimer_OnElapsed;
        }
 public virtual void OnBehaviorComplete()
 {
     if (Object.op_Equality((Object)this._bookingPoint, (Object)null))
     {
         return;
     }
     this._bookingPoint.RemoveBooking((Actor)this._merchant);
     if (Object.op_Equality((Object)this._merchant.BookingActionPoint, (Object)this._bookingPoint))
     {
         this._merchant.BookingActionPoint = (ActionPoint)null;
     }
     this._bookingPoint = (ActionPoint)null;
 }
Example #6
0
        public TwoToOneMerge(TwoToOneMergeInfo info) : base(info)
        {
            info.height  = info.height * 2; // assembley is placed at height/2 so that it comes out at height ?!!??
            twoToOneInfo = info;
            rhsConveyor  = new StraightConveyor(NewStraightInfo());
            Add(rhsConveyor);
            rhsEnd = rhsConveyor.TransportSection.Route.InsertActionPoint(3);

            lhsConveyor = new StraightConveyor(NewStraightInfo());
            Add(lhsConveyor);
            lhsEnd = lhsConveyor.TransportSection.Route.InsertActionPoint(3);

            lhsConveyor.EndFixPoint.Enabled = false; //Disable one of the fixpoints so that there is only one that can be fixed to
            lhsConveyor.EndFixPoint.Visible = false;

            #region Make it look nice

            BasicInfo boxInfo = new BasicInfo
            {
                length = info.length,
                width  = info.width,
                height = 0.05f,
                color  = Core.Environment.Scene.DefaultColor
            };

            box = new Cube(boxInfo);
            Add(box);

            #endregion

            lhsEnd.OnEnter   += lhsEnd_OnEnter;
            TwoToOneWidth     = info.width;
            TwoToOneLength    = info.length;
            InternalConvWidth = info.internalConvWidth;
            UpdateMergeAngles();

            lhsConveyor.RouteAvailable = RouteStatuses.Request;              //We are setting this to request because the DHDM controls the release of loads from the previous conveyor onto it.
            rhsConveyor.RouteAvailable = RouteStatuses.Request;              //same here

            ReleaseDelayTimer            = new Core.Timer(ReleaseDelayTime); //loads will be only be released when the timer elapses the timer will start when a load transfers
            ReleaseDelayTimer.OnElapsed += ReleaseDelayTimer_OnElapsed;

            lhsConveyor.StartFixPoint.OnSnapped   += LHSStartFixPoint_OnSnapped;
            lhsConveyor.StartFixPoint.OnUnSnapped += LHSStartFixPoint_OnUnSnapped;

            rhsConveyor.StartFixPoint.OnSnapped   += RHSStartFixPoint_OnSnapped;
            rhsConveyor.StartFixPoint.OnUnSnapped += RHSStartFixPoint_OnUnSnapped;

            rhsConveyor.OnNextRouteStatusAvailableChanged += rhsConveyor_OnNextRouteStatusAvailableChanged;
        }
Example #7
0
        private void Car1OnBoard_OnEnter(ActionPoint sender, Load load)
        {
            sender.Parent.Motor.Stop();
            if (currentJob?.JobType != TransferCarJob.JobTypes.PickDrop)
                return;

            car1Done = true;

            if (car1Done)
            {
                currentJob = null;
                NextJob();
            }
        }
        protected IObservable <TimeInterval <float> > FadeOutActionAsObservable(
            PlayerActor actor,
            int sex,
            Transform t,
            ActionPoint actionPoint)
        {
            if (Object.op_Inequality((Object)t, (Object)null))
            {
                Vector3         position = actor.Position;
                Quaternion      rotation = actor.Rotation;
                ActionPointInfo outInfo;
                actionPoint.TryGetPlayerActionPointInfo(actor.EventKey, out outInfo);
                Dictionary <int, Dictionary <int, PlayState> > dictionary1;
                Dictionary <int, PlayState> dictionary2;
                PlayState playState;
                if (Singleton <Resources> .Instance.Animation.PlayerActionAnimTable.TryGetValue(sex, out dictionary1) && dictionary1.TryGetValue(outInfo.eventID, out dictionary2) && dictionary2.TryGetValue(outInfo.poseID, out playState))
                {
                    IConnectableObservable <TimeInterval <float> > iconnectableObservable = (IConnectableObservable <TimeInterval <float> >)Observable.Publish <TimeInterval <float> >((IObservable <M0>)Observable.FrameTimeInterval <float>((IObservable <M0>)ObservableEasing.Linear(playState.MainStateInfo.OutStateInfo.FadeSecond, false), false));
                    iconnectableObservable.Connect();
                    switch (playState.DirectionType)
                    {
                    case 0:
                        if (playState.MainStateInfo.OutStateInfo.EnableFade)
                        {
                            ObservableExtensions.Subscribe <TimeInterval <float> >((IObservable <M0>)iconnectableObservable, (Action <M0>)(x =>
                            {
                                actor.Position = Vector3.Lerp(position, t.get_position(), ((TimeInterval <float>) ref x).get_Value());
                                actor.Rotation = Quaternion.Slerp(rotation, t.get_rotation(), ((TimeInterval <float>) ref x).get_Value());
                            }));
                            break;
                        }
                        actor.Position = t.get_position();
                        actor.Rotation = t.get_rotation();
                        break;

                    case 1:
                        Quaternion lookRotation = Quaternion.LookRotation(Vector3.op_Subtraction(actionPoint.Position, position));
                        if (playState.MainStateInfo.OutStateInfo.EnableFade)
                        {
                            ObservableExtensions.Subscribe <TimeInterval <float> >((IObservable <M0>)iconnectableObservable, (Action <M0>)(x => actor.Rotation = Quaternion.Slerp(rotation, lookRotation, ((TimeInterval <float>) ref x).get_Value())));
                            break;
                        }
                        actor.Rotation = lookRotation;
                        break;
                    }
                    return((IObservable <TimeInterval <float> >)iconnectableObservable);
                }
            }
            return((IObservable <TimeInterval <float> >)Observable.Empty <TimeInterval <float> >());
        }
Example #9
0
 public override void OnClick(Click type)
 {
     if (!CheckClick())
     {
         return;
     }
     if (type == Click.MOUSE_RIGHT_BUTTON || type == Click.TOUCH)
     {
         ActionMenu.Instance.CurrentAction = this;
         MenuManager.Instance.ShowMenu(MenuManager.Instance.PuckMenu);
         selected = true;
         ActionPoint.HighlightAP(true);
     }
 }
Example #10
0
        public StraightConveyor(StraightConveyorInfo info) : base(info)
        {
            try
            {
                straightinfo = info;
                TransportSection.Route.DragDropLoad = false;
                Entering          = TransportSection.Route.InsertActionPoint(0);
                Leaving           = TransportSection.Route.InsertActionPoint(TransportSection.Route.Length);
                Entering.OnEnter += entering_OnEnter;
                // Leaving.OnEnter += leaving_OnEnter;
                Core.Environment.Scene.OnLoaded += Scene_OnLoaded;

                Intersectable = false;

                if (TransportSection.Route.Arrow != null)
                {
                    TransportSection.Route.Arrow.Visible = false;
                }

                //Length does not update when dragging so disabled for now (Update on length is required to ensure that photocells are positioned correctly)
                StartFixPoint.Dragable = false;
                EndFixPoint.Dragable   = false;

                arrow = new DematicArrow(this, Width);

                startLine = new Cube(Color.Black, Width + 0.005f, 0.055f, 0.004f);
                Add(startLine);
                startLine.LocalPosition = new Vector3(Length / 2 + 0.002f, 0, 0);
                startLine.Yaw           = (float)Math.PI / 2;

                endLine = new Cube(Color.Black, Width + 0.005f, 0.055f, 0.004f);
                Add(endLine);
                endLine.LocalPosition = new Vector3(-Length / 2 - 0.002f, 0, 0);
                endLine.Yaw           = (float)Math.PI / 2;

                EndFixPoint.OnUnSnapped += EndFixPoint_OnUnSnapped;
                EndFixPoint.OnSnapped   += EndFixPoint_OnSnapped;

                StartFixPoint.OnUnSnapped += StartFixPoint_OnUnSnapped;
                StartFixPoint.OnSnapped   += StartFixPoint_OnSnapped;

                ThisRouteStatus.OnRouteStatusChanged            += ThisRouteStatus_OnAvailableChanged;
                TransportSection.Route.Motor.OnDirectionChanged += Motor_OnDirectionChanged;
            }
            catch (Exception ex)
            {
                Core.Environment.Log.Write(ex.Message);
            }
        }
Example #11
0
        public static event OnLiftRaisedEvent OnLiftRaisedStatic;        // This is the event that can be subscribed to in the routing script

        public Lift(LiftInfo info) : base(info)
        {
            liftInfo    = info;
            info.height = info.height * 2; // assembley is placed at height/2 so that it comes out at height ?!!??

            // Rail
            lift = new StraightTransportSection(Color.Gray, LiftHeight, 0.1f, 0.02f);
            Add(lift);
            lift.Route.Motor.Speed = 1; // m/s ?
            lift.LocalRoll         = -(float)Math.PI / 2.0f;

            // Load Vehicle
            liftLoad           = Core.Loads.Load.CreateBox(0.1f, 0.1f, 0.1f, Color.Red);
            liftLoad.Embedded  = true;
            liftLoad.Deletable = false;
            lift.Route.Add(liftLoad);
            liftLoad.OnPositionChanged += Liftload_OnPositionChanged;
            liftLoad.Stop();
            liftLoad.Visible = false;

            // Action point for lift rail
            liftStopPoint          = lift.Route.InsertActionPoint(LiftHeight);
            liftStopPoint.Visible  = false;
            liftStopPoint.OnEnter += LiftStopPoint_OnEnter;

            // Conveyor
            LiftStraightInfo straightInfo = new LiftStraightInfo
            {
                ConveyorType = PalletConveyorType.Roller,
                thickness    = 0.05f,
                spacing      = 0.1f,
                width        = liftInfo.ConveyorWidth,
                length       = liftInfo.ConveyorLength,
                height       = 0.7f,
                speed        = 0.3f,
                color        = liftInfo.color,
            };

            LiftConveyor = new LiftStraight(straightInfo);
            LiftConveyor.LineReleasePhotocell.OnPhotocellStatusChanged += LineReleasePhotocell_OnPhotocellStatusChanged;
            LiftConveyor.EndFixPoint.OnSnapped += EndFixPoint_OnSnapped;
            Add(LiftConveyor);

            var zposition = LiftConveyor.Width / 2.0f + 0.02f;

            lift.LocalPosition = new Vector3(0, LiftHeight / 2.0f, zposition);

            Reset();
        }
Example #12
0
        public SorterInduction(SorterInductionInfo info)
            : base(info)
        {
            EndFixPoint.OnSnapped   += EndFixPoint_Snapped;
            EndFixPoint.OnUnSnapped += EndFixPoint_UnSnapped;
            StartFixPoint.OnSnapped += StartFixPoint_Snapped;

            if (info.InductionDisctance > Length)
            {
                info.InductionDisctance = Length / 2;
            }

            inductionPoint      = TransportSection.Route.InsertActionPoint(info.InductionDisctance);
            inductionPoint.Edge = ActionPoint.Edges.Leading;
        }
Example #13
0
        //Finds an empty storage location in the relevant aisle to store the pallet
        private ActionPoint findUnoccupiedLocation(Load load, List <KeyValuePair <ActionPoint, bool> > aisleLocations)
        {
            ActionPoint destination = null;

            for (int i = 0; i < aisleLocations.Count; i++)
            {
                if (aisleLocations[i].Value == true)
                {
                    aisleLocations[i] = new KeyValuePair <ActionPoint, bool>(aisleLocations[i].Key, false);
                    destination       = aisleLocations[i].Key;
                    return(destination);
                }
            }
            return(destination);
        }
Example #14
0
 public DematicSensor()
 {
     base.Visible  = false;
     base.Color    = Color.Red;
     base.Edge     = Edges.Leading;
     base.OnEnter += Entering;
     OnRemoved    += Sensor_Removed;
     leaving       = new ActionPoint {
         Edge = Edges.Trailing
     };
     leaving.Visible   = false;
     leaving.Color     = Color.Blue;
     leaving.OnEnter  += Leaving;
     OnEnabledChanged += Sensor_OnEnabledChanged;
 }
Example #15
0
    public bool Move(Point point)
    {
        if (ActionPoint.PointsRemaining < MoveAPCost)
        {
            return(false);
        }
        if (!Movement.Move(point))
        {
            return(false);
        }

        ActionPoint.Use(MoveAPCost);

        return(true);
    }
Example #16
0
        private void ClearPreviousPhotocells(Load load)
        {
            //Look back at the previous conveyor and clear the load from any photocells that it may still be covering
            //This is to stop the load from locking up the divert when the divert point is closer than half the load
            //length away from the feeding conveyor photocell.

            for (int i = load.Route.ActionPoints.Count - 1; i >= 0; i--)
            {
                ActionPoint actionPoint = load.Route.ActionPoints[i];
                if (actionPoint is DematicSensor && actionPoint.ActiveLoad == load)
                {
                    ((DematicSensor)actionPoint).ForceLoadClear(load);
                    return;
                }
            }
        }
Example #17
0
 /// <summary>
 /// Transfer the load to the next conveyor by switching on APs
 /// </summary>
 void ExitPoint_OnEnter(ActionPoint sender, Load load)
 {
     try
     {
         if (Elevator.CurrentTask != null)
         {
             load.Switch(Elevator.CurrentTask.GetDestConvOfLoad((Case_Load)load).Entering);
         }
     }
     catch (Exception ex)
     {
         Log.Write(ex.ToString(), Color.Red);
         Log.Write(string.Format("Load: {0}, Name: {1}", load.Identification, Name), Color.Red);
         Experior.Core.Environment.Scene.Pause();
     }
 }
 public HttpResponseMessage CreateActionPoint([FromBody] ActionPoint actionPoint)
 {
     try
     {
         if (ModelState.IsValid)
         {
             actionPoint = _actionPointProvider.AddActionPoint(actionPoint);
             return(Request.CreateResponse(HttpStatusCode.OK, actionPoint));
         }
         return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
     }
     catch (Exception exception)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, exception.Message));
     }
 }
        private TransferCar.TransferCarSide TransferSide(ActionPoint destination)
        {
            Vector3 dir = new Vector3(0, 0, 1);

            dir.TransformCoordinate(transferCar.Orientation);

            var ap = destination.Position - transferCar.Position;
            var d  = Vector3.Dot(dir, ap);

            if (d > 0)
            {
                return(TransferCar.TransferCarSide.Left);
            }

            return(TransferCar.TransferCarSide.Right);
        }
Example #20
0
        void pos1pd_OnEnter(ActionPoint sender, Load load) //First position the load comes to
        {
            if (pickConveyor.TransportSection.Route.Loads.Count == 2 && pickConveyor.TransportSection.Route.Loads.Last().Distance > load.Distance)
            {
                load.Stop();
            }

            if (PickRouteCount() == 2 && pos1Pick.Active)
            {
                LoadsArrivedAtPickStation(pos1Pick.ActiveLoad, load);
            }
            else if (PickRouteCount() == 1)
            {
                LoadsArrivedAtPickStation(null, load);
            }
        }
 public HttpResponseMessage UpdateActionPoint(int id, [FromBody] ActionPoint actionPoint)
 {
     try
     {
         if (ModelState.IsValid)
         {
             _actionPointProvider.UpdateActionPoint(id, actionPoint);
             return(Request.CreateResponse(HttpStatusCode.OK, "Successfully updated!"));
         }
         return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
     }
     catch (Exception exception)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, exception.Message));
     }
 }
Example #22
0
        public void rackConvLocA_Enter(ActionPoint sender, Core.Loads.Load load)
        {
            if (LocationA.LocName.ConvType() == ConveyorTypes.OutfeedRack)
            {
                Elevator.ParentMultiShuttle.ArrivedAtOutfeedRackConvPosA(new RackConveyorArrivalEventArgs(LocationA.LocName, (Case_Load)load, Elevator, this, null));
                Elevator.ParentMultiShuttle.shuttlecars[Level].CurrentTask = null; //If outfeed then shuttle must have finished its current task

                if (TransportSection.Route.Loads.Count == 2)
                {
                    load.Stop();
                }
                else
                {
                    load.Release();
                }
            }
            else if (LocationA.LocName.ConvType() == ConveyorTypes.InfeedRack)
            {
                Cycle?unloadCycle = null;

                //if (RelevantElevatorTask(Elevator.CurrentTask))
                if (RelevantElevatorTask(LocationA, LocationB))
                {
                    unloadCycle = Elevator.CurrentTask.UnloadCycle;
                }

                Elevator.ParentMultiShuttle.ArrivedAtInfeedRackConvPosA(new RackConveyorArrivalEventArgs(LocationA.LocName, (Case_Load)load, Elevator, this, unloadCycle));
                TryClearElevatorTask(Elevator.CurrentTask);

                if (TransportSection.Route.Loads.Count > 1)
                {
                    load.Stop();
                }

                if (Elevator.ElevatorConveyor.TransportSection.Route.Loads.Count > 0) //release the elevator load from A
                {
                    Elevator.ElevatorConveyor.UnLoading = true;
                    Elevator.ElevatorConveyor.LocationA.Release();
                    //Elevator.ReleaseLocationAFFS(Elevator.ElevatorConveyor.LocationA.ActiveLoad, "RackConveyor 309");
                }

                //if ((Elevator.CurrentTask != null && Elevator.CurrentTask.UnloadCycle == Cycle.Single && (Elevator.CurrentTask.BarcodeLoadA == ((Case_Load)load).SSCCBarcode || Elevator.CurrentTask.BarcodeLoadB == ((Case_Load)load).SSCCBarcode)) && Elevator.ElevatorConveyor.Route.Loads.Count == 0 )
                //                    {
                //    Elevator.CurrentTask = null;  // Elevator task is now complete
                //}
            }
        }
Example #23
0
    // Use this for initialization
    void Start()
    {
        m_actionPointInfos.Clear();
        Hashtable actionPointDB = sdConfDataMgr.Instance().m_actionPointDB;

        foreach (DictionaryEntry item in actionPointDB)
        {
            ActionPoint     actionPoint     = item.Value as ActionPoint;
            ActionPointInfo actionPointInfo = new ActionPointInfo();
            actionPointInfo.SpiritNum    = actionPoint.SpiritNum;
            actionPointInfo.CostNonCash  = actionPoint.CostNonCash;
            actionPointInfo.NeedVIPLevel = actionPoint.NeedVIPLevel;

            m_actionPointInfos.Add(actionPointInfo);
        }

        m_actionPointInfos.Sort(delegate(ActionPointInfo x, ActionPointInfo y)
        {
            return(x.SpiritNum.CompareTo(y.SpiritNum));
        });

        /*
         * if (Application.platform == RuntimePlatform.Android ||
         *  Application.platform == RuntimePlatform.IPhonePlayer)
         * {
         *      GHome.GetInstance().GetAreaConfig((code, msg, data) =>
         *      {
         *              if (code == 0)
         *              {
         *                      string json = (string)data["data"];
         *                      JsonNode NODE = new JsonNode();
         *                      int iPOS = 0;
         *                      NODE.Parse(json,ref iPOS);
         *                      List<JsonNode> lstAREA = new List<JsonNode>();
         *                      NODE.FindListHasAttibuteName("area_code",lstAREA);
         *                      //foreach()
         *                      //SDGlobal.phoneNumber = (string)data["userId"];
         *                      //SDGlobal.ticket = (string)data["ticket"];
         *              }
         *              else
         *              {
         *                      sdUICharacter.Instance.ShowMsgLine("GHome.GetInstance().GetAreaConfig() failure!", Color.red);
         *              }
         *      });
         * }
         */
    }
Example #24
0
 void endAP_OnEnter(ActionPoint sender, Load load)
 {
     if (threeWaySwitch.ControlType == ControlTypes.Controller && threeWaySwitch.OnArrivedAtTransferController != null)
     {
         if (threeWaySwitch.OnDivertCompleteController != null)
         {
             threeWaySwitch.OnDivertCompleteController(this, new ThreeWayDivertedArgs(this.convPosition, load));
         }
     }
     else if (threeWaySwitch.ControlType == ControlTypes.Project_Script && OnArrivedAtTransferRoutingScript != null)
     {
         if (OnDivertCompleteRoutingScript != null)
         {
             OnDivertCompleteRoutingScript(this, new ThreeWayDivertedArgs(this.convPosition, load));
         }
     }
 }
Example #25
0
        private void Lower2_OnEnter(ActionPoint sender, Core.Loads.Load load)
        {
            if ((string)load.UserData != "PICKED")
            {
                if (!upper2.Active)
                {
                    load.Stop();
                    load.Translate(() => load.Switch(upper2, true), new Microsoft.DirectX.Vector3(0, 0.5f, 0), 1.5f);
                }
                else
                {
                    Log.Write("There is a problem in the picking station, tell Barry he would love to fix it");
                    Pause();
                }
            }
            else //load has been picked and either lowered or picked at the first station
            {
                if (lastUpper2 == load)
                {
                    lowering2 = null;
                }

                if (NextRouteStatus.Available != Experior.Dematic.Base.RouteStatuses.Available)
                {
                    load.Stop();
                }
                else
                {
                    releaseLower2();
                }
            }

            //if the load has arrived from the
            if (lower1ToLower2 == load)
            {
                lower1ToLower2 = null;
                if (waitingToLower1 != null)
                {
                    StartLower1();
                }
                else
                {
                    InfeedCheck();
                }
            }
        }
Example #26
0
        public Shuttle(ShuttleInfo info) : base(info)
        {
            shuttleInfo = info;
            trackRail   = new TrackRail(info.multiShuttleinfo, info.level, info.parent)
            {
                Name        = "S" + info.level.ToString().PadLeft(2, '0'),
                ThisShuttle = this
            };

            ParentMultiShuttle = info.parent;
            AddPart(trackRail);

            shuttleConveyor = new StraightTransportSection(Core.Environment.Scene.DefaultColor, ParentMultiShuttle.DepthDistPos2 * 2, 0.5f)
            {
                Height = 0.05f
            };
            Add(shuttleConveyor, new Vector3(trackRail.Length / 2, 0, 0));
            shuttleConveyor.LocalYaw = (float)Math.PI / 2;

            transferIn          = shuttleConveyor.Route.InsertActionPoint(ParentMultiShuttle.DepthDistPos2 - ((info.multiShuttleinfo.RackConveyorWidth / 2) + (info.multiShuttleinfo.carwidth / 2)));
            transferIn.OnEnter += transferIn_OnEnter;

            transferOut          = shuttleConveyor.Route.InsertActionPoint(ParentMultiShuttle.DepthDistPos2 + ((info.multiShuttleinfo.RackConveyorWidth / 2) + (info.multiShuttleinfo.carwidth / 2)));
            transferOut.OnEnter += transferOut_OnEnter;

            shuttleAP          = shuttleConveyor.Route.InsertActionPoint(shuttleConveyor.Length / 2);
            shuttleAP.OnEnter += shuttleAP_OnEnter;

            enterPointDepth1          = shuttleConveyor.Route.InsertActionPoint(ParentMultiShuttle.DepthDistPos2 - ParentMultiShuttle.DepthDistPos1);
            enterPointDepth1.OnEnter += enterPointDepth1_OnEnter;

            enterPointDepth2 = shuttleConveyor.Route.InsertActionPoint(0);

            exitPointDepth1          = shuttleConveyor.Route.InsertActionPoint(ParentMultiShuttle.DepthDistPos2 + ParentMultiShuttle.DepthDistPos1);
            exitPointDepth1.OnEnter += exitPointDepth1_OnEnter;

            exitPointDepth2          = shuttleConveyor.Route.InsertActionPoint(shuttleConveyor.Length);
            exitPointDepth2.OnEnter += exitPointDepth2_OnEnter;

            trackRail.Car.OnPositionChanged += Car_OnPositionChanged;

            ShuttleTasks.Clear();
            ShuttleTasks.CollectionChanged += ShuttleTasks_CollectionChanged;

            // MoveShuttle(ParentMultiShuttle.workarround);
        }
Example #27
0
        void apHold_OnEnter(ActionPoint sender, Load load)
        {
            load.Stop();
            if (PreviousLoadWaiting.LoadWaiting)
            {
                feedSection.RouteAvailable = RouteStatuses.Available;
                LoadTransferringIn         = true;
            }
            else
            {
                feedSection.RouteAvailable = RouteStatuses.Request;
                LoadTransferringIn         = false;
            }

            //When the first load arrives at the hold position, then start the Single load timer
            SingleTimer.Start();
        }
Example #28
0
        private void Leaving(ActionPoint sender, Load load)
        {
            load.OnDisposed -= CurrentLoadDisposed;
            ClearCurrentLoadRemovedEvent(load.Route);

            OnLeave?.Invoke(this, load);

            if (previousload != null && previousload.Equals(load))
            {
                previousload = null;
            }

            if (currentload != null && currentload.Equals(load))
            {
                currentload = null;
            }
        }
Example #29
0
        public override void TreeTraversal(ADecisionNode p_sourceNode)
        {
            //TODO -> Store executed attacks in a vector, then the consumer read the vector and transforms them in EntityActions.
            ActionPoint     l_sourceEntityActionPoint = EntityComponent.get_component <ActionPoint>(SourceEntity);
            ActionPointData l_virtualActionPointData  = new ActionPointData()
            {
                InitialActionPoints = l_sourceEntityActionPoint.ActionPointData.InitialActionPoints,
                CurrentActionPoints = l_sourceEntityActionPoint.ActionPointData.InitialActionPoints
            };

            while (l_virtualActionPointData.CurrentActionPoints >= Attack.AttackData.APCost)
            {
                ActionPointData.add(ref l_virtualActionPointData, -1 * Attack.AttackData.APCost);
                DamageDone      += Attack.AttackData.Damage;
                NumberOfAttacks += 1;
            }
        }
        public void PickupAndDrop(ActionPoint pickPoint, ActionPoint dropPoint)
        {
            //Goto pick
            var job = new TransferCarJob
            {
                JobType           = TransferCarJob.JobTypes.Goto,
                DestinationLength = Distance(pickPoint)
            };

            transferCar.AddJob(job);

            //Pick pallet
            job = new TransferCarJob {
                JobType = TransferCarJob.JobTypes.PickDrop
            };
            var pick = new TransferCarJob.PickDropInfo();

            job.PickDropInfos.Add(pick);
            pick.TransferSide = TransferSide(pickPoint);
            pick.ActionPoint  = pickPoint;
            pick.JobType      = TransferCarJob.PickDropInfo.PickDropTypes.Pick;
            pick.DestinationMotorDirection = DestinationMotorDirection(pickPoint, pick.JobType);
            transferCar.AddJob(job);

            //Goto drop
            job = new TransferCarJob
            {
                JobType           = TransferCarJob.JobTypes.Goto,
                DestinationLength = Distance(dropPoint)
            };
            transferCar.AddJob(job);

            //Drop pallet
            job = new TransferCarJob {
                JobType = TransferCarJob.JobTypes.PickDrop
            };
            var drop = new TransferCarJob.PickDropInfo();

            job.PickDropInfos.Add(drop);
            drop.TransferSide = TransferSide(dropPoint);
            drop.ActionPoint  = dropPoint;
            drop.JobType      = TransferCarJob.PickDropInfo.PickDropTypes.Drop;
            drop.DestinationMotorDirection = DestinationMotorDirection(dropPoint, drop.JobType);
            transferCar.AddJob(job);
        }