We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ebdc3e1 commit 336a30bCopy full SHA for 336a30b
src/optimization/gdrr.rs
@@ -232,7 +232,12 @@ impl<'a> GDRR<'a> {
232
let sheettype_id = empty_layout.sheettype().id();
233
234
if self.problem.sheettype_qtys()[sheettype_id] == 0 {
235
- insertion_option_cache.remove_all_for_layout(&elected_blueprint.layout_index(), empty_layout);
+ //There is no more stock left of this sheettype, remove all empty layouts with this sheettype from the cache
236
+ self.problem.empty_layouts().iter().enumerate()
237
+ .filter(|(_, l)| l.sheettype().id() == sheettype_id)
238
+ .for_each(|(i, l)| {
239
+ insertion_option_cache.remove_all_for_layout(&LayoutIndex::Empty(i), l);
240
+ });
241
}
242
243
if *self.problem.parttype_qtys().get(elected_parttype.id()).unwrap() == 0 {
0 commit comments