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
Class PerformanceMeasureFormatExcel

    java.lang.Object
      umontreal.iro.lecuyer.contactcenters.app.PerformanceMeasureFormat
          umontreal.iro.lecuyer.contactcenters.app.PerformanceMeasureFormatExcel

    public class PerformanceMeasureFormatExcel

extends PerformanceMeasureFormat

Provides methods used to format matrices of performance measures into Microsoft Excel spreadsheets. This class uses the JExcel API library to construct a workbook in memory, i.e., an instance of `WritableWorkbook`. Some methods are provided to add sheets to the current workbook, and tables of results to the current sheet. Methods are finally available to transfer the in-memory workbook into a disk file that can be read by Microsoft Excel, OpenOffice.org Calc, etc.

For example, the following code creates an Excel file containing three sheets containing the statistics for each aggregate performance measures (e.g., service level for all contact types, over all periods), the statistics for time-aggregate measures (e.g., service level for contacts of type k over all periods, for all k), and statistics for all performance measures (e.g., service level for contacts of type k during period p, for all k and p). The variable `sim` corresponds to any instance of `ContactCenterSim`.

        PerformanceMeasureFormatExcel2fmt =
           new PerformanceMeasureFormatExcel2();
        fmt.newSheet ("Summary");
        fmt.formatStatisticsSummary (sim, 0.95, sim.getPerformanceMeasures());
        fmt.newSheet ("Detailed, without individual period");
        for (PerformanceMeasureType pm : sim.getPerformanceMeasures())
           fmt.formatStatisticsDetailedHidePeriods (sim, 0.95, pm);
        fmt.newSheet ("Detailed, with individual periods");
        for (PerformanceMeasureType pm : sim.getPerformanceMeasures())
           fmt.formatStatisticsDetailed (sim, 0.95, pm);
        fmt.writeWorkbook (new File ("output.xls"));

Field Summary
`static String` | `defaultDetailedSheetNameWithoutPeriods`
`static String` | `defaultDetailedSheetNameWithPeriods`
`static String` | `defaultObsSheetName`
`static String` | `defaultSummarySheetName`

Fields inherited from class umontreal.iro.lecuyer.contactcenters.app.PerformanceMeasureFormat
`agentGroupProperties, contactTypeProperties, histogramList`

Constructor Summary
`PerformanceMeasureFormatExcel(WritableWorkbook wb)` Constructs a new performance measure formatter with the workbook `wb`.
`PerformanceMeasureFormatExcel(WritableWorkbook wb, ReportParams reportParams)`

Method Summary
`WritableCellFormat` | `createTitleCellStyle()` Creates a cell style for cells containing titles for tables of results.
`WritableCellFormat` | `createVerticalTitleCellStyle()`
`boolean` | `formatInfo(Map<String,Object> info)` Appends rows containing the evaluation information `info` to the current spreadsheet.
`boolean` | `formatObservations(ContactCenterSimWithObservations sim, ReportParams reportParams)` For each element `PerformanceMeasureParams` returned by `ReportParams.getPrintedObs()`, formats the complete list of observations generated by the simulator `sim` for the referred performance measure.
`boolean` | `formatStatistics(ContactCenterSim sim, ReportParams reportParams)` Similar to `formatValues(ContactCenterEval,ReportParams)`, except this formats a full statistical report using `formatStatisticsSummary(ContactCenterSim,double,String,PerformanceMeasureType[])`, and `formatStatisticsDetailed(ContactCenterSim,double,PerformanceMeasureType)`.
`boolean` | `formatStatisticsDetailed(ContactCenterSim sim, double level, PerformanceMeasureType pm)` Adds a statistical report for all the values of the performance measure `pm` estimated by the simulator `sim`, with confidence intervals with level `level`, to the current spreadsheet.
`boolean` | `formatStatisticsDetailedHidePeriods(ContactCenterSim sim, double level, PerformanceMeasureType pm)` Similar to `formatStatisticsDetailedMatrix(ContactCenterSim,double,PerformanceMeasureType)` but does not format per-period statistics.
`boolean` | `formatStatisticsDetailedMatrix(ContactCenterSim sim, double level, PerformanceMeasureType pm)`
`boolean` | `formatStatisticsSummary(ContactCenterSim sim, double level, String description, PerformanceMeasureType... pms)` Adds a statistical report for all the performance measures in `pms` supported by the contact center simulator `sim` to the current spreadsheet.
`void` | `formatValueRow(String name, Date val, boolean borderTop, boolean borderBottom, boolean borderBefore, boolean borderBetween, boolean borderAfter)` Similar to `formatValueRow(String,String,boolean,boolean,boolean,boolean,boolean,boolean)`, with `val` being a date.
`void` | `formatValueRow(String name, double val, boolean percent, TimeUnit timeUnit, boolean borderTop, boolean borderBottom, boolean borderBefore, boolean borderBetween, boolean borderAfter)` Similar to `formatValueRow(String,String,boolean,boolean,boolean,boolean,boolean,boolean)`, with `val` being a numeric value.
`void` | `formatValueRow(String name, int value, boolean borderTop, boolean borderBottom, boolean borderBefore, boolean borderBetween, boolean borderAfter)` Similar to `formatValueRow(String,String,boolean,boolean,boolean,boolean,boolean,boolean)`, with `val` being an integer.
`void` | `formatValueRow(String name, String val, boolean borderTop, boolean borderBottom, boolean borderBefore, boolean borderBetween, boolean borderAfter, boolean wrapText)` Adds a new row containing the value `val` of a string with name `name`.
`boolean` | `formatValues(ContactCenterEval eval, ReportParams reportParams)` Formats a workbook containing the report of the last evaluation performed by the system `eval`.
`boolean` | `formatValuesDetailed(ContactCenterEval eval, PerformanceMeasureType pm)` Adds a table containing the current values of the performance measures of type `pm` estimated by the evaluation system `eval` to the current spreadsheet.
`boolean` | `formatValuesDetailedHidePeriods(ContactCenterEval eval, PerformanceMeasureType pm)` Similar to `formatValuesDetailedMatrix(ContactCenterEval,PerformanceMeasureType)` except per-period values are not displayed.
`boolean` | `formatValuesDetailedMatrix(ContactCenterEval eval, PerformanceMeasureType pm)` Adds a table containing the current values of the performance measures of type `pm` estimated by the evaluation system `eval` to the current spreadsheet.
`boolean` | `formatValuesMatrix(ContactCenterInfo eval, PerformanceMeasureType pm, DoubleMatrix2D valm, int row, int column, int height, int width, boolean transposedValm, String description)` This is similar to `formatValuesSingleColumn(ContactCenterInfo,PerformanceMeasureType,DoubleMatrix2D,int,int,int,int,String)`, except that the formatted table has dimensions a×b.
`boolean` | `formatValuesSingleColumn(ContactCenterInfo eval, PerformanceMeasureType pm, DoubleMatrix2D valm, int row, int column, int height, int width, String description)` Adds a table to the current spreadsheet containing the values in a matrix `valm.``viewPart` `(row, column, height, width)` concerning performance measures of type `pm` obtained with the evaluation system `eval`.
`boolean` | `formatValuesSummary(ContactCenterEval eval, String description, PerformanceMeasureType... pms)` Adds a report for all the performance measures `pms` supported by the evaluation system `eval` into the current spreadsheet.
`boolean` | `getColumnOutlines()` Determines if column outlines are created by formatting methods.
`int` | `getCurrentRow()` Returns the index of the current row into the current spreadsheet.
`WritableSheet` | `getCurrentSheet()` Returns the high-level object representing the current spreadsheet.
`WritableWorkbook` | `getCurrentWorkbook()` Returns the high-level object representing the current workbook.
`RowType[]` | `getDestinationRowTypes()`
`int` | `getMaxColumns()` Returns the maximal number of columns a spreadsheet may contain.
`boolean` | `getRowOutlines()` Determines if row outlines are created by formatting methods.
`boolean` | `getRowOverwrite()` Determines the status of row overwriting which affects how rows are managed when the current row index is smaller than the number of rows.
`int` | `getStartingColumn()` Returns the index of the starting column of subsequent tables of results.
`void` | `groupColumn(int fromColumn, int toColumn)` Similar to `groupRow(int,int)`, for creating column outlines.
`void` | `groupRow(int fromRow, int toRow)` This method does nothing as JExcel API does not support outlining yet.
`void` | `newSheet(String sheetName)` Creates a new `WritableSheet` with name `sheetName`, and sets this new sheet as the current one.
`void` | `setColumnOutlines(boolean columnOutlines)` Sets the column outlines flag to `columnOutlines`.
`void` | `setCurrentRow(int currentRow)` Sets the index of the current row to `currentRow`
`void` | `setCurrentSheet(WritableSheet sheet)` Sets the current sheet to `sheet`, and resets the current row and starting column to 0.
`void` | `setCurrentWorkbook(WritableWorkbook workbook)` Sets the current workbook to `workbook`.
`void` | `setMaxColumns(int maxColumns)` Sets the maximal number of columns in a spreadsheet to `maxColumns`.
`void` | `setRowOutlines(boolean rowOutlines)` Sets the row outlines flag to `rowOutlines`.
`void` | `setRowOverwrite(boolean rowOverwrite)` Sets the status of row overwriting to `rowOverwrite`.
`void` | `setStartingColumn(int startingColumn)` Sets the index of the starting column to `startingColumn`.
`void` | `skipRow()` Increments the current row index to leave a blank row in the current spreadsheet.
`void` | `writeWorkbook()` Writes the current workbook..

Methods inherited from class umontreal.iro.lecuyer.contactcenters.app.PerformanceMeasureFormat
`addExperimentInfo, capitalizeFirstLetter, columnNameWithProperties, countRowsSummary, createHistogram, formatResults, formatResults, formatResults, getDefaultPrintedStatParams, getHistogramList, getName, getNameWithProperties, getNumPropColumns, getNumPropRows, getPerformanceMeasures, getPerformanceMeasures, getPerformanceMeasures, getPropColumns, getPropNameColumns, getPropNameRows, getPropRows, getPropRows, getShownProperties, getStandardDeviation, getStatColumnNames, getValColumnNames, isIncludedInDefaultReport, isIncludedInReport, isIncludedInSummary, rowNameWithProperties, writeHistograms, writeHistogramsLaTeX`

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

Field Detail

### defaultSummarySheetName

    public static final String defaultSummarySheetName

### defaultDetailedSheetNameWithoutPeriods

    public static final String defaultDetailedSheetNameWithoutPeriods

### defaultDetailedSheetNameWithPeriods

    public static final String defaultDetailedSheetNameWithPeriods

### defaultObsSheetName

    public static final String defaultObsSheetName

Constructor Detail

### PerformanceMeasureFormatExcel

    public PerformanceMeasureFormatExcel(WritableWorkbook wb)

  Constructs a new performance measure formatter with the workbook `wb`.

  Parameters:
    `wb` - the workbook used for formatting.

### PerformanceMeasureFormatExcel

    public PerformanceMeasureFormatExcel(WritableWorkbook wb,
                                         ReportParams reportParams)

Method Detail

### newSheet

    public void newSheet(String sheetName)

  Creates a new `WritableSheet` with name `sheetName`, and sets this new sheet as the current one. This method resets the current row index to 0, and the starting column to 0.

  If a sheet with the given name already exists, this method appends a number to the given name. The number is incremented until the resulting resulting sheet name is unused.

  Parameters:
    `sheetName` - the name of the new sheet.

### getCurrentRow

    public int getCurrentRow()

  Returns the index of the current row into the current spreadsheet. This corresponds to the row at which subsequent tables of results will be inserted. After each insertion, this index is incremented automatically. Consequently, the default index corresponds to the last row in the sheet.

  Returns:
    the index of the current row.

### setCurrentRow

    public void setCurrentRow(int currentRow)

  Sets the index of the current row to `currentRow`

  Parameters:
    `currentRow` - the new index of the current row.

### getStartingColumn

    public int getStartingColumn()

  Returns the index of the starting column of subsequent tables of results. This defaults to 0, but can be changed to format, e.g., side-by-side tables of results. This index is not modified by methods writing data to the spreadsheet.

  Returns:
    the index of the starting column.

### setStartingColumn

    public void setStartingColumn(int startingColumn)

  Sets the index of the starting column to `startingColumn`.

  Parameters:
    `startingColumn` - the new starting column.

### getCurrentWorkbook

    public WritableWorkbook getCurrentWorkbook()

  Returns the high-level object representing the current workbook.

  Returns:
    the current workbook.

### setCurrentWorkbook

    public void setCurrentWorkbook(WritableWorkbook workbook)

  Sets the current workbook to `workbook`. This also resets the current sheet to `null`.

  Parameters:
    `workbook` - the new current workbook.

### getCurrentSheet

    public WritableSheet getCurrentSheet()

  Returns the high-level object representing the current spreadsheet.

  Returns:
    the current spreadsheet.

### setCurrentSheet

    public void setCurrentSheet(WritableSheet sheet)

  Sets the current sheet to `sheet`, and resets the current row and starting column to 0.

  Parameters:
    `sheet` - the new current sheet.

### getRowOverwrite

    public boolean getRowOverwrite()

  Determines the status of row overwriting which affects how rows are managed when the current row index is smaller than the number of rows. When overwriting is `true`, the formating methods reuse the already created rows. When overwriting is `false` (the default), formatting methods always inert new rows.

  Returns:
    the status of row overwriting.

### setRowOverwrite

    public void setRowOverwrite(boolean rowOverwrite)

  Sets the status of row overwriting to `rowOverwrite`.

  Parameters:
    `rowOverwrite` - the new status of row overwriting.

### getColumnOutlines

    public boolean getColumnOutlines()

  Determines if column outlines are created by formatting methods. The default value of this boolean is `false`.

  Returns:
    the status of the outline creation flag.

### setColumnOutlines

    public void setColumnOutlines(boolean columnOutlines)

  Sets the column outlines flag to `columnOutlines`.

  Parameters:
    `columnOutlines` - the new value of the flag.

### getRowOutlines

    public boolean getRowOutlines()

  Determines if row outlines are created by formatting methods. The default value of this boolean is `false`.

  Returns:
    the status of the outline creation flag.

### setRowOutlines

    public void setRowOutlines(boolean rowOutlines)

  Sets the row outlines flag to `rowOutlines`.

  Parameters:
    `rowOutlines` - the new value of the flag.

### getMaxColumns

    public int getMaxColumns()

  Returns the maximal number of columns a spreadsheet may contain. The default value of this variable is 256. This affects how `formatValuesMatrix(ContactCenterInfo,PerformanceMeasureType,DoubleMatrix2D,int,int,int,int,boolean,String)`, and `formatStatisticsDetailedMatrix(ContactCenterSim,double,PerformanceMeasureType)` work.

  Returns:
    the maximal number of columns in a spreadsheet.

### setMaxColumns

    public void setMaxColumns(int maxColumns)

  Sets the maximal number of columns in a spreadsheet to `maxColumns`.

  Parameters:
    `maxColumns` - the maximal number of columns in a spreadsheet.

### writeWorkbook

    public void writeWorkbook()
                       throws IOException

  Writes the current workbook..

  Throws:
    `IOException` - if an I/O error occurs during writing.

### groupRow

    public void groupRow(int fromRow,
                         int toRow)

  This method does nothing as JExcel API does not support outlining yet. Creates an outline for rows `fromRow` to `toRow`. Calling the `groupRow` method repeatedly with the same values creates multiple identical outlines in the spreadsheet. This method calls `groupRow` if and only if the outline was not created previously.

  Parameters:
    `fromRow` - the starting row of the outline.
    `toRow` - the ending row of the outline.

### groupColumn

    public void groupColumn(int fromColumn,
                            int toColumn)

  Similar to `groupRow(int,int)`, for creating column outlines.

  Parameters:
    `fromColumn` - the starting column.
    `toColumn` - the ending column.

### createTitleCellStyle

    public WritableCellFormat createTitleCellStyle()
                                            throws WriteException

  Creates a cell style for cells containing titles for tables of results.

  By default, this method uses the `CellFormat` no-argument constructor to create the cell style, and sets its alignment to ``center''. One can override this method to apply user-defined cell styles (colors, fill patterns, borders, etc.).

  Returns:
    the created cell style.
  Throws:
    `WriteException`

### createVerticalTitleCellStyle

    public WritableCellFormat createVerticalTitleCellStyle()
                                                    throws WriteException

  Throws:
    `WriteException`

### formatValueRow

    public void formatValueRow(String name,
                               String val,
                               boolean borderTop,
                               boolean borderBottom,
                               boolean borderBefore,
                               boolean borderBetween,
                               boolean borderAfter,
                               boolean wrapText)
                        throws WriteException

  Adds a new row containing the value `val` of a string with name `name`. The first column of the row contains the string `name` while the second column contains `val`.

  Parameters:
    `name` - the name of the quantity.
    `val` - the value of the quantity.
    `borderTop` - determines if a top border must be set for the cells.
    `borderBottom` - determines if a bottom border must be set for the cells.
    `borderBefore` - determines if a left border must be set for the first cell.
    `borderBetween` - determines if a border must separate the two cells.
    `borderAfter` - determines if a right border must be set for the second cell.
    `wrapText` - determines if text can be wrapped.
  Throws:
    `WriteException`

### formatValueRow

    public void formatValueRow(String name,
                               double val,
                               boolean percent,
                               TimeUnit timeUnit,
                               boolean borderTop,
                               boolean borderBottom,
                               boolean borderBefore,
                               boolean borderBetween,
                               boolean borderAfter)
                        throws WriteException

  Similar to `formatValueRow(String,String,boolean,boolean,boolean,boolean,boolean,boolean)`, with `val` being a numeric value. The value is formatted with the general (default) style if `percent` is `false`, or in percentage notation if `percent` is `true`.

  Parameters:
    `name` - the name of the quantity.
    `val` - the value of the quantity.
    `percent` - determines if the percentage notation must be used.
    `timeUnit` - the time unit of the formatted value, or `null` if the value does not correspond to a time.
    `borderTop` - determines if the cell containing the value has a top border.
    `borderBottom` - determines if the cell containing the value has a bottom border.
    `borderBefore` - determines if a left border must be set for the first cell.
    `borderBetween` - determines if a border must separate the two cells.
    `borderAfter` - determines if a right border must be set for the second cell.
  Throws:
    `WriteException`

### formatValueRow

    public void formatValueRow(String name,
                               int value,
                               boolean borderTop,
                               boolean borderBottom,
                               boolean borderBefore,
                               boolean borderBetween,
                               boolean borderAfter)
                        throws WriteException

  Similar to `formatValueRow(String,String,boolean,boolean,boolean,boolean,boolean,boolean)`, with `val` being an integer.

  Parameters:
    `name` - the name of the quantity.
    `value` - the value of the quantity.
    `borderTop` - determines if a top border must be set for the first cell.
    `borderBottom` - determines if a bottom border must be set for the first cell.
    `borderBefore` - determines if a left border must be set for the first cell.
    `borderBetween` - determines if a border must separate the two cells.
    `borderAfter` - determines if a right border must be set for the second cell.
  Throws:
    `WriteException`

### formatValueRow

    public void formatValueRow(String name,
                               Date val,
                               boolean borderTop,
                               boolean borderBottom,
                               boolean borderBefore,
                               boolean borderBetween,
                               boolean borderAfter)
                        throws WriteException

  Similar to `formatValueRow(String,String,boolean,boolean,boolean,boolean,boolean,boolean)`, with `val` being a date.

  Parameters:
    `name` - the name of the quantity.
    `val` - the value of the quantity.
    `borderTop` - determines if a top border must be set for the first cell.
    `borderBottom` - determines if a bottom border must be set for the first cell.
    `borderBefore` - determines if a left border must be set for the first cell.
    `borderBetween` - determines if a border must separate the two cells.
    `borderAfter` - determines if a right border must be set for the second cell.
  Throws:
    `WriteException`

### skipRow

    public void skipRow()

  Increments the current row index to leave a blank row in the current spreadsheet.

### formatValuesSummary

    public boolean formatValuesSummary(ContactCenterEval eval,
                                       String description,
                                       PerformanceMeasureType... pms)
                                throws WriteException

  Adds a report for all the performance measures `pms` supported by the evaluation system `eval` into the current spreadsheet. This uses the `ContactCenterEval.getPerformanceMeasure(umontreal.iro.lecuyer.contactcenters.app.PerformanceMeasureType)` method to obtain a matrix of values for each performance measure in `pms` supported by `eval`. Considering the element at the bottom right of this matrix as the aggregate value, the method then, for each performance measure, adds a row containing the aggregate value.

  The resulting table of results contains one row for each type of performance measure, and two columns (name of measure, and value).

  Parameters:
    `eval` - the contact center evaluation system.
    `pms` - the array of performance measures.
  Returns:
    `true` if and only if the sheet was modified.
  Throws:
    `WriteException`

### formatValuesDetailed

    public boolean formatValuesDetailed(ContactCenterEval eval,
                                        PerformanceMeasureType pm)
                                 throws WriteException

  Adds a table containing the current values of the performance measures of type `pm` estimated by the evaluation system `eval` to the current spreadsheet. This method uses `formatValuesSingleColumn(ContactCenterInfo,PerformanceMeasureType,DoubleMatrix2D,int,int,int,int,String)` with a matrix of values obtained via `eval.getPerformanceMeasure`, and a description obtained via `pm.getDescription()`.

  Parameters:
    `eval` - the contact center evaluation system.
    `pm` - the performance measure of interest.
  Returns:
    `true` if and only if the sheet was modified.
  Throws:
    `WriteException`

### formatValuesDetailedMatrix

    public boolean formatValuesDetailedMatrix(ContactCenterEval eval,
                                              PerformanceMeasureType pm)
                                       throws WriteException

  Adds a table containing the current values of the performance measures of type `pm` estimated by the evaluation system `eval` to the current spreadsheet. This method uses `formatValuesMatrix(ContactCenterInfo,PerformanceMeasureType,DoubleMatrix2D,int,int,int,int,boolean,String)` with a matrix of values obtained via `eval.getPerformanceMeasure`, and a description obtained via `pm.getDescription()`.

  Parameters:
    `eval` - the contact center evaluation system.
    `pm` - the performance measure of interest.
  Returns:
    `true` if and only if the sheet was modified.
  Throws:
    `WriteException`

### formatValuesDetailedHidePeriods

    public boolean formatValuesDetailedHidePeriods(ContactCenterEval eval,
                                                   PerformanceMeasureType pm)
                                            throws WriteException

  Similar to `formatValuesDetailedMatrix(ContactCenterEval,PerformanceMeasureType)` except per-period values are not displayed.

  Parameters:
    `eval` - the evaluation system.
    `pm` - the type of performance measure.
  Returns:
    `true` if and only if the sheet was modified.
  Throws:
    `WriteException`

### formatValuesSingleColumn

    public boolean formatValuesSingleColumn(ContactCenterInfo eval,
                                            PerformanceMeasureType pm,
                                            DoubleMatrix2D valm,
                                            int row,
                                            int column,
                                            int height,
                                            int width,
                                            String description)
                                     throws WriteException

  Adds a table to the current spreadsheet containing the values in a matrix `valm.``viewPart` `(row, column, height, width)` concerning performance measures of type `pm` obtained with the evaluation system `eval`. The string `description` provides a description for the matrix which is displayed in a row preceding the table.

  Suppose that the given matrix has dimensions a×b. For example, the matrix can contain averages or sample variances for different contact types and periods. This method formats the results as a ab×1 matrix with one row for each element of `valm`. The names of rows are constructed using `getName` `(eval, pm, i, j)`.

  Parameters:
    `eval` - the evaluation system.
    `pm` - the type of performance measures concerned.
    `valm` - the matrix of values.
    `row` - the starting row of the matrix to be formatted.
    `column` - the starting column of the matrix to be formatted.
    `height` - the height of the formatted matrix.
    `width` - the width of the formatted matrix.
    `description` - the description for the formatted matrix.
  Returns:
    `true` if and only if the sheet was modified.
  Throws:
    `WriteException`

### formatValuesMatrix

    public boolean formatValuesMatrix(ContactCenterInfo eval,
                                      PerformanceMeasureType pm,
                                      DoubleMatrix2D valm,
                                      int row,
                                      int column,
                                      int height,
                                      int width,
                                      boolean transposedValm,
                                      String description)
                               throws WriteException

  This is similar to `formatValuesSingleColumn(ContactCenterInfo,PerformanceMeasureType,DoubleMatrix2D,int,int,int,int,String)`, except that the formatted table has dimensions a×b. Tables obtained via this method are often more readable than with the preceding one, but they can contain excessively long lines if `width` is large. If `width` is greater than `getMaxColumns()`, this method calls the result of `formatValuesSingleColumn(ContactCenterInfo,PerformanceMeasureType,DoubleMatrix2D,int,int,int,int,String)`.

  If `transposedValm` is `true`, the given matrix is considered to be transposed, i.e., the meaning of its rows and columns is inverted with respect to a typical matrix of performance measures of type `pm`. For example, let `pm` correspond to `PerformanceMeasureType.SERVEDRATES`. Usually, each row of `valm` corresponds to a contact type. With `transposedValm` enabled, each row of `valm` corresponds to an agent group. This flag only affects how rows and columns are named; it does not change the values being formatted.

  Parameters:
    `eval` - the evaluation system.
    `pm` - the type of performance measures concerned.
    `valm` - the matrix of values.
    `row` - the starting row of the matrix to be formatted.
    `column` - the starting column of the matrix to be formatted.
    `height` - the height of the formatted matrix.
    `width` - the width of the formatted matrix.
    `transposedValm` - determines if `valm` is transposed with respect to a typical matrix of performance measures of type `pm`.
    `description` - the description for the formatted matrix.
  Returns:
    `true` if and only if the sheet was modified.
  Throws:
    `WriteException`

### formatStatisticsSummary

    public boolean formatStatisticsSummary(ContactCenterSim sim,
                                           double level,
                                           String description,
                                           PerformanceMeasureType... pms)
                                    throws WriteException

  Adds a statistical report for all the performance measures in `pms` supported by the contact center simulator `sim` to the current spreadsheet. This is similar to `formatValuesSummary(umontreal.iro.lecuyer.contactcenters.app.ContactCenterEval, java.lang.String, umontreal.iro.lecuyer.contactcenters.app.PerformanceMeasureType...)`, with additional statistical information such as miminum, maximum, standard deviation, and confidence intervals with confidence level `level`, if available.

  Parameters:
    `sim` - the contact center simulator.
    `level` - the confidence level of the confidence intervals.
    `pms` - the array of performance measures.
  Returns:
    `true` if and only if the sheet was modified.
  Throws:
    `WriteException`

### formatStatisticsDetailed

    public boolean formatStatisticsDetailed(ContactCenterSim sim,
                                            double level,
                                            PerformanceMeasureType pm)
                                     throws WriteException

  Adds a statistical report for all the values of the performance measure `pm` estimated by the simulator `sim`, with confidence intervals with level `level`, to the current spreadsheet.

  Parameters:
    `sim` - the contact center simulator.
    `level` - the level of confidence intervals.
    `pm` - the performance measure of interest.
  Returns:
    `true` if and only if the sheet was modified.
  Throws:
    `WriteException`

### formatStatisticsDetailedMatrix

    public boolean formatStatisticsDetailedMatrix(ContactCenterSim sim,
                                                  double level,
                                                  PerformanceMeasureType pm)
                                           throws WriteException

  Throws:
    `WriteException`

### formatStatisticsDetailedHidePeriods

    public boolean formatStatisticsDetailedHidePeriods(ContactCenterSim sim,
                                                       double level,
                                                       PerformanceMeasureType pm)
                                                throws WriteException

  Similar to `formatStatisticsDetailedMatrix(ContactCenterSim,double,PerformanceMeasureType)` but does not format per-period statistics.

  Parameters:
    `sim` - the contact center simulator.
    `level` - the confidence level of the intervals.
    `pm` - the type of performance measures.
  Returns:
    `true` if and only if the sheet was modified.
  Throws:
    `WriteException`

### formatInfo

    public boolean formatInfo(Map<String,Object> info)
                       throws WriteException

  Appends rows containing the evaluation information `info` to the current spreadsheet. For each entry in the given map, this method creates a row containing one cell for the key, and a second cell for the value. Values are formatted as follows. Any `null` reference becomes the string `null`, instances of `Number` are turned into numeric cells, and instances of `Date` are converted to numeric cells formatted as dates. Any other non-`null` value is formatted using the `Object.toString()` method to become a string cell.

  Parameters:
    `info` - the evaluation information.
  Returns:
    `true` if and only if the sheet was modified.
  Throws:
    `WriteException`

### getDestinationRowTypes

    public RowType[] getDestinationRowTypes()

### formatObservations

    public boolean formatObservations(ContactCenterSimWithObservations sim,
                                      ReportParams reportParams)
                               throws WriteException

  For each element `PerformanceMeasureParams` returned by `ReportParams.getPrintedObs()`, formats the complete list of observations generated by the simulator `sim` for the referred performance measure. Each performance measure is formatted as a separate column in the current sheet.

  Parameters:
    `sim` - the simulator to get observations from.
    `reportParams` - the report parameters.
  Returns:
    `true` if the current sheet is modified by this operation.
  Throws:
    `WriteException` - if an error happens when writing to the current sheet.

### formatValues

    public boolean formatValues(ContactCenterEval eval,
                                ReportParams reportParams)
                         throws WriteException

  Formats a workbook containing the report of the last evaluation performed by the system `eval`. This method can be called by the implementation of `ContactCenterEval.formatStatisticsExcel(WritableWorkbook)`.

  Assuming that the current workbook is empty, this method creates a new sheet with name given by `summarySheetName`, and calls `formatInfo(Map)` with the evaluation information of `eval` to add the information to the new sheet. It then formats a summary report using `formatValuesSummary(ContactCenterEval,String,PerformanceMeasureType[])` into the same sheet. The method then creates a second sheet with name given by `detailedSheetNameWithoutPeriods` for the detailed report. For each performance measure a detailed report is reuqested for, the method calls `formatValuesDetailedHidePeriods(ContactCenterEval,PerformanceMeasureType)`. Finally, the method creates a third sheet with name given by `detailedSheetNameWithPeriods` and containing detailed information with individual periods, using `formatStatisticsDetailed(ContactCenterSim,double,PerformanceMeasureType)` to create the new cells. The two last sheets are not created if they would be empty. The creation of any of the third sheet can be disabled by giving a `null` or empty name for that sheet. Information that would be presented on an omitted sheet is written on the next requested sheet.

  The types of performance measures to include in the report are selected using `printedStats` which can be `null` or empty; in these two latter cases, the report includes all performance measures supported by `eval`. Each element of `printedStats` specifies a type of performance measure to include in the report (if supported by `eval`), whether a detailed report must be included, and if this detailed report includes information about each individual period.

  Parameters:
    `eval` - the evaluation system.
    `reportParams` - the report parameters.
  Throws:
    `WriteException`

### formatStatistics

    public boolean formatStatistics(ContactCenterSim sim,
                                    ReportParams reportParams)
                             throws WriteException

  Similar to `formatValues(ContactCenterEval,ReportParams)`, except this formats a full statistical report using `formatStatisticsSummary(ContactCenterSim,double,String,PerformanceMeasureType[])`, and `formatStatisticsDetailed(ContactCenterSim,double,PerformanceMeasureType)`. If the given report parameters contains information about observations to print, the method also calls `formatObservations(ContactCenterSimWithObservations,ReportParams)`, and creates a sheet with the results.

  Parameters:
    `sim` - the contact center simulator.
    `reportParams` - the report parameters.
  Returns:
    the current workbook.
  Throws:
    `WriteException`

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.