Example #1
0
def series_solver(strip_lengths):
    """
    The basic solver.
    Just run a depth first search, no tricks.
    """
    toy = Toy(strip_lengths)
    toy.run()
    return toy.rel_solutions()
Example #2
0
async def asyncio_subprocess(strip_lengths, start, end):
    """
    Subprocess for concurrent_asyncio
    """
    toy = Toy(strip_lengths)
    toy.start(start)
    toy.run(finish_state=end)
    # print(start, toy.rel_solutions())
    return toy.rel_solutions()
Example #3
0
def subprocess(strip_lengths, start, end):
    """
    Subprocess for embarrassinly parallel
    """
    toy = Toy(strip_lengths)
    toy.start(start)
    toy.run(finish_state=end)
    # print(start, toy.rel_solutions())
    return toy.rel_solutions()