Extend CutSolver to accept multiple stock lengths/number of stock
Closed this issue · 5 comments
Hello,
Is it possible to extend CutSolver to be able to accept multiple number/length tuples for stock and a default length, so I can use this solution to optimize the use of available stock?
It should be technically possible, but I'm not working on it at the moment. I'm marking it as a possible extension, I'm more than happy to look at a pull requests for it though.
@erikhagemeijer have a look at the output example in my branch feature/multi-stocks : https://github.com/ModischFabrications/CutSolver/blob/feature/multi-stocks/tests/res/out/testresult_multi.json
This is what you would expect from the API, right? I might change a few things, but that's the rough sketch I have in mind
Perfect, I will continue work on the implementation then.
I will add your request to #68 , could be a nice addition there.
Relevant for replacement vs additional path solution is the execution time for old-style jobs.
new (only bruteforce migrated, others are have cheap workarounds):
Going from 4, 3, 2 to 5, 3, 2 in test_m increases runtime of bruteforce to 720ms and 83ms (wow!), seems like the new permutations increase performance a lot more than the new solver type slows it down. Old solution has speedup from 8s to 0.2s for 8, 3, 2, which makes even larger jobs possible.
New structure shows minor slowdown, but I think it's worth it, at least for the bruteforce solver. Unifying the codebase will also make testing more thorough and maintenance much easier.