Welcome, Guest

Author Topic: How many planks should I buy for so many pieces of wood?  (Read 3019 times)

Offline ugcheleuce

  • House Bee
  • **
  • Posts: 128
  • Gender: Male
How many planks should I buy for so many pieces of wood?
« on: February 04, 2014, 05:12:52 pm »
Hello everyone

Do you know of an online calculator that will help calculate the least number of planks that I should buy if I want to cut smaller pieces of wood from it?  I mean, suppose I know that I need 5 x 120 cm and 4 x 70 cm and 2 x 65 cm pieces, and the planks at the hardware store are 500 cm long, how many planks do I need to buy?

I found an online calculator for it, but it is a little cumbersome to use, so perhaps you know of something better...?

Thanks
Samuel
--
Samuel Murray, Apeldoorn, Netherlands
3 hives in desperate need of requeening :-)

Offline ugcheleuce

  • House Bee
  • **
  • Posts: 128
  • Gender: Male
Re: How many planks should I buy for so many pieces of wood?
« Reply #1 on: February 04, 2014, 05:15:52 pm »
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).
--
Samuel Murray, Apeldoorn, Netherlands
3 hives in desperate need of requeening :-)

Offline bbbthingmaker

  • House Bee
  • **
  • Posts: 51
  • Gender: Male
Re: How many planks should I buy for so many pieces of wood?
« Reply #2 on: February 05, 2014, 10:24:40 pm »
Buy a few more than you think you need.  Unless your lumber is perfect there will be knots, cracks and bad ends to work around.