CPSolver.Examples.QAP (Fixpoint v0.8.24)



Link to this function

check_solution(solution, distances, weights)

Link to this function

model(distances, weights)

Link to this function


Link to this function

run(instance, opts \\ [])

The Quadratic Assignment problem. Given:

  • a set of n facilities;
  • a set of n locations;
  • for each pair of locations, a distance between them;
  • for each pair of facilities, a weight of the edge (e.g., the amount of supplies transported) between them.

Assign all facilities to different locations, such that the sum of products d(i,j ) * w(i, j)

, where d(i,j) is a distance between locations i and j

and w(i, j) is a weight of edge (i, j)

is minimized.

Link to this function