Update linear_programming_example.py

Change the lower limit on the variables to 0 to match the versions in the other languages, and to agree with the doc.
This commit is contained in:
Paul
2019-09-23 11:19:03 -04:00
committed by GitHub
parent 591638426a
commit c9f1fc3bf2

View File

@@ -27,10 +27,10 @@ def LinearProgrammingExample():
pywraplp.Solver.GLOP_LINEAR_PROGRAMMING)
# [END solver]
# Create the two variables and let them take on any value.
# Create the two variables and let them take on any non-negative value.
# [START variables]
x = solver.NumVar(-solver.infinity(), solver.infinity(), 'x')
y = solver.NumVar(-solver.infinity(), solver.infinity(), 'y')
x = solver.NumVar(0, solver.infinity(), 'x')
y = solver.NumVar(0, solver.infinity(), 'y')
# [END variables]
# [START constraints]