From 9419fdefd7c7be549983fe208959d7e32a6a52e2 Mon Sep 17 00:00:00 2001 From: Ilya Grigorev Date: Sat, 9 Nov 2024 22:07:03 +0300 Subject: [PATCH] fix objective function value return --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 87f225b..208eb28 100644 --- a/main.py +++ b/main.py @@ -109,7 +109,7 @@ def Vogel( D[y] = 0 remaining_cols[y] = 0 x_0[x][y] = selected_value - return Result(State.SOLVED, C * x_0, x_0) + return Result(State.SOLVED, np.sum(C * x_0), x_0) def Russell( @@ -156,7 +156,7 @@ def Russell( it_count += 1 if (it_count > 1000): return Result(State.UNAPPLICABLE) - return Result(State.SOLVED, C * x_0, x_0) + return Result(State.SOLVED, np.sum(C * x_0), x_0) def print_problem_statement(