Skip to main content

Module qap

Module qap 

Source
Expand description

The quadratic assignment problem (SciPy’s quadratic_assignment): find the permutation p minimising Σᵢⱼ A[i][j] B[p(i)][p(j)], by Vogelstein et al.’s Fast Approximate QAP or by 2-opt local search.

See the book entry Global and combinatorial optimisation.

Structs§

FaqOptions
Options of quadratic_assignment_seeded.
QapResult
The result of quadratic_assignment.

Enums§

QapMethod
The method of quadratic_assignment.

Functions§

qap_score
Σᵢⱼ A[i][j] B[p(i)][p(j)].
quadratic_assignment
Solves (approximately: the problem is NP-hard) min_p Σᵢⱼ A[i][j] B[p(i)][p(j)] over permutations, or the maximum with maximize (SciPy’s quadratic_assignment). Both methods are deterministic ports of SciPy’s and give its permutations.
quadratic_assignment_seeded
Fast Approximate QAP with seeds (SciPy’s quadratic_assignment with partial_match, after Fishkind et al.’s seeded graph matching): the matched nodes are moved to the front of both matrices, which are split into seed and non-seed blocks, and Frank-Wolfe runs on the non-seed block with the seeds contributing a constant term to the gradient and linear terms to the step size. randomized_start replaces the barycentre by the mean of the barycentre and a random doubly stochastic matrix, drawn from uniform (values in [0, 1)), so that restarts from different random streams explore different local optima.