dignea  1.0.0
Diverse Instance Generator with Novelty Search and Evolutionary Algorithms
Default.h
1 
2 
3 #ifndef DIGNEA_KP_DEFAULT_HEURISTIC_H
4 #define DIGNEA_KP_DEFAULT_HEURISTIC_H
5 
6 #include <dignea/core/Heuristic.h>
7 #include <dignea/problems/KPNR.h>
8 
9 #include <nlohmann/json.hpp>
10 #include <vector>
11 
12 using json = nlohmann::json;
13 using namespace std;
19 class Default : public Heuristic<BoolFloatSolution> {
20  public:
21  Default();
22 
23  virtual ~Default() = default;
24 
25  void run() override;
26 
27  string getName() const { return "Default KP"; };
28 
29  string getID() const { return "Def"; }
30 
31  void setProblem(shared_ptr<KP> prob);
32 
33  void setProblem(KP *prob);
34 
35  Front<BoolFloatSolution> getResults() const override;
36 };
37 
38 #endif // DIGNEA_KP_DEFAULT_HEURISTIC_H
nlohmann::json json
Definition: MinKnap.h:85
Default Heuristic for the Knapsack Problem. Tries to insert each item in the knapsack while there is ...
Definition: Default.h:19
string getName() const
Returns the name of the algorithm, this is used in the to_json method. Must be implemented in the sub...
Definition: Default.h:27
string getID() const
Returns the identificator of the algorithm, this is used in the to_json method. Must be implemented i...
Definition: Default.h:29
Front class which stores the final results of an EA execution.
Definition: Front.h:26
Base heuristic class. This is the skeleton for future heuristic implementations. Extends AbstractEA f...
Definition: Heuristic.h:19
Class representing a Knapsack Problem.
Definition: KP.h:28