Merry Christmas to everyone here,
I know this has been discussed in
http://www.theswamp.org/index.php?topic=34464.msg397353#msg397353 and , I had a probl
http://www.theswamp.org/index.php?topic=8943.0But i can't modify the the routine from david,cab,tim.
This problem is pure math that beyond my knowledge.
I need to find the pattern of cut steel bars with minimum waste or left overs.
As the example:
1. List data cut order :
‘((23 7.65) (10 5.30) (54 3.67) (67 2.66) (44 9.71) (120 4.0))
(23 7.65) means 23 pcs with each length 7.65m’
(10 5.30) => 10 pcs 5.30m’
2. List data stock :
‘(750 12.0) represent 750 pcs with each length 12.0 m’
Goal :
Find the most minimum of waste (amount of left-overs) cut from stock.
Example of result :
‘((37 (4.0 4.0 4.0))
(10 (4.0 5.3 2.66 0.04))
(23 (7.65 3.67 0.68))
(4 (3.67 3.67 3.67 0.99)
(44 (9.71 2.29))
(19 (3.67 2.66 2.66 2.66 0.35))This result means :
37 pcs with cut pattern 4.0m + 4.0m + 4.0m equal 12m (stock length)
10 pcs with cut pattern 4.0m + 5.3m + 2.66m + 0.04m (0.04m is waste) etc.
The total needed from stock 37+10+23+4+44+19 = 137 pcs @ 12m’
Calculating waste :
1. Total length of waste
37*0 + 10*0.04 + 23*0.68 + 4*0.99 + 44*2.29 + 19*0.35 = 127.41m’
2. Total length needed from stock
137*12 = 1644m’
So waste = 127.41/1644 =
0.0775.
I hope my explanation is clear enough.
This is reference :
en.wikipedia.org/wiki/Cutting_stock_problemhttp://delphiforfun.org/Programs/Cutting%20Stock.htm
Thank you.
mardi