def main():
    agents, tasks = generate_painter(X, Y, 3)

    # We give back m tasks in a giveback phase, and each iteration we assign one task,
    # so for m agents we should have a giveback probability < 1/m
    auctioneer = Auctioneer(agents, tasks, 0.25)  #1 / ( * len(agents)))

    schedule = auctioneer.optimize_schedule()

    Agent.print_schedule(X, Y, auctioneer, schedule)
Exemple #2
0
def main():
    agents, tasks = generate_painter(X, Y, 3)

    # nFeas = The number of feasible 1-moves
    # Given a schedule, we can move tasks equal to the number of agents.
    # Using the result by Osman, we set alpha = n * Nfeas, gamma = n
    alpha = math.factorial(X * Y)
    # The number of iterations is n

    annealer = Annealer(agents, tasks, 2500, 100, 0.1, 1)

    schedule = annealer.optimize_schedule()

    Agent.print_schedule(X, Y, annealer, schedule)