Coming soon - Get a detailed view of why an account is flagged as spam!
view details

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.

0
cutting stock problem
Post Body

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.

Author
Account Strength
100%
Account Age
4 years
Verified Email
Yes
Verified Flair
No
Total Karma
3,363
Link Karma
213
Comment Karma
3,150
Profile updated: 23 hours ago
Posts updated: 1 week ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
1 year ago