#include <BinPackingProblem.h>
|
| | BinPackingProblem (unsigned int objects, const std::vector< double > &weights, double capacity) |
| | Constructor. More...
|
| |
| | BinPackingProblem (unsigned int objects, double capacity, double minWeight, double maxWeight, bool integerValues=false) |
| | Constructor. More...
|
| |
| | BinPackingProblem (const std::string &filename) |
| | Constructor. More...
|
| |
| void | setData (unsigned int objects, const std::vector< double > &weights, double capacity) |
| | Setter for bin packing problem data. More...
|
| |
| void | generateData (unsigned int objects, double capacity, double minWeight, double maxWeight, bool integerValues=false) |
| | Generates bin packing problem data according to setup. More...
|
| |
| void | readDataFromFile (const std::string &filename) |
| | Reads bin packing problem data from a file with a filename. More...
|
| |
| void | writeDataToFile (const std::string &filename) |
| | Writes bin packing problem data to a file with a filename. More...
|
| |
| void | showData () |
| | Shows bin packing problem data. More...
|
| |
| unsigned int | evaluateBPP (const std::vector< unsigned int > &schedule) |
| | Evaluates bin packing problem. More...
|
| |
| unsigned int | evaluateBPP (const std::vector< unsigned int > &schedule, const std::string &filename) |
| | Evaluates bin packing problem to file with a filename. More...
|
| |
| double | getCapacity () const |
| | Getter for bin capacity. More...
|
| |
| unsigned int | getObjects () const |
| | Getter for number of objects. More...
|
| |
| const std::vector< double > & | getWeights () const |
| | Getter for weights of objects. More...
|
| |
| virtual | ~IData () |
| | Virtual destructor. More...
|
| |
- Author
- Milan Hlinak
- Date
- 04/14/15
| operational_research::BinPackingProblem::BinPackingProblem |
( |
unsigned int |
objects, |
|
|
const std::vector< double > & |
weights, |
|
|
double |
capacity |
|
) |
| |
Constructor.
- Parameters
-
| objects | Number of objects. |
| weights | Weights of objects. |
| capacity | Bin capacity. |
- Exceptions
-
| std::invalid_argument | exception. |
| operational_research::BinPackingProblem::BinPackingProblem |
( |
unsigned int |
objects, |
|
|
double |
capacity, |
|
|
double |
minWeight, |
|
|
double |
maxWeight, |
|
|
bool |
integerValues = false |
|
) |
| |
Constructor.
- Parameters
-
| objects | Number of objects. |
| capacity | Bin capacity. |
| minWeight | Minimal weight of object. |
| maxWeight | Maximal weight of object. |
| integerValues | True if generated data is integer values, false if generated data is real values. |
- Exceptions
-
| std::invalid_argument | exception. |
| operational_research::BinPackingProblem::BinPackingProblem |
( |
const std::string & |
filename | ) |
|
Constructor.
- Parameters
-
- Exceptions
-
| std::runtime_error | exception. |
| std::invalid_argument | exception. |
| unsigned int operational_research::BinPackingProblem::evaluateBPP |
( |
const std::vector< unsigned int > & |
schedule | ) |
|
Evaluates bin packing problem.
- Parameters
-
- Returns
- Cost function value for given schedule.
- Exceptions
-
| std::invalid_argument | exception. |
| unsigned int operational_research::BinPackingProblem::evaluateBPP |
( |
const std::vector< unsigned int > & |
schedule, |
|
|
const std::string & |
filename |
|
) |
| |
Evaluates bin packing problem to file with a filename.
- Parameters
-
| schedule | Schedule. |
| filename | Filename. |
- Returns
- Cost function value for given schedule.
- Exceptions
-
| std::invalid_argument | exception. |
| std::runtime_error | exception. |
| void operational_research::BinPackingProblem::generateData |
( |
unsigned int |
objects, |
|
|
double |
capacity, |
|
|
double |
minWeight, |
|
|
double |
maxWeight, |
|
|
bool |
integerValues = false |
|
) |
| |
Generates bin packing problem data according to setup.
- Parameters
-
| objects | Number of objects. |
| capacity | Bin capacity. |
| minWeight | Minimal weight of object. |
| maxWeight | Maximal weight of object. |
| integerValues | True if generated data is integer values, false if generated data is real values. |
- Exceptions
-
| std::invalid_argument | exception. |
| double operational_research::BinPackingProblem::getCapacity |
( |
| ) |
const |
|
inline |
Getter for bin capacity.
- Returns
- Bin capacity.
| unsigned int operational_research::BinPackingProblem::getObjects |
( |
| ) |
const |
|
inline |
Getter for number of objects.
- Returns
- Number of objects.
| const std::vector<double>& operational_research::BinPackingProblem::getWeights |
( |
| ) |
const |
|
inline |
Getter for weights of objects.
- Returns
- Weights of objects.
| void operational_research::BinPackingProblem::readDataFromFile |
( |
const std::string & |
filename | ) |
|
|
virtual |
Reads bin packing problem data from a file with a filename.
- Parameters
-
- Exceptions
-
| std::runtime_error | exception. |
| std::invalid_argument | exception. |
Implements operational_research::IData.
| void operational_research::BinPackingProblem::setData |
( |
unsigned int |
objects, |
|
|
const std::vector< double > & |
weights, |
|
|
double |
capacity |
|
) |
| |
Setter for bin packing problem data.
- Parameters
-
| objects | Number of objects. |
| weights | Weights of objects. |
| capacity | Bin capacity. |
- Exceptions
-
| std::invalid_argument | exception. |
| void operational_research::BinPackingProblem::showData |
( |
| ) |
|
|
virtual |
| void operational_research::BinPackingProblem::writeDataToFile |
( |
const std::string & |
filename | ) |
|
|
virtual |
Writes bin packing problem data to a file with a filename.
- Parameters
-
- Exceptions
-
| std::runtime_error | exception. |
Implements operational_research::IData.
The documentation for this class was generated from the following files: