So I did a first step and reused and adopted macro from another thread on this forum: https://www.excelforum.com/excel-pro...-in-range.html to list all possible ways of cutting 7500 bar (with waste not larger than 100mm) into pieces of required lengths and allowed spare lengths.
Note that there is no way to cut 3780mm pieces. with 100 mm waste criterion.
The next step could be optimization (not done yet)
For instance probably first way of cutting shall not be used as it produces all needed 980mm pieces (and one stock piece) and all other usefull cuts like listed in row 6
980 980 980 3180 1380
which gives 3x980 + 1x3180 + 1 stock piece
But before I start with opitimization/selection which "paths" shall be used, I'd like to know what is ""Total bars in saw" - does it mean that there is always a pair of bars cut at the same time? Then first way of cutting is obviously wrong as we take 2 7500 bars and end up with 12 980 pieces.
And what we do if there is no allowed way to cut 3780 piece?
The code is:
See attached file (with macros enabled)
Bookmarks