Exemple #1
0
        public Elevator(ElevatorInfo info) : base(info)
        {
            multishuttleElevatorInfo = info;
            Embedded           = true;
            ParentMultiShuttle = info.Multishuttle;
            Side        = info.Side;
            AisleNumber = ParentMultiShuttle.AisleNumber;
            GroupName   = info.groupName;

            ElevatorConveyor = new ElevatorConveyor(new ElevatorConveyorInfo
            {
                length    = info.multishuttleinfo.ElevatorConveyorLength,
                width     = info.multishuttleinfo.ElevatorConveyorWidth,
                thickness = 0.05f,
                color     = Core.Environment.Scene.DefaultColor,
                Elevator  = this
            }
                                                    );

            Add(ElevatorConveyor);
            ElevatorConveyor.Visible           = false;
            ElevatorConveyor.Route.Motor.Speed = info.multishuttleinfo.ConveyorSpeed;
            ElevatorConveyor.LocalYaw          = -(float)Math.PI;

            Lift = new TrackRail(new TrackRailInfo()
            {
                parentMultiShuttle = ParentMultiShuttle, level = 0, shuttlecarSpeed = ParentMultiShuttle.ShuttleCarSpeed, controlAssembly = this
            });
            Vehicle = new TrackVehicle(new TrackVehicleInfo()
            {
                trackRail = Lift, moveToDistance = 0, controlAssembly = this
            });

            Vehicle.Length = info.multishuttleinfo.ElevatorConveyorLength;
            Vehicle.Width  = info.multishuttleinfo.ElevatorConveyorWidth;
            Vehicle.Color  = Color.Silver;

            Vehicle.OnVehicleArrived  += ElevatorOnArrived;
            Vehicle.OnPositionChanged += Car_PositionChanged;
            Add((Core.Parts.RigidPart)Lift, new Vector3(-0.025f, 0, 0));
            Lift.LocalRoll         = -(float)Math.PI / 2;
            Lift.Route.Motor.Speed = multishuttleElevatorInfo.multishuttleinfo.elevatorSpeed;
            Lift.Route.Motor.Stop();
            Vehicle.Roll    = (float)Math.PI / 2;
            Vehicle.Movable = false;
            ElevatorTasks.Clear();
            ElevatorTasks.CollectionChanged += ElevatorTasks_CollectionChanged;

            taskMonitor            = new Timer(5);
            taskMonitor.AutoReset  = true;
            taskMonitor.OnElapsed += TaskMonitor_OnElapsed;
            taskMonitor.Start();
            Core.Environment.Scene.OnResetCompleted += Scene_OnResetCompleted;
        }
Exemple #2
0
        public TrackRail(MultiShuttleInfo trackInfo, int level, MultiShuttle parent, Elevator elevator = null) : base(Color.Gray, trackInfo.raillength, 0.05f)
        {
            multishuttle         = parent;
            ListSolutionExplorer = true;
            this.level           = level;
            this.shuttleinfo     = trackInfo;//TODO shuttleinfo is of type multishuttleinfo -- this is confusing
            ThisElevator         = elevator;

            LoadInfo shuttlecarinfo = new LoadInfo()
            {
                length = carlength,
                height = carheight,
                width  = carwidth,
                color  = Color.Yellow
            };

            shuttlecar               = new TrackVehicle(shuttlecarinfo);
            shuttlecar.Deletable     = false;
            shuttlecar.UserDeletable = false;
            shuttlecar.Embedded      = true;

            //if (elevator == null)
            //{
            //    shuttlecar.OnPositionChanged += Car_PositionChanged;
            //}

            Load.Items.Add(shuttlecar);

            if (ThisElevator != null)
            {
                route.Add(shuttlecar);
                Destination = route.InsertActionPoint(0);
            }
            else
            {
                route.Add(shuttlecar, multishuttle.workarround);
                Destination = route.InsertActionPoint(multishuttle.workarround);
            }

            Destination.Visible  = true;
            Destination.OnEnter += destination_Enter;
            route.Motor.Speed    = trackInfo.shuttlecarSpeed;
            shuttlecar.Stop();
            route.Motor.Stop();

            Visible = false;
        }
Exemple #3
0
        private const float Tolerance = 0.01f; //1 cm

        public MSlevel(MSlevelInfo info) : base(info)
        {
            msLevelInfo = info;
            ParentMS    = info.parentMultishuttle;

            Track = new TrackRail(new TrackRailInfo()
            {
                level = info.level, parentMultiShuttle = ParentMS, shuttlecarSpeed = ParentMS.ShuttleCarSpeed, controlAssembly = this
            });
            Vehicle = new TrackVehicle(new TrackVehicleInfo()
            {
                trackRail = Track, moveToDistance = InfeedRackShuttleLocation, controlAssembly = this
            });
            Add((Core.Parts.RigidPart)Track, new Vector3(0, -0.025f, 0));

            Vehicle.OnLoadArrived          += Vehicle_OnLoadArrived;
            Vehicle.Length                  = ParentMS.ShuttleCarLength;
            Vehicle.Width                   = ParentMS.ShuttleCarWidth;
            shuttleAP_Zpos                  = (info.multiShuttleinfo.RackConveyorWidth / 2) + (info.multiShuttleinfo.carwidth / 2);
            ShuttleTasks.CollectionChanged += ShuttleTasks_CollectionChanged;
            Vehicle.OnVehicleArrived       += ShuttleOnArrived;
            ShuttleTasks.Clear();
        }