|
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.CCParamReadHelper
public class CCParamReadHelper
Provides helper methods to convert parameter objects into usable objects.
Constructor Summary | |
---|---|
CCParamReadHelper()
|
Method Summary | |
---|---|
static void |
compactPeriods(MultiPeriodGenParams mpg,
double tol)
Replaces, in mpg, any group of successive period-specific generators having equivalent parameters with a single per-period generator with a repeat attribute. |
static MultiPeriodGen |
createGenerator(MultiPeriodGenParams mpgp,
RandomStream stream,
PeriodChangeEvent pce)
Constructs and returns a random variate generator for multiple periods using the parameters in mpgp, the random stream stream, and the period-change event pce. |
static boolean |
estimateParameters(MultiPeriodGenParams mpgp)
Estimates parameters for every period-specific generator specified by mpgp. |
static double |
getMeanForPeriod(MultiPeriodGenParams mpgp,
int p)
Returns the mean value of the distribution for the main period p. |
static double |
getMeanPre(MultiPeriodGenParams mpgp)
Returns the mean for the preliminary period, if parameters are set for this period. |
static double |
getMeanWrap(MultiPeriodGenParams mpgp)
Returns the mean for the wrap-up period, if parameters are set for this period. |
static double |
getVarianceForPeriod(MultiPeriodGenParams mpgp,
int p)
Returns the variance value of the distribution for the main period p. |
static double |
getVariancePre(MultiPeriodGenParams mpgp)
Returns the variance for the preliminary period, if parameters are set for this period. |
static double |
getVarianceWrap(MultiPeriodGenParams mpgp)
Returns the variance for the wrap-up period, if parameters are set for this period. |
static boolean |
sameGenerators(MultiPeriodGenParams mpg1,
MultiPeriodGenParams mpg2,
double tol)
Determines if the two generators mpg1, and mpg2 are equivalent, i.e., if they use the same distribution and parameters for each period. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CCParamReadHelper()
Method Detail |
---|
public static double getMeanForPeriod(MultiPeriodGenParams mpgp, int p) throws DistributionCreationException
mpgp
- the parameters of the random variate generator for multiple
periods.p
- the index of the main period.
DistributionCreationException
- if an error occurs during the creation of the distribution.public static double getVarianceForPeriod(MultiPeriodGenParams mpgp, int p) throws DistributionCreationException
mpgp
- the parameters of the random variate generator for multiple
periods.p
- the index of the main period.
DistributionCreationException
- if an error occurs during the creation of the distribution.public static double getMeanPre(MultiPeriodGenParams mpgp) throws DistributionCreationException
mpgp
- the parameters of the random variate generator for multiple
periods.
DistributionCreationException
- if an error occurs during the creation of the distribution.public static double getVariancePre(MultiPeriodGenParams mpgp) throws DistributionCreationException
mpgp
- the parameters of the random variate generator for multiple
periods.
DistributionCreationException
- if an error occurs during the creation of the distribution.public static double getMeanWrap(MultiPeriodGenParams mpgp) throws DistributionCreationException
mpgp
- the parameters of the random variate generator for multiple
periods.
DistributionCreationException
- if an error occurs during the creation of the distribution.public static double getVarianceWrap(MultiPeriodGenParams mpgp) throws DistributionCreationException
mpgp
- the parameters of the random variate generator for multiple
periods.
DistributionCreationException
- if an error occurs during the creation of the distribution.public static MultiPeriodGen createGenerator(MultiPeriodGenParams mpgp, RandomStream stream, PeriodChangeEvent pce) throws DistributionCreationException, GeneratorCreationException
The parameters for the preliminary and wrap-up periods are obtained using
MultiPeriodGenParams.getPreGen()
, and
MultiPeriodGenParams.getWrapGen()
, respectively. If no
parameters are given for the preliminary [wrap-up] period, the generator
of the first [last] main period is used. For main periods, the method
obtains parameters from MultiPeriodGenParams.getPeriodGen()
. If
the number of main periods defined by pce exceeds the number of
period-specific sets of parameters, the method constructs the default
generator based on parameters in
MultiPeriodGenParams.getDefaultGen()
, and uses it for the
remaining main periods.
When constructing a period-specific generator, this method replaces the missing distribution class, generator class, and shift by the default value given by mpgp.
mpgp
- the parameters for the multiple-periods generator.stream
- the random stream.pce
- the period-change event.
DistributionCreationException
- if an exception occurred during the construction of a
period-specific distribution.
GeneratorCreationException
- if an exception occurred during the construction of a
period-specific generator.public static void compactPeriods(MultiPeriodGenParams mpg, double tol)
mpg
- the parameters of the multiple-periods generator..tol
- the tolerance used for comparing numbers.public static boolean estimateParameters(MultiPeriodGenParams mpgp) throws DistributionCreationException
ParamReadHelper.estimateParameters(RandomVariateGenParams)
for each period-specific generator to estimate parameters.
mpgp
- the parameters for the multiple-period generator.
ParamReadHelper.estimateParameters(RandomVariateGenParams)
returned true.
DistributionCreationException
public static boolean sameGenerators(MultiPeriodGenParams mpg1, MultiPeriodGenParams mpg2, double tol)
ParamReadHelper.sameGenerators(RandomVariateGenParams,RandomVariateGenParams,double)
to compare period-specific generators.
mpg1
- the first multiple-periods generators.mpg2
- the second multiple-periods generators.tol
- the tolerance used to compare numbers.
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |