|
| KPDomain (const int &numberOfVars, const int &numberOfObjs=1) |
|
| KPDomain (const string &pathToInstance)=delete |
|
| KPDomain (const int &numberOfVars, const int &numberOfObjs, const int &numOfInstances, const int &lowerWeight, const int &upperWeight, const int &lowerProfit, const int &upperProfit, bool reducedSpace=false) |
|
shared_ptr< KPNR > | genOptProblem (const KPInstance &instance) const override |
|
void | evaluate (KPInstance &solution) const override |
|
vector< KPInstance > | createSolutions (const int &maxSolutions) const override |
|
void | beforeEvaluation (vector< KPInstance > &) override |
|
void | afterEvaluation (vector< KPInstance > &) override |
| Method applied after evaluation the population of solutions. More...
|
|
KPInstance | createSolution () const override |
|
KPInstance | createSolution (ParallelPRNG &engine) const override |
|
KPInstance | createSolution () |
|
KPInstance | createSolution (ParallelPRNG &engine) |
|
bool | evaluateConstraints (KPInstance &solution) const override |
|
int | getOptimizationDirection (const int i) const override |
|
string | getName () const override |
| Returns the name of the problem. This method must be implemented in the subclasses. More...
|
|
float | getUpperLimit (const int i) const override |
|
float | getLowerLimit (const int i) const override |
|
int | getNumberOfInstances () const |
|
void | setNumberOfInstances (int numberOfInstances) |
|
int | getLowWeight () const |
|
void | setLowWeight (int lowWeight) |
|
int | getUpWeight () const |
|
void | setUpWeight (int upWeight) |
|
int | getLowProfit () const |
|
void | setLowProfit (int lowProfit) |
|
int | getUpProfit () const |
|
void | setUpProfit (int upProfit) |
|
int | getGeneratedInstances () const |
|
void | setGeneratedInstances (int generatedInstances) |
|
bool | isReducedSpace () const |
| Check if the search is performed in a PCA space. More...
|
|
json | to_json () const override |
| Creates a JSON object with the information of the Problem. More...
|
|
void | readData (const string &path) override |
|
Public Member Functions inherited from AbstractDomain< KPNR, KPInstance > |
| AbstractDomain () |
| Construct a new AbstractDomain<OptProblem, InstSolution>AbstractDomain object. More...
|
|
| AbstractDomain (const int &numberOfVars, const int &numberOfObjectives, const int &nCons) |
| Construct a new AbstractDomain<OptProblem, InstSolution>AbstractDomain object. More...
|
|
| Problem () |
| Creates a new Problem with all parameters to zero. More...
|
|
| Problem (const int &numberOfVars, const int &numberOfObjectives, const int &nCons) |
| Construct a new Problem with all the given parameters. More...
|
|
| Problem (const Problem *copy) |
|
virtual bool | evaluateConstraints (S &sol) const =0 |
| Method to evaluate whether a solution is feasible or not. This method must be implemented in the subclasses. More...
|
|
virtual void | evaluate (S &sol) const =0 |
| Method to evaluate a solution using the proper problem formulation. This method must be implemented in the subclasses. More...
|
|
virtual void | readData (const std::string &path)=0 |
| Method to read problem information from the given path. This method must be implemented in the subclasses. More...
|
|
int | getNumberOfVars () const |
| Get the number of variables (dimension) of the problem. More...
|
|
void | setNumberOfVars (int nVars) |
| Sets the number of variables (dimension) of the problem. More...
|
|
int | getNumberOfObjs () const |
| Get the number of objectives of the problem. More...
|
|
void | setNumberOfObjs (int nObjs) |
| Sets the number of objectives to the problem. More...
|
|
int | getNumberOfCons () const |
| Get the number the constraint of the problem. More...
|
|
void | setNumberOfCons (int nCons) |
| Sets the number of constraint of the problem. More...
|
|
Instance Generator Knapsack Problem. Problem for the Instance Generator to generate Knapsack Problem Instances The number of variables (dimension) is set as the double of the number of variables which it is used to create an object. This is because the KPInstance must be twice size of the nVars.