ortools: export from google3
This commit is contained in:
@@ -5074,6 +5074,7 @@ class SequenceVar : public PropagationBaseObject {
|
||||
class AssignmentElement {
|
||||
public:
|
||||
AssignmentElement() : activated_(true) {}
|
||||
AssignmentElement(const AssignmentElement&) = default;
|
||||
|
||||
void Activate() { activated_ = true; }
|
||||
void Deactivate() { activated_ = false; }
|
||||
@@ -5087,6 +5088,7 @@ class IntVarElement : public AssignmentElement {
|
||||
public:
|
||||
IntVarElement();
|
||||
explicit IntVarElement(IntVar* var);
|
||||
IntVarElement(const IntVarElement& element) = default;
|
||||
void Reset(IntVar* var);
|
||||
IntVarElement* Clone();
|
||||
void Copy(const IntVarElement& element);
|
||||
@@ -5351,9 +5353,8 @@ class AssignmentContainer {
|
||||
/// previous content.
|
||||
void Copy(const AssignmentContainer<V, E>& container) {
|
||||
Clear();
|
||||
for (int i = 0; i < container.elements_.size(); ++i) {
|
||||
const E& element = container.elements_[i];
|
||||
FastAdd(element.Var())->Copy(element);
|
||||
for (const E& element : container.elements_) {
|
||||
elements_.emplace_back(element);
|
||||
}
|
||||
}
|
||||
bool Contains(const V* const var) const {
|
||||
|
||||
@@ -2481,7 +2481,7 @@ void GlobalCheapestInsertionFilteredHeuristic::AddNodeEntry(
|
||||
}
|
||||
|
||||
void InsertionSequenceGenerator::AppendPickupDeliveryMultitourInsertions(
|
||||
int pickup, int delivery, int vehicle, const std::vector<int>& path,
|
||||
int pickup, int delivery, int vehicle, absl::Span<const int> path,
|
||||
const std::vector<bool>& path_node_is_pickup,
|
||||
const std::vector<bool>& path_node_is_delivery,
|
||||
InsertionSequenceContainer& insertions) {
|
||||
@@ -2514,7 +2514,7 @@ void InsertionSequenceGenerator::AppendPickupDeliveryMultitourInsertions(
|
||||
}
|
||||
}
|
||||
|
||||
auto append = [pickup, delivery, vehicle, num_nodes, &path, &insertions](
|
||||
auto append = [pickup, delivery, vehicle, num_nodes, path, &insertions](
|
||||
int pickup_pos, int delivery_pos) {
|
||||
if (pickup_pos < 0 || num_nodes - 1 <= pickup_pos) return;
|
||||
if (delivery_pos < 0 || num_nodes - 1 <= delivery_pos) return;
|
||||
|
||||
@@ -1099,7 +1099,7 @@ class InsertionSequenceGenerator {
|
||||
/// are made on the subpath of paired nodes, all extensions to the original
|
||||
/// path that conserve order are equivalent.
|
||||
void AppendPickupDeliveryMultitourInsertions(
|
||||
int pickup, int delivery, int vehicle, const std::vector<int>& path,
|
||||
int pickup, int delivery, int vehicle, absl::Span<const int> path,
|
||||
const std::vector<bool>& path_node_is_pickup,
|
||||
const std::vector<bool>& path_node_is_delivery,
|
||||
InsertionSequenceContainer& insertions);
|
||||
|
||||
Reference in New Issue
Block a user