Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend CutSolver to accept multiple stock lengths/number of stock #52

Closed
erikhagemeijer opened this issue Aug 24, 2022 · 5 comments · Fixed by #71
Closed

Extend CutSolver to accept multiple stock lengths/number of stock #52

erikhagemeijer opened this issue Aug 24, 2022 · 5 comments · Fixed by #71
Assignees
Labels
enhancement New feature or request

Comments

@erikhagemeijer
Copy link

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?

@ModischFabrications
Copy link
Owner

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.

@ModischFabrications
Copy link
Owner

ModischFabrications commented Apr 2, 2024

@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

@erikhagemeijer
Copy link
Author

erikhagemeijer commented Apr 7, 2024 via email

@ModischFabrications
Copy link
Owner

Perfect, I will continue work on the implementation then.

I will add your request to #68 , could be a nice addition there.

@ModischFabrications
Copy link
Owner

Relevant for replacement vs additional path solution is the execution time for old-style jobs.

old:
image

new (only bruteforce migrated, others are have cheap workarounds):
image

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants