-
Notifications
You must be signed in to change notification settings - Fork 294
Expand file tree
/
Copy pathHighsDebugSol.h
More file actions
133 lines (91 loc) · 4.16 KB
/
HighsDebugSol.h
File metadata and controls
133 lines (91 loc) · 4.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the HiGHS linear optimization suite */
/* */
/* Available as open-source under the MIT License */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file mip/HighsDebugSol.h
* @brief Debug solution for MIP solver
*/
#ifndef HIGHS_DEBUG_SOL_H_
#define HIGHS_DEBUG_SOL_H_
class HighsDomain;
class HighsMipSolver;
class HighsLp;
#include <set>
#include <vector>
#include "mip/HighsCliqueTable.h"
#include "mip/HighsDomain.h"
#ifdef HIGHS_DEBUGSOL
#include <unordered_map>
struct HighsDebugSol {
const HighsMipSolver* mipsolver;
double debugSolObjective;
std::vector<double> debugOrigSolution;
std::vector<double> debugSolution;
bool debugSolActive;
std::unordered_map<const HighsDomain*, std::multiset<HighsDomainChange>>
conflictingBounds;
HighsDebugSol(HighsMipSolver& mipsolver);
void newIncumbentFound();
void activate();
void shrink(const std::vector<HighsInt>& newColIndex);
void registerDomain(const HighsDomain& domain);
void boundChangeAdded(const HighsDomain& domain,
const HighsDomainChange& domchg,
bool branching = false);
void boundChangeRemoved(const HighsDomain& domain,
const HighsDomainChange& domchg);
void resetDomain(const HighsDomain& domain);
void nodePruned(const HighsDomain& localdomain);
void checkCut(const HighsInt* Rindex, const double* Rvalue, HighsInt Rlen,
double rhs);
void checkRow(const HighsInt* Rindex, const double* Rvalue, HighsInt Rlen,
double Rlower, double Rupper);
void checkRowAggregation(const HighsLp& lp, const HighsInt* Rindex,
const double* Rvalue, HighsInt Rlen);
void checkClique(const HighsCliqueTable::CliqueVar* clq, HighsInt clqlen);
void checkVub(HighsInt col, HighsInt vubcol, double vubcoef,
double vubconstant) const;
void checkVlb(HighsInt col, HighsInt vlbcol, double vlbcoef,
double vlbconstant) const;
void checkConflictReasonFrontier(
const std::set<HighsDomain::ConflictSet::LocalDomChg>& reasonSideFrontier,
const std::vector<HighsDomainChange>& domchgstack) const;
void checkConflictReconvergenceFrontier(
const std::set<HighsDomain::ConflictSet::LocalDomChg>&
reconvergenceFrontier,
const HighsDomain::ConflictSet::LocalDomChg& reconvDomchgPos,
const std::vector<HighsDomainChange>& domchgstack) const;
};
#else
struct HighsDebugSol {
HighsDebugSol(HighsMipSolver&) {}
void newIncumbentFound() const {}
void activate() const {}
void shrink(const std::vector<HighsInt>&) const {}
void registerDomain(const HighsDomain&) const {}
void boundChangeAdded(const HighsDomain&, const HighsDomainChange&,
bool = false) const {}
void boundChangeRemoved(const HighsDomain&, const HighsDomainChange&) const {}
void resetDomain(const HighsDomain&) const {}
void nodePruned(const HighsDomain&) const {}
void checkCut(const HighsInt*, const double*, HighsInt, double) const {}
void checkRow(const HighsInt*, const double*, HighsInt, double,
double) const {}
void checkRowAggregation(const HighsLp&, const HighsInt*, const double*,
HighsInt) const {}
void checkClique(const HighsCliqueTable::CliqueVar*, HighsInt) const {}
void checkVub(HighsInt, HighsInt, double, double) const {}
void checkVlb(HighsInt, HighsInt, double, double) const {}
void checkConflictReasonFrontier(
const std::set<HighsDomain::ConflictSet::LocalDomChg>&,
const std::vector<HighsDomainChange>&) const {}
void checkConflictReconvergenceFrontier(
const std::set<HighsDomain::ConflictSet::LocalDomChg>&,
const HighsDomain::ConflictSet::LocalDomChg&,
const std::vector<HighsDomainChange>&) const {}
};
#endif
#endif