From c9f1fc3bf2315447cec1c1228d66a794ca1b56e0 Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 23 Sep 2019 11:19:03 -0400 Subject: [PATCH] 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. --- ortools/linear_solver/samples/linear_programming_example.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ortools/linear_solver/samples/linear_programming_example.py b/ortools/linear_solver/samples/linear_programming_example.py index ca48569c13..d71f744621 100644 --- a/ortools/linear_solver/samples/linear_programming_example.py +++ b/ortools/linear_solver/samples/linear_programming_example.py @@ -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]