remove __future__ from doc
This commit is contained in:
@@ -66,7 +66,6 @@ int main(int argc, char** argv) {
|
||||
```python
|
||||
"""Simple Constraint optimization example."""
|
||||
|
||||
from __future__ import print_function
|
||||
from ortools.constraint_solver import pywrapcp
|
||||
|
||||
|
||||
|
||||
@@ -88,7 +88,6 @@ int main(int argc, char** argv) {
|
||||
```python
|
||||
"""Vehicle Routing example."""
|
||||
|
||||
from __future__ import print_function
|
||||
from ortools.constraint_solver import routing_enums_pb2
|
||||
from ortools.constraint_solver import pywrapcp
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
"""Generate SVG for a Routing problem."""
|
||||
|
||||
# [START import]
|
||||
from __future__ import print_function
|
||||
import argparse
|
||||
from ortools.constraint_solver import pywrapcp
|
||||
from ortools.constraint_solver import routing_enums_pb2
|
||||
|
||||
@@ -45,9 +45,6 @@ The Python interface to the CP-SAT solver is implemented using two classes.
|
||||
```python
|
||||
"""Simple solve."""
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
from ortools.sat.python import cp_model
|
||||
|
||||
|
||||
@@ -49,9 +49,6 @@ negation of `x`.
|
||||
```python
|
||||
"""Code sample to demonstrate Boolean variable and literals."""
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
from ortools.sat.python import cp_model
|
||||
|
||||
@@ -149,9 +146,6 @@ constraints. For instance, we can add a constraint Or(x, not(y)).
|
||||
```python
|
||||
"""Code sample to demonstrates a simple Boolean constraint."""
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
from ortools.sat.python import cp_model
|
||||
|
||||
@@ -258,9 +252,6 @@ then is written as Or(not b, x) and Or(not b, not y).
|
||||
```python
|
||||
"""Simple model with a reified constraint."""
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
from ortools.sat.python import cp_model
|
||||
|
||||
@@ -421,9 +412,6 @@ code samples output this truth table:
|
||||
```python
|
||||
"""Code sample that encodes the product of two Boolean variables."""
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
from ortools.sat.python import cp_model
|
||||
|
||||
|
||||
@@ -48,9 +48,6 @@ These are implemented using the `OnlyEnforceIf` method as shown below.
|
||||
```python
|
||||
"""Link integer constraints together."""
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
from ortools.sat.python import cp_model
|
||||
|
||||
@@ -352,7 +349,6 @@ variables together:
|
||||
```python
|
||||
"""Solves a binpacking problem using the CP-SAT solver."""
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
from ortools.sat.python import cp_model
|
||||
|
||||
|
||||
@@ -149,9 +149,6 @@ rabbits and pheasants are there?
|
||||
```python
|
||||
"""Rabbits and Pheasants quizz."""
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
from ortools.sat.python import cp_model
|
||||
|
||||
@@ -328,9 +325,6 @@ The following samples output:
|
||||
```python
|
||||
"""Encodes an convex piecewise linear function."""
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
from ortools.sat.python import cp_model
|
||||
|
||||
@@ -689,9 +683,6 @@ The following samples output:
|
||||
```python
|
||||
"""Implements a step function."""
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
from ortools.sat.python import cp_model
|
||||
|
||||
|
||||
@@ -87,9 +87,6 @@ Some remarks:
|
||||
```python
|
||||
"""Code sample that solves a model using solution hinting."""
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
from ortools.sat.python import cp_model
|
||||
|
||||
|
||||
@@ -64,9 +64,6 @@ C++, Java, and C\#.
|
||||
```python
|
||||
"""Code sample to demonstrates how to build an interval."""
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
from ortools.sat.python import cp_model
|
||||
|
||||
@@ -181,9 +178,6 @@ understand these presence literals, and correctly ignore inactive intervals.
|
||||
```python
|
||||
"""Code sample to demonstrates how to build an optional interval."""
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
from ortools.sat.python import cp_model
|
||||
|
||||
@@ -313,9 +307,6 @@ weekends, making the final day as early as possible.
|
||||
```python
|
||||
"""Code sample to demonstrate how to build a NoOverlap constraint."""
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
from ortools.sat.python import cp_model
|
||||
|
||||
@@ -611,7 +602,6 @@ number of other intervals that precede it.
|
||||
```python
|
||||
"""Code sample to demonstrates how to rank intervals."""
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
from ortools.sat.python import cp_model
|
||||
|
||||
@@ -1256,9 +1246,6 @@ The following code displays:
|
||||
```python
|
||||
"""Code sample to demonstrate how an interval can span across a break."""
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
from ortools.sat.python import cp_model
|
||||
|
||||
|
||||
@@ -42,9 +42,6 @@ solver. The most useful one is the time limit.
|
||||
```python
|
||||
"""Solves a problem with a time limit."""
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
from ortools.sat.python import cp_model
|
||||
|
||||
@@ -220,9 +217,6 @@ The exact implementation depends on the target language.
|
||||
```python
|
||||
"""Solves an optimization problem and displays all intermediate solutions."""
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
from ortools.sat.python import cp_model
|
||||
|
||||
@@ -469,9 +463,6 @@ To search for all solutions, use the SearchForAllSolutions method.
|
||||
```python
|
||||
"""Code sample that solves a model and displays all solutions."""
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
from ortools.sat.python import cp_model
|
||||
|
||||
@@ -709,9 +700,6 @@ CpSolverSolutionCallback.OnSolutionCallback().
|
||||
```python
|
||||
"""Code sample that solves a model and displays a small number of solutions."""
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
from ortools.sat.python import cp_model
|
||||
|
||||
|
||||
Reference in New Issue
Block a user