ContactCenters
V. 0.9.9.

umontreal.iro.lecuyer.contactcenters.app
Class CompareSimResults

java.lang.Object
  extended by umontreal.iro.lecuyer.contactcenters.app.CompareSimResults

public class CompareSimResults
extends Object

Provides static methods that can be used to compare simulation results.


Constructor Summary
CompareSimResults()
           
 
Method Summary
static boolean equals(ContactCenterEval res1, ContactCenterEval res2, double tol, Formatter fmt)
          Determines if systems res1 and res2 seem equal, and formats any detected error using fmt.
static boolean equals(ContactCenterEval res1, ContactCenterEval res2, Formatter fmt)
          Determines if systems res1 and res2 seem equal, and formats any detected error using fmt.
static boolean equalsStat(ContactCenterSim res1, ContactCenterSim res2, double confidenceLevel, double tol, Formatter fmt)
          Determines if systems res1 and res2 seem statistically equal, and formats any detected error using fmt.
static String formatDifferentPoints(ContactCenterEval res1, ContactCenterEval res2, Map<PerformanceMeasureType,List<Point>> diffMap)
          Formats the values of the performance measures for each differing point given by diffMap.
static String formatDifferentPoints(ContactCenterSim res1, ContactCenterSim res2, Map<PerformanceMeasureType,List<Point>> diffMap, double confidenceLevel)
          Sends the values of the performance measures for each differing point given by diffMap.
static Set<PerformanceMeasureType> getCommonPerformanceMeasures(ContactCenterEval res1, ContactCenterEval res2, Formatter fmt)
          Returns a set containing the performance measure types supported by both res1 and res2, and providing matrices of results of the same dimensions.
static Map<PerformanceMeasureType,List<Point>> getDifferent(ContactCenterEval res1, ContactCenterEval res2, double tol, Set<PerformanceMeasureType> pmSet)
          Equivalent to getDifferent(ContactCenterEval,ContactCenterEval,Set), except that two real numbers v1 and v2 are considered different if | v2 - v1| > ε, where ε = tol.
static Map<PerformanceMeasureType,List<Point>> getDifferent(ContactCenterEval res1, ContactCenterEval res2, Set<PerformanceMeasureType> pmSet)
          Compares res1 and res2 based on the performance measures in pmSet, and adds a point (r, c) for each performance measure whose estimated value differs more than tol.
static Map<PerformanceMeasureType,List<Point>> getNonOverlappingCI(ContactCenterSim res1, ContactCenterSim res2, double confidenceLevel, double tol, Set<PerformanceMeasureType> pmSet)
          Compares res1 and res2 based on the performance measures in pmSet, and adds a point (r, c) for each performance measure whose confidence intervals with confidence level confidenceLevel, for both system, do not overlap.
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompareSimResults

public CompareSimResults()
Method Detail

getCommonPerformanceMeasures

public static Set<PerformanceMeasureType> getCommonPerformanceMeasures(ContactCenterEval res1,
                                                                       ContactCenterEval res2,
                                                                       Formatter fmt)
Returns a set containing the performance measure types supported by both res1 and res2, and providing matrices of results of the same dimensions. For performance measures supported by one result set only, this method can output a message on the formatter fmt.

Parameters:
res1 - the first result set.
res2 - the second result set.
fmt - the formatter to output messages, or null.
Returns:
the set of performance measures.

getDifferent

public static Map<PerformanceMeasureType,List<Point>> getDifferent(ContactCenterEval res1,
                                                                   ContactCenterEval res2,
                                                                   Set<PerformanceMeasureType> pmSet)
Compares res1 and res2 based on the performance measures in pmSet, and adds a point (r, c) for each performance measure whose estimated value differs more than tol. This method uses ContactCenterEval.getPerformanceMeasure(PerformanceMeasureType) to get a matrix of point estimates for each performance measure type in pmSet, for res1, and res2. Then, assuming that both matrices of estimates share the same dimensions, the method compares all corresponding elements (r, c) in the matrices.

Parameters:
res1 - the first system.
res2 - the second system.
pmSet - the set of tested performance measures.
Returns:
the map giving the list of differing points for each performance measure.

getDifferent

public static Map<PerformanceMeasureType,List<Point>> getDifferent(ContactCenterEval res1,
                                                                   ContactCenterEval res2,
                                                                   double tol,
                                                                   Set<PerformanceMeasureType> pmSet)
Equivalent to getDifferent(ContactCenterEval,ContactCenterEval,Set), except that two real numbers v1 and v2 are considered different if | v2 - v1| > ε, where ε = tol.

Parameters:
res1 - the first system.
res2 - the second system.
tol - the tolerance.
pmSet - the set of tested performance measures.
Returns:
the map giving the list of differing points for each performance measure.

getNonOverlappingCI

public static Map<PerformanceMeasureType,List<Point>> getNonOverlappingCI(ContactCenterSim res1,
                                                                          ContactCenterSim res2,
                                                                          double confidenceLevel,
                                                                          double tol,
                                                                          Set<PerformanceMeasureType> pmSet)
Compares res1 and res2 based on the performance measures in pmSet, and adds a point (r, c) for each performance measure whose confidence intervals with confidence level confidenceLevel, for both system, do not overlap.

Parameters:
res1 - the first system.
res2 - the second system.
confidenceLevel - the confidence level.
pmSet - the set of tested performance measures.
Returns:
the map giving the list of differing points for each performance measure.

formatDifferentPoints

public static String formatDifferentPoints(ContactCenterEval res1,
                                           ContactCenterEval res2,
                                           Map<PerformanceMeasureType,List<Point>> diffMap)
Formats the values of the performance measures for each differing point given by diffMap. For each key in diffMap, this method obtains a list of points (r, c) corresponding to performance measures. For each such point, the method formats the average for both systems.

Parameters:
res1 - the first system.
res2 - the second system.
diffMap - the map containing differing performance measures.
Returns:
the string containing the results.

formatDifferentPoints

public static String formatDifferentPoints(ContactCenterSim res1,
                                           ContactCenterSim res2,
                                           Map<PerformanceMeasureType,List<Point>> diffMap,
                                           double confidenceLevel)
Sends the values of the performance measures for each differing point given by diffMap. For each key in diffMap, this method obtains a list of points (r, c) corresponding to performance measures. For each such point, the method formats the average, standard deviation, and confidence interval, for both systems.

Parameters:
res1 - the first system.
res2 - the second system.
diffMap - the map containing differing performance measures.
confidenceLevel - the level of confidence of the intervals.
Returns:
the string containing the results.

equals

public static boolean equals(ContactCenterEval res1,
                             ContactCenterEval res2,
                             Formatter fmt)
Determines if systems res1 and res2 seem equal, and formats any detected error using fmt. This method uses getCommonPerformanceMeasures(ContactCenterEval,ContactCenterEval,Formatter) to obtain the set of common performance measures. Then, it uses getDifferent(ContactCenterEval,ContactCenterEval,Set) to obtain the list of different points. The method returns true if and only if all point estimators are equal. Otherwise, formatDifferentPoints(ContactCenterEval,ContactCenterEval,Map) is used to format differing points.

Parameters:
res1 - the first system.
res2 - the second system.
fmt - the formatter, or null.
Returns:
the result of the test.

equals

public static boolean equals(ContactCenterEval res1,
                             ContactCenterEval res2,
                             double tol,
                             Formatter fmt)
Determines if systems res1 and res2 seem equal, and formats any detected error using fmt. This method uses getCommonPerformanceMeasures(ContactCenterEval,ContactCenterEval,Formatter) to obtain the set of common performance measures. Then, it uses getDifferent(ContactCenterEval,ContactCenterEval,double,Set) to obtain the list of different points. The method returns true if and only if all point estimators are equal. Otherwise, formatDifferentPoints(ContactCenterEval,ContactCenterEval,Map) is used to format differing points.

Parameters:
res1 - the first system.
res2 - the second system.
tol - the tolerance.
fmt - the formatter, or null.
Returns:
the result of the test.

equalsStat

public static boolean equalsStat(ContactCenterSim res1,
                                 ContactCenterSim res2,
                                 double confidenceLevel,
                                 double tol,
                                 Formatter fmt)
Determines if systems res1 and res2 seem statistically equal, and formats any detected error using fmt. This method uses getCommonPerformanceMeasures(ContactCenterEval,ContactCenterEval,Formatter) to obtain the set of common performance measures. Then, it uses getNonOverlappingCI(ContactCenterSim,ContactCenterSim,double,double,Set) to obtain the list of non-overlapping confidence intervals. The method returns true if and only if all confidence intervals overlap. Otherwise, formatDifferentPoints(ContactCenterSim,ContactCenterSim,Map,double) is used to format differing points.

Parameters:
res1 - the first system.
res2 - the second system.
confidenceLevel - the confidence level.
fmt - the formatter, or null.
Returns:
the result of the test.

main

public static void main(String[] args)
                 throws IOException,
                        ClassNotFoundException,
                        ParserConfigurationException,
                        SAXException
Throws:
IOException
ClassNotFoundException
ParserConfigurationException
SAXException

ContactCenters
V. 0.9.9.

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