ContactCenters
V. 0.9.9.

umontreal.iro.lecuyer.contactcenters.router
Class EnqueueEventWithRerouting

java.lang.Object
  extended by umontreal.iro.lecuyer.simevents.Event
      extended by umontreal.iro.lecuyer.contactcenters.queue.EnqueueEvent
          extended by umontreal.iro.lecuyer.contactcenters.router.EnqueueEventWithRerouting
All Implemented Interfaces:
Comparable<Event>

public class EnqueueEventWithRerouting
extends EnqueueEvent

Represents an event that queues a contact, and schedules an additional event for supporting rerouting. This event is the same as the event represented by the superclass EnqueueEvent, except that the dequeue event obtained by adding the contact into the waiting queue is used to construct a ContactReroutingEvent based on stored information.


Field Summary
 
Fields inherited from class umontreal.iro.lecuyer.simevents.Event
eventTime, priority, sim
 
Constructor Summary
EnqueueEventWithRerouting(DequeueEvent oldDequeueEvent, Router targetRouter, ReroutingState reroutingState)
          Constructs a new dequeue event with rerouting from the old dequeue event oldDequeueEvent, the target router targetRouter, and the rerouting state reroutingState.
EnqueueEventWithRerouting(WaitingQueue targetQueue, Contact contact, double queueTime, int dqType, Router targetRouter, int numReroutingsDone, double nextReroutingTime)
          Constructs a new enqueue event with rerouting from the target waiting queue targetQueue, queueing information, and rerouting information.
EnqueueEventWithRerouting(WaitingQueue targetQueue, DequeueEvent oldDequeueEvent, Router targetRouter, ReroutingState reroutingState)
          Constructs a new enqueue event with rerouting from the target waiting queue targetQueue, the old dequeue event oldDequeueEvent, the target router targetRouter, and the rerouting state information reroutingState.
 
Method Summary
 void actions()
           
 double getNextReroutingTime()
          Returns the simulation time at which the router will try to reroute the contact or the agent.
 int getNumReroutingsDone()
          Returns the number of reroutings that has happened so far for the contact or agent.
 Router getTargetRouter()
          Returns the target router for this event, i.e., the router for which the rerouting event will be scheduled.
 String toString()
           
 
Methods inherited from class umontreal.iro.lecuyer.contactcenters.queue.EnqueueEvent
getContact, getNewDequeueEvent, getScheduledDequeueType, getScheduledQueueTime, getTargetWaitingQueue
 
Methods inherited from class umontreal.iro.lecuyer.simevents.Event
cancel, cancel, compareTo, getRa, priority, reschedule, schedule, scheduleAfter, scheduleBefore, scheduleNext, setPriority, setRa, setSimulator, setTime, simulator, time
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EnqueueEventWithRerouting

public EnqueueEventWithRerouting(DequeueEvent oldDequeueEvent,
                                 Router targetRouter,
                                 ReroutingState reroutingState)
Constructs a new dequeue event with rerouting from the old dequeue event oldDequeueEvent, the target router targetRouter, and the rerouting state reroutingState. This calls super (oldDequeueEvent) and sets the target router and rerouting information.

Parameters:
oldDequeueEvent - the old dequeue event.
targetRouter - the target router.
reroutingState - the rerouting state.

EnqueueEventWithRerouting

public EnqueueEventWithRerouting(WaitingQueue targetQueue,
                                 DequeueEvent oldDequeueEvent,
                                 Router targetRouter,
                                 ReroutingState reroutingState)
Constructs a new enqueue event with rerouting from the target waiting queue targetQueue, the old dequeue event oldDequeueEvent, the target router targetRouter, and the rerouting state information reroutingState. This calls super (targetQueue, oldDequeueEvent) and sets the target router and rerouting information.

Parameters:
targetQueue - the target waiting queue.
oldDequeueEvent - the old dequeue event.
targetRouter - the target router.
reroutingState - the rerouting information.

EnqueueEventWithRerouting

public EnqueueEventWithRerouting(WaitingQueue targetQueue,
                                 Contact contact,
                                 double queueTime,
                                 int dqType,
                                 Router targetRouter,
                                 int numReroutingsDone,
                                 double nextReroutingTime)
Constructs a new enqueue event with rerouting from the target waiting queue targetQueue, queueing information, and rerouting information. This calls super (targetQueue, contact, queueTime, dqType) and sets the target router and rerouting information.

Parameters:
targetQueue - the target waiting queue.
contact - the contact being queued.
queueTime - the maximal queue time.
dqType - the dequeue type.
targetRouter - the target router.
numReroutingsDone - the number of times the contact or agent has been rerouted before.
nextReroutingTime - the simulation of the next rerouting.
Method Detail

getTargetRouter

public Router getTargetRouter()
Returns the target router for this event, i.e., the router for which the rerouting event will be scheduled.

Returns:
the target router.

getNextReroutingTime

public double getNextReroutingTime()
Returns the simulation time at which the router will try to reroute the contact or the agent.

Returns:
the next rerouting time.

getNumReroutingsDone

public int getNumReroutingsDone()
Returns the number of reroutings that has happened so far for the contact or agent.

Returns:
the number of preceding reroutings.

actions

public void actions()
Overrides:
actions in class EnqueueEvent

toString

public String toString()
Overrides:
toString in class EnqueueEvent

ContactCenters
V. 0.9.9.

To submit a bug or ask questions, send an e-mail to Richard Simard.