|
| TSPInstance () |
| Creates a default TSPInstance. More...
|
|
| TSPInstance (const int &nVars, const int &nObjs=1) |
| Creates a TSPInstance with a specified dimension. Notice that passing nVars = 100 will create a 50 cities since the number of variables must be divided by two to contain the coordinates for each city. More...
|
|
| TSPInstance (const TSPInstance &solution) |
| Creates a new TSPInstance object with the information from other solution. More...
|
|
| TSPInstance (const TSPInstance *solution) |
| Creates a new TSPInstance object with the information from other solution. More...
|
|
| TSPInstance (unique_ptr< TSPInstance > &ptr)=delete |
| Cannot be used in the AbstractInstance. More...
|
|
void | setVariables (const vector< float > &vars) override |
| Set the variables for the instance. More...
|
|
json | to_json () const override |
| Creates and returns a JSON object with the information from the TSP. More...
|
|
virtual void | to_instance (std::ostream &os) const |
| Generates the instance representation of the TSP and puts it in the ostream. More...
|
|
vector< coords > | to_coords () const |
| Generates the vector of coordinates for the instance. Look the TSP getPoints() method. 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...
|
|
virtual vector< float > | getFeatures () const |
| Get 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 Traveling Salesman Problem Solution. Class which represents the solution for the Instance Traveling Salesman Problem (TSPDomain). The variables inherited from the Solution<float, float> class contains the pairs of coordinates for each point (city) in the instance. [(x0,y0), ..., (xn-1,yn-1)] in a single array.