} // end of Initialize

        #endregion

        //--------------------------------------------------------------------------------------------------
        // Rule Handling
        //--------------------------------------------------------------------------------------------------

        #region PerformCustomRules

        /// <summary>
        /// Dispatches slot requests by booking in the booking model, further, now show probabilities
        /// and arrival deviations of patients are calculated. Corresponding events for arrival are scheduled.
        /// </summary>
        /// <param name="startTime">Time rules are executed</param>
        /// <param name="simEngine">SimEngine responsible for simulation execution</param>
        /// <returns>False</returns>
        protected override bool PerformCustomRules(DateTime time, ISimulationEngine simEngine)
        {
            if (RAEL.Count == 0)
            {
                return(false);
            }

            if (!WaitingListSchedule.ReadyForDispatch)
            {
                return(false);
            }

            while (RAEL.Count > 0)
            {
                RequestOutpatientWaitingListPatientToAssignSlot reqToDisptatch = (RequestOutpatientWaitingListPatientToAssignSlot)RAEL.First();

                DateTime earliestTime = time;

                earliestTime = reqToDisptatch.EarliestTime;

                Slot slot = WaitingListSchedule.GetEarliestSlotTime(time,
                                                                    earliestTime,
                                                                    reqToDisptatch.Patient,
                                                                    reqToDisptatch.AdmissionType);

                WaitingListSchedule.BookSlot(slot, reqToDisptatch.AdmissionType);

                reqToDisptatch.Patient.StopCurrentActivities(time, simEngine);
                ParentControlUnit.RemoveRequest(reqToDisptatch);
                RemoveRequest(reqToDisptatch);

                if (InputData.NoShowForAppointment(reqToDisptatch.Patient, reqToDisptatch.AdmissionType, slot, time))
                {
                    continue;
                }

                DateTime arrivalTime = slot.StartTime + InputData.PatientArrivalDeviationFromSlotTime(reqToDisptatch.Patient, reqToDisptatch.AdmissionType);

                arrivalTime = new DateTime(Math.Max(time.Ticks, arrivalTime.Ticks));

                EventOutpatientArrival arrival = new EventOutpatientArrival(ParentControlUnit,
                                                                            reqToDisptatch.Patient,
                                                                            slot.StartTime,
                                                                            InputData,
                                                                            reqToDisptatch.AdmissionType);

                simEngine.AddScheduledEvent(arrival, arrivalTime);

                Event patientWait = reqToDisptatch.Patient.StartWaitingActivity(null);

                patientWait.Trigger(time, simEngine);
            } // end while

            WaitingListSchedule.ReadyForDispatch = false;

            return(false);
        } // end of PerformCustomRules