Пример #1
0
        public bool UnLoading = false; //we need to tag outfeeding as there is no difference between picking up 2 at differnt levels and dropping off at differnt levels


        public ElevatorConveyor(ElevatorConveyorInfo info) : base(info)
        {
            Elevator          = info.Elevator;
            LocationA.LocName = string.Format("{0}{1}{2}{3}{4}", Elevator.AisleNumber.ToString().PadLeft(2, '0'), (char)Elevator.Side, "00", (char)ConveyorTypes.Elevator, "A");
            LocationB.LocName = string.Format("{0}{1}{2}{3}{4}", Elevator.AisleNumber.ToString().PadLeft(2, '0'), (char)Elevator.Side, "00", (char)ConveyorTypes.Elevator, "B");

            // LocationA.LocName = LocationA.Name;
            // LocationB.LocName = LocationB.Name;

            Route.InsertActionPoint(locationB, Route.Length / 2 + Route.Length / 4);
            Route.InsertActionPoint(locationA, Route.Length / 2 - Route.Length / 4);

            LocationA.OnEnter += LocationA_OnEnter;
            LocationB.OnEnter += LocationB_OnEnter;
            Elevator.ParentMultiShuttle.ConveyorLocations.Add(LocationA);
            Elevator.ParentMultiShuttle.ConveyorLocations.Add(LocationB);
            Leaving.OnEnter += ExitPoint_OnEnter;

            Entering.Name = "EnterPoint";
            Leaving.Name  = "ExitPoint";

            Entering.Distance = 0.000001f;  //HACK this is a dodgy workarround. When switching to the Entering from a previous conveyors exit
            //if the conveyor has had its local yaw changed then it gets into an infinite loop somehow needs more investigation...Localyaw may be a red herring.... in fact it almost certinally is!!
        }
Пример #2
0
        private void SetDropStationOccupiedStatus()
        {
            //Set the empty status of the drop station, and trigger an event when the drop station becomes available
            bool triggerEvent = false;

            if (!DropStationConvEmpty && TransportSection.Route.Loads.Count == 0)
            {
                triggerEvent = true;
            }

            if (TransportSection.Route.Loads.Count == 0)
            {
                dropStationConvEmpty = true;
            }
            else
            {
                dropStationConvEmpty = false;
            }

            if (triggerEvent)
            {
                Elevator.SetNewElevatorTask();
            }
        }
Пример #3
0
 public PickDropStationArrivalEventArgs(string locationName, Case_Load caseLoad, Elevator elevator, int NumberOfLoads)
 {
     _locationName  = locationName;
     _caseLoad      = caseLoad;
     _elevator      = elevator;
     _numberOfLoads = NumberOfLoads;
 }
Пример #4
0
 public ArrivedOnElevatorEventArgs(Task task, Case_Load loadA, Case_Load loadB, Elevator elevator, string locationName)
 {
     _task         = task;
     _loadA        = loadA;
     _loadB        = loadB;
     _elevator     = elevator;
     _locationName = locationName;
 }
Пример #5
0
 public ElevatorTasksStatusChangedEventArgs(Elevator elevator)
 {
     _elevator = elevator;
 }
Пример #6
0
 public DropStationConvClearEventArgs(string dropStationName, Elevator elevator)
 {
     _dropStationName = dropStationName;
     _elevator        = elevator;
 }
Пример #7
0
        public void ConfigureRackConveyor(Elevator elevator, float zCoord, int level, float xoffset)
        {
            Elevator = elevator;
            MultiShuttle ParentMultiShuttle = Elevator.ParentMultiShuttle;

            if (ParentMultiShuttle.MultiShuttleinfo.MultiShuttleDriveThrough)
            {
                LocalPosition = ParentMultiShuttle.shuttlecars[level].LocalPosition + new Vector3(-Length + ParentMultiShuttle.DriveThroughElevatorOffset + xoffset, 0, zCoord);
            }
            else  //outfeed wll always travel in the same direction so point the conveyor in the correct direction and not reverse the conveyor
            {
                Height        = ParentMultiShuttle.shuttlecars[level].LocalPosition.Y;
                LocalPosition = ParentMultiShuttle.shuttlecars[level].LocalPosition + new Vector3(ParentMultiShuttle.MultiShuttleinfo.raillength / 2 - Length / 2 + xoffset, /*0.025f*/ 0, zCoord);
            }

            if (RackConveyorType == MultiShuttleDirections.Outfeed)
            {
                LocalYaw = (float)Math.PI;
            }
            //    TransportSection.Route.InsertActionPoint(LocationA, Length/ 2 + Length / 4);
            //    TransportSection.Route.InsertActionPoint(LocationB, Length/ 2 - Length / 4);
            //}
            //else if (RackConveyorType == MultiShuttleDirections.Infeed)
            //{
            TransportSection.Route.InsertActionPoint(LocationA, Length / 2 - Length / 4);
            TransportSection.Route.InsertActionPoint(LocationB, Length / 2 + Length / 4);
            // }
            //LocationA.Visible = true;
            //LocationB.Visible = true;
            LocationA.LocName = string.Format("{0}{1}{2}{3}{4}", Elevator.AisleNumber.ToString().PadLeft(2, '0'), (char)Elevator.Side, level.ToString().PadLeft(2, '0'), (char)RackConveyorType, "A");
            LocationB.LocName = string.Format("{0}{1}{2}{3}{4}", Elevator.AisleNumber.ToString().PadLeft(2, '0'), (char)Elevator.Side, level.ToString().PadLeft(2, '0'), (char)RackConveyorType, "B");

            ParentMultiShuttle.ConveyorLocations.Add(LocationA);
            ParentMultiShuttle.ConveyorLocations.Add(LocationB);

            Level    = level;
            Elevator = elevator;
            // RackName = rackname;
            // ms.RackConveyors.Add(rackname, this);
            ParentMultiShuttle.RackConveyors.Add(this);
            LocationA.OnEnter += rackConvLocA_Enter;
            LocationB.OnEnter += rackConvLocB_Enter;
            //Location1.UserData = elevator;
            //Location2.UserData = elevator;

            //if (ms.MultiShuttleDriveThrough)
            //{
            //    RackConveyorInfo rackConvInfo = new RackConveyorInfo();

            //    //rackConvInfo.length = RackConveyorLength;
            //    //rackConvInfo.width = RackConveyorWidth;
            //   // conv = new RackConveyor(rackConvInfo);
            //    //ElevatorConveyor = new RackConveyor(Color.Gray, RackConveyorLength, RackConveyorWidth);
            //    //AddPart(ElevatorConveyor);
            //    AddAssembly(this);
            //    ConvRoute.Motor.Speed = ms.ConveyorSpeed;
            //    LocalPosition = ms.shuttlecars[level].LocalPosition + new Vector3(Length + ms.DriveThroughElevatorOffset + xoffset, 0, zCoord);
            //    LocalYaw = (float)Math.PI;
            //    _level = level.ToString();
            //    _level = _level.PadLeft(2, '0');

            //    if (rackConveyorType == MultiShuttleDirections.Infeed)
            //    {
            //        if (mSside == "L")
            //        {
            //            name1 = ms.FrontLeftOutfeedRackGroupName + mSside + ms.POS1OUTFEED + _level; // Front, Left, pos 001, level level
            //            name2 = ms.FrontLeftOutfeedRackGroupName + mSside + ms.POS2OUTFEED + _level; // Front, Left, pos 001, level level
            //            rackname = ms.FrontLeftOutfeedRackGroupName + mSside + _level;
            //        }
            //        else
            //        {
            //            name1 = ms.FrontRightOutfeedRackGroupName + mSside + ms.POS1OUTFEED + _level; // Front, Left, pos 001, level level
            //            name2 = ms.FrontRightOutfeedRackGroupName + mSside + ms.POS2OUTFEED + _level; // Front, Left, pos 001, level level
            //            rackname = ms.FrontRightOutfeedRackGroupName + mSside + _level;
            //        }
            //    }
            //    else
            //    {
            //        if (mSside == "L")
            //        {
            //            name1 = ms.FrontLeftInfeedRackGroupName + mSside + ms.POS1 + _level; // Front, Left, pos 001, level level
            //            name2 = ms.FrontLeftInfeedRackGroupName + mSside + ms.POS2 + _level; // Front, Left, pos 001, level level'
            //            rackname = ms.FrontLeftInfeedRackGroupName + mSside + _level;
            //        }
            //        else
            //        {
            //            name1 = ms.FrontRightInfeedRackGroupName + mSside + ms.POS1 + _level; // Front, Left, pos 001, level level
            //            name2 = ms.FrontRightInfeedRackGroupName + mSside + ms.POS2 + _level; // Front, Left, pos 001, level level
            //            rackname = ms.FrontRightInfeedRackGroupName + mSside + _level;
            //        }
            //    }

            //    if (rackConveyorType == MultiShuttleDirections.Infeed)
            //    {
            //        ConvRoute.Motor.Backward();
            //        //ElevatorConveyor.Exit = ElevatorConveyor.Route.InsertActionPoint(0);
            //        //ElevatorConveyor.Exit.OnEnter += new ActionPoint.EnterEvent(Exit_Enter);
            //        //ElevatorConveyor.RackConveyorType = RackConveyor.RackConveyorTypes.Outfeed;
            //    }
            //    Location1 = ConvRoute.InsertActionPoint(Length / 2 + Length / 4 + 0.01f);
            //    Location1.Name = name1;
            //    Location2 = ConvRoute.InsertActionPoint(Length / 2 - Length / 4);
            //    Location2.Name = name2;
            //    ms.conveyorlocations.Add(Location1.Name, Location1);
            //    ms.conveyorlocations.Add(Location2.Name, Location2);
            //    Level = _level;
            //    Elevator = elevator;
            //    RackName = rackname;
            //    ms.RackConveyors.Add(rackname, this);
            //    ms.RackConveyorsList.Add(this);
            //    Location1.OnEnter += rackConvLoc1_Enter;
            //    Location2.OnEnter += rackConvLoc2_Enter;
            //    Location1.UserData = elevator;
            //    Location2.UserData = elevator;

            //}
        }