|
| BPP () |
| Construct a new BPP::BPP object.
|
|
| BPP (const string &pathToInstance) |
| Construct a new BPP::BPP object from the data in the file in the path. More...
|
|
| BPP (const int &numberOfVars, const int &capacity, const vector< int > &items) |
|
| BPP (const BPP *) |
| Construct a new BPP::BPP object from another BPP object. More...
|
|
float | getUpperLimit (int i) const override |
| Returns the upper limit of the variable i In this case, the upper limit is the number of items - 1. More...
|
|
int | getOptimizationDirection (const int i) const override |
| Gets the optimization direction of the problem. For the BPP is should always be Minimize. More...
|
|
float | getLowerLimit (int i) const override |
| Returns the lower limit of the variable i In this case, the lower limit is 0. More...
|
|
string | getName () const override |
| Returns the name of the problem. This method must be implemented in the subclasses. More...
|
|
void | evaluate (IntIntSolution &solution) const override |
| Evaluates a bin assignment for the BPP instances represented in the object The fitness of the solution is the amount of unused space, as well as the number of bins for a specific solution. Falkenauer (1998) performance metric defined as: More...
|
|
bool | evaluateConstraints (IntIntSolution &ptr) const override |
| Method to evaluate whether a solution is feasible or not. This method must be implemented in the subclasses. More...
|
|
IntIntSolution | createSolution () const override |
| Creates a random solution for the BPP Each items is assigned to a random bin in the range [0, numberOfVars) More...
|
|
IntIntSolution | createSolution (ParallelPRNG &engine) const override |
| Creates a random solution for the BPP Each items is assigned to a random bin in the range [0, numberOfVars) More...
|
|
int | getCapacity () const |
|
void | setCapacity (int capacity) |
| Updates the capacity of the instance. More...
|
|
const vector< int > & | getItems () const |
|
void | readData (const string &path) override |
| Reads the data from the file in the path. The file should contain a proper BPP instance with the following format: nItems Q w0 w1 ... wn-1. More...
|
|
json | to_json () const override |
|
| 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 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...
|
|
Class to represent the Bin Packing Problem.