Skip to content

Commit c6ef443

Browse files
committed
Add statistics about tiny sn
1 parent 2709311 commit c6ef443

4 files changed

Lines changed: 14 additions & 0 deletions

File tree

highs/ipm/hipo/factorhighs/Analyse.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,6 +1277,15 @@ Int Analyse::run(Symbolic& S) {
12771277
if (i <= 100) S.sn_size_100_++;
12781278
}
12791279

1280+
// count tiny supernodes, i.e., sn with small size and with clique that fits
1281+
// in a single block.
1282+
for (Int i = 0; i < sn_count_; ++i) {
1283+
if (sn_size[i] <= kTinySupernodeSize &&
1284+
(ptr_sn_[i + 1] - ptr_sn_[i]) <= sn_size[i] + nb_) {
1285+
S.sn_tiny_++;
1286+
}
1287+
}
1288+
12801289
if (checkOverflow()) {
12811290
if (logger_) logger_->printe("Integer overflow in analyse phase\n");
12821291
return kRetIntOverflow;

highs/ipm/hipo/factorhighs/FactorHiGHSSettings.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ const double kAlphaBK = 0.01; //(sqrt(17.0) + 1.0) / 8.0;
4545
const Int kBlockGrainSize = 1;
4646
const Int kBlockParallelThreshold = 5;
4747

48+
const Int kTinySupernodeSize = 4;
49+
4850
const Int kMinConsecutiveSums = 1;
4951

5052
// regularisation

highs/ipm/hipo/factorhighs/Symbolic.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ void Symbolic::print(const Logger& logger, bool verbose) const {
9191
log_stream << textline("Sn size <= 10:") << integer(sn_size_10_, 0) << '\n';
9292
log_stream << textline("Sn size <= 100:") << integer(sn_size_100_, 0)
9393
<< '\n';
94+
log_stream << textline("Tiny sn:") << integer(sn_tiny_) << " ("
95+
<< fix((double)sn_tiny_ / sn_ * 100, 0, 1) << "%%)\n";
9496
log_stream << textline("Sn avg size:") << sci((double)n_ / sn_, 0, 1)
9597
<< '\n';
9698
}

highs/ipm/hipo/factorhighs/Symbolic.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class Symbolic {
3333
Int sn_size_1_{};
3434
Int sn_size_10_{};
3535
Int sn_size_100_{};
36+
Int sn_tiny_{};
3637

3738
// Inverse permutation
3839
std::vector<Int> iperm_{};

0 commit comments

Comments
 (0)