Skip to content

Commit e6e6ce3

Browse files
committed
Fix typo remaiing -> remaining
1 parent 36363de commit e6e6ce3

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

include/packingsolver/onedimensional/solution.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ struct SolutionBin
4040
* Remaining weight allowed in the bin to satisfy the maximum
4141
* weight after constraint.
4242
*/
43-
Weight remaiing_weight = -1;
43+
Weight remaining_weight = -1;
4444
};
4545

4646
/**

src/boxstacks/branching_scheme.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -554,8 +554,8 @@ BranchingScheme::Node BranchingScheme::child_tmp(
554554
node.uncovered_items[insertion.uncovered_item_pos].maximum_number_of_items = std::min(
555555
parent.uncovered_items[insertion.uncovered_item_pos].maximum_number_of_items,
556556
item_type.maximum_stackability);
557-
node.uncovered_items[insertion.uncovered_item_pos].remaiing_weight = std::min(
558-
parent.uncovered_items[insertion.uncovered_item_pos].remaiing_weight - item_type.weight,
557+
node.uncovered_items[insertion.uncovered_item_pos].remaining_weight = std::min(
558+
parent.uncovered_items[insertion.uncovered_item_pos].remaining_weight - item_type.weight,
559559
item_type.maximum_weight_above);
560560
} else if (insertion.new_bin > 0) { // New bin.
561561
if (ys > 0) {
@@ -571,7 +571,7 @@ BranchingScheme::Node BranchingScheme::child_tmp(
571571
uncovered_item.item_type_ids.push_back(insertion.item_type_id);
572572
uncovered_item.weight = item_type.weight;
573573
uncovered_item.maximum_number_of_items = item_type.maximum_stackability;
574-
uncovered_item.remaiing_weight = item_type.maximum_weight_above;
574+
uncovered_item.remaining_weight = item_type.maximum_weight_above;
575575
uncovered_item.ze = zj;
576576
uncovered_item.xs = xs;
577577
uncovered_item.xe = xe;
@@ -603,7 +603,7 @@ BranchingScheme::Node BranchingScheme::child_tmp(
603603
new_uncovered_item_2.item_type_ids.push_back(insertion.item_type_id);
604604
new_uncovered_item_2.weight = item_type.weight;
605605
new_uncovered_item_2.maximum_number_of_items = item_type.maximum_stackability;
606-
new_uncovered_item_2.remaiing_weight = item_type.maximum_weight_above;
606+
new_uncovered_item_2.remaining_weight = item_type.maximum_weight_above;
607607
new_uncovered_item_2.ze = zj;
608608
new_uncovered_item_2.xs = xs;
609609
new_uncovered_item_2.xe = xe;
@@ -988,7 +988,7 @@ void BranchingScheme::insertion_item_above(
988988
return;
989989
}
990990
// Check maximum weight above.
991-
if (item_type.weight > uncovered_item.remaiing_weight) {
991+
if (item_type.weight > uncovered_item.remaining_weight) {
992992
return;
993993
}
994994
// Check unloading constraints.

src/boxstacks/branching_scheme.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class BranchingScheme
4545
* Remaining weight allowed in the stack to satisfy the maximum weight
4646
* above constraint.
4747
*/
48-
Weight remaiing_weight = -1;
48+
Weight remaining_weight = -1;
4949

5050
/** Start x-coordiante. */
5151
Length xs;
@@ -367,8 +367,8 @@ class BranchingScheme
367367
}
368368
if (uncovered_item_1.ze > uncovered_item_2.ze)
369369
return false;
370-
if (uncovered_item_1.remaiing_weight < instance().item_weight()
371-
&& uncovered_item_1.remaiing_weight < uncovered_item_2.remaiing_weight)
370+
if (uncovered_item_1.remaining_weight < instance().item_weight()
371+
&& uncovered_item_1.remaining_weight < uncovered_item_2.remaining_weight)
372372
return false;
373373
if (uncovered_item_1.maximum_number_of_items < instance().number_of_items()
374374
&& uncovered_item_1.maximum_number_of_items < uncovered_item_2.maximum_number_of_items)

src/onedimensional/branching_scheme.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ BranchingScheme::Node BranchingScheme::child_tmp(
3939
node.last_bin_number_of_items = 1;
4040
node.last_bin_weight = item_type.weight;
4141
node.last_bin_maximum_number_of_items = item_type.maximum_stackability;
42-
node.last_bin_remaiing_weight = item_type.maximum_weight_after;
42+
node.last_bin_remaining_weight = item_type.maximum_weight_after;
4343
} else { // Same bin.
4444
node.number_of_bins = parent.number_of_bins;
4545
node.last_bin_length = parent.last_bin_length + item_type.length - item_type.nesting_length;
@@ -49,8 +49,8 @@ BranchingScheme::Node BranchingScheme::child_tmp(
4949
node.last_bin_maximum_number_of_items = std::min(
5050
parent.last_bin_maximum_number_of_items,
5151
item_type.maximum_stackability);
52-
node.last_bin_remaiing_weight = std::min(
53-
parent.last_bin_remaiing_weight - item_type.weight,
52+
node.last_bin_remaining_weight = std::min(
53+
parent.last_bin_remaining_weight - item_type.weight,
5454
item_type.maximum_weight_after);
5555
}
5656

@@ -138,7 +138,7 @@ void BranchingScheme::insertion_item_same_bin(
138138
if (parent->last_bin_number_of_items + 1 > last_bin_maximum_number_of_items)
139139
return;
140140
// Check maximum weight above.
141-
if (item_type.weight > parent->last_bin_remaiing_weight * PSTOL)
141+
if (item_type.weight > parent->last_bin_remaining_weight * PSTOL)
142142
return;
143143

144144
Insertion insertion;

src/onedimensional/branching_scheme.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class BranchingScheme
102102
* Remaining weight allowed in the last bin to satisfy the maximum
103103
* weight after constraint.
104104
*/
105-
Weight last_bin_remaiing_weight = -1;
105+
Weight last_bin_remaining_weight = -1;
106106

107107
};
108108

src/onedimensional/solution.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,19 @@ void Solution::add_item(
7070
// Update bin.maximum_number_of_items and bin.maximum_number_of_items.
7171
if (bin.items.size() == 1) {
7272
bin.maximum_number_of_items = item_type.maximum_stackability;
73-
bin.remaiing_weight = item_type.maximum_weight_after;
73+
bin.remaining_weight = item_type.maximum_weight_after;
7474
} else {
7575
bin.maximum_number_of_items = std::min(
7676
bin.maximum_number_of_items,
7777
item_type.maximum_stackability);
78-
bin.remaiing_weight = std::min(
79-
bin.remaiing_weight - item_type.weight,
78+
bin.remaining_weight = std::min(
79+
bin.remaining_weight - item_type.weight,
8080
item_type.maximum_weight_after);
8181
}
8282
if (bin.items.size() > bin.maximum_number_of_items) {
8383
feasible_ = false;
8484
}
85-
if (bin.remaiing_weight < 0) {
85+
if (bin.remaining_weight < 0) {
8686
feasible_ = false;
8787
}
8888

0 commit comments

Comments
 (0)