AutoPas  3.0.0
Loading...
Searching...
No Matches
TuningStrategyInterface.h
Go to the documentation of this file.
1
7#pragma once
8
9#include <functional>
10#include <optional>
11
17
18namespace autopas {
19
24 public:
25 virtual ~TuningStrategyInterface() = default;
26
31 virtual TuningStrategyOption getOptionType() const = 0;
32
45 virtual void addEvidence(const Configuration &configuration, const Evidence &evidence){};
46
58 virtual bool optimizeSuggestions(std::vector<Configuration> &configQueue,
59 const EvidenceCollection &evidenceCollection) = 0;
60
72 virtual bool reset(size_t iteration, size_t tuningPhase, std::vector<Configuration> &configQueue,
73 const autopas::EvidenceCollection &evidenceCollection) = 0;
74
80 [[nodiscard]] virtual bool needsLiveInfo() const { return false; }
81
87 virtual void receiveLiveInfo(const LiveInfo &info){};
88
95 virtual void rejectConfiguration(const Configuration &configuration, bool indefinitely){};
96
101 virtual bool needsSmoothedHomogeneityAndMaxDensity() const { return false; }
102
108 virtual void receiveSmoothedHomogeneityAndMaxDensity(double homogeneity, double maxDensity){};
109};
110} // namespace autopas
Class containing multiple options that form an algorithm configuration for the pairwise iteration.
Definition: Configuration.h:24
Class to manage all evidence.
Definition: EvidenceCollection.h:21
Helper class that associates a measurement with the iteration when it was taken.
Definition: Evidence.h:15
This class is able to gather and store important information for a tuning phase from a container and ...
Definition: LiveInfo.h:31
Interface for tuning strategies for the auto tuner.
Definition: TuningStrategyInterface.h:23
virtual TuningStrategyOption getOptionType() const =0
Get this object's associated TuningStrategyOption type.
virtual void addEvidence(const Configuration &configuration, const Evidence &evidence)
Notifies the strategy about empirically collected information for the given configuration.
Definition: TuningStrategyInterface.h:45
virtual bool optimizeSuggestions(std::vector< Configuration > &configQueue, const EvidenceCollection &evidenceCollection)=0
Optimizes the queue of configurations to process.
virtual void rejectConfiguration(const Configuration &configuration, bool indefinitely)
Notify the strategy about a configuration that is (currently) invalid and thus can potentially be dro...
Definition: TuningStrategyInterface.h:95
virtual void receiveSmoothedHomogeneityAndMaxDensity(double homogeneity, double maxDensity)
Method to pass smoothed homogeneity and the maximal density to the tuning strategy.
Definition: TuningStrategyInterface.h:108
virtual bool needsSmoothedHomogeneityAndMaxDensity() const
Indicate whether the strategy needs smoothed values of homogeneity and max density.
Definition: TuningStrategyInterface.h:101
virtual bool reset(size_t iteration, size_t tuningPhase, std::vector< Configuration > &configQueue, const autopas::EvidenceCollection &evidenceCollection)=0
Reset all internal parameters to the beginning of a new tuning phase.
virtual bool needsLiveInfo() const
Returns whether this tuning strategy wants to get a LiveInfo object passed before a new tuning phase.
Definition: TuningStrategyInterface.h:80
virtual void receiveLiveInfo(const LiveInfo &info)
Virtual method that subclasses can override to receive the LiveInfo object before a tuning phase if t...
Definition: TuningStrategyInterface.h:87
This is the main namespace of AutoPas.
Definition: AutoPasDecl.h:32