Class AbstractMultiExperiment

    • Constructor Detail

      • AbstractMultiExperiment

        public AbstractMultiExperiment()
    • Method Detail

      • init

        public void init()
        Description copied from class: Experiment
        This method is called to perform any initializations required before the experiment is run.
        Overrides:
        init in class Experiment
      • performRun

        protected void performRun()
        Description copied from class: Experiment
        Contains the code to actually do something useful. This is the only abstract method that sub-classes are required to implement.
        Specified by:
        performRun in class Experiment
      • hasMoreTasks

        protected boolean hasMoreTasks()
      • createExperiments

        protected abstract void createExperiments()
      • executeExperiments

        protected void executeExperiments()
      • configureRunExperiment

        protected void configureRunExperiment​(Experiment e)
      • getExperimentSeed

        protected long getExperimentSeed()
      • getNumExperiments

        public abstract int getNumExperiments()
      • getNumTasks

        public int getNumTasks()
      • getNumTasksExecuted

        public int getNumTasksExecuted()
      • prefix

        protected abstract String prefix()
      • handleOtherValue

        protected void handleOtherValue​(String key,
                                        Object val)
        Handles arbitrary values "val" by storing them in an object array.
        Parameters:
        key - Name of the value to store.
        val - The value to store. Can be null.
      • handleNumericValue

        protected void handleNumericValue​(String key,
                                          Object val)
        Handles a numeric value "val" by averaging it over all runs performed. If "val" is of type SummaryStat, averaging is performed with its mean()-value.
        Parameters:
        key - The name if the value.
        val - The numeric value to store. Either a Number, or a SummaryStat
      • isSpecialKey

        protected boolean isSpecialKey​(String key)
      • addKeepResultName

        public void addKeepResultName​(String name)
      • removeKeepResultName

        public boolean removeKeepResultName​(String name)
      • isKeepTaskResults

        public boolean isKeepTaskResults()
      • getKeepResults

        public String[] getKeepResults()
      • setKeepResults

        public void setKeepResults​(String... keepResults)
        Sets the names of all results where detailed results of all sub-experiment executions should be preserved.
        Parameters:
        keepResults - The names of all results for which detailed run results from sub-experiments should be stored.
      • setAllowParallelExecution

        public void setAllowParallelExecution​(boolean allowParallelExecution)
        If this attribute is set to true, sub-experiments will be executed concurrently in parallel. Setting this property to false (therefore using only a single CPU core) is sometimes useful for debugging purposes or when fine-grained control over parallelization of nested (multi-)experiments is required.
        Parameters:
        allowParallelExecution - Whether or not to allow parallel execution of sub-experiments.
      • isAllowParallelExecution

        public boolean isAllowParallelExecution()
      • setCommonRandomNumbers

        protected void setCommonRandomNumbers​(boolean commonRandomNumbers)
        Whether to use the variance reduction technique of common random numbers. If set to true, all sub-experiments are executed using the same random seed, so random influences will be the same for all sub-experiments. If set to false, all sub-experiments will be assigned a different initialSeed, depending only on this experiment's initialSeed.
        Parameters:
        commonRandomNumbers - Whether or not all sub-experiments are assigned the same initialSeed.
      • isCommonRandomNumbers

        public boolean isCommonRandomNumbers()
      • setSkipSeedCount

        public void setSkipSeedCount​(int skipSeedCount)
        Before starting, throw away this many seed values. This setting can be useful to resume interrupted sub-experiments.
        Parameters:
        skipSeedCount - The number of seeds to skip.
      • getSkipSeedCount

        public int getSkipSeedCount()
      • setAbortUponBaseExperimentAbort

        public void setAbortUponBaseExperimentAbort​(boolean abortUponBaseExperimentAbort)
        If set to true, this experiment aborts immediately (indicating an abort in its results) after the first sub-experiment aborting. If this is set to false, execution of sub-experiments continues, ignoring aborting experiments.
        Parameters:
        abortUponBaseExperimentAbort - Whether or not to abort execution of sub-experiments upon the first execution error.
      • isAbortUponBaseExperimentAbort

        public boolean isAbortUponBaseExperimentAbort()
      • isProduceAveragedResults

        public boolean isProduceAveragedResults()
      • setProduceAveragedResults

        public void setProduceAveragedResults​(boolean produceAveragedResults)
        Whether or not to produce averaged results across all sub-experiments as a result of this experiment.
        Parameters:
        produceAveragedResults - Whether or not to produce averaged results.