Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <qap_reader.h>
Public Member Functions | |
bool | operator== (const QapProblem &q) const |
For testing. | |
Public Attributes | |
std::vector< std::vector< int64_t > > | weights |
weights[i][j] is the amount of flow from facility i to facility j. | |
std::vector< std::vector< int64_t > > | distances |
distances[i][j] is the distance from location i to location j. | |
int64_t | best_known_solution = -1 |
Best known solution (-1 if not defined). | |
Quadratic assignment problem (QAP) is a classical combinatorial optimization problem. See https://en.wikipedia.org/wiki/Quadratic_assignment_problem. In short, there are a set of n facilities and a set of n locations. For each pair of locations, a distance
is specified and for each pair of facilities a weight
is specified (e.g., the amount of supplies transported between the two facilities). The problem is to assign all facilities to different locations with the goal of minimizing the sum of the distances multiplied by the corresponding flows.
Definition at line 32 of file qap_reader.h.
|
inline |
For testing.
Definition at line 43 of file qap_reader.h.
int64_t operations_research::QapProblem::best_known_solution = -1 |
Best known solution (-1 if not defined).
Definition at line 40 of file qap_reader.h.
std::vector<std::vector<int64_t> > operations_research::QapProblem::distances |
distances[i][j]
is the distance from location i to location j.
Definition at line 37 of file qap_reader.h.
std::vector<std::vector<int64_t> > operations_research::QapProblem::weights |
weights[i][j]
is the amount of flow from facility i to facility j.
Definition at line 34 of file qap_reader.h.