Add version string to sat/glop; export MPSolver::SolverVersion() in python/java/C#

This commit is contained in:
Laurent Perron
2022-12-20 11:54:29 +01:00
parent 068df24bec
commit 1f8a0a7770
17 changed files with 271 additions and 148 deletions

View File

@@ -51,6 +51,7 @@ def main():
# [END objective]
# [START solve]
print(f'Solving with {solver.SolverVersion()}')
status = solver.Solve()
# [END solve]

View File

@@ -21,7 +21,7 @@ from ortools.linear_solver import pywraplp
def main():
# [START solver]
# Create the mip solver with the SCIP backend.
solver = pywraplp.Solver.CreateSolver('SCIP')
solver = pywraplp.Solver.CreateSolver('SAT')
if not solver:
return
# [END solver]
@@ -51,6 +51,7 @@ def main():
# [END objective]
# [START solve]
print(f'Solving with {solver.SolverVersion()}')
status = solver.Solve()
# [END solve]