This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
hi guys! first of all, I am really new to python and only used it with the help of CHATGPT (it did most of the work lol). Second of all, im not the best in English so sorry for my mistakes and if it's not clear. I'll be glad to clarify if something doesn't make sense.
So im having a cutting stock problem everyday at work and would like to solve it with the use of an automated code or any other solution to save time. I'm a panel assembler and make really custom products so im never working with the same lenght. In each panel I install what we call cable duct to install. I need to cut them, in specific size, for example: 1 of 32", one of 4", one of 36" and four of 10,75". the thing is that my cable duct only mesures 72" and I find myself making combination of cuts to minimize my lost and find how many cable duct I need to achieve the cuts needed which consume a lot of time. I know I'll have losse on every full length and I don't care. what I want is to minimize it which CHATGPT doesn't seem to be understanding.
In this example the answer I would like to get from the code is that the first combination will be ( 32, 4, 36) which = 0 in loss and the second will be (10,75, 10,75, 10,75, 10,75) which = 29 in loss. And I need a total of 2 full length to complete the task
Something important to note is that I need to use floating numbers, I need to achieve every cut with the least loss and I need to know how many full length I need and that every cut must be done. I runed some codes with the same example but it only took 32 out of the needed cut and give (32, 32) as an answer and that not what I want.
I hope everything is clear and makes sense. Im open to any suggestion and ides.
Thanks a lot
Étienne.
Subreddit
Post Details
- Posted
- 1 year ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/learnpython...