public Elevator(MultiShuttleElevatorInfo info) : base(info) { multishuttleElevatorInfo = info; Embedded = true; ParentMultiShuttle = info.Multishuttle; Side = info.Side; AisleNumber = ParentMultiShuttle.AisleNumber; ElevatorConveyor = new ElevatorConveyor(new ElevatorConveyorInfo { length = info.multishuttleinfo.ElevatorConveyorLength, width = info.multishuttleinfo.ElevatorConveyorWidth, thickness = 0.05f, color = Core.Environment.Scene.DefaultColor, Elevator = this } ); AddAssembly(ElevatorConveyor); ElevatorConveyor.Route.Motor.Speed = info.multishuttleinfo.ConveyorSpeed; ElevatorConveyor.LocalYaw = -(float)Math.PI; lift = new TrackRail(info.multishuttleinfo, 1, info.Multishuttle, this);// UserData = this }; lift.Car.OnPositionChanged += Car_PositionChanged; AddPart(lift); lift.LocalRoll = -(float)Math.PI / 2; lift.Route.Motor.Speed = multishuttleElevatorInfo.multishuttleinfo.elevatorSpeed; lift.Car.Visible = false; ElevatorTasks.Clear(); ElevatorTasks.CollectionChanged += ElevatorTasks_CollectionChanged; }
public TrackVehicle(TrackVehicleInfo info) : base(info) { ControlAssembly = info.controlAssembly; trackVehicleInfo = info; Length = 0.05f; Width = 0.5f; Height = 0.05f; Color = Color.Yellow; shuttleConveyor = new StraightTransportSection(Core.Environment.Scene.DefaultColor, 0.1f, 0.1f) { Height = 0.05f }; shuttleAP = shuttleConveyor.Route.InsertActionPoint(shuttleConveyor.Length / 2); shuttleAP2 = shuttleConveyor.Route.InsertActionPoint(shuttleConveyor.Length / 2); shuttleAP.OnEnter += ShuttleAP_OnEnter; shuttleConveyor.Route.Motor.Stop(); shuttleConveyor.Visible = false; Track = info.trackRail; DestAP = Track.Route.InsertActionPoint(info.moveToDistance); Track.Route.Add(this, info.moveToDistance); DestAP.Visible = false; DestAP.OnEnter += MoveTo_OnEnter; Deletable = false; UserDeletable = false; Embedded = true; Stop(); Load.Items.Add(this); Core.Environment.Scene.OnLoaded += Scene_OnLoaded; }
public Shuttle(ShuttleInfo info) : base(info) { shuttleInfo = info; //trackRail = new TrackRail(info.multiShuttleinfo, info.level, info.parent) trackRail = new TrackRail(new TrackRailInfo() { level = info.level, parentMultiShuttle = info.parentMultishuttle, shuttlecarSpeed = info.parentMultishuttle.ShuttleCarSpeed }) { Name = "S" + info.level.ToString().PadLeft(2, '0'), ThisShuttle = this }; ParentMultiShuttle = info.parentMultishuttle; Add((Core.Parts.RigidPart)trackRail); shuttleConveyor = new StraightTransportSection(Core.Environment.Scene.DefaultColor, 0.1f, 0.1f) { Height = 0.05f }; Add(shuttleConveyor, new Vector3(trackRail.Length / 2, 0, 0)); //shuttleConveyor.LocalYaw = (float)Math.PI / 2; shuttleAP = shuttleConveyor.Route.InsertActionPoint(shuttleConveyor.Length / 2); shuttleAP.OnEnter += shuttleAP_OnEnter; shuttleAP2 = shuttleConveyor.Route.InsertActionPoint(shuttleConveyor.Length / 2); shuttleAP_Zpos = (info.multiShuttleinfo.RackConveyorWidth / 2) + (info.multiShuttleinfo.carwidth / 2); trackRail.Car.OnPositionChanged += Car_OnPositionChanged; ShuttleTasks.CollectionChanged += ShuttleTasks_CollectionChanged; ShuttleTasks.Clear(); shuttleConveyor.Route.Motor.Stop(); }
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; }
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); }
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(); }