internal void Arriving(SorterCarrier carrier, Load load) { if (OnCarrierArrived != null) { OnCarrierArrived(carrier, load); } }
internal void OnLoadDestinationArrivedEvent(SorterCarrier carrier, SorterElementFixPoint destination, Load load, bool discharged) { if (LoadArrivedAtDestination != null) { LoadArrivedAtDestination(parent.Control, carrier, destination, load, discharged); } destination.Arriving(carrier, load); }
/// <summary> /// Reserve a carrier. When the carrier is reserved it is only free to the reserver. /// </summary> /// <param name="carrier">The carrier to reserve</param> /// <param name="reservationKey">the key. Can be any thing</param> /// <returns>Returns true if the reservartion is succesfull. Otherwise false.</returns> public bool ReserveCarrier(SorterCarrier carrier, object reservationKey) { if (carrier.ReservationKey != null) { return(false); } carrier.ReservationKey = reservationKey; return(true); }
internal void OnCarrierArrivedEvent(SorterCarrier carrier, SorterElementFixPoint f) { if (CarrierArrived != null) { CarrierArrived(parent.Control, carrier, f); } if (f.InductionPoint != null && f.InductionPoint.ActiveLoad != null && f.InductionPoint.ActiveLoad.Stopped) { f.Arriving(carrier, f.InductionPoint.ActiveLoad); } }
/// <summary> /// Calculate the time in seconds to arrival of the carrier at the FixPoint. /// </summary> /// <param name="carrier"></param> /// <param name="fixpoint"></param> /// <returns></returns> public float TimeToArrival(SorterCarrier carrier, SorterElementFixPoint fixpoint) { return(parent.TimeToArrival(carrier, fixpoint)); }
/// <summary> /// Calculate the time in seconds to arrival of the carrier at the FixPoint. /// Returns -1 if the FixPoint is not found. /// </summary> /// <param name="carrier"></param> /// <param name="fixPoint"></param> /// <returns></returns> public float TimeToArrival(SorterCarrier carrier, string fixPoint) { return(parent.TimeToArrival(carrier, fixPoint)); }
/// <summary> /// Delete the carrier reserve key. /// </summary> /// <param name="carrier"></param> public void DeleteReservation(SorterCarrier carrier) { carrier.ReservationKey = null; }
/// <summary> /// Adds the load to the carrier. /// </summary> /// <param name="load"></param> /// <param name="carrier"></param> /// <param name="reservationKey">Can be any thing</param> /// <returns>Returns true if the load is successfully added. /// Returns false if the load has waitingtime (load.Waiting == true) /// Returns false if the load is already added.</returns> public bool AddLoadToCarrier(Load load, SorterCarrier carrier, object reservationKey) { return(parent.AddLoadToCarrier(load, carrier, reservationKey)); }
/// <summary> /// Calling this method will cause a CarrierArrived event when the carrier arrives at the FixPoint. /// If a sorter controller is listening to this event it will handle the event. Otherwise nothing will happen. /// </summary> /// <param name="carrier">The carrier that should arrive at the FixPoint</param> /// <param name="f"></param> /// /// <param name="leadtime"></param> /// <returns>Returns false if there is another notification waiting for this FixPoint.</returns> public bool NotifyArrival(SorterCarrier carrier, SorterElementFixPoint f, float leadtime) { return(parent.NotifyArrival(carrier, f, leadtime)); }
/// <summary> /// Calling this method will cause a CarrierArrived event when the carrier arrives at the FixPoint. /// If a sorter controller is listening to this event it will handle the event. Otherwise nothing will happen. /// </summary> /// <param name="carrier">The carrier that should arrive at the FixPoint</param> /// <param name="f"></param> /// <returns>Returns false if there is another notification waiting for this FixPoint.</returns> public bool NotifyArrival(SorterCarrier carrier, SorterElementFixPoint f) { return(parent.NotifyArrival(carrier, f)); }
/// <summary> /// Calling this method will cause a CarrierArrived event when the carrier arrives at the FixPoint. /// </summary> /// <param name="carrier">The carrier that should arrive at the FixPoint</param> /// <param name="fixPointName"></param> /// <returns>Returns false if there is another notification waiting for this FixPoint. /// Returns false if sorter is not initialized. /// Returns false if there is no fixpoint with this name.</returns> public bool NotifyArrival(SorterCarrier carrier, string fixPointName) { return(parent.NotifyArrival(carrier, fixPointName)); }