Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calculate best material length
Message
From
16/02/2001 10:23:57
 
 
To
16/02/2001 00:20:18
Al Doman (Online)
M3 Enterprises Inc.
North Vancouver, British Columbia, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00476005
Message ID:
00476623
Views:
25
Cut order is not needed but material selection is. They might only have 20' and 40' pieces to choose from.

So far I'm thinking along the lines of
Calculate total length needed.
Calculate what combination of lengths give the least waste
Calculate the cuts starting with the longest parts and the longest material and working my way down till the end. If I run out of material then select the next longest combination of lengths of materials and run the cut list again.

for example

10 pcs 3'
10 pcs 5'
10 pcs 7'

150 total feet
4 x 40 = 160 7 x 24 = 168 8 x 20 = 160 (2 x 40)+(3 x 24) = 152
Clearly the last combination leaves the least waste if I can cut all the parts from combination. so starting from the longest I see if I can do it...
#1 40' 5 x 7 and 1 x 5 = 40 0 waste
#2 40' 5 x 7 and 1 x 5 = 40 0 waste
#3 24' 4 x 5 and 1 x 3 = 23 1 waste
#4 24' 4 x 5 and 1 x 3 = 23 1 waste
#5 24' 8 x 3 = 24 0 waste


Thanks

>>I need to calculate the best material length to cut parts from. The inputs are quantity and length. The choice of lengths is 20', 24', 40'. So from a list of quantitys and lengths I need to calculate the least waste and print a list of what to cut from each length. Does any one know a good way to calculate this?
>>
>>Thanks
>
>I suspect there are more boundary conditions you haven't told us yet - such as availability of each material length, requirements to cut parts in a specific order, etc.
>
>These conditions determine whether the problem is trivial or quite complex.
Previous
Reply
Map
View

Click here to load this message in the networking platform