Пример #1
0
def _run_serial():
    times, convs, dives = [], [], []
    for i in range(settings.runs):
        model = DTLZ2(3)
        algo = GALE_S(model)
        start = clock()
        print(i)
        goods = algo.run()
        times.append(clock() - start)
        convs.append(algo.convergence(goods))
        dives.append(algo.diversity(goods))
        algo.solution_range(goods)
    print("Time", times)
    report(times, "Time Taken")
    print("Convergence", convs)
    report(convs, "Convergence")
    print("Diversity", dives)
    report(dives, "Diversity")
Пример #2
0
def _run_serial():
  times, convs, dives = [], [], []
  for i in range(settings.runs):
    model = DTLZ2(3)
    algo = GALE_S(model)
    start = clock()
    print(i)
    goods = algo.run()
    times.append(clock() - start)
    convs.append(algo.convergence(goods))
    dives.append(algo.diversity(goods))
    algo.solution_range(goods)
  print("Time", times)
  report(times, "Time Taken")
  print("Convergence", convs)
  report(convs, "Convergence")
  print("Diversity", dives)
  report(dives, "Diversity")
Пример #3
0
def _run_parallel():
    model = DTLZ2(3)
    opt = DE_P(model)
    times, convs, dives = [], [], []
    for i in range(settings.runs):
        print(i)
        start = clock()
        goods = DE_P.run(opt, id=i)
        if RANK == 0:
            times.append(clock() - start)
            convs.append(opt.convergence(goods))
            dives.append(opt.diversity(goods))
    if RANK == 0:
        print("Time", times)
        report(times, "Time Taken")
        print("Convergence", convs)
        report(convs, "Convergence")
        print("Diversity", dives)
        report(dives, "Diversity")
Пример #4
0
def _run_parallel():
  model = DTLZ2(3)
  opt = DE_P(model)
  times, convs, dives = [], [], []
  for i in range(settings.runs):
    print(i)
    start = clock()
    goods = DE_P.run(opt, id = i)
    if RANK == 0:
      times.append(clock() - start)
      convs.append(opt.convergence(goods))
      dives.append(opt.diversity(goods))
  if RANK == 0:
    print("Time", times)
    report(times, "Time Taken")
    print("Convergence", convs)
    report(convs, "Convergence")
    print("Diversity", dives)
    report(dives, "Diversity")