This problem fit in a domain named "Linear Programming with Integer Numbers".
It takes books to explain how efficient algorithms are working. The problem is so difficult that companies are selling programs just to solve this problem.
Integer programming - Wikipedia[
^]
Cutting stock problem - Wikipedia[
^]
1 solution is to generate all possible combination of cable that fit in each drum length. Then pick ones to minimize waste.
Quote:
I have large number of cable reels/drums (lets say in the order of 20,000 numbers) each having varying lengths (random lengths between 200 meter to 3,000 meter) of cable in it.
The number of drums do nit matters, it is the number of drum length which matters.
Quote:
I have to cut a large number of cables of different lengths (that randomly varies from 1 meter to 1000 meter).
If minimum cable length is 1 meter, waste is drum with shorter cable remaining.