experimental support for dynamic loading of gurobi; add MPSolver.CreateSolver() factory method for non C++ languages to check correctly installed linear solver backends and licenses when needed; port all non C++ examples

This commit is contained in:
Laurent Perron
2020-06-24 18:11:12 +02:00
parent 2f7e8e9eb8
commit d6ecea46ad
42 changed files with 1268 additions and 315 deletions

View File

@@ -23,8 +23,7 @@ def LinearProgrammingExample():
"""Linear programming sample."""
# Instantiate a Glop solver, naming it LinearExample.
# [START solver]
solver = pywraplp.Solver('LinearProgrammingExample',
pywraplp.Solver.GLOP_LINEAR_PROGRAMMING)
solver = pywraplp.Solver.CreateSolver('LinearProgrammingExample', 'glop')
# [END solver]
# Create the two variables and let them take on any non-negative value.