This commit is contained in:
Laurent Perron
2025-12-12 17:29:41 +01:00
committed by Corentin Le Molgat
parent e55172a5d2
commit b6c198050d
4 changed files with 7 additions and 1 deletions

View File

@@ -184,7 +184,7 @@ ComputeShortestPath(const GraphType& graph,
}
if (std::vector<typename GraphType::NodeIndex> path =
std::move(dijkstra.NodePathTo(destination));
dijkstra.NodePathTo(destination);
!path.empty()) {
return {std::move(path), path_length};
} else {

View File

@@ -440,6 +440,7 @@ cc_test(
":test_util",
":trust_region",
"//ortools/base:gmock_main",
"@abseil-cpp//absl/base:core_headers",
"@abseil-cpp//absl/strings",
"@eigen",
],

View File

@@ -22,6 +22,7 @@
#include "Eigen/Core"
#include "Eigen/SparseCore"
#include "absl/base/optimization.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "gtest/gtest.h"
@@ -610,6 +611,7 @@ INSTANTIATE_TEST_SUITE_P(
case PrimalDualNorm::kMaxNorm:
return absl::StrCat("MaxNorm", "_", suffix);
}
ABSL_UNREACHABLE();
});
TEST_P(ComputeLocalizedLagrangianBoundsTest, ZeroGapAtOptimal) {

View File

@@ -115,6 +115,9 @@ class SolverLogger {
if ((logger)->LoggingIsEnabled()) \
(logger)->LogInfo(__FILE__, __LINE__, absl::StrCat(__VA_ARGS__))
#define FORCED_SOLVER_LOG(logger, ...) \
(logger)->LogInfo(__FILE__, __LINE__, absl::StrCat(__VA_ARGS__))
// Simple helper class to:
// - log in an uniform way a "time-consuming" presolve operation.
// - track a deterministic work limit.