From b376de441102409a06a946e97e3642a73603c09a Mon Sep 17 00:00:00 2001 From: Gleb Belov Date: Fri, 18 Aug 2023 14:30:48 +1000 Subject: [PATCH] Fix solver-test: old API call --- include/mp/solver-io.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/include/mp/solver-io.h b/include/mp/solver-io.h index 617afe85a..8f28a18a5 100644 --- a/include/mp/solver-io.h +++ b/include/mp/solver-io.h @@ -85,7 +85,7 @@ class SolutionWriterImpl : ArrayRef options_; - // The number of feasible solutions found. + /// The number of feasible solutions found. int num_solutions_; protected: @@ -99,13 +99,21 @@ class SolutionWriterImpl : ArrayRef options = mp::ArrayRef(0, 0)) : stub_(stub.to_string()), overrideStub_(), solver_(s), builder_(b), options_(options), num_solutions_(0) {} - // Returns the .sol writer. + /// Returns the .sol writer. Writer &sol_writer() { return *this; } + /// Writes an intermediate solution to a .sol file. void HandleFeasibleSolution(int status, fmt::CStringRef message, const double *values, const double *dual_values, double); - // Writes the solution to a .sol file. + /// Deprecated: no status + void HandleFeasibleSolution(fmt::CStringRef message, + const double *values, const double *dual_values, double obj) { + HandleFeasibleSolution(sol::UNCERTAIN, message, + values, dual_values, obj); + } + + /// Writes the solution to a .sol file. void HandleSolution(int status, fmt::CStringRef message, const double *values, const double *dual_values, double);