Make max_migrations configurable
Broken floyd-warshall