Hello SciPy developers and maintainers,
During my PhD, I modified the implementation of the ‘faq' algorithm inside scipy.optimize.quadratic_assignment() so that it can handle forbidden assignments between nodes.
Motivation
During my PhD in neuroscience, I frequently needed to forbid certain node-to-node mappings, and I believe that restricting the assignment of a node to only a subset of nodes would be useful for other scientific domains.
Proposed feature
Add a new optional argument, for example allowed, which is a boolean matrix of shape (n_nodes, n_nodes).
-
allowed[i, j] = Truemeans assignment of nodeito nodejis allowed, -
allowed[i, j] = Falsemeans this assignment is forbidden.
The FAQ algorithm would then respect these constraints when solving the quadratic assignment problem.
I would be happy to open a pull request for this implementation, including documentation and tests. So please let me know if this feature is worth integrating.
Thank you for your time and for maintaining SciPy!