Skip to content

Commit 1ae4665

Browse files
committed
Add C++ LLM black magic
1 parent 257bacd commit 1ae4665

File tree

3 files changed

+37
-2
lines changed

3 files changed

+37
-2
lines changed

highs/mip/HighsDomain.cpp

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,23 @@ HighsDomain::ConflictPoolPropagation::ConflictPoolPropagation(
146146
conflictpool_->addPropagationDomain(this);
147147
}
148148

149+
HighsDomain::ConflictPoolPropagation&
150+
HighsDomain::ConflictPoolPropagation::operator=(
151+
const ConflictPoolPropagation& other) {
152+
if (this == &other) return *this;
153+
if (conflictpool_) conflictpool_->removePropagationDomain(this);
154+
conflictpoolindex = other.conflictpoolindex;
155+
domain = other.domain;
156+
conflictpool_ = other.conflictpool_;
157+
colLowerWatched_ = other.colLowerWatched_;
158+
colUpperWatched_ = other.colUpperWatched_;
159+
conflictFlag_ = other.conflictFlag_;
160+
propagateConflictInds_ = other.propagateConflictInds_;
161+
watchedLiterals_ = other.watchedLiterals_;
162+
if (conflictpool_) conflictpool_->addPropagationDomain(this);
163+
return *this;
164+
}
165+
149166
HighsDomain::ConflictPoolPropagation::~ConflictPoolPropagation() {
150167
conflictpool_->removePropagationDomain(this);
151168
}
@@ -375,6 +392,22 @@ HighsDomain::CutpoolPropagation::CutpoolPropagation(
375392
cutpool->addPropagationDomain(this);
376393
}
377394

395+
HighsDomain::CutpoolPropagation& HighsDomain::CutpoolPropagation::operator=(
396+
const CutpoolPropagation& other) {
397+
if (this == &other) return *this;
398+
if (cutpool) cutpool->removePropagationDomain(this);
399+
cutpoolindex = other.cutpoolindex;
400+
domain = other.domain;
401+
cutpool = other.cutpool;
402+
activitycuts_ = other.activitycuts_;
403+
activitycutsinf_ = other.activitycutsinf_;
404+
propagatecutflags_ = other.propagatecutflags_;
405+
propagatecutinds_ = other.propagatecutinds_;
406+
capacityThreshold_ = other.capacityThreshold_;
407+
if (cutpool) cutpool->addPropagationDomain(this);
408+
return *this;
409+
}
410+
378411
HighsDomain::CutpoolPropagation::~CutpoolPropagation() {
379412
cutpool->removePropagationDomain(this);
380413
}

highs/mip/HighsDomain.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ class HighsDomain {
166166

167167
CutpoolPropagation(const CutpoolPropagation& other);
168168

169+
CutpoolPropagation& operator=(const CutpoolPropagation& other);
170+
169171
~CutpoolPropagation();
170172

171173
void recomputeCapacityThreshold(HighsInt cut);
@@ -203,6 +205,8 @@ class HighsDomain {
203205

204206
ConflictPoolPropagation(const ConflictPoolPropagation& other);
205207

208+
ConflictPoolPropagation& operator=(const ConflictPoolPropagation& other);
209+
206210
~ConflictPoolPropagation();
207211

208212
void linkWatchedLiteral(HighsInt linkPos);

highs/mip/HighsMipSolver.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -847,8 +847,6 @@ void HighsMipSolver::run() {
847847
};
848848

849849
auto diveSearches = [&]() -> bool {
850-
std::vector<double> dive_times(mipdata_->workers.size(),
851-
-analysis_.mipTimerRead(kMipClockTheDive));
852850
analysis_.mipTimerStart(kMipClockTheDive);
853851
std::vector<HighsSearch::NodeResult> dive_results(
854852
mipdata_->workers.size(), HighsSearch::NodeResult::kBranched);

0 commit comments

Comments
 (0)