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()
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()
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()