|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectumontreal.iro.lecuyer.contactcenters.app.PerformanceMeasureFormat
umontreal.iro.lecuyer.contactcenters.app.PerformanceMeasureFormatText
public class PerformanceMeasureFormatText
Defines some facilities to format performance measures as strings. For each estimated performance measure, an evaluation system can produce matrices of results which may need to be formatted to be displayed on-screen or included in printable documents. This class defines methods to create summary reports for several performance measures or a detailed report for a particular measure.
Each formatting method constructs an ObjectMatrix2D
instance
containing String
elements, each numerical value being processed
using a double formatter implementing interfaces DoubleFormatter
or
DoubleFormatterWithError
. After the intermediate matrix is
constructed, the method uses an instance of Formatter
to turn it into
a String
. By default, this class is adapted for on-screen reports,
but methods may be overridden for other types of formatting.
Field Summary |
---|
Fields inherited from class umontreal.iro.lecuyer.contactcenters.app.PerformanceMeasureFormat |
---|
agentGroupProperties, contactTypeProperties, histogramList |
Constructor Summary | |
---|---|
PerformanceMeasureFormatText()
Creates a performance measure formatter using the default Formatter implementation adapted for on-screen printing. |
|
PerformanceMeasureFormatText(Formatter fmt)
Constructs a performance measure formatter with the formatter fmt. |
|
PerformanceMeasureFormatText(Formatter fmt,
DoubleFormatter dfmtVal,
DoubleFormatter dfmtStat)
Constructs a performance measure formatter with the matrix formatter fmt, the double-precision formatter fmtVal for values (with unknown error), and fmtStat for statistics (with an estimated error). |
|
PerformanceMeasureFormatText(Formatter fmt,
ReportParams reportParams)
|
|
PerformanceMeasureFormatText(ReportParams reportParams)
|
Method Summary | |
---|---|
String |
formatInfo(Map<String,Object> info)
Constructs and returns a string containing the evaluation information info. |
String |
formatObservations(ContactCenterSimWithObservations sim,
ReportParams reportParams)
For each element PerformanceMeasureParams in the list returned
by ReportParams.getPrintedObs() ,
formats a report containing the complete list of observations
generated by the simulator sim
for the referred performance measure. |
String |
formatStatistics(ContactCenterSim sim,
ReportParams reportParams)
Similar to formatValues(ContactCenterEval,ReportParams) ,
except this formats a full statistical report using
formatStatisticsSummary(ContactCenterSim,double,PerformanceMeasureType[]) ,
and
formatStatisticsDetailed(ContactCenterSim,double,PerformanceMeasureType) . |
String |
formatStatisticsDetailed(ContactCenterSim sim,
double level,
PerformanceMeasureType pm)
Returns a statistical report for all the values of the performance measure pm estimated by the simulator sim, with confidence intervals with level level. |
String |
formatStatisticsDetailedHidePeriods(ContactCenterSim sim,
double level,
PerformanceMeasureType pm)
Similar to formatStatisticsDetailed(ContactCenterSim,double,PerformanceMeasureType)
but does not format per-period statistics. |
String |
formatStatisticsSummary(ContactCenterSim sim,
double level,
PerformanceMeasureType... pms)
Formats a statistical report for all the performance measures in pms supported by the contact center simulator sim. |
String |
formatValues(ContactCenterEval eval,
ReportParams reportParams)
Formats and returns a string containing the report of the last evaluation performed by the system eval. |
String |
formatValuesDetailed(ContactCenterEval eval,
PerformanceMeasureType pm)
Returns a string containing the current values of the performance measures of type pm estimated by the evaluation system eval. |
String |
formatValuesDetailedHidePeriods(ContactCenterEval eval,
PerformanceMeasureType pm)
Similar to formatValuesDetailed(ContactCenterEval,PerformanceMeasureType)
except per-period values are not displayed. |
String |
formatValuesDetailedMatrix(ContactCenterEval eval,
PerformanceMeasureType pm)
Returns a string containing the current values of the performance measures of type pm estimated by the evaluation system eval. |
String |
formatValuesMatrix(ContactCenterInfo eval,
PerformanceMeasureType pm,
DoubleMatrix2D valm,
int row,
int column,
int height,
int width,
boolean transposedValm,
String description)
This is similar to formatValuesSingleRow(ContactCenterInfo,PerformanceMeasureType,DoubleMatrix2D,int,int,int,int,String) ,
except that the intermediate matrix of strings has dimensions a×b. |
String |
formatValuesSingleRow(ContactCenterInfo eval,
PerformanceMeasureType pm,
DoubleMatrix2D valm,
int row,
int column,
int height,
int width,
String description)
Formats the values in a matrix valm. viewPart
(row, column, height, width) concerning performance measures of
type pm obtained with the evaluation system eval. |
String |
formatValuesSummary(ContactCenterEval eval,
PerformanceMeasureType... pms)
Formats a report for all the performance measures pms supported by the evaluation system eval. |
DoubleFormatter |
getDoubleFormatterStatistics()
Returns the double-precision formatter used for statistics. |
DoubleFormatter |
getDoubleFormatterValues()
Returns the double-precision formatter used for values. |
Formatter |
getMatrixFormatter()
Returns the matrix formatter used by this object. |
String |
getPercentString()
Returns the string representing the percentage sign in reports, the default being %. |
void |
setDoubleFormatterStatistics(DoubleFormatter dfmtStat)
Sets the double-precision formatter used for statistics to dfmtStat. |
void |
setDoubleFormatterValues(DoubleFormatter dfmtVal)
Sets the double-precision formatter used for values to dfmtVal. |
void |
setMatrixFormatter(Formatter fmt)
Sets the matrix formatter used by this object to fmt. |
void |
setPercentString(String percentString)
Sets the percentage string to percentString. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PerformanceMeasureFormatText()
Formatter
implementation adapted for on-screen printing.
public PerformanceMeasureFormatText(Formatter fmt)
fmt
- the user-defined formatter object.
NullPointerException
- if fmt is null.public PerformanceMeasureFormatText(Formatter fmt, DoubleFormatter dfmtVal, DoubleFormatter dfmtStat)
fmt
- the user-defined formatter object.dfmtVal
- the double-precision formatter for values.dfmtStat
- the doubl-precision formatter for statistics.
NullPointerException
- if any argument is null.public PerformanceMeasureFormatText(ReportParams reportParams)
public PerformanceMeasureFormatText(Formatter fmt, ReportParams reportParams)
Method Detail |
---|
public Formatter getMatrixFormatter()
public void setMatrixFormatter(Formatter fmt)
fmt
- the matrix formatter used.public DoubleFormatter getDoubleFormatterValues()
public void setDoubleFormatterValues(DoubleFormatter dfmtVal)
dfmtVal
- the new double-precision formatter used for values.public DoubleFormatter getDoubleFormatterStatistics()
public void setDoubleFormatterStatistics(DoubleFormatter dfmtStat)
dfmtStat
- the double-precision formatter used for statistics.public String getPercentString()
public void setPercentString(String percentString)
percentString
- the new percentage string.public String formatValuesSummary(ContactCenterEval eval, PerformanceMeasureType... pms)
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 formats this value for each
performance measure, using getDoubleFormatterValues()
to convert
double-precision values to strings.
The intermediate formatting matrix contains one row for each performance measure, and a single column containing its aggregate value.
eval
- the contact center evaluation system.pms
- the array of performance measures.
public String formatValuesDetailed(ContactCenterEval eval, PerformanceMeasureType pm)
formatValuesSingleRow(ContactCenterInfo,PerformanceMeasureType,DoubleMatrix2D,int,int,int,int,String)
with a matrix of values obtained via
eval.getPerformanceMeasure
, and a description obtained via
pm.getDescription()
.
eval
- the contact center evaluation system.pm
- the performance measure of interest.
public String formatValuesDetailedMatrix(ContactCenterEval eval, PerformanceMeasureType pm)
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()
.
eval
- the contact center evaluation system.pm
- the performance measure of interest.
public String formatValuesDetailedHidePeriods(ContactCenterEval eval, PerformanceMeasureType pm)
formatValuesDetailed(ContactCenterEval,PerformanceMeasureType)
except per-period values are not displayed.
eval
- the evaluation system.pm
- the type of performance measure.
public String formatValuesSingleRow(ContactCenterInfo eval, PerformanceMeasureType pm, DoubleMatrix2D valm, int row, int column, int height, int width, String description)
viewPart
(row, column, height, width) concerning performance measures of
type pm obtained with the evaluation system eval.
Numbers are formatted using getDoubleFormatterValues()
, and
description provides a description for the matrix.
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 creates a
ab×1 intermediate matrix
of strings with one row for each element of valm. The names of
rows are constructed using
getName
(eval, pm, i, j).
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.
public String formatValuesMatrix(ContactCenterInfo eval, PerformanceMeasureType pm, DoubleMatrix2D valm, int row, int column, int height, int width, boolean transposedValm, String description)
formatValuesSingleRow(ContactCenterInfo,PerformanceMeasureType,DoubleMatrix2D,int,int,int,int,String)
,
except that the intermediate matrix of strings has dimensions a×b.
The formatted strings obtained via this method are often more readable
than with the preceding method, but they can contain excessively long
lines if the width is large.
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.
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.
public String formatStatisticsSummary(ContactCenterSim sim, double level, PerformanceMeasureType... pms)
formatValuesSummary(umontreal.iro.lecuyer.contactcenters.app.ContactCenterEval, 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. Values are
formatted using the formatter getDoubleFormatterStatistics()
.
The format of the intermediate matrix is the same as
formatValuesSummary(umontreal.iro.lecuyer.contactcenters.app.ContactCenterEval, umontreal.iro.lecuyer.contactcenters.app.PerformanceMeasureType...)
, except that columns are defined for the
minimum, maximum, average, standard deviation, and confidence interval.
sim
- the contact center simulator.level
- the level of confidence of the intervalspms
- the array of performance measures.
public String formatStatisticsDetailed(ContactCenterSim sim, double level, PerformanceMeasureType pm)
getDoubleFormatterStatistics()
.
The intermediate matrix has a format similar to the one constructed by
formatValuesDetailed(ContactCenterEval,PerformanceMeasureType)
,
except that a column is defined for the minimum, maximum, average,
standard deviation, and confidence interval.
sim
- the contact center simulator.level
- the level of confidence intervals.pm
- the performance measure of interest.
public String formatStatisticsDetailedHidePeriods(ContactCenterSim sim, double level, PerformanceMeasureType pm)
formatStatisticsDetailed(ContactCenterSim,double,PerformanceMeasureType)
but does not format per-period statistics.
sim
- the contact center simulator.level
- the confidence level of the intervals.pm
- the type of performance measures.
public String formatInfo(Map<String,Object> info)
Number
are formatted using NumberFormat
, and instances
of Date
are formatted using DateFormat
. Any other
non-null value is formatted using the Object.toString()
method.
info
- the evaluation information.
public String formatObservations(ContactCenterSimWithObservations sim, ReportParams reportParams)
PerformanceMeasureParams
in the list returned
by ReportParams.getPrintedObs()
,
formats a report containing the complete list of observations
generated by the simulator sim
for the referred performance measure.
Each measure-specific report is concatenated, and
the resulting string is returned.
sim
- the queried simulator.reportParams
- the report parameters.
public String formatValues(ContactCenterEval eval, ReportParams reportParams)
ContactCenterEval.formatStatistics()
.
This method first calls formatInfo(Map)
with the evaluation
information of eval. It then formats a summary report using
formatValuesSummary(ContactCenterEval,PerformanceMeasureType...)
.
Then, for each performance measure a detailed report is requested for, the
method appends the contents of
formatStatisticsDetailed(ContactCenterSim,double,PerformanceMeasureType)
or
formatValuesDetailedHidePeriods(ContactCenterEval,PerformanceMeasureType)
to the report.
The types of performance measures to include in the report are selected
using reportParams.getPrintedStats()
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.
eval
- the evaluation system.reportParams
- the report parameters.
public String formatStatistics(ContactCenterSim sim, ReportParams reportParams)
formatValues(ContactCenterEval,ReportParams)
,
except this formats a full statistical report using
formatStatisticsSummary(ContactCenterSim,double,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 appends the result to the returned string.
sim
- the contact center simulator.reportParams
- the report parameters.
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |