|
| KPInstance (const int &nVars, const int &nObjs=1, bool reducedSpace=false) |
|
| KPInstance (const KPInstance &solution) |
|
| KPInstance (const KPInstance *solution) |
|
| KPInstance (unique_ptr< KPInstance > &ptr)=delete |
|
KPInstance & | operator= (const KPInstance ©) |
| Copies a solution using the assignment operator. More...
|
|
bool | operator== (const KPInstance &other) const |
| Compares whether two solutions are equal. More...
|
|
void | setCapacity (const int &Q) |
|
int | getCapacity (void) const |
|
vector< float > | getFeatures () const override |
| Get the features. If reducedSpace is true in IKProblem the features are the (x0, x1) principal components after applying PCA. More...
|
|
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 (wi,pi). More...
|
|
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 KPInstance. More...
|
|
virtual void | to_instance (std::ostream &os) const |
| Generates a instance representation of the KP problem. More...
|
|
| AbstractInstance () |
| Construct a new AbstractInstance<V, O>::AbstractInstance object. More...
|
|
| AbstractInstance (const int &nVars, const int &nObjs=1, const int &nCons=0) |
| Construct a new AbstractInstance<V, O>::AbstractInstance object from the data given in the arguments. More...
|
|
| AbstractInstance (const AbstractInstance &solution) |
| Construct a new AbstractInstance<V, O>::AbstractInstance object from the data in the given solution. More...
|
|
| AbstractInstance (const AbstractInstance *solution) |
| Construct a new AbstractInstance<V, O>::AbstractInstance object from the data in the given solution. More...
|
|
| AbstractInstance (unique_ptr< AbstractInstance > &ptr)=delete |
|
AbstractInstance & | operator= (const AbstractInstance ©) |
| Copies a solution using the assignment operator. More...
|
|
bool | operator== (const AbstractInstance &other) const |
| Compares whether two solutions are equal. More...
|
|
json | to_json () const override |
| Creates a JSON format representation of the solution. It must be override by the subclasses. More...
|
|
void | setFeatures (const vector< float > &v) |
| Set the features descriptor of this instance. More...
|
|
float | getDiversity () const |
| Get the Diversity of the solution. More...
|
|
void | setDiversity (float diversity) |
| Set the Diversity of the solution. The diversity of the instance is computed using the Novelty Search. More...
|
|
float | getBiasedFitness () const |
| Get the Biased Fitness value. The BiasedFitness is the fitness value compute exclusively from the difference in performance between the target and the other algorithms in the portfolio. To get the fitness value computed with the WFF use the getFitness() method. More...
|
|
void | setBiasedFitness (float bFitness) |
| Set the Biased Fitness value. The BiasedFitness is the fitness value compute exclusively from the difference in performance between the target and the other algorithms in the portfolio. More...
|
|
void | setConfigFitness (const vector< vector< float >> &fitness) |
| Set the fitness of each algorithm in the porftolio over this instance. More...
|
|
void | setAvgConfigFitness (const vector< float > &fitness) |
| Set the average fitness of each algorithm in the porftolio over this instance. More...
|
|
vector< vector< float > > | getPortFitness () const |
| Get the Config Fitness matrix. More...
|
|
vector< float > | getAvgPortFitness () const |
| Get the Avg Config Fitness vector. More...
|
|
| Solution () |
| Creates a Solution with all parameters set to zero. More...
|
|
| Solution (const int &nVars, const int &nObjs) |
| Creates a new solution with the given dimension (nVars) and nObjs number of objectives. More...
|
|
| Solution (const int &nVars, const int &nObjs, const int &nCons) |
| Creates a new solution with the given dimension (nVars), nObjs number of objectives and nCons number of constraints. More...
|
|
| Solution (const Solution< V, O > &) |
| Creates a new solution with the information from copy. More...
|
|
| Solution (const Solution< V, O > *) |
| Creates a new solution with the information from the pointer to other solution. More...
|
|
Solution & | operator= (const Solution ©) |
| Copies a solution using the assignment operator. More...
|
|
bool | operator== (const Solution &other) const |
| Compares whether two solutions are equal. More...
|
|
virtual const vector< O > & | getObjectives () const |
| Returns the objective values of the solution. More...
|
|
virtual void | setObjectives (const vector< O > &objs) |
| Updates the objective values of the solution. More...
|
|
virtual const vector< V > & | getVariables () const |
| Get the variables of the solution. More...
|
|
virtual void | setVariables (const vector< V > &vars) |
| Updates the variable values (dimension) of the solution. More...
|
|
virtual const vector< O > & | getConstraints () const |
| Get the constraint values of the solution. More...
|
|
virtual void | setConstraints (const vector< O > &constr) |
| Updates the constraints of the solution. More...
|
|
virtual int | getNumberOfVars () const |
| Get the number of variables (dimension) of the solution. More...
|
|
virtual void | setNumberOfVars (const int &numberOfVars) |
| Set the number of variables (dimension) of the solution. More...
|
|
virtual int | getNumberOfObjs () const |
| Get the number of objectives of the solution. More...
|
|
virtual void | setNumberOfbjs (const int &numberOfObjs) |
| Set the number of objectives of the solution. More...
|
|
virtual int | getNumberOfCons () const |
| Get the number of constraint in the solution. More...
|
|
virtual void | setNumberOfCons (const int &nConstraints) |
| Set the number of constraints of the solution. More...
|
|
virtual void | setRank (int id) |
| Set the identifier of the solution in the population. Only used in the Non-Dominated Sorting operator. More...
|
|
virtual int | getRank () const |
| Get the identifier of the solution in the population. Only used in the Non-Dominated Sorting operator. More...
|
|
virtual void | setCrowDistance (float d) |
| Set the Crow Distance object. More...
|
|
virtual float | getCrowDistance () const |
| Get the Crow Distance object. More...
|
|
virtual void | setVarAt (const int &, const V &v) |
| Updates the ith variable of the solution with the value v. More...
|
|
virtual void | setObjAt (const int &, const O &obj) |
| Updates the ith objective with the value obj. More...
|
|
virtual void | setConstAt (const int &, const O &cons) |
| Updates the ith constraint value with the value. More...
|
|
virtual V | getVarAt (const int &index) const |
| Returns the ith variable if its in the valid range. More...
|
|
virtual O | getObjAt (const int &index) const |
| Returns the ith objective value if exists. More...
|
|
virtual O | getConstAt (const int &index) const |
| Returns the ith constraint value if exists. More...
|
|
virtual float | getFitness () const |
| Get the fitness of the solution. More...
|
|
virtual void | setFitness (const float &f) |
| Set the fitness of the solution. More...
|
|
float | getConstraintCoeff () const |
| Get the constraint coefficient of the solutions. This value means different for every problem. In most cases is the weighted sum of constraint violation values. More...
|
|
void | setConstraintCoeff (float constraintCoeff) |
| Set the constraint coefficient value. More...
|
|
Instance Knapsack Problem Solution. Class which represents the solution for the Instance Knapsack Problem (EKPP). This class is used to represent an actual Knapsack Problem instance.
- The variables inherited from the Solution<int, float> class contains the pairs [(w0,p0), ..., (wn-1,pn-1)] in a single array.
- The capacity is stored separately.