def test_find_mip_parallel_standard_example(s, flushcache, restore_fs_cache): flushcache() unpartitioned_constellation = constellation(s) bipartitions = utils.directed_bipartition(s.node_indices)[1:-1] cuts = [Cut(bipartition[0], bipartition[1]) for bipartition in bipartitions] min_mip = _null_bigmip(s) min_mip.phi = float('inf') mip = _find_mip_parallel(s, cuts, unpartitioned_constellation, min_mip) check_mip(mip, standard_answer)
def test_find_mip_sequential_micro(micro_s, flushcache, restore_fs_cache): flushcache() unpartitioned_constellation = constellation(micro_s) bipartitions = utils.directed_bipartition(micro_s.node_indices)[1:-1] cuts = [Cut(bipartition[0], bipartition[1]) for bipartition in bipartitions] min_mip = _null_bigmip(micro_s) min_mip.phi = float('inf') mip = _find_mip_sequential(micro_s, cuts, unpartitioned_constellation, min_mip) check_mip(mip, micro_answer)