Evgenyi,
What the binpack function does is minimize the number
of bin used.
What you are after is minimizing the waste in each bin.
If you use the 1d-csp routine shown
here and gives as argument :
(setq l '(62 20 9 8 12 17 9 6)
d'(1 1 1 1 1 1 1 1)
s 80
)
The routine will return:
((1 (1 0 0 1 0 0 0 1) 0) (1 (0 1 1 0 1 1 1 0) 17))
Since your l list gets sorted in descending order of l
l is now equal to:
(62 20 17 12 9 9 8 6)
The first pattern (1 0 0 1 0 0 0 1) means (62 0 0 12 0 0 0 0 6)
Which is an equivalent answer to (62 9 9)
L: (62 20 17 12 9 9 8 6)
(1 (1 0 0 1 0 0 0 1) 0)
(1 (0 1 1 0 1 1 1 0) 17)
Nb of Stock used: 2
Nb of Parts Cutted: 8
Total Length Wasted: 17.00
ymg