public abstract class DistributionStatisticBase extends DistributionStatistic implements BatchExportable
StdDistributionStatistic
, but buckets are
determined automatically. All samples are collected during the simulation. At
the end, the values are sorted and the quantiles are caluclated.
Output: This statistic is based on quantiles, so the size of "buckets" varies
(different to the StdDistributionStatistic
). The main output is the
distribution over all drops. In addition, the distribution of each drop is
written to the result file separately. To have an approximation of the
estimation accuracy, the minimum and maximum value (over all drops) for each
quantile is calculated. Be careful: With few drops, this can become narrow,
although it might be inaccurate!
sampleIndex, simNode, traceWriter
Constructor and Description |
---|
DistributionStatisticBase(SimNode ownNode,
int numberOfQuantiles) |
DistributionStatisticBase(SimNode ownNode,
int numberOfQuantiles,
boolean writeDropDistributions) |
DistributionStatisticBase(SimNode ownNode,
QuantileDescription quantiles,
boolean writeDropDistributions) |
Modifier and Type | Method and Description |
---|---|
void |
computeMeasures(int batchNumber) |
protected abstract DataStorage |
createNewDataStorage(int batchNumber) |
void |
exportBatch(ResultWriter writer)
Exports the batch state to a result writer.
|
int |
getArraySize()
distribution statistic interface
|
double |
getBatchDistribution(int bucketIndex) |
double |
getBatchOverflowProb() |
double |
getBatchProbability(int bucketIndex) |
double |
getBatchUnderflowProb() |
double |
getDistribution(int bucketIndex) |
double |
getDistributionConfInterval(int bucketIndex) |
double |
getLowerBound(int bucketIndex) |
double |
getOverflowConfInterval() |
double |
getOverflowProbability() |
double |
getProbability(int bucketIndex) |
double |
getProbabilityConfInterval(int bucketIndex) |
double |
getUnderflowConfInterval() |
double |
getUnderflowProbability() |
double |
getUpperBound(int bucketIndex) |
void |
handleStartBatch(int batchNumber) |
void |
handleStartTransientPhase() |
void |
handleStopBatch(int batchNumber) |
void |
handleStopTransientPhase() |
void |
importBatch(ResultReader reader)
Imports the state of a batch from the result reader.
|
void |
printResults(ResultType type,
PrintResultWriter writer) |
void |
resetBatchStatistic()
only between batches
|
void |
resetStatistic()
reset complete statistic
|
void |
update(double sample,
double weight) |
update, update, update
addResultTag, addResultTag, disableTracing, enableTracing, handleInitSimulation, printComments, update, writeTraceEntry
public DistributionStatisticBase(SimNode ownNode, int numberOfQuantiles)
public DistributionStatisticBase(SimNode ownNode, int numberOfQuantiles, boolean writeDropDistributions)
public DistributionStatisticBase(SimNode ownNode, QuantileDescription quantiles, boolean writeDropDistributions)
public void update(double sample, double weight)
update
in class DistributionStatistic
protected abstract DataStorage createNewDataStorage(int batchNumber)
public void handleStartBatch(int batchNumber)
handleStartBatch
in class Statistic
public void handleStartTransientPhase()
handleStartTransientPhase
in class Statistic
public void handleStopTransientPhase()
handleStopTransientPhase
in class Statistic
public void handleStopBatch(int batchNumber)
handleStopBatch
in class Statistic
public void computeMeasures(int batchNumber)
computeMeasures
in class Statistic
public void resetBatchStatistic()
Statistic
resetBatchStatistic
in class Statistic
public void resetStatistic()
Statistic
resetStatistic
in class Statistic
public void printResults(ResultType type, PrintResultWriter writer) throws PrintException
printResults
in interface Printable
printResults
in class DistributionStatistic
PrintException
public void exportBatch(ResultWriter writer) throws PrintException
BatchExportable
importBatch
despite the keywords.exportBatch
in interface BatchExportable
writer
- the result writer which preserves the statePrintException
- if any exception occurs while writing a result to the writerpublic void importBatch(ResultReader reader) throws ImportException
BatchExportable
exportBatch
despite the keywords.importBatch
in interface BatchExportable
reader
- the result reader which contains the batch stateImportException
- if any exception occurs while reading a result from the readerpublic int getArraySize()
getArraySize
in class DistributionStatistic
public double getLowerBound(int bucketIndex)
getLowerBound
in class DistributionStatistic
public double getUpperBound(int bucketIndex)
getUpperBound
in class DistributionStatistic
public double getUnderflowProbability()
getUnderflowProbability
in class DistributionStatistic
public double getUnderflowConfInterval()
getUnderflowConfInterval
in class DistributionStatistic
public double getOverflowProbability()
getOverflowProbability
in class DistributionStatistic
public double getOverflowConfInterval()
getOverflowConfInterval
in class DistributionStatistic
public double getProbability(int bucketIndex)
getProbability
in class DistributionStatistic
public double getProbabilityConfInterval(int bucketIndex)
getProbabilityConfInterval
in class DistributionStatistic
public double getDistribution(int bucketIndex)
getDistribution
in class DistributionStatistic
public double getDistributionConfInterval(int bucketIndex)
getDistributionConfInterval
in class DistributionStatistic
public double getBatchUnderflowProb()
getBatchUnderflowProb
in class DistributionStatistic
public double getBatchOverflowProb()
getBatchOverflowProb
in class DistributionStatistic
public double getBatchProbability(int bucketIndex)
getBatchProbability
in class DistributionStatistic
public double getBatchDistribution(int bucketIndex)
getBatchDistribution
in class DistributionStatistic