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

Multithreaded Computation or slow CPU #6

Open
TheDammedSon opened this issue Aug 11, 2021 · 2 comments
Open

Multithreaded Computation or slow CPU #6

TheDammedSon opened this issue Aug 11, 2021 · 2 comments

Comments

@TheDammedSon
Copy link

Hi,

I'm really like this approach to the problem.

The thing is when I use big sets of small rolls (typically around 70 units) it's freezes.
My question is my computer slow ( i5-4460 with 8 Gb of RAM) or is this computation single-threaded?

How can I work is around?

Thank you in advance

@emadehsan
Copy link
Owner

Hi @TheDammedSon,

This code is actually expansion of Serge Kruk's code: cutting_stock.py, the code accompanying his book Practical Python AI Projects. Which is meant for learning rather than production usage.

In Optimization Problems like Cutting Stock Problem, the time to solve the problem (as well as problem space) increases exponentially with the increase in input size.

I think your machine is good. This implementation is not optimized for higher inputs or multi-threads.

The work around is to either use some production ready Cutting Stock Solver or learn OR-Tools and optimize this Cutting Stock Solver.

Helpful links:

@emadehsan
Copy link
Owner

@TheDammedSon if you successfully increase the speed of this algorithm, please feel free to create a Pull request.

@emadehsan emadehsan reopened this Aug 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants