Overview | Package | Class | Tree | Deprecated | Index | Help
| ContactCenters V. 0.9.9.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## umontreal.iro.lecuyer.contactcenters.msk.model
Class Call

    java.lang.Object
      umontreal.iro.lecuyer.contactcenters.contact.Contact
          umontreal.iro.lecuyer.contactcenters.msk.model.Call

All Implemented Interfaces:
  Cloneable, Comparable<Contact>, Named

    public class Call

extends Contact

Represents a call in the multi-skill call center simulator. A call is a special type of contact that stores the periods of its arrival, of its service startup and its service termination. These periods can be stored, because the model uses a single period-change event. A call also holds additional information such as transfer times, conference times, etc.

Constructor Summary
`Call(PeriodChangeEvent pce, int arrivalPeriod)` Equivalent to `Call` `(pce, arrivalPeriod, 1, 0)`.
`Call(PeriodChangeEvent pce, int arrivalPeriod, double priority, int typeId)` Constructs a new call with period-change event `pce`, period of arrival `arrivalPeriod`, priority `priority`, and type identifier `typeId`.
`Call(PeriodChangeEvent pce, int arrivalPeriod, int typeId)` Equivalent to `Call` `(pce, arrivalPeriod, 1, typeId)`.

Method Summary
`void` | `beginService(EndServiceEvent ev)` This method is called when the service of this contact by an agent begins, the end-service event `ev` representing the contact being served.
`void` | `blocked(int bType)` This method is called when the contact is blocked by its current router with blocking type `bType`.
`void` | `dequeued(DequeueEvent ev)` This method is called when a contact leaves a queue, the dequeue event `ev` representing the queued contact.
`void` | `endContact(EndServiceEvent ev)` This method is called when the communication between this contact and an agent is terminated.
`int` | `getArrivalPeriod()` Returns the period during which this call has arrived.
`int` | `getBeginServicePeriod()` Returns the period at which the service of this call started, or -1 if this call was never served.
`ServiceTimes` | `getConferenceTimes()` Returns the conference times spent by a primary agent with a secondary before the service of this transferred call begins with the secondary agent.
`int` | `getExitPeriod()` Returns the period at which this call exited the system, or -1 if the call is still in the system.
`PeriodChangeEvent` | `getPeriodChangeEvent()` Returns the period-change event used to initializes the period at which the service begins, and at which this call exits.
`ServiceTimes` | `getPreServiceTimesNoConf()` Returns the pre-service times with an agent.
`EndServiceEvent` | `getPrimaryEndServiceEvent()` If this object represents a transferred call, returns a reference to the end-service event representing the service with the primary agent, before the transfer.
`ServiceTimes` | `getTransferTimes()` Returns the transfer times spent by primary agents to initiate call transfers.
`int` | `getTypeBeforeVQ()` Returns the type of this call before entering virtual queue.
`double` | `getUTransfer()` Returns the random number used to test if a call is transferred after its service is over.
`double` | `getUTransferWait()` Returns the uniform used to decide if the primary agent waits for a secondary agent after a transfer.
`double` | `getUVQ()` Returns the uniform used to decide if a call accepts to be called back (or join the virtual queue) if offered the possibility.
`double` | `getUVQCallBack()` Returns the uniform used to decide if a call returning from the virtual queue is successfully called back.
`double` | `getWaitingTimeVQ()` Returns the time spent in virtual queue by this call.
`boolean` | `isRightPartyConnect()` Determines if this call is a right party connect.
`void` | `setArrivalPeriod(int arrivalPeriod)` Sets the period of arrival of this call to `arrivalPeriod`.
`void` | `setBeginServicePeriod(int beginServicePeriod)` Sets the period at which the service of this call begins to `beginServicePeriod`.
`void` | `setExitPeriod(int exitPeriod)` Sets the period at which this call exits the system to `exitPeriod`.
`void` | `setPeriodChangeEvent(PeriodChangeEvent pce)` Sets the period-change event of this call to `pce`.
`void` | `setPrimaryEndServiceEvent(EndServiceEvent primaryEndServiceEvent)` Sets the end-service event associated with the primary agent for a transferred call to `primaryEndServiceEvent`.
`void` | `setRightPartyConnect(boolean rightPartyConnect)` Sets the indicator for right party connect to `rightPartyConnect`.
`void` | `setTypeBeforeVQ(int beforeVQ)` Sets the type of this call before it enters virtual queue to `beforeVQ`.
`void` | `setUTransfer(double transfer)` Sets the uniform for transfer decision to `transfer`.
`void` | `setUTransferWait(double transferWait)` Sets the uniform for deciding if the primary agent waits for a secondary agent to `transferWait`.
`void` | `setUVQ(double u)` Sets the uniform for deciding if a call chooses to be called back to `u`.
`void` | `setUVQCallBack(double u)` Sets the uniform for call back success to `u`.
`void` | `setWaitingTimeVQ(double waitingTimeVQ)` Sets the waiting time in virtual queue of this call to `waitingTimeVQ`.

Methods inherited from class umontreal.iro.lecuyer.contactcenters.contact.Contact
`addToTotalQueueTime, addToTotalServiceTime, clone, compareTo, enableStepsTracing, endService, enqueued, ensureCapacityForDefaultAfterContactTime, ensureCapacityForDefaultContactTime, getAfterContactTimes, getArrivalTime, getAttributes, getContactTimes, getDefaultAfterContactTime, getDefaultAfterContactTime, getDefaultContactTime, getDefaultContactTime, getDefaultPatienceTime, getDefaultServiceTime, getDefaultServiceTime, getLastAgentGroup, getLastWaitingQueue, getName, getNumAgentGroups, getNumWaitingQueues, getPriority, getRouter, getSource, getSteps, getTotalQueueTime, getTotalServiceTime, getTrunkGroup, getTypeId, hasExited, isSetDefaultAfterContactTime, isSetDefaultContactTime, setArrivalTime, setDefaultAfterContactTime, setDefaultAfterContactTime, setDefaultContactTime, setDefaultContactTime, setDefaultPatienceTime, setDefaultServiceTime, setExited, setName, setPriority, setRouter, setSimulator, setSource, setTrunkGroup, setTypeId, simulator, toString`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Call

    public Call(PeriodChangeEvent pce,
                int arrivalPeriod)

  Equivalent to `Call` `(pce, arrivalPeriod, 1, 0)`.

  Parameters:
    `pce` - the period-change event associated with the call.
    `arrivalPeriod` - the period of arrival of the call.
  Throws:
    `NullPointerException` - if `pce` is `null`.

### Call

    public Call(PeriodChangeEvent pce,
                int arrivalPeriod,
                int typeId)

  Equivalent to `Call` `(pce, arrivalPeriod, 1, typeId)`.

  Parameters:
    `pce` - the period-change event associated with the call.
    `arrivalPeriod` - the period of arrival of the call.
    `typeId` - the type identifier of the call.
  Throws:
    `NullPointerException` - if `pce` is `null`.

### Call

    public Call(PeriodChangeEvent pce,
                int arrivalPeriod,
                double priority,
                int typeId)

  Constructs a new call with period-change event `pce`, period of arrival `arrivalPeriod`, priority `priority`, and type identifier `typeId`. The period-change event is used to set the simulator associated with the call, and to determine periods of service termination or abandonment.

  Parameters:
    `pce` - the period-change event associated with the call.
    `arrivalPeriod` - the period of arrival of the call.
    `priority` - the priority of the call.
    `typeId` - the type identifier of the call.
  Throws:
    `NullPointerException` - if `pce` is `null`.

Method Detail

### getArrivalPeriod

    public int getArrivalPeriod()

  Returns the period during which this call has arrived. This corresponds to the period during which the call object was constructed.

  Returns:
    the period during which the call arrived.

### setArrivalPeriod

    public void setArrivalPeriod(int arrivalPeriod)

  Sets the period of arrival of this call to `arrivalPeriod`.

  Parameters:
    `arrivalPeriod` - the new period of arrival.

### getBeginServicePeriod

    public int getBeginServicePeriod()

  Returns the period at which the service of this call started, or -1 if this call was never served.

  Returns:
    the period at which the service of this call began.

### setBeginServicePeriod

    public void setBeginServicePeriod(int beginServicePeriod)

  Sets the period at which the service of this call begins to `beginServicePeriod`.

  Parameters:
    `beginServicePeriod` - the period at which the service of this call begins.

### getExitPeriod

    public int getExitPeriod()

  Returns the period at which this call exited the system, or -1 if the call is still in the system.

  Returns:
    the period at which this call exited the system.

### setExitPeriod

    public void setExitPeriod(int exitPeriod)

  Sets the period at which this call exits the system to `exitPeriod`.

  Parameters:
    `exitPeriod` - the period at which this call exits the system.

### getPeriodChangeEvent

    public PeriodChangeEvent getPeriodChangeEvent()

  Returns the period-change event used to initializes the period at which the service begins, and at which this call exits.

  Returns:
    the period-change event.

### setPeriodChangeEvent

    public void setPeriodChangeEvent(PeriodChangeEvent pce)

  Sets the period-change event of this call to `pce`.

  Parameters:
    `pce` - the period-change event associated with this call.
  Throws:
    `NullPointerException` - if `pce` is `null`.

### beginService

    public void beginService(EndServiceEvent ev)

  Description copied from class: `Contact`
  This method is called when the service of this contact by an agent begins, the end-service event `ev` representing the contact being served.

  Overrides:
    `beginService` in class `Contact`
  Parameters:
    `ev` - the event occurring at the end of the service.

### blocked

    public void blocked(int bType)

  Description copied from class: `Contact`
  This method is called when the contact is blocked by its current router with blocking type `bType`. The `Contact.getRouter()` method can be used to access the reference to the router which blocked this contact while `bType` indicates the reason why the contact was blocked.

  Overrides:
    `blocked` in class `Contact`
  Parameters:
    `bType` - the contact blocking type.

### dequeued

    public void dequeued(DequeueEvent ev)

  Description copied from class: `Contact`
  This method is called when a contact leaves a queue, the dequeue event `ev` representing the queued contact.

  Overrides:
    `dequeued` in class `Contact`
  Parameters:
    `ev` - the dequeue event associated with the contact.

### endContact

    public void endContact(EndServiceEvent ev)

  Description copied from class: `Contact`
  This method is called when the communication between this contact and an agent is terminated. The end-service event `ev` can be used to obtain information about the end of communication.

  Overrides:
    `endContact` in class `Contact`
  Parameters:
    `ev` - the end-service event associated with the contact.

### isRightPartyConnect

    public boolean isRightPartyConnect()

  Determines if this call is a right party connect. By default, this method returns `true`, but for outbound calls, `OutboundCallFactory` can set this flag to `false` in order to generate a wrong party connect. This differs from a failed call, which is handled by the dialer itself, because an agent is needed to screen the call. The main use of the returned value is for statistical collecting.

  Returns:
    `true` if and only if this call is a right party connect, or an inbound call.

### setRightPartyConnect

    public void setRightPartyConnect(boolean rightPartyConnect)

  Sets the indicator for right party connect to `rightPartyConnect`.

  Parameters:
    `rightPartyConnect` - the new value of the indicator.
  See Also:
    `isRightPartyConnect()`

### getPrimaryEndServiceEvent

    public EndServiceEvent getPrimaryEndServiceEvent()

  If this object represents a transferred call, returns a reference to the end-service event representing the service with the primary agent, before the transfer. This end-service event is used to terminate the service with the primary agent after a conference time. This returns `null` if this object does not represent a transferred call, or if the primary agent does not wait for a secondary agent after the transfer.

  Returns:
    the end-service event associated with the primary agent for a transferred call.

### setPrimaryEndServiceEvent

    public void setPrimaryEndServiceEvent(EndServiceEvent primaryEndServiceEvent)

  Sets the end-service event associated with the primary agent for a transferred call to `primaryEndServiceEvent`.

  Parameters:
    `primaryEndServiceEvent` - the new end-service event.

### getUTransfer

    public double getUTransfer()

  Returns the random number used to test if a call is transferred after its service is over. This uniform is initialized by the call factory if call transfers are supported. Otherwise, it is set to 0.

  Returns:
    the uniform for deciding if the call is transferred.

### setUTransfer

    public void setUTransfer(double transfer)

  Sets the uniform for transfer decision to `transfer`.

  Parameters:
    `transfer` - the new uniform.
  Throws:
    `IllegalArgumentException` - if `transfer` is out of [0, 1].
  See Also:
    `getUTransfer()`

### getUTransferWait

    public double getUTransferWait()

  Returns the uniform used to decide if the primary agent waits for a secondary agent after a transfer. This uniform is generated by the call factory only if call transfers are supported. If transfers are disabled, this method always returns 0.

  Returns:
    the uniform for deciding if the primary agent waits for the secondary agent with the caller.

### setUTransferWait

    public void setUTransferWait(double transferWait)

  Sets the uniform for deciding if the primary agent waits for a secondary agent to `transferWait`.

  Parameters:
    `transferWait` - the new uniform.
  Throws:
    `IllegalArgumentException` - if `transferWait` is out of [0, 1].
  See Also:
    `getUTransferWait()`

### getUVQ

    public double getUVQ()

  Returns the uniform used to decide if a call accepts to be called back (or join the virtual queue) if offered the possibility. This uniform is generated by the call factory if virtual queueing is used. If virtual queueing is disabled, this method always returns 0.

  Returns:
    the uniform for virtual queueing decision.

### setUVQ

    public void setUVQ(double u)

  Sets the uniform for deciding if a call chooses to be called back to `u`.

  Parameters:
    `u` - the new uniform.
  Throws:
    `IllegalArgumentException` - if `u` is not in [0, 1].
  See Also:
    `getUVQ()`

### getUVQCallBack

    public double getUVQCallBack()

  Returns the uniform used to decide if a call returning from the virtual queue is successfully called back. This uniform is generated by the call factory, and is always 0 if virtual queueing is disabled.

  Returns:
    the uniform for call back success.

### setUVQCallBack

    public void setUVQCallBack(double u)

  Sets the uniform for call back success to `u`.

  Parameters:
    `u` - the new uniform.
  Throws:
    `IllegalArgumentException` - if `u` is not in [0, 1].
  See Also:
    `getUVQCallBack()`

### getConferenceTimes

    public ServiceTimes getConferenceTimes()

  Returns the conference times spent by a primary agent with a secondary before the service of this transferred call begins with the secondary agent. By default, this is set to 0. This time is set by the call factory if call transfers are enabled.

  Returns:
    an object storing the conference times.

### getPreServiceTimesNoConf

    public ServiceTimes getPreServiceTimesNoConf()

  Returns the pre-service times with an agent. By default, this is set to 0.

  Returns:
    an object storing pre-service times.

### getTransferTimes

    public ServiceTimes getTransferTimes()

  Returns the transfer times spent by primary agents to initiate call transfers. By default, this is set to 0.

  Returns:
    an object storing transfer times.

### getWaitingTimeVQ

    public double getWaitingTimeVQ()

  Returns the time spent in virtual queue by this call. If virtual queueing is disabled, this method always returns 0.

  Returns:
    the waiting time of this call in virtual queue.

### setWaitingTimeVQ

    public void setWaitingTimeVQ(double waitingTimeVQ)

  Sets the waiting time in virtual queue of this call to `waitingTimeVQ`.

  Parameters:
    `waitingTimeVQ` - the new waiting time in virtual queue.

### getTypeBeforeVQ

    public int getTypeBeforeVQ()

  Returns the type of this call before entering virtual queue.

  Returns:
    the type identifier of this call before entering virtual queue.

### setTypeBeforeVQ

    public void setTypeBeforeVQ(int beforeVQ)

  Sets the type of this call before it enters virtual queue to `beforeVQ`.

  Parameters:
    `beforeVQ` - the original type of this call.

Overview | Package | Class | Tree | Deprecated | Index | Help
| ContactCenters V. 0.9.9.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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