diff --git a/ortools/base/dump_vars.h b/ortools/base/dump_vars.h index b2814c2e53..96536fcefe 100644 --- a/ortools/base/dump_vars.h +++ b/ortools/base/dump_vars.h @@ -43,12 +43,10 @@ #include #include #include -#include #include #include #include "absl/container/inlined_vector.h" -#include "ortools/base/strong_int.h" #include "ortools/base/strong_vector.h" /* need extra level to force extra eval */ diff --git a/ortools/base/python-swig.h b/ortools/base/python-swig.h index 8c7003691a..b5134df498 100644 --- a/ortools/base/python-swig.h +++ b/ortools/base/python-swig.h @@ -16,7 +16,7 @@ // This file should only be included in base.i inside Python-specific part: // #ifdef SWIGPYTHON // %{ -// #include "ortools/base/swig/python-swig.cc" +// #include "ortools/base/python-swig.h" // %} // #endif // It has no XXX_H_ guard because SWIG protects all %include'd files to be used diff --git a/ortools/constraint_solver/csharp/IntVarArrayHelper.cs b/ortools/constraint_solver/csharp/IntVarArrayHelper.cs index bc32203bf9..1c1711cb7d 100644 --- a/ortools/constraint_solver/csharp/IntVarArrayHelper.cs +++ b/ortools/constraint_solver/csharp/IntVarArrayHelper.cs @@ -174,7 +174,7 @@ public static class IntVarArrayHelper } } -// TODO(user): Try to move this code back to the .swig with @define macros. +// TODO(user): Try to move this code back to the .i with @define macros. public partial class IntVarVector : IDisposable, System.Collections.IEnumerable #if !SWIG_DOTNET_1 diff --git a/ortools/constraint_solver/expressions.cc b/ortools/constraint_solver/expressions.cc index 7c8edb4975..eb34ac69f3 100644 --- a/ortools/constraint_solver/expressions.cc +++ b/ortools/constraint_solver/expressions.cc @@ -21,22 +21,19 @@ #include #include -#include "absl/container/flat_hash_map.h" +#include "absl/flags/flag.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include "absl/strings/string_view.h" #include "absl/types/span.h" -#include "ortools/base/commandlineflags.h" #include "ortools/base/logging.h" -#include "ortools/base/map_util.h" #include "ortools/base/mathutil.h" #include "ortools/base/stl_util.h" -#include "ortools/base/types.h" #include "ortools/constraint_solver/constraint_solver.h" #include "ortools/constraint_solver/constraint_solveri.h" #include "ortools/util/bitset.h" +#include "ortools/util/piecewise_linear_function.h" #include "ortools/util/saturated_arithmetic.h" -#include "ortools/util/string_array.h" ABSL_FLAG(bool, cp_disable_expression_optimization, false, "Disable special optimization when creating expressions."); @@ -5849,8 +5846,8 @@ class SimpleConvexPiecewiseExpr : public BaseIntExpr { DCHECK_GE(lc, int64_t{0}); DCHECK_GE(ld, ed); - // If the penalty is 0, we can push the "confort zone or zone - // of no cost towards infinity. + // If the penalty is 0, we can push the "comfort zone or zone of no cost + // towards infinity. } ~SimpleConvexPiecewiseExpr() override {} diff --git a/ortools/graph/christofides_test.cc b/ortools/graph/christofides_test.cc index 8e24e9981e..1ee926f9d3 100644 --- a/ortools/graph/christofides_test.cc +++ b/ortools/graph/christofides_test.cc @@ -273,7 +273,7 @@ void BM_ChristofidesPathSolver(benchmark::State& state) { } } auto cost = [&costs](int i, int j) { return costs[i][j]; }; - // TODO: MSVC v19.41 can't convert lambda to std::function. + // TODO(user) MSVC v19.41 can't convert lambda to std::function. #if defined(_MSC_VER) using Cost = std::function; #else diff --git a/ortools/graph/one_tree_lower_bound_test.cc b/ortools/graph/one_tree_lower_bound_test.cc index 4a5e917450..15516e25c2 100644 --- a/ortools/graph/one_tree_lower_bound_test.cc +++ b/ortools/graph/one_tree_lower_bound_test.cc @@ -22,6 +22,7 @@ #include "absl/log/log.h" #include "absl/types/span.h" #include "gtest/gtest.h" +#include "ortools/base/gmock.h" #include "ortools/base/path.h" #include "ortools/routing/parsers/tsplib_parser.h" diff --git a/ortools/pdlp/README.md b/ortools/pdlp/README.md index b770f265a3..789effe98a 100644 --- a/ortools/pdlp/README.md +++ b/ortools/pdlp/README.md @@ -5,28 +5,24 @@ quadratic programming (QP) problems using first-order methods. The implementation is based on the Primal-Dual Hybrid Gradient (PDHG) algorithm, which is preprocessed with scaling and optional presolving to improve -performance and numerical stability. +performance and numerical stability. See also +[Mathematical background for PDLP][background]. ## Core C++ libraries: * [`primal_dual_hybrid_gradient.h`][primal_dual_hybrid_gradient_h]: The main - entry point for the solver, which takes a `QuadraticProgram` and solver - parameters. - + entry point `PrimalDualHybridGradient()` for the solver, which takes a + `QuadraticProgram` and solver parameters. * [`quadratic_program.h`][quadratic_program_h]: Defines the `QuadraticProgram` struct to represent the optimization problem, including objective vectors, constraint matrices, and bounds. - * [`quadratic_program_io.h`][quadratic_program_io_h]: Provides utilities to read quadratic programs from various file formats, including MPS and MPModelProto. - * [`sharded_quadratic_program.h`][sharded_quadratic_program_h] and [`sharder.h`][sharder_h]: These provide the infrastructure for sharding problem data and performing parallel computations. - * [`scheduler.h`][scheduler_h]: A thread scheduling interface that supports multiple backends (e.g. Eigen's thread pools). - * [`iteration_stats.h`][iteration_stats_h] and [`termination.h`][termination_h]: Contain logic for computing convergence and infeasibility statistics and checking termination criteria. @@ -46,7 +42,7 @@ performance and numerical stability. * [`samples/`](samples): This directory provides example usage of the library. - +[background]: https://developers.google.com/optimization/lp/pdlp_math [primal_dual_hybrid_gradient_h]: ../pdlp/primal_dual_hybrid_gradient.h [quadratic_program_h]: ../pdlp/quadratic_program.h [quadratic_program_io_h]: ../pdlp/quadratic_program_io.h