dignea  1.0.0
Diverse Instance Generator with Novelty Search and Evolutionary Algorithms
WorstFit.h
Go to the documentation of this file.
1 
12 #ifndef DIGNEA_BPP_WORST_FIT_H
13 #define DIGNEA_BPP_WORST_FIT_H
14 
15 #include <dignea/core/Heuristic.h>
16 #include <dignea/problems/BPP.h>
17 
18 #include <nlohmann/json.hpp>
19 #include <vector>
20 
21 using json = nlohmann::json;
22 using namespace std;
23 
29 class WorstFit : public Heuristic<IntIntSolution> {
30  public:
31  WorstFit();
32 
33  virtual ~WorstFit() = default;
34 
35  void run() override;
36 
37  string getName() const { return "WorstFit"; };
38 
39  string getID() const { return "WorstFit"; }
40 
41  void setProblem(shared_ptr<BPP> prob);
42 
43  void setProblem(BPP *prob);
44 
45  Front<IntIntSolution> getResults() const override;
46 };
47 
48 #endif // DIGNEA_BPP_WORST_FIT_H
nlohmann::json json
Definition: MinKnap.h:85
Class to represent the Bin Packing Problem.
Definition: BPP.h:27
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
Worst Fit Heuristic for the BPP. Places each item into the current bin.
Definition: WorstFit.h:29
string getName() const
Returns the name of the algorithm, this is used in the to_json method. Must be implemented in the sub...
Definition: WorstFit.h:37
string getID() const
Returns the identificator of the algorithm, this is used in the to_json method. Must be implemented i...
Definition: WorstFit.h:39