dignea  1.0.0
Diverse Instance Generator with Novelty Search and Evolutionary Algorithms
MiW.h
1 
2 
3 #ifndef DIGNEA_KP_MIW_HEURISTIC_H
4 #define DIGNEA_KP_MIW_HEURISTIC_H
5 
6 #include <dignea/algorithms/kp_heuristics/Default.h>
7 
8 #include <nlohmann/json.hpp>
9 #include <vector>
10 
11 using json = nlohmann::json;
12 using namespace std;
13 
20 class MiW : public Default {
21  public:
22  MiW();
23 
24  virtual ~MiW() = default;
25 
26  void run() override;
27 
28  string getName() const { return "MiW KP"; };
29 
30  string getID() const { return "MiW"; }
31 };
32 
33 #endif // DIGNEA_KP_MIW_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
Performs the Minimum Weight Heuristic for the Knapsack Problem It sorts the elements based on their w...
Definition: MiW.h:20
string getName() const
Returns the name of the algorithm, this is used in the to_json method. Must be implemented in the sub...
Definition: MiW.h:28
string getID() const
Returns the identificator of the algorithm, this is used in the to_json method. Must be implemented i...
Definition: MiW.h:30