File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed
Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -120,22 +120,26 @@ DualFeasibleFunctionsOutput packingsolver::rectangle::dual_feasible_functions(
120120 bin_type.rect .x ,
121121 -1 ,
122122 2 * instance.number_of_items () + bound);
123- modified_instance_builder.add_item_type (
124- bin_type.rect .x ,
125- bin_type.rect .x - bin_type.rect .y ,
126- -1 ,
127- bound);
123+ if (bound > 0 ) {
124+ modified_instance_builder.add_item_type (
125+ bin_type.rect .x ,
126+ bin_type.rect .x - bin_type.rect .y ,
127+ -1 ,
128+ bound);
129+ }
128130 } else if (bin_type.rect .x < bin_type.rect .y ) {
129131 modified_instance_builder.add_bin_type (
130132 bin_type.rect .y ,
131133 bin_type.rect .y ,
132134 -1 ,
133135 2 * instance.number_of_items () + bound);
134- modified_instance_builder.add_item_type (
135- bin_type.rect .y - bin_type.rect .x ,
136- bin_type.rect .y ,
137- -1 ,
138- bound);
136+ if (bound > 0 ) {
137+ modified_instance_builder.add_item_type (
138+ bin_type.rect .y - bin_type.rect .x ,
139+ bin_type.rect .y ,
140+ -1 ,
141+ bound);
142+ }
139143 }
140144 // Add items.
141145 for (ItemTypeId item_type_id = 0 ;
You can’t perform that action at this time.
0 commit comments