Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::QapProblem Struct Reference

#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).
 

Detailed Description

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.

Member Function Documentation

◆ operator==()

bool operations_research::QapProblem::operator== ( const QapProblem & q) const
inline

For testing.

Definition at line 43 of file qap_reader.h.

Member Data Documentation

◆ best_known_solution

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.

◆ distances

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.

◆ weights

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.


The documentation for this struct was generated from the following file: