SSJ  3.3.1
Stochastic Simulation in Java
Static Public Member Functions | List of all members
RQMCExperiment Class Reference

Provides basic generic tools to perform RQMC experiments with a simulation model that implements the MonteCarloModelDouble interface. More...

Inheritance diagram for RQMCExperiment:
[legend]
Collaboration diagram for RQMCExperiment:
[legend]

Static Public Member Functions

static void simulReplicatesRQMC (MonteCarloModelDouble model, RQMCPointSet prqmc, int m, Tally statReps)
 Simulate m replications with prqmc and return the m RQMC average observations in statReps. More...
 
static void simulReplicatesRQMC (MonteCarloModelDouble model, PointSet p, PointSetRandomization rand, int m, Tally statReps)
 Simulate m replications and return the m RQMC average observations in statReps. More...
 
static void simulReplicatesRQMC (MonteCarloModelDouble model, RQMCPointSet prqmc, int m, Tally statReps, double[][] data)
 Same as simulReplicatesRQMC, except that all the n observations for each the m replications are saved and returned in a new two-dimensional array data, which is an array of m arrays of size ‘n’, i.e., double[m][n], created inside this method. More...
 
static void simulReplicatesRQMC (MonteCarloModelDouble model, PointSet p, PointSetRandomization rand, int m, Tally statReps, double[][] data)
 Here the QMC point set p and its randomization rand are specified directly.
 
static String simulReplicatesRQMCDefaultReport (MonteCarloModelDouble model, PointSet p, PointSetRandomization rand, int m, RandomStream noise, Tally statRQMC)
 Similar to simulReplicatesRQMC, but also returns a report as a String.
 
static String simulReplicatesRQMCDefaultReportCompare (MonteCarloModelDouble model, PointSet p, PointSetRandomization rand, int m, Tally statRQMC, double variancePerRunMC, double secondsPerRunMC)
 Similar to simulReplicatesRQMCDefaultReport, but this one makes a comparison with another estimator whose variance per run is variancePerRunMC and which took a time secondPerRunMC per run to compute. More...
 
static String makeComparisonExperimentMCvsRQMC (MonteCarloModelDouble model, RandomStream stream, PointSet p, PointSetRandomization rand, int n, int m, Tally statMC, Tally statRQMC)
 This method first performs a MC experiment to estimate the variance and CPU time per run, then invokes simulReplicatesRQMCDefaultReportCompare and returns a printable report that compares MC with RQMC.
 
static String makeComparisonExperimentMCvsRQMC (MonteCarloModelDouble model, RandomStream stream, PointSet p, PointSetRandomization rand, int n, int m)
 In this version, the statistical collectors are created internally, so they cannot be accessed externally.
 
static void simulReplicatesRQMC (MonteCarloModelDoubleArray model, RQMCPointSet prqmc, int m, ListOfTallies< Tally > statRepsList)
 Similar to simulReplicatesRQMC(MonteCarloModelDouble, RQMCPointSet, int, Tally) but for a model of type MonteCarloModelDoubleArray. More...
 
static void simulReplicatesRQMC (MonteCarloModelDoubleArray model, PointSet p, PointSetRandomization rand, int m, ListOfTallies< Tally > statRepsList)
 Same as simulReplicatesRQMC(MonteCarloModelArrayOfDoubles, RQMCPointSet, int, ListOfTallies) but with the point set #p and its randomization #rand specified directly. More...
 
static void simulReplicatesRQMC (MonteCarloModelDoubleArray model, RQMCPointSet prqmc, int m, ListOfTallies< Tally > statRepsList, double[][][] data)
 Same as simulReplicatesRQMC(MonteCarloModelDoubleArray, RQMCPointSet, int, ListOfTallies), except that all the \(n\) observations of dimension \(t\) for each of the \(m\) replications are saved and returned in a new three-dimensional array data<>, which is an array of size \(m\times n\times t\), i.e., double[m][n][t]. More...
 
static void simulReplicatesRQMC (MonteCarloModelDoubleArray model, PointSet p, PointSetRandomization rand, int m, ListOfTallies< Tally > statRepsList, double[][][] data)
 Same as simulReplicatesRQMC(MonteCarloModelDoubleArray, RQMCPointSet, int, ListOfTallies, double[][][]), but with the point set and the randomization passed separately. More...
 
static void simulReplicatesRQMCCV (MonteCarloModelCV model, RQMCPointSet prqmc, int m, ListOfTalliesWithCV< Tally > statWithCV)
 Same as simulReplicatesRQMC, except that this one uses control variates. More...
 
static void simulReplicatesRQMCCV (MonteCarloModelCV model, PointSet p, PointSetRandomization rand, int m, ListOfTalliesWithCV< Tally > statWithCV)
 Same as simulReplicatesRQMCCV above, except that here the point set #p and the randomization #rand are specified directly.
 
static void simulFDReplicatesRQMC (MonteCarloModelDouble model1, MonteCarloModelDouble model2, double delta, PointSet p, PointSetRandomization rand, int m, Tally statDiffRQMC)
 To estimate a derivative via a finite difference.
 
- Static Public Member Functions inherited from MonteCarloExperiment
static void simulateRuns (MonteCarloModelDouble model, int n, RandomStream stream, Tally statValue)
 Performs #n simulation runs of #model using #stream and collects statistics in #statValue. More...
 
static void simulateRuns (MonteCarloModelDoubleArray model, int n, RandomStream stream, ListOfTallies<? extends Tally > statValueList)
 Similar to simulateRuns(MonteCarloModelDouble, int, RandomStream, Tally) but for a model of type MonteCarloModelDoubleArray. More...
 
static void simulateRunsCV (MonteCarloModelCV model, int n, RandomStream stream, ListOfTalliesWithCV< Tally > statWithCV)
 Performs n runs of model using #stream and collects statistics for a model with a vector of control variates. More...
 
static void simulateRunsCV (MonteCarloModelCV model, int n, RandomStream stream, TallyStore statX, TallyStore statC)
 Performs n runs using stream and collects statistics for a model with a single real-valued control variate C. More...
 
static void simulateRunsCV (MonteCarloModelCV model, int n, RandomStream stream, double[] mean, double[] variance)
 
Performs n runs using #stream and collects statistics for a model with a single real-valued control variate C. More...
 
static void computeMeanVarCV (TallyStore statX, TallyStore statC, double[] mean, double[] variance)
 Given statistics collected in statX and statC as with simulateRunsCV, this method computes the mean and variance of the estimators with and without the CV and returns them in the two-dimensional vectors mean and variance (mean[0] is the value without CV, mean[1] the value with CV, and similarly for the variance.
 
static void simulFDReplicatesCRN (MonteCarloModelDouble model1, MonteCarloModelDouble model2, double delta, int n, RandomStream stream, Tally statDiff)
 Performs n simulation runs to estimate the difference in performance between model2 and model1, divided by delta, using common random numbers (CRN) across the two models. More...
 
static void simulFDReplicatesIRN (MonteCarloModelDouble model1, MonteCarloModelDouble model2, double delta, int n, RandomStream stream, Tally statDiff)
 Similar to simulFDReplicatesCRN, but using independent random numbers (IRN) across the two models. More...
 
static String simulateRunsDefaultReportStudent (MonteCarloModelDouble model, int n, RandomStream stream, Tally statValue, double level, int d, Chrono timer)
 Performs n independent runs using n substreams of #stream, collects statistics in #statValue, and returns a report with a confidence interval of level #level, with d decimal fractional digits of precision for the output, computed via a Student distribution.
 
static String simulateRunsDefaultReportStudent (MonteCarloModelDouble model, int n, RandomStream stream, Tally statValue, double level, int d)
 In this version, there is no need to provide a Chrono; it is created inside.
 
static String simulateRunsDefaultReportStudent (MonteCarloModelDouble model, int n, RandomStream stream, Tally statValue, Chrono timer)
 A short-hand equivalent for simulateRunsDefaultReportStudent (model, n, stream, statValue, 0.95, 4, timer)
 
static String simulateRunsDefaultReportStudent (MonteCarloModelDouble model, int n, RandomStream stream, Tally statValue)
 A short-hand equivalent for simulateRunsDefaultReportStudent (model, n, stream, statValue, 0.95, 4)
 
static String simulateRunsDefaultReportCV (MonteCarloModelCV model, int n, RandomStream stream, ListOfTalliesWithCV< Tally > statWithCV, double level, int d, Chrono timer)
 Similar to simulateRunsDefaultReport, but this one uses a vector of control variates. More...
 
static String simulateRunsDefaultReportCV (MonteCarloModelCV model, int n, RandomStream stream, ListOfTalliesWithCV< Tally > statWithCV, double level, int d)
 In this one the timer is created internally (and cannot be accessed externally).
 
static String simulateRunsDefaultReportCV (MonteCarloModelCV model, int n, RandomStream stream, double[] mean, double[] variance, double level, int d, Chrono timer)
 This one uses a single real-valued CV, as in simulateRunsCV.
 

Detailed Description

Provides basic generic tools to perform RQMC experiments with a simulation model that implements the MonteCarloModelDouble interface.

Author
Pierre L'Ecuyer

Member Function Documentation

◆ simulReplicatesRQMC() [1/7]

static void simulReplicatesRQMC ( MonteCarloModelDouble  model,
RQMCPointSet  prqmc,
int  m,
Tally  statReps 
)
static

Simulate m replications with prqmc and return the m RQMC average observations in statReps.

These m observations are usually independent if the randomizations used in the RQMC point set prqmc are independent.

◆ simulReplicatesRQMC() [2/7]

static void simulReplicatesRQMC ( MonteCarloModelDouble  model,
PointSet  p,
PointSetRandomization  rand,
int  m,
Tally  statReps 
)
static

Simulate m replications and return the m RQMC average observations in statReps.

Here the QMC point set p and its randomization rand are specified directly.

◆ simulReplicatesRQMC() [3/7]

static void simulReplicatesRQMC ( MonteCarloModelDouble  model,
RQMCPointSet  prqmc,
int  m,
Tally  statReps,
double  data[][] 
)
static

Same as simulReplicatesRQMC, except that all the n observations for each the m replications are saved and returned in a new two-dimensional array data, which is an array of m arrays of size ‘n’, i.e., double[m][n], created inside this method.

Each array of size n is sorted by increasing order. This is useful for density and cdf estimation, or for further processing of the data, for example.

◆ simulReplicatesRQMC() [4/7]

static void simulReplicatesRQMC ( MonteCarloModelDoubleArray  model,
RQMCPointSet  prqmc,
int  m,
ListOfTallies< Tally statRepsList 
)
static

Similar to simulReplicatesRQMC(MonteCarloModelDouble, RQMCPointSet, int, Tally) but for a model of type MonteCarloModelDoubleArray.

Consequently, the statistics are collected in a ListOfTallies. The \(t\)-th element of #statValueList collects the statistics for the \(t\)-th coordinate of the performance vector of #model.

Parameters
modelthe underlying model which is simulated.
prqmcthe RQMC-point set used.
mnumber of independent replications.
statRepsstatistical container collecting the obtained estimates.

◆ simulReplicatesRQMC() [5/7]

static void simulReplicatesRQMC ( MonteCarloModelDoubleArray  model,
PointSet  p,
PointSetRandomization  rand,
int  m,
ListOfTallies< Tally statRepsList 
)
static

Same as simulReplicatesRQMC(MonteCarloModelArrayOfDoubles, RQMCPointSet, int, ListOfTallies) but with the point set #p and its randomization #rand specified directly.

Parameters
modelthe underlying model which is simulated.
pthe point set used.
randthe point set randomization used.
mnumber of independent replications.
statRepsListstatistical container collecting the obtained estimates.

◆ simulReplicatesRQMC() [6/7]

static void simulReplicatesRQMC ( MonteCarloModelDoubleArray  model,
RQMCPointSet  prqmc,
int  m,
ListOfTallies< Tally statRepsList,
double  data[][][] 
)
static

Same as simulReplicatesRQMC(MonteCarloModelDoubleArray, RQMCPointSet, int, ListOfTallies), except that all the \(n\) observations of dimension \(t\) for each of the \(m\) replications are saved and returned in a new three-dimensional array data<>, which is an array of size \(m\times n\times t\), i.e., double[m][n][t].

Note that the \(n\times t\) submatrices of data are not sorted.

Parameters
modelthe underlying model which is simulated.
prqmcthe RQMC-point set used.
mnumber of independent replications.
statRepsListstatistical container collecting the obtained estimates.
dataarray in which all the observations are stored.

◆ simulReplicatesRQMC() [7/7]

static void simulReplicatesRQMC ( MonteCarloModelDoubleArray  model,
PointSet  p,
PointSetRandomization  rand,
int  m,
ListOfTallies< Tally statRepsList,
double  data[][][] 
)
static

Same as simulReplicatesRQMC(MonteCarloModelDoubleArray, RQMCPointSet, int, ListOfTallies, double[][][]), but with the point set and the randomization passed separately.

Parameters
modelthe underlying model which is simulated.
pthe QMC-point set used.
randthe point set randomization used.
mnumber of independent replications.
statRepsListstatistical container collecting the obtained estimates.
dataarray in which all the observations are stored.

◆ simulReplicatesRQMCCV()

static void simulReplicatesRQMCCV ( MonteCarloModelCV  model,
RQMCPointSet  prqmc,
int  m,
ListOfTalliesWithCV< Tally statWithCV 
)
static

Same as simulReplicatesRQMC, except that this one uses control variates.

It returns in statWithCV the statistics for m observations which corresponds to the m RQMC replications. Each observation is a vector that contains the average over the n simulation runs of the performance value and of the control variates. This implements the replication method for RQMC with CVs, as in Section 5 of Hickernell, Lemieux and Owen (2005). The CV estimates, variances, and covariances can be recovered from statWithCV.

◆ simulReplicatesRQMCDefaultReportCompare()

static String simulReplicatesRQMCDefaultReportCompare ( MonteCarloModelDouble  model,
PointSet  p,
PointSetRandomization  rand,
int  m,
Tally  statRQMC,
double  variancePerRunMC,
double  secondsPerRunMC 
)
static

Similar to simulReplicatesRQMCDefaultReport, but this one makes a comparison with another estimator whose variance per run is variancePerRunMC and which took a time secondPerRunMC per run to compute.

These values may come from a previous MC experiment. Returns a report as a String.


The documentation for this class was generated from the following file: