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.app.trace
Interface ContactTrace

All Known Implementing Classes:
  DBContactTrace, ExcelContactTrace, FileContactTrace

    public interface ContactTrace

Represents an object capable of creating a contact-by-contact trace. The format and location of the produced trace depends on the implementation.

The tracing facility is used as follows. An implementation of this interface is initialized at the beginning of the simulation using the `init()` method. Each time a contact is processed, the `writeLine(int,int,int,double,double,String,int,double)` method is called by some listener. At the end of the simulation, the `close()` method is called to close the file or database connection the trace is sent to.

Field Summary
`static String` | `OUTCOME_ABANDONED`
`static String` | `OUTCOME_BLOCKED`
`static String` | `OUTCOME_FAILED`
`static String` | `OUTCOME_SERVED`

Method Summary
`void` | `close()` Closes the trace facility after a simulation.
`void` | `init()` Initializes the tracing mechanism.
`void` | `writeLine(int step, int type, int period, double arvTime, double queueTime, String outcome, int group, double srvTime)` Writes a new line in the trace representing a simulated contact.

Field Detail

### OUTCOME_BLOCKED

    static final String OUTCOME_BLOCKED

See Also:
  Constant Field Values

### OUTCOME_ABANDONED

    static final String OUTCOME_ABANDONED

See Also:
  Constant Field Values

### OUTCOME_SERVED

    static final String OUTCOME_SERVED

See Also:
  Constant Field Values

### OUTCOME_FAILED

    static final String OUTCOME_FAILED

See Also:
  Constant Field Values

Method Detail

### init

    void init()

  Initializes the tracing mechanism. This method opens the trace file or database connection, and writes headers, etc. If an error occurs during the initialization, this method should log the error, and disable tracing.

### close

    void close()

  Closes the trace facility after a simulation. This method closes files, database connections, etc.

### writeLine

    void writeLine(int step,
                   int type,
                   int period,
                   double arvTime,
                   double queueTime,
                   String outcome,
                   int group,
                   double srvTime)

  Writes a new line in the trace representing a simulated contact. The line includes the step of the simulation at which the contact occurred, the type of the contact, the period of its arrival, its time spent in queue, its outcome, the group of its serving agent, and its service time. Some of these fields might be `Double.NaN` if the information does not exist. For example, a blocked or abandoned call does not have a serving agent group, or a service time.

  Parameters:
    `step` - the step, in the experiment, during which the call occurred.
    `type` - the type of the call.
    `period` - the period of arrival of the call.
    `arvTime` - the arrival time.
    `queueTime` - the time spent by the call in the queue.
    `outcome` - the outcome of the call.
    `group` - the group of the serving agent.
    `srvTime` - the service time of the 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.