algorithms: backport from main

This commit is contained in:
Corentin Le Molgat
2024-03-25 11:20:29 +01:00
parent f88f748635
commit 5bdcc38cbd
8 changed files with 108 additions and 1212 deletions

View File

@@ -22,6 +22,7 @@ from ortools.algorithms.python import knapsack_solver
class PyWrapAlgorithmsKnapsackSolverTest(absltest.TestCase):
def RealSolve(self, profits, weights, capacities, solver_type, use_reduction):
solver = knapsack_solver.KnapsackSolver(solver_type, "solver")
solver.set_use_reduction(use_reduction)