Forum Discussion
Grouping a list of numbers
Your request is what's known as the 'Cutting Stock Problem'.
https://en.wikipedia.org/wiki/Cutting_stock_problem
There are two possible approaches to solving this: Lambda or Solver.
Do you happen to have any more details about the grass lengths?
- Jasmine_tamaraApr 28, 2023Copper Contributor
Thanks for getting back to me so quickly, this is very helpful!
This is not a real plan that we are doing, just a mock area to demonstrate:
The image below shows the area of grass to be covered, and the red rectangles are the grass rolls. Then the image below that shows a section of a worksheet showing how long each of those rolls are, rounded up to the nearest 500mm.
Obviously this is a very simple example that would be easy to workout manually, however we often have plans where we use a lot more grass than this, and in those instances, it's hard to workout the best combinations to minimise the amount of waste and cuts we need to make.
Any help is greatly appreciated!
- Patrick2788Apr 28, 2023Silver Contributor
If I understand correctly, these figures are the rolls to be produced with as minimal waste as possible:
I think the part that's missing are the constraints. I realize this is an example and the there's no waste because 25mm is a multiple of the the various rolls required.
- Jasmine_tamaraApr 28, 2023Copper ContributorAh sorry for the misunderstanding, the length of the product to start with is 25m, not 25mm