Example #1
0
for problema in problemas:
    for i in problema:
        s = []
        inicial_r = FLSol(i)
        if (inicial_r.M > 100):
            continue
        print(i.nome)
        print("N:", inicial_r.N, " M:", inicial_r.M)

        hc = HC()
        vnd = VND()
        rms = RMS()
        ils = ILS()
        vns = VNS()
        sa = SA()
        gls = GLS()
        ag = AG()
        grasp = GRASP()

        # Ponto inicial guloso
        inicial_g = FLSol(i)
        tempo = time.perf_counter()
        inicial_g.build_greedy()
        sb = cp.deepcopy(inicial_g)
        tempo = time.perf_counter() - tempo
        s.append(["PTG", sb.avaliacao(), tempo])

        # # Ponto inicial Randomico
        tempo = time.perf_counter()
        inicial_r.build_random()
        tempo = time.perf_counter() - tempo