Class AbstractExperiment<S extends Solution<S,I>,I extends Instance>

java.lang.Object
es.urjc.etsii.grafo.experiment.AbstractExperiment<S,I>
Type Parameters:
S - Solution class
I - Instance class
Direct Known Subclasses:
ComplexityExperiment, ConstructiveExperiment, ConstructiveExperiment, LocalSearchExperiment

public abstract class AbstractExperiment<S extends Solution<S,I>,I extends Instance> extends Object
Defines an experiment to execute. Each experiment is defined by extending this class, multiple experiments can be defined at the same time. By default, all experiments are executed at runtime, but this behaviour can be changed in the application.yml configuration file.
  • Constructor Details

    • AbstractExperiment

      protected AbstractExperiment()
      Initialize common fields for all experiments
  • Method Details

    • getAlgorithms

      public abstract List<Algorithm<S,I>> getAlgorithms()
      Get list of algorithms defined in this experiment. Each experiment can define a different set of algorithms. Although the same algorithm can be used several times in the same experiment, if you return the same configuration for the same algorithm an exception will be thrown.
      Returns:
      list of algorithms defined in this experiment
    • getName

      public String getName()
      Return the current experiment name. If not overridden, defaults to the Java class name.
      Returns:
      Experiment name as string