I am working on a self-study project but I cannot come up with a reliable answer.
Here is the deal:
I start with 500cm sticks. I have orders from customers who want smaller sticks. I am willing to cut my 500cm stick into as many as 7 pieces.
How can I determine which combination of customer orders to use for each stick to minimize waste?
This is some sample customer order data:
+-----------+--------+
| Firm Name | Length |
+-----------+--------+
| "firm1", | 34, |
| "firm2", | 43, |
| "firm3", | 52, |
| "firm4", | 61, |
| "firm5", | 62, |
...
| "firm26", | 102, |
| "firm27", | 152, |
| "firm28", | 153, |
| "firm29", | 163, |
| "firm30", | 202, |
+-----------+--------+
The important part is the algorithm should give minimize scrap.
I thought that I could use a genetic algorithm but it does not return the correct solution every time.
The important thing is all cutting to pieces work orders must be 500cm in total. Or it should be near to that length according to given waste length. Quantity could be higher than the order and can be put to the stock.