11 #ifndef DIGNEA_EKPPROBLEM_H
12 #define DIGNEA_EKPPROBLEM_H
17 #include <dignea/types/SolutionTypes.h>
35 KPDomain(
const string &pathToInstance) =
delete;
38 const int &numOfInstances,
const int &lowerWeight,
39 const int &upperWeight,
const int &lowerProfit,
40 const int &upperProfit,
bool reducedSpace =
false);
46 vector<KPInstance>
createSolutions(
const int &maxSolutions)
const override;
60 bool evaluateConstraints(
KPInstance &solution)
const override {
66 string getName()
const override {
return "KPDomain"; }
72 int getNumberOfInstances()
const {
return numberOfInstances; }
74 void setNumberOfInstances(
int numberOfInstances) {
75 KPDomain::numberOfInstances = numberOfInstances;
78 int getLowWeight()
const {
return lowWeight; }
80 void setLowWeight(
int lowWeight) { KPDomain::lowWeight = lowWeight; }
82 int getUpWeight()
const {
return upWeight; }
84 void setUpWeight(
int upWeight) { KPDomain::upWeight = upWeight; }
86 int getLowProfit()
const {
return lowProfit; }
88 void setLowProfit(
int lowProfit) { KPDomain::lowProfit = lowProfit; }
90 int getUpProfit()
const {
return upProfit; }
92 void setUpProfit(
int upProfit) { KPDomain::upProfit = upProfit; }
94 int getGeneratedInstances()
const {
return generatedInstances; }
96 void setGeneratedInstances(
int generatedInstances) {
97 KPDomain::generatedInstances = generatedInstances;
108 const int &maxInstances)
const;
111 int numberOfInstances;
117 int generatedInstances;
123 void readData(
const string &path)
override{};
EIG Instance Generation Problem. Abstract Problem for the EIG. This problem will be used as a supercl...
Definition: AbstractDomain.h:28
Instance Generator Knapsack Problem. Problem for the Instance Generator to generate Knapsack Problem ...
Definition: KPDomain.h:27
void evaluate(KPInstance &solution) const override
Definition: KPDomain.cpp:52
void beforeEvaluation(vector< KPInstance > &) override
Definition: KPDomain.cpp:201
void afterEvaluation(vector< KPInstance > &) override
Method applied after evaluation the population of solutions.
Definition: KPDomain.cpp:223
bool isReducedSpace() const
Check if the search is performed in a PCA space.
Definition: KPDomain.h:102
shared_ptr< KPNR > genOptProblem(const KPInstance &instance) const override
Definition: KPDomain.cpp:143
vector< KPInstance > createSolutions(const int &maxSolutions) const override
Definition: KPDomain.cpp:188
float getUpperLimit(const int i) const override
Definition: KPDomain.cpp:109
int getOptimizationDirection(const int i) const override
Definition: KPDomain.cpp:174
float getLowerLimit(const int i) const override
Definition: KPDomain.cpp:126
json to_json() const override
Creates a JSON object with the information of the Problem.
Definition: KPDomain.cpp:307
string getName() const override
Returns the name of the problem. This method must be implemented in the subclasses.
Definition: KPDomain.h:66
KPInstance createSolution() const override
Definition: KPDomain.cpp:82
Instance Knapsack Problem Solution. Class which represents the solution for the Instance Knapsack Pro...
Definition: KPInstance.h:27
int numberOfVars
Definition: Problem.h:155
int numberOfObjs
Definition: Problem.h:159