11 #ifndef DIGNEA_EKPSOLUTION_H
12 #define DIGNEA_EKPSOLUTION_H
32 bool reducedSpace =
false);
38 KPInstance(unique_ptr<KPInstance> &ptr) =
delete;
46 inline void setCapacity(
const int &Q) { this->capacity = Q; };
48 inline int getCapacity(
void)
const {
return this->capacity; };
Solution for a Instance Generation Problem used in the EIG. This is a solution for AbstractDomain.
Definition: AbstractInstance.h:30
Instance Knapsack Problem Solution. Class which represents the solution for the Instance Knapsack Pro...
Definition: KPInstance.h:27
vector< float > getFeatures() const override
Get the features. If reducedSpace is true in IKProblem the features are the (x0, x1) principal compon...
Definition: KPInstance.cpp:99
KPInstance & operator=(const KPInstance ©)
Copies a solution using the assignment operator.
Definition: KPInstance.cpp:40
virtual void to_instance(std::ostream &os) const
Generates a instance representation of the KP problem.
Definition: KPInstance.cpp:168
void setVariables(const vector< int > &vars) override
Sets the variables of the solution. Expected to be twice of number of vars since it stores the pairs ...
Definition: KPInstance.cpp:83
bool isReducedSpace() const
Check if the search is performed in a PCA space.
Definition: KPInstance.h:59
bool operator==(const KPInstance &other) const
Compares whether two solutions are equal.
Definition: KPInstance.cpp:70
json to_json() const override
Creates a JSON object with the information of the KPInstance.
Definition: KPInstance.cpp:116
int nVars
Definition: Solution.h:194
int nObjs
Definition: Solution.h:195