I found an online calculator for it, but it is a little cumbersome to use, so perhaps you know of something better...?
The calculator I found is this one:
http://khep.dcc.fc.up.pt/~fdabrandao/vpsolver/So, suppose I need 5 x 120 cm, 4 x 70 cm and 2 x 65 cm pieces, and the planks are 500 cm long, then I need to enter this into the "Instance" window of that web site:
1
500
11
120 1
120 1
120 1
120 1
120 1
70 1
70 1
70 1
70 1
65 1
65 1
(the 11 is the number of pieces that you want, and the "1" at the end of every piece is its priority)
The solution that is given, is this:
Objective: 3
Solution:
1 x [i=1, i=3]
1 x [i=2, i=4, i=5, i=8, i=10]
1 x [i=6, i=7, i=9, i=11]
Which takes a bit of decyphering, but it basically means this:
Plank 1: 120+120 (260 cm left over)
Plank 2: 120+120+120+70+65 (5 cm left over)
Plank 3: 70+70+70+65 (215 cm left over)
This is not the ideal solution, for I would have preferred to put the one 120 cm piece into plank 3, so that a larger portion of plank 1 is left over, but I'd
still have to use 3 planks.
I used this online calculator with a rather more complex calculation (42 planks of 6 different sizes), and I'm quite satisfied with the results. It's just that processing the results is a bit cumbersome (you have to map the piece number to each piece manually).