24package umontreal.ssj.simexp;
26import umontreal.ssj.simevents.Simulator;
27import umontreal.ssj.stat.FunctionOfMultipleMeansTally;
28import umontreal.ssj.stat.StatProbe;
29import umontreal.ssj.stat.Tally;
68 throw new NullPointerException();
89 throw new NullPointerException();
91 throw new UnsupportedOperationException(
"Unable to set Simulator, experiment object already running");
190 if (probe instanceof
Tally)
211 double[] cr =
new double[2];
233 double[] cr =
new double[2];
288 throw new IllegalArgumentException(
"The radius must not be negative");
290 throw new IllegalArgumentException(
"The target error must not be negative");
293 double targetRadius = targetError * Math.abs(center);
294 if (radius <= targetRadius)
296 double deltan = radius * Math.sqrt(numberObs);
297 double sqrtnp = deltan / targetRadius;
298 double totalnobs = sqrtnp * sqrtnp;
299 int nn = (int) Math.round(totalnobs) - numberObs;
Represents the executive of a discrete-event simulator.
static Simulator getDefaultSimulator()
Returns the default simulator instance used by the deprecated class.
final void setSimulator(Simulator sim)
Sets the simulator associated with this experiment to sim.
boolean simulating
Determines if the simulation is in progress.
static int getRequiredNewObservations(StatProbe[] a, double targetError, double level)
Returns the approximate number of additional observations required to reach a relative error smaller ...
abstract void simulate()
Performs an experiment whose logic depends on the used subclass.
static int getRequiredNewObservationsTally(FunctionOfMultipleMeansTally fmmt, double targetError, double level)
Calls getRequiredNewObservations(double,double,int,double) with the average, confidence interval radi...
static int getRequiredNewObservationsTally(Tally ta, double targetError, double level)
Calls getRequiredNewObservations(double,double,int,double) with the average, confidence interval radi...
SimExp(Simulator sim)
Constructs a new object performing experiments using the given simulator sim.
static int getRequiredNewObservations(Iterable<? extends StatProbe > it, double targetError, double level)
Returns the approximate number of additional observations required to reach a relative error smaller ...
static int getRequiredNewObservations(double center, double radius, int numberObs, double targetError)
Returns the approximate number of additional observations needed for the point estimator  center,...
SimExp()
Constructs a new object for performing experiments using the default simulator returned by Simulator....
final Simulator simulator()
Returns the simulator linked to this experiment object.
static int getRequiredNewObservations(StatProbe probe, double targetError, double level)
Calls getRequiredNewObservations(double,double,int,double) with the average, confidence interval radi...
boolean isSimulating()
Determines if the simulation is in progress.
Represents a statistical collector for estimating a function of multiple means with a confidence inte...
int numberObs()
Returns the number of vectors of observations given to this probe since its last initialization.
void confidenceIntervalDelta(double level, double[] centerAndRadius)
Computes a confidence interval with confidence level level on.
The objects of this class are statistical probes or collectors, which are elementary devices for coll...
int numberObs()
Returns the number of observations given to this probe since its last initialization.
void confidenceIntervalStudent(double level, double[] centerAndRadius)
Computes a confidence interval on the mean.