diff --git a/docs/python/ortools/algorithms/pywrapknapsack_solver.html b/docs/python/ortools/algorithms/pywrapknapsack_solver.html index ae58aef78c..32b58e1b1a 100644 --- a/docs/python/ortools/algorithms/pywrapknapsack_solver.html +++ b/docs/python/ortools/algorithms/pywrapknapsack_solver.html @@ -90,7 +90,7 @@ pywrapknapsack_solver
View Source
# This file was automatically generated by SWIG (http://www.swig.org).
-# Version 4.0.1
+# Version 4.0.2
 #
 # Do not make changes to this file unless you know what you are doing--modify
 # the SWIG interface file instead.
@@ -192,49 +192,52 @@ pywrapknapsack_solver    
     E.g.:
 
       **Python**:
-      .py}
-          profits = [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
-          weights = [ [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ],
-                      [ 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
-                    ]
-          capacities = [ 34, 4 ]
 
-          solver = pywrapknapsack_solver.KnapsackSolver(
-              pywrapknapsack_solver.KnapsackSolver
-                  .KNAPSACK_MULTIDIMENSION_BRANCH_AND_BOUND_SOLVER,
-              'Multi-dimensional solver')
-          solver.Init(profits, weights, capacities)
-          profit = solver.Solve()
+      .. code-block:: python
 
+              profits = [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
+              weights = [ [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ],
+                          [ 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
+                        ]
+              capacities = [ 34, 4 ]
+
+              solver = pywrapknapsack_solver.KnapsackSolver(
+                  pywrapknapsack_solver.KnapsackSolver
+                      .KNAPSACK_MULTIDIMENSION_BRANCH_AND_BOUND_SOLVER,
+                  'Multi-dimensional solver')
+              solver.Init(profits, weights, capacities)
+              profit = solver.Solve()
 
       **C++**:
-      .cpp}
-         const std::vector<int64_t> profits = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
-         const std::vector<std::vector<int64_t>> weights =
-             { { 1, 2, 3, 4, 5, 6, 7, 8, 9 },
-               { 1, 1, 1, 1, 1, 1, 1, 1, 1 } };
-         const std::vector<int64_t> capacities = { 34, 4 };
 
-         KnapsackSolver solver(
-             KnapsackSolver::KNAPSACK_MULTIDIMENSION_BRANCH_AND_BOUND_SOLVER,
-             "Multi-dimensional solver");
-         solver.Init(profits, weights, capacities);
-         const int64_t profit = solver.Solve();
+      .. code-block:: c++
 
+             const std::vector<int64_t> profits = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+             const std::vector<std::vector<int64_t>> weights =
+                 { { 1, 2, 3, 4, 5, 6, 7, 8, 9 },
+                   { 1, 1, 1, 1, 1, 1, 1, 1, 1 } };
+             const std::vector<int64_t> capacities = { 34, 4 };
+
+             KnapsackSolver solver(
+                 KnapsackSolver::KNAPSACK_MULTIDIMENSION_BRANCH_AND_BOUND_SOLVER,
+                 "Multi-dimensional solver");
+             solver.Init(profits, weights, capacities);
+             const int64_t profit = solver.Solve();
 
       **Java**:
-      .java}
-        final long[] profits = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
-        final long[][] weights = { { 1, 2, 3, 4, 5, 6, 7, 8, 9 },
-               { 1, 1, 1, 1, 1, 1, 1, 1, 1 } };
-        final long[] capacities = { 34, 4 };
 
-        KnapsackSolver solver = new KnapsackSolver(
-            KnapsackSolver.SolverType.KNAPSACK_MULTIDIMENSION_BRANCH_AND_BOUND_SOLVER,
-            "Multi-dimensional solver");
-        solver.init(profits, weights, capacities);
-        final long profit = solver.solve();
+      .. code-block:: java
 
+            final long[] profits = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+            final long[][] weights = { { 1, 2, 3, 4, 5, 6, 7, 8, 9 },
+                   { 1, 1, 1, 1, 1, 1, 1, 1, 1 } };
+            final long[] capacities = { 34, 4 };
+
+            KnapsackSolver solver = new KnapsackSolver(
+                KnapsackSolver.SolverType.KNAPSACK_MULTIDIMENSION_BRANCH_AND_BOUND_SOLVER,
+                "Multi-dimensional solver");
+            solver.init(profits, weights, capacities);
+            final long profit = solver.solve();
     """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
@@ -372,49 +375,52 @@ pywrapknapsack_solver    
     E.g.:
 
       **Python**:
-      .py}
-          profits = [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
-          weights = [ [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ],
-                      [ 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
-                    ]
-          capacities = [ 34, 4 ]
 
-          solver = pywrapknapsack_solver.KnapsackSolver(
-              pywrapknapsack_solver.KnapsackSolver
-                  .KNAPSACK_MULTIDIMENSION_BRANCH_AND_BOUND_SOLVER,
-              'Multi-dimensional solver')
-          solver.Init(profits, weights, capacities)
-          profit = solver.Solve()
+      .. code-block:: python
 
+              profits = [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
+              weights = [ [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ],
+                          [ 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
+                        ]
+              capacities = [ 34, 4 ]
+
+              solver = pywrapknapsack_solver.KnapsackSolver(
+                  pywrapknapsack_solver.KnapsackSolver
+                      .KNAPSACK_MULTIDIMENSION_BRANCH_AND_BOUND_SOLVER,
+                  'Multi-dimensional solver')
+              solver.Init(profits, weights, capacities)
+              profit = solver.Solve()
 
       **C++**:
-      .cpp}
-         const std::vector<int64_t> profits = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
-         const std::vector<std::vector<int64_t>> weights =
-             { { 1, 2, 3, 4, 5, 6, 7, 8, 9 },
-               { 1, 1, 1, 1, 1, 1, 1, 1, 1 } };
-         const std::vector<int64_t> capacities = { 34, 4 };
 
-         KnapsackSolver solver(
-             KnapsackSolver::KNAPSACK_MULTIDIMENSION_BRANCH_AND_BOUND_SOLVER,
-             "Multi-dimensional solver");
-         solver.Init(profits, weights, capacities);
-         const int64_t profit = solver.Solve();
+      .. code-block:: c++
 
+             const std::vector<int64_t> profits = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+             const std::vector<std::vector<int64_t>> weights =
+                 { { 1, 2, 3, 4, 5, 6, 7, 8, 9 },
+                   { 1, 1, 1, 1, 1, 1, 1, 1, 1 } };
+             const std::vector<int64_t> capacities = { 34, 4 };
+
+             KnapsackSolver solver(
+                 KnapsackSolver::KNAPSACK_MULTIDIMENSION_BRANCH_AND_BOUND_SOLVER,
+                 "Multi-dimensional solver");
+             solver.Init(profits, weights, capacities);
+             const int64_t profit = solver.Solve();
 
       **Java**:
-      .java}
-        final long[] profits = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
-        final long[][] weights = { { 1, 2, 3, 4, 5, 6, 7, 8, 9 },
-               { 1, 1, 1, 1, 1, 1, 1, 1, 1 } };
-        final long[] capacities = { 34, 4 };
 
-        KnapsackSolver solver = new KnapsackSolver(
-            KnapsackSolver.SolverType.KNAPSACK_MULTIDIMENSION_BRANCH_AND_BOUND_SOLVER,
-            "Multi-dimensional solver");
-        solver.init(profits, weights, capacities);
-        final long profit = solver.solve();
+      .. code-block:: java
 
+            final long[] profits = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+            final long[][] weights = { { 1, 2, 3, 4, 5, 6, 7, 8, 9 },
+                   { 1, 1, 1, 1, 1, 1, 1, 1, 1 } };
+            final long[] capacities = { 34, 4 };
+
+            KnapsackSolver solver = new KnapsackSolver(
+                KnapsackSolver.SolverType.KNAPSACK_MULTIDIMENSION_BRANCH_AND_BOUND_SOLVER,
+                "Multi-dimensional solver");
+            solver.init(profits, weights, capacities);
+            final long profit = solver.solve();
     """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
@@ -540,49 +546,55 @@ one just has to feed a profit vector with the 9 profits, a vector of 2
 vectors for weights, and a vector of capacities.
 E.g.:

-

Python: - .py} - profits = [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ] +

Python:

+ +

.. code-block:: python

+ +
      profits = [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
       weights = [ [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ],
                   [ 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
                 ]
-      capacities = [ 34, 4 ]

+ capacities = [ 34, 4 ] -
  solver = pywrapknapsack_solver.KnapsackSolver(
-      pywrapknapsack_solver.KnapsackSolver
-          .KNAPSACK_MULTIDIMENSION_BRANCH_AND_BOUND_SOLVER,
-      'Multi-dimensional solver')
-  solver.Init(profits, weights, capacities)
-  profit = solver.Solve()
+      solver = pywrapknapsack_solver.KnapsackSolver(
+          pywrapknapsack_solver.KnapsackSolver
+              .KNAPSACK_MULTIDIMENSION_BRANCH_AND_BOUND_SOLVER,
+          'Multi-dimensional solver')
+      solver.Init(profits, weights, capacities)
+      profit = solver.Solve()
 
-

C++: - .cpp} - const std::vector profits = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; - const std::vector> weights = +

C++:

+ +

.. code-block:: c++

+ +
     const std::vector<int64_t> profits = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+     const std::vector<std::vector<int64_t>> weights =
          { { 1, 2, 3, 4, 5, 6, 7, 8, 9 },
            { 1, 1, 1, 1, 1, 1, 1, 1, 1 } };
-     const std::vector capacities = { 34, 4 };

+ const std::vector<int64_t> capacities = { 34, 4 }; -
 KnapsackSolver solver(
-     KnapsackSolver::KNAPSACK_MULTIDIMENSION_BRANCH_AND_BOUND_SOLVER,
-     "Multi-dimensional solver");
- solver.Init(profits, weights, capacities);
- const int64_t profit = solver.Solve();
+     KnapsackSolver solver(
+         KnapsackSolver::KNAPSACK_MULTIDIMENSION_BRANCH_AND_BOUND_SOLVER,
+         "Multi-dimensional solver");
+     solver.Init(profits, weights, capacities);
+     const int64_t profit = solver.Solve();
 
-

Java: - .java} - final long[] profits = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; +

Java:

+ +

.. code-block:: java

+ +
    final long[] profits = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
     final long[][] weights = { { 1, 2, 3, 4, 5, 6, 7, 8, 9 },
            { 1, 1, 1, 1, 1, 1, 1, 1, 1 } };
-    final long[] capacities = { 34, 4 };

+ final long[] capacities = { 34, 4 }; -
KnapsackSolver solver = new KnapsackSolver(
-    KnapsackSolver.SolverType.KNAPSACK_MULTIDIMENSION_BRANCH_AND_BOUND_SOLVER,
-    "Multi-dimensional solver");
-solver.init(profits, weights, capacities);
-final long profit = solver.solve();
+    KnapsackSolver solver = new KnapsackSolver(
+        KnapsackSolver.SolverType.KNAPSACK_MULTIDIMENSION_BRANCH_AND_BOUND_SOLVER,
+        "Multi-dimensional solver");
+    solver.init(profits, weights, capacities);
+    final long profit = solver.solve();
 
diff --git a/docs/python/ortools/constraint_solver/pywrapcp.html b/docs/python/ortools/constraint_solver/pywrapcp.html index 9525a74ab0..805276244a 100644 --- a/docs/python/ortools/constraint_solver/pywrapcp.html +++ b/docs/python/ortools/constraint_solver/pywrapcp.html @@ -3450,7 +3450,7 @@ pywrapcp
View Source
# This file was automatically generated by SWIG (http://www.swig.org).
-# Version 4.0.1
+# Version 4.0.2
 #
 # Do not make changes to this file unless you know what you are doing--modify
 # the SWIG interface file instead.
@@ -3515,7 +3515,11 @@ pywrapcp    
 import weakref
 
 class DefaultPhaseParameters(object):
-    r""" This struct holds all parameters for the default search. DefaultPhaseParameters is only used by Solver::MakeDefaultPhase methods. Note this is for advanced users only."""
+    r"""
+    This struct holds all parameters for the default search.
+    DefaultPhaseParameters is only used by Solver::MakeDefaultPhase methods.
+    Note this is for advanced users only.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
@@ -3527,15 +3531,35 @@ pywrapcp    
     NONE = _pywrapcp.DefaultPhaseParameters_NONE
     NORMAL = _pywrapcp.DefaultPhaseParameters_NORMAL
     VERBOSE = _pywrapcp.DefaultPhaseParameters_VERBOSE
-    var_selection_schema = property(_pywrapcp.DefaultPhaseParameters_var_selection_schema_get, _pywrapcp.DefaultPhaseParameters_var_selection_schema_set, doc=r""" This parameter describes how the next variable to instantiate will be chosen.""")
+    var_selection_schema = property(_pywrapcp.DefaultPhaseParameters_var_selection_schema_get, _pywrapcp.DefaultPhaseParameters_var_selection_schema_set, doc=r"""
+    This parameter describes how the next variable to instantiate
+    will be chosen.
+    """)
     value_selection_schema = property(_pywrapcp.DefaultPhaseParameters_value_selection_schema_get, _pywrapcp.DefaultPhaseParameters_value_selection_schema_set, doc=r""" This parameter describes which value to select for a given var.""")
-    initialization_splits = property(_pywrapcp.DefaultPhaseParameters_initialization_splits_get, _pywrapcp.DefaultPhaseParameters_initialization_splits_set, doc=r""" Maximum number of intervals that the initialization of impacts will scan per variable.""")
-    run_all_heuristics = property(_pywrapcp.DefaultPhaseParameters_run_all_heuristics_get, _pywrapcp.DefaultPhaseParameters_run_all_heuristics_set, doc=r""" The default phase will run heuristics periodically. This parameter indicates if we should run all heuristics, or a randomly selected one.""")
-    heuristic_period = property(_pywrapcp.DefaultPhaseParameters_heuristic_period_get, _pywrapcp.DefaultPhaseParameters_heuristic_period_set, doc=r""" The distance in nodes between each run of the heuristics. A negative or null value will mean that we will not run heuristics at all.""")
+    initialization_splits = property(_pywrapcp.DefaultPhaseParameters_initialization_splits_get, _pywrapcp.DefaultPhaseParameters_initialization_splits_set, doc=r"""
+    Maximum number of intervals that the initialization of impacts will scan
+    per variable.
+    """)
+    run_all_heuristics = property(_pywrapcp.DefaultPhaseParameters_run_all_heuristics_get, _pywrapcp.DefaultPhaseParameters_run_all_heuristics_set, doc=r"""
+    The default phase will run heuristics periodically. This parameter
+    indicates if we should run all heuristics, or a randomly selected
+    one.
+    """)
+    heuristic_period = property(_pywrapcp.DefaultPhaseParameters_heuristic_period_get, _pywrapcp.DefaultPhaseParameters_heuristic_period_set, doc=r"""
+    The distance in nodes between each run of the heuristics. A
+    negative or null value will mean that we will not run heuristics
+    at all.
+    """)
     heuristic_num_failures_limit = property(_pywrapcp.DefaultPhaseParameters_heuristic_num_failures_limit_get, _pywrapcp.DefaultPhaseParameters_heuristic_num_failures_limit_set, doc=r""" The failure limit for each heuristic that we run.""")
-    persistent_impact = property(_pywrapcp.DefaultPhaseParameters_persistent_impact_get, _pywrapcp.DefaultPhaseParameters_persistent_impact_set, doc=r""" Whether to keep the impact from the first search for other searches, or to recompute the impact for each new search.""")
+    persistent_impact = property(_pywrapcp.DefaultPhaseParameters_persistent_impact_get, _pywrapcp.DefaultPhaseParameters_persistent_impact_set, doc=r"""
+    Whether to keep the impact from the first search for other searches,
+    or to recompute the impact for each new search.
+    """)
     random_seed = property(_pywrapcp.DefaultPhaseParameters_random_seed_get, _pywrapcp.DefaultPhaseParameters_random_seed_set, doc=r""" Seed used to initialize the random part in some heuristics.""")
-    display_level = property(_pywrapcp.DefaultPhaseParameters_display_level_get, _pywrapcp.DefaultPhaseParameters_display_level_set, doc=r""" This represents the amount of information displayed by the default search. NONE means no display, VERBOSE means extra information.""")
+    display_level = property(_pywrapcp.DefaultPhaseParameters_display_level_get, _pywrapcp.DefaultPhaseParameters_display_level_set, doc=r"""
+    This represents the amount of information displayed by the default search.
+    NONE means no display, VERBOSE means extra information.
+    """)
     decision_builder = property(_pywrapcp.DefaultPhaseParameters_decision_builder_get, _pywrapcp.DefaultPhaseParameters_decision_builder_set, doc=r""" When defined, this overrides the default impact based decision builder.""")
 
     def __init__(self):
@@ -3546,7 +3570,25 @@ pywrapcp    
 _pywrapcp.DefaultPhaseParameters_swigregister(DefaultPhaseParameters)
 
 class Solver(object):
-    r""" Solver Class A solver represents the main computation engine. It implements the entire range of Constraint Programming protocols:   - Reversibility   - Propagation   - Search Usually, Constraint Programming code consists of   - the creation of the Solver,   - the creation of the decision variables of the model,   - the creation of the constraints of the model and their addition to the     solver() through the AddConstraint() method,   - the creation of the main DecisionBuilder class,   - the launch of the solve() method with the decision builder. For the time being, Solver is neither MT_SAFE nor MT_HOT."""
+    r"""
+    Solver Class
+
+    A solver represents the main computation engine. It implements the entire
+    range of Constraint Programming protocols:
+      - Reversibility
+      - Propagation
+      - Search
+
+    Usually, Constraint Programming code consists of
+      - the creation of the Solver,
+      - the creation of the decision variables of the model,
+      - the creation of the constraints of the model and their addition to the
+        solver() through the AddConstraint() method,
+      - the creation of the main DecisionBuilder class,
+      - the launch of the solve() method with the decision builder.
+
+    For the time being, Solver is neither MT_SAFE nor MT_HOT.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
@@ -3555,29 +3597,85 @@ pywrapcp    
     INT_VAR_SIMPLE = _pywrapcp.Solver_INT_VAR_SIMPLE
     r""" The simple selection is CHOOSE_FIRST_UNBOUND."""
     CHOOSE_FIRST_UNBOUND = _pywrapcp.Solver_CHOOSE_FIRST_UNBOUND
-    r""" Select the first unbound variable. Variables are considered in the order of the vector of IntVars used to create the selector."""
+    r"""
+    Select the first unbound variable.
+    Variables are considered in the order of the vector of IntVars used
+    to create the selector.
+    """
     CHOOSE_RANDOM = _pywrapcp.Solver_CHOOSE_RANDOM
     r""" Randomly select one of the remaining unbound variables."""
     CHOOSE_MIN_SIZE_LOWEST_MIN = _pywrapcp.Solver_CHOOSE_MIN_SIZE_LOWEST_MIN
-    r""" Among unbound variables, select the variable with the smallest size, i.e., the smallest number of possible values. In case of a tie, the selected variables is the one with the lowest min value. In case of a tie, the first one is selected, first being defined by the order in the vector of IntVars used to create the selector."""
+    r"""
+    Among unbound variables, select the variable with the smallest size,
+    i.e., the smallest number of possible values.
+    In case of a tie, the selected variables is the one with the lowest min
+    value.
+    In case of a tie, the first one is selected, first being defined by the
+    order in the vector of IntVars used to create the selector.
+    """
     CHOOSE_MIN_SIZE_HIGHEST_MIN = _pywrapcp.Solver_CHOOSE_MIN_SIZE_HIGHEST_MIN
-    r""" Among unbound variables, select the variable with the smallest size, i.e., the smallest number of possible values. In case of a tie, the selected variable is the one with the highest min value. In case of a tie, the first one is selected, first being defined by the order in the vector of IntVars used to create the selector."""
+    r"""
+    Among unbound variables, select the variable with the smallest size,
+    i.e., the smallest number of possible values.
+    In case of a tie, the selected variable is the one with the highest min
+    value.
+    In case of a tie, the first one is selected, first being defined by the
+    order in the vector of IntVars used to create the selector.
+    """
     CHOOSE_MIN_SIZE_LOWEST_MAX = _pywrapcp.Solver_CHOOSE_MIN_SIZE_LOWEST_MAX
-    r""" Among unbound variables, select the variable with the smallest size, i.e., the smallest number of possible values. In case of a tie, the selected variables is the one with the lowest max value. In case of a tie, the first one is selected, first being defined by the order in the vector of IntVars used to create the selector."""
+    r"""
+    Among unbound variables, select the variable with the smallest size,
+    i.e., the smallest number of possible values.
+    In case of a tie, the selected variables is the one with the lowest max
+    value.
+    In case of a tie, the first one is selected, first being defined by the
+    order in the vector of IntVars used to create the selector.
+    """
     CHOOSE_MIN_SIZE_HIGHEST_MAX = _pywrapcp.Solver_CHOOSE_MIN_SIZE_HIGHEST_MAX
-    r""" Among unbound variables, select the variable with the smallest size, i.e., the smallest number of possible values. In case of a tie, the selected variable is the one with the highest max value. In case of a tie, the first one is selected, first being defined by the order in the vector of IntVars used to create the selector."""
+    r"""
+    Among unbound variables, select the variable with the smallest size,
+    i.e., the smallest number of possible values.
+    In case of a tie, the selected variable is the one with the highest max
+    value.
+    In case of a tie, the first one is selected, first being defined by the
+    order in the vector of IntVars used to create the selector.
+    """
     CHOOSE_LOWEST_MIN = _pywrapcp.Solver_CHOOSE_LOWEST_MIN
-    r""" Among unbound variables, select the variable with the smallest minimal value. In case of a tie, the first one is selected, "first" defined by the order in the vector of IntVars used to create the selector."""
+    r"""
+    Among unbound variables, select the variable with the smallest minimal
+    value.
+    In case of a tie, the first one is selected, "first" defined by the
+    order in the vector of IntVars used to create the selector.
+    """
     CHOOSE_HIGHEST_MAX = _pywrapcp.Solver_CHOOSE_HIGHEST_MAX
-    r""" Among unbound variables, select the variable with the highest maximal value. In case of a tie, the first one is selected, first being defined by the order in the vector of IntVars used to create the selector."""
+    r"""
+    Among unbound variables, select the variable with the highest maximal
+    value.
+    In case of a tie, the first one is selected, first being defined by the
+    order in the vector of IntVars used to create the selector.
+    """
     CHOOSE_MIN_SIZE = _pywrapcp.Solver_CHOOSE_MIN_SIZE
-    r""" Among unbound variables, select the variable with the smallest size. In case of a tie, the first one is selected, first being defined by the order in the vector of IntVars used to create the selector."""
+    r"""
+    Among unbound variables, select the variable with the smallest size.
+    In case of a tie, the first one is selected, first being defined by the
+    order in the vector of IntVars used to create the selector.
+    """
     CHOOSE_MAX_SIZE = _pywrapcp.Solver_CHOOSE_MAX_SIZE
-    r""" Among unbound variables, select the variable with the highest size. In case of a tie, the first one is selected, first being defined by the order in the vector of IntVars used to create the selector."""
+    r"""
+    Among unbound variables, select the variable with the highest size.
+    In case of a tie, the first one is selected, first being defined by the
+    order in the vector of IntVars used to create the selector.
+    """
     CHOOSE_MAX_REGRET_ON_MIN = _pywrapcp.Solver_CHOOSE_MAX_REGRET_ON_MIN
-    r""" Among unbound variables, select the variable with the largest gap between the first and the second values of the domain."""
+    r"""
+    Among unbound variables, select the variable with the largest
+    gap between the first and the second values of the domain.
+    """
     CHOOSE_PATH = _pywrapcp.Solver_CHOOSE_PATH
-    r""" Selects the next unbound variable on a path, the path being defined by the variables: var[i] corresponds to the index of the next of i."""
+    r"""
+    Selects the next unbound variable on a path, the path being defined by
+    the variables: var[i] corresponds to the index of the next of i.
+    """
     INT_VALUE_DEFAULT = _pywrapcp.Solver_INT_VALUE_DEFAULT
     r""" The default behavior is ASSIGN_MIN_VALUE."""
     INT_VALUE_SIMPLE = _pywrapcp.Solver_INT_VALUE_SIMPLE
@@ -3589,11 +3687,21 @@ pywrapcp    
     ASSIGN_RANDOM_VALUE = _pywrapcp.Solver_ASSIGN_RANDOM_VALUE
     r""" Selects randomly one of the possible values of the selected variable."""
     ASSIGN_CENTER_VALUE = _pywrapcp.Solver_ASSIGN_CENTER_VALUE
-    r""" Selects the first possible value which is the closest to the center of the domain of the selected variable. The center is defined as (min + max) / 2."""
+    r"""
+    Selects the first possible value which is the closest to the center
+    of the domain of the selected variable.
+    The center is defined as (min + max) / 2.
+    """
     SPLIT_LOWER_HALF = _pywrapcp.Solver_SPLIT_LOWER_HALF
-    r""" Split the domain in two around the center, and choose the lower part first."""
+    r"""
+    Split the domain in two around the center, and choose the lower
+    part first.
+    """
     SPLIT_UPPER_HALF = _pywrapcp.Solver_SPLIT_UPPER_HALF
-    r""" Split the domain in two around the center, and choose the lower part first."""
+    r"""
+    Split the domain in two around the center, and choose the lower
+    part first.
+    """
     SEQUENCE_DEFAULT = _pywrapcp.Solver_SEQUENCE_DEFAULT
     SEQUENCE_SIMPLE = _pywrapcp.Solver_SEQUENCE_SIMPLE
     CHOOSE_MIN_SLACK_RANK_FORWARD = _pywrapcp.Solver_CHOOSE_MIN_SLACK_RANK_FORWARD
@@ -3603,49 +3711,177 @@ pywrapcp    
     INTERVAL_SIMPLE = _pywrapcp.Solver_INTERVAL_SIMPLE
     r""" The simple is INTERVAL_SET_TIMES_FORWARD."""
     INTERVAL_SET_TIMES_FORWARD = _pywrapcp.Solver_INTERVAL_SET_TIMES_FORWARD
-    r""" Selects the variable with the lowest starting time of all variables, and fixes its starting time to this lowest value."""
+    r"""
+    Selects the variable with the lowest starting time of all variables,
+    and fixes its starting time to this lowest value.
+    """
     INTERVAL_SET_TIMES_BACKWARD = _pywrapcp.Solver_INTERVAL_SET_TIMES_BACKWARD
-    r""" Selects the variable with the highest ending time of all variables, and fixes the ending time to this highest values."""
+    r"""
+    Selects the variable with the highest ending time of all variables,
+    and fixes the ending time to this highest values.
+    """
     TWOOPT = _pywrapcp.Solver_TWOOPT
-    r""" Operator which reverses a sub-chain of a path. It is called TwoOpt because it breaks two arcs on the path; resulting paths are called two-optimal. Possible neighbors for the path 1 -> 2 -> 3 -> 4 -> 5 (where (1, 5) are first and last nodes of the path and can therefore not be moved):   1 -> [3 -> 2] -> 4  -> 5   1 -> [4 -> 3  -> 2] -> 5   1 ->  2 -> [4 -> 3] -> 5"""
+    r"""
+    Operator which reverses a sub-chain of a path. It is called TwoOpt
+    because it breaks two arcs on the path; resulting paths are called
+    two-optimal.
+    Possible neighbors for the path 1 -> 2 -> 3 -> 4 -> 5
+    (where (1, 5) are first and last nodes of the path and can therefore not
+    be moved):
+      1 -> [3 -> 2] -> 4  -> 5
+      1 -> [4 -> 3  -> 2] -> 5
+      1 ->  2 -> [4 -> 3] -> 5
+    """
     OROPT = _pywrapcp.Solver_OROPT
-    r""" Relocate: OROPT and RELOCATE. Operator which moves a sub-chain of a path to another position; the specified chain length is the fixed length of the chains being moved. When this length is 1, the operator simply moves a node to another position. Possible neighbors for the path 1 -> 2 -> 3 -> 4 -> 5, for a chain length of 2 (where (1, 5) are first and last nodes of the path and can therefore not be moved):   1 ->  4 -> [2 -> 3] -> 5   1 -> [3 -> 4] -> 2  -> 5 Using Relocate with chain lengths of 1, 2 and 3 together is equivalent to the OrOpt operator on a path. The OrOpt operator is a limited  version of 3Opt (breaks 3 arcs on a path)."""
+    r"""
+    Relocate: OROPT and RELOCATE.
+    Operator which moves a sub-chain of a path to another position; the
+    specified chain length is the fixed length of the chains being moved.
+    When this length is 1, the operator simply moves a node to another
+    position.
+    Possible neighbors for the path 1 -> 2 -> 3 -> 4 -> 5, for a chain
+    length of 2 (where (1, 5) are first and last nodes of the path and can
+    therefore not be moved):
+      1 ->  4 -> [2 -> 3] -> 5
+      1 -> [3 -> 4] -> 2  -> 5
+
+    Using Relocate with chain lengths of 1, 2 and 3 together is equivalent
+    to the OrOpt operator on a path. The OrOpt operator is a limited
+     version of 3Opt (breaks 3 arcs on a path).
+    """
     RELOCATE = _pywrapcp.Solver_RELOCATE
     r""" Relocate neighborhood with length of 1 (see OROPT comment)."""
     EXCHANGE = _pywrapcp.Solver_EXCHANGE
-    r""" Operator which exchanges the positions of two nodes. Possible neighbors for the path 1 -> 2 -> 3 -> 4 -> 5 (where (1, 5) are first and last nodes of the path and can therefore not be moved):   1 -> [3] -> [2] ->  4  -> 5   1 -> [4] ->  3  -> [2] -> 5   1 ->  2  -> [4] -> [3] -> 5"""
+    r"""
+    Operator which exchanges the positions of two nodes.
+    Possible neighbors for the path 1 -> 2 -> 3 -> 4 -> 5
+    (where (1, 5) are first and last nodes of the path and can therefore not
+    be moved):
+      1 -> [3] -> [2] ->  4  -> 5
+      1 -> [4] ->  3  -> [2] -> 5
+      1 ->  2  -> [4] -> [3] -> 5
+    """
     CROSS = _pywrapcp.Solver_CROSS
-    r""" Operator which cross exchanges the starting chains of 2 paths, including exchanging the whole paths. First and last nodes are not moved. Possible neighbors for the paths 1 -> 2 -> 3 -> 4 -> 5 and 6 -> 7 -> 8 (where (1, 5) and (6, 8) are first and last nodes of the paths and can therefore not be moved):   1 -> [7] -> 3 -> 4 -> 5  6 -> [2] -> 8   1 -> [7] -> 4 -> 5       6 -> [2 -> 3] -> 8   1 -> [7] -> 5            6 -> [2 -> 3 -> 4] -> 8"""
+    r"""
+    Operator which cross exchanges the starting chains of 2 paths, including
+    exchanging the whole paths.
+    First and last nodes are not moved.
+    Possible neighbors for the paths 1 -> 2 -> 3 -> 4 -> 5 and 6 -> 7 -> 8
+    (where (1, 5) and (6, 8) are first and last nodes of the paths and can
+    therefore not be moved):
+      1 -> [7] -> 3 -> 4 -> 5  6 -> [2] -> 8
+      1 -> [7] -> 4 -> 5       6 -> [2 -> 3] -> 8
+      1 -> [7] -> 5            6 -> [2 -> 3 -> 4] -> 8
+    """
     MAKEACTIVE = _pywrapcp.Solver_MAKEACTIVE
-    r""" Operator which inserts an inactive node into a path. Possible neighbors for the path 1 -> 2 -> 3 -> 4 with 5 inactive (where 1 and 4 are first and last nodes of the path) are:   1 -> [5] ->  2  ->  3  -> 4   1 ->  2  -> [5] ->  3  -> 4   1 ->  2  ->  3  -> [5] -> 4"""
+    r"""
+    Operator which inserts an inactive node into a path.
+    Possible neighbors for the path 1 -> 2 -> 3 -> 4 with 5 inactive
+    (where 1 and 4 are first and last nodes of the path) are:
+      1 -> [5] ->  2  ->  3  -> 4
+      1 ->  2  -> [5] ->  3  -> 4
+      1 ->  2  ->  3  -> [5] -> 4
+    """
     MAKEINACTIVE = _pywrapcp.Solver_MAKEINACTIVE
-    r""" Operator which makes path nodes inactive. Possible neighbors for the path 1 -> 2 -> 3 -> 4 (where 1 and 4 are first and last nodes of the path) are:   1 -> 3 -> 4 with 2 inactive   1 -> 2 -> 4 with 3 inactive"""
+    r"""
+    Operator which makes path nodes inactive.
+    Possible neighbors for the path 1 -> 2 -> 3 -> 4 (where 1 and 4 are
+    first and last nodes of the path) are:
+      1 -> 3 -> 4 with 2 inactive
+      1 -> 2 -> 4 with 3 inactive
+    """
     MAKECHAININACTIVE = _pywrapcp.Solver_MAKECHAININACTIVE
-    r""" Operator which makes a "chain" of path nodes inactive. Possible neighbors for the path 1 -> 2 -> 3 -> 4 (where 1 and 4 are first and last nodes of the path) are:   1 -> 3 -> 4 with 2 inactive   1 -> 2 -> 4 with 3 inactive   1 -> 4 with 2 and 3 inactive"""
+    r"""
+    Operator which makes a "chain" of path nodes inactive.
+    Possible neighbors for the path 1 -> 2 -> 3 -> 4 (where 1 and 4 are
+    first and last nodes of the path) are:
+      1 -> 3 -> 4 with 2 inactive
+      1 -> 2 -> 4 with 3 inactive
+      1 -> 4 with 2 and 3 inactive
+    """
     SWAPACTIVE = _pywrapcp.Solver_SWAPACTIVE
-    r""" Operator which replaces an active node by an inactive one. Possible neighbors for the path 1 -> 2 -> 3 -> 4 with 5 inactive (where 1 and 4 are first and last nodes of the path) are:   1 -> [5] ->  3  -> 4 with 2 inactive   1 ->  2  -> [5] -> 4 with 3 inactive"""
+    r"""
+    Operator which replaces an active node by an inactive one.
+    Possible neighbors for the path 1 -> 2 -> 3 -> 4 with 5 inactive
+    (where 1 and 4 are first and last nodes of the path) are:
+      1 -> [5] ->  3  -> 4 with 2 inactive
+      1 ->  2  -> [5] -> 4 with 3 inactive
+    """
     EXTENDEDSWAPACTIVE = _pywrapcp.Solver_EXTENDEDSWAPACTIVE
-    r""" Operator which makes an inactive node active and an active one inactive. It is similar to SwapActiveOperator except that it tries to insert the inactive node in all possible positions instead of just the position of the node made inactive. Possible neighbors for the path 1 -> 2 -> 3 -> 4 with 5 inactive (where 1 and 4 are first and last nodes of the path) are:   1 -> [5] ->  3  -> 4 with 2 inactive   1 ->  3  -> [5] -> 4 with 2 inactive   1 -> [5] ->  2  -> 4 with 3 inactive   1 ->  2  -> [5] -> 4 with 3 inactive"""
+    r"""
+    Operator which makes an inactive node active and an active one inactive.
+    It is similar to SwapActiveOperator except that it tries to insert the
+    inactive node in all possible positions instead of just the position of
+    the node made inactive.
+    Possible neighbors for the path 1 -> 2 -> 3 -> 4 with 5 inactive
+    (where 1 and 4 are first and last nodes of the path) are:
+      1 -> [5] ->  3  -> 4 with 2 inactive
+      1 ->  3  -> [5] -> 4 with 2 inactive
+      1 -> [5] ->  2  -> 4 with 3 inactive
+      1 ->  2  -> [5] -> 4 with 3 inactive
+    """
     PATHLNS = _pywrapcp.Solver_PATHLNS
-    r""" Operator which relaxes two sub-chains of three consecutive arcs each. Each sub-chain is defined by a start node and the next three arcs. Those six arcs are relaxed to build a new neighbor. PATHLNS explores all possible pairs of starting nodes and so defines n^2 neighbors, n being the number of nodes. Note that the two sub-chains can be part of the same path; they even may overlap."""
+    r"""
+    Operator which relaxes two sub-chains of three consecutive arcs each.
+    Each sub-chain is defined by a start node and the next three arcs. Those
+    six arcs are relaxed to build a new neighbor.
+    PATHLNS explores all possible pairs of starting nodes and so defines
+    n^2 neighbors, n being the number of nodes.
+    Note that the two sub-chains can be part of the same path; they even may
+    overlap.
+    """
     FULLPATHLNS = _pywrapcp.Solver_FULLPATHLNS
-    r""" Operator which relaxes one entire path and all inactive nodes, thus defining num_paths neighbors."""
+    r"""
+    Operator which relaxes one entire path and all inactive nodes, thus
+    defining num_paths neighbors.
+    """
     UNACTIVELNS = _pywrapcp.Solver_UNACTIVELNS
-    r""" Operator which relaxes all inactive nodes and one sub-chain of six consecutive arcs. That way the path can be improved by inserting inactive nodes or swapping arcs."""
+    r"""
+    Operator which relaxes all inactive nodes and one sub-chain of six
+    consecutive arcs. That way the path can be improved by inserting
+    inactive nodes or swapping arcs.
+    """
     INCREMENT = _pywrapcp.Solver_INCREMENT
-    r""" Operator which defines one neighbor per variable. Each neighbor tries to increment by one the value of the corresponding variable. When a new solution is found the neighborhood is rebuilt from scratch, i.e., tries to increment values in the variable order. Consider for instance variables x and y. x is incremented one by one to its max, and when it is not possible to increment x anymore, y is incremented once. If this is a solution, then next neighbor tries to increment x."""
+    r"""
+    Operator which defines one neighbor per variable. Each neighbor tries to
+    increment by one the value of the corresponding variable. When a new
+    solution is found the neighborhood is rebuilt from scratch, i.e., tries
+    to increment values in the variable order.
+    Consider for instance variables x and y. x is incremented one by one to
+    its max, and when it is not possible to increment x anymore, y is
+    incremented once. If this is a solution, then next neighbor tries to
+    increment x.
+    """
     DECREMENT = _pywrapcp.Solver_DECREMENT
-    r""" Operator which defines a neighborhood to decrement values. The behavior is the same as INCREMENT, except values are decremented instead of incremented."""
+    r"""
+    Operator which defines a neighborhood to decrement values.
+    The behavior is the same as INCREMENT, except values are decremented
+    instead of incremented.
+    """
     SIMPLELNS = _pywrapcp.Solver_SIMPLELNS
-    r""" Operator which defines one neighbor per variable. Each neighbor relaxes one variable. When a new solution is found the neighborhood is rebuilt from scratch. Consider for instance variables x and y. First x is relaxed and the solver is looking for the best possible solution (with only x relaxed). Then y is relaxed, and the solver is looking for a new solution. If a new solution is found, then the next variable to be relaxed is x."""
+    r"""
+    Operator which defines one neighbor per variable. Each neighbor relaxes
+    one variable.
+    When a new solution is found the neighborhood is rebuilt from scratch.
+    Consider for instance variables x and y. First x is relaxed and the
+    solver is looking for the best possible solution (with only x relaxed).
+    Then y is relaxed, and the solver is looking for a new solution.
+    If a new solution is found, then the next variable to be relaxed is x.
+    """
     GE = _pywrapcp.Solver_GE
     r""" Move is accepted when the current objective value >= objective.Min."""
     LE = _pywrapcp.Solver_LE
     r""" Move is accepted when the current objective value <= objective.Max."""
     EQ = _pywrapcp.Solver_EQ
-    r""" Move is accepted when the current objective value is in the interval objective.Min .. objective.Max."""
+    r"""
+    Move is accepted when the current objective value is in the interval
+    objective.Min .. objective.Max.
+    """
     DELAYED_PRIORITY = _pywrapcp.Solver_DELAYED_PRIORITY
-    r""" DELAYED_PRIORITY is the lowest priority: Demons will be processed after VAR_PRIORITY and NORMAL_PRIORITY demons."""
+    r"""
+    DELAYED_PRIORITY is the lowest priority: Demons will be processed after
+    VAR_PRIORITY and NORMAL_PRIORITY demons.
+    """
     VAR_PRIORITY = _pywrapcp.Solver_VAR_PRIORITY
     r""" VAR_PRIORITY is between DELAYED_PRIORITY and NORMAL_PRIORITY."""
     NORMAL_PRIORITY = _pywrapcp.Solver_NORMAL_PRIORITY
@@ -3670,7 +3906,41 @@ pywrapcp    
         return _pywrapcp.Solver_DefaultSolverParameters()
 
     def AddConstraint(self, c: "Constraint") -> "void":
-        r""" Adds the constraint 'c' to the model. After calling this method, and until there is a backtrack that undoes the addition, any assignment of variables to values must satisfy the given constraint in order to be considered feasible. There are two fairly different use cases: - the most common use case is modeling: the given constraint is really part of the problem that the user is trying to solve. In this use case, AddConstraint is called outside of search (i.e., with state() == OUTSIDE_SEARCH). Most users should only use AddConstraint in this way. In this case, the constraint will belong to the model forever: it cannot not be removed by backtracking. - a rarer use case is that 'c' is not a real constraint of the model. It may be a constraint generated by a branching decision (a constraint whose goal is to restrict the search space), a symmetry breaking constraint (a constraint that does restrict the search space, but in a way that cannot have an impact on the quality of the solutions in the subtree), or an inferred constraint that, while having no semantic value to the model (it does not restrict the set of solutions), is worth having because we believe it may strengthen the propagation. In these cases, it happens that the constraint is added during the search (i.e., with state() == IN_SEARCH or state() == IN_ROOT_NODE). When a constraint is added during a search, it applies only to the subtree of the search tree rooted at the current node, and will be automatically removed by backtracking. This method does not take ownership of the constraint. If the constraint has been created by any factory method (Solver::MakeXXX), it will automatically be deleted. However, power users who implement their own constraints should do: solver.AddConstraint(solver.RevAlloc(new MyConstraint(...));"""
+        r"""
+        Adds the constraint 'c' to the model.
+
+        After calling this method, and until there is a backtrack that undoes the
+        addition, any assignment of variables to values must satisfy the given
+        constraint in order to be considered feasible. There are two fairly
+        different use cases:
+
+        - the most common use case is modeling: the given constraint is really
+        part of the problem that the user is trying to solve. In this use case,
+        AddConstraint is called outside of search (i.e., with state() ==
+        OUTSIDE_SEARCH). Most users should only use AddConstraint in this
+        way. In this case, the constraint will belong to the model forever: it
+        cannot not be removed by backtracking.
+
+        - a rarer use case is that 'c' is not a real constraint of the model. It
+        may be a constraint generated by a branching decision (a constraint whose
+        goal is to restrict the search space), a symmetry breaking constraint (a
+        constraint that does restrict the search space, but in a way that cannot
+        have an impact on the quality of the solutions in the subtree), or an
+        inferred constraint that, while having no semantic value to the model (it
+        does not restrict the set of solutions), is worth having because we
+        believe it may strengthen the propagation. In these cases, it happens
+        that the constraint is added during the search (i.e., with state() ==
+        IN_SEARCH or state() == IN_ROOT_NODE). When a constraint is
+        added during a search, it applies only to the subtree of the search tree
+        rooted at the current node, and will be automatically removed by
+        backtracking.
+
+        This method does not take ownership of the constraint. If the constraint
+        has been created by any factory method (Solver::MakeXXX), it will
+        automatically be deleted. However, power users who implement their own
+        constraints should do: solver.AddConstraint(solver.RevAlloc(new
+        MyConstraint(...));
+        """
         return _pywrapcp.Solver_AddConstraint(self, c)
 
     def Solve(self, *args) -> "bool":
@@ -3696,7 +3966,11 @@ pywrapcp    
         return _pywrapcp.Solver_CheckAssignment(self, solution)
 
     def CheckConstraint(self, ct: "Constraint") -> "bool":
-        r""" Checks whether adding this constraint will lead to an immediate failure. It will return false if the model is already inconsistent, or if adding the constraint makes it inconsistent."""
+        r"""
+        Checks whether adding this constraint will lead to an immediate
+        failure. It will return false if the model is already inconsistent, or if
+        adding the constraint makes it inconsistent.
+        """
         return _pywrapcp.Solver_CheckConstraint(self, ct)
 
     def Fail(self) -> "void":
@@ -3709,7 +3983,10 @@ pywrapcp    
         return _pywrapcp.Solver_MemoryUsage()
 
     def WallTime(self) -> "int64_t":
-        r""" DEPRECATED: Use Now() instead. Time elapsed, in ms since the creation of the solver."""
+        r"""
+        DEPRECATED: Use Now() instead.
+        Time elapsed, in ms since the creation of the solver.
+        """
         return _pywrapcp.Solver_WallTime(self)
 
     def Branches(self) -> "int64_t":
@@ -3729,7 +4006,10 @@ pywrapcp    
         return _pywrapcp.Solver_AcceptedNeighbors(self)
 
     def Stamp(self) -> "uint64_t":
-        r""" The stamp indicates how many moves in the search tree we have performed. It is useful to detect if we need to update same lazy structures."""
+        r"""
+        The stamp indicates how many moves in the search tree we have performed.
+        It is useful to detect if we need to update same lazy structures.
+        """
         return _pywrapcp.Solver_Stamp(self)
 
     def FailStamp(self) -> "uint64_t":
@@ -3809,7 +4089,14 @@ pywrapcp    
         return _pywrapcp.Solver_ScalProd(self, *args)
 
     def MonotonicElement(self, values: "operations_research::Solver::IndexEvaluator1", increasing: "bool", index: "IntVar") -> "operations_research::IntExpr *":
-        r""" Function based element. The constraint takes ownership of the callback.  The callback must be monotonic. It must be able to cope with any possible value in the domain of 'index' (potentially negative ones too). Furtermore, monotonicity is not checked. Thus giving a non-monotonic function, or specifying an incorrect increasing parameter will result in undefined behavior."""
+        r"""
+        Function based element. The constraint takes ownership of the
+        callback.  The callback must be monotonic. It must be able to
+        cope with any possible value in the domain of 'index'
+        (potentially negative ones too). Furtermore, monotonicity is not
+        checked. Thus giving a non-monotonic function, or specifying an
+        incorrect increasing parameter will result in undefined behavior.
+        """
         return _pywrapcp.Solver_MonotonicElement(self, values, increasing, index)
 
     def Element(self, *args) -> "operations_research::IntExpr *":
@@ -3825,7 +4112,9 @@ pywrapcp    
         |
 
         *Overload 3:*
-        Function-based element. The constraint takes ownership of the callback. The callback must be able to cope with any possible value in the domain of 'index' (potentially negative ones too).
+        Function-based element. The constraint takes ownership of the
+        callback. The callback must be able to cope with any possible
+        value in the domain of 'index' (potentially negative ones too).
 
         |
 
@@ -3840,7 +4129,10 @@ pywrapcp    
         return _pywrapcp.Solver_Element(self, *args)
 
     def IndexExpression(self, vars: "std::vector< operations_research::IntVar * > const &", value: "int64_t") -> "operations_research::IntExpr *":
-        r""" Returns the expression expr such that vars[expr] == value. It assumes that vars are all different."""
+        r"""
+        Returns the expression expr such that vars[expr] == value.
+        It assumes that vars are all different.
+        """
         return _pywrapcp.Solver_IndexExpression(self, vars, value)
 
     def Min(self, *args) -> "operations_research::IntExpr *":
@@ -3892,7 +4184,10 @@ pywrapcp    
         return _pywrapcp.Solver_ConvexPiecewiseExpr(self, expr, early_cost, early_date, late_date, late_cost)
 
     def SemiContinuousExpr(self, expr: "IntExpr", fixed_charge: "int64_t", step: "int64_t") -> "operations_research::IntExpr *":
-        r""" Semi continuous Expression (x <= 0 -> f(x) = 0; x > 0 -> f(x) = ax + b) a >= 0 and b >= 0"""
+        r"""
+        Semi continuous Expression (x <= 0 -> f(x) = 0; x > 0 -> f(x) = ax + b)
+        a >= 0 and b >= 0
+        """
         return _pywrapcp.Solver_SemiContinuousExpr(self, expr, fixed_charge, step)
 
     def ConditionalExpression(self, condition: "IntVar", expr: "IntExpr", unperformed_value: "int64_t") -> "operations_research::IntExpr *":
@@ -4035,15 +4330,27 @@ pywrapcp    
         return _pywrapcp.Solver_AbsEquality(self, var, abs_var)
 
     def IndexOfConstraint(self, vars: "std::vector< operations_research::IntVar * > const &", index: "IntVar", target: "int64_t") -> "operations_research::Constraint *":
-        r""" This constraint is a special case of the element constraint with an array of integer variables, where the variables are all different and the index variable is constrained such that vars[index] == target."""
+        r"""
+        This constraint is a special case of the element constraint with
+        an array of integer variables, where the variables are all
+        different and the index variable is constrained such that
+        vars[index] == target.
+        """
         return _pywrapcp.Solver_IndexOfConstraint(self, vars, index, target)
 
     def ConstraintInitialPropagateCallback(self, ct: "Constraint") -> "operations_research::Demon *":
-        r""" This method is a specialized case of the MakeConstraintDemon method to call the InitiatePropagate of the constraint 'ct'."""
+        r"""
+        This method is a specialized case of the MakeConstraintDemon
+        method to call the InitiatePropagate of the constraint 'ct'.
+        """
         return _pywrapcp.Solver_ConstraintInitialPropagateCallback(self, ct)
 
     def DelayedConstraintInitialPropagateCallback(self, ct: "Constraint") -> "operations_research::Demon *":
-        r""" This method is a specialized case of the MakeConstraintDemon method to call the InitiatePropagate of the constraint 'ct' with low priority."""
+        r"""
+        This method is a specialized case of the MakeConstraintDemon
+        method to call the InitiatePropagate of the constraint 'ct' with
+        low priority.
+        """
         return _pywrapcp.Solver_DelayedConstraintInitialPropagateCallback(self, ct)
 
     def ClosureDemon(self, closure: "operations_research::Solver::Closure") -> "operations_research::Demon *":
@@ -4117,72 +4424,130 @@ pywrapcp    
         |
 
         *Overload 4:*
-        Aggregated version of count with bounded cardinalities: forall j in 0 .. card_size - 1: card_min <= |{i | v[i] == j}| <= card_max
+        Aggregated version of count with bounded cardinalities:
+        forall j in 0 .. card_size - 1: card_min <= |{i | v[i] == j}| <= card_max
 
         |
 
         *Overload 5:*
-        Aggregated version of count with bounded cardinalities: forall j in 0 .. card_size - 1:    card_min[j] <= |{i | v[i] == j}| <= card_max[j]
+        Aggregated version of count with bounded cardinalities:
+        forall j in 0 .. card_size - 1:
+           card_min[j] <= |{i | v[i] == j}| <= card_max[j]
 
         |
 
         *Overload 6:*
-        Aggregated version of count with bounded cardinalities: forall j in 0 .. card_size - 1:    card_min[j] <= |{i | v[i] == j}| <= card_max[j]
+        Aggregated version of count with bounded cardinalities:
+        forall j in 0 .. card_size - 1:
+           card_min[j] <= |{i | v[i] == j}| <= card_max[j]
 
         |
 
         *Overload 7:*
-        Aggregated version of count with bounded cardinalities: forall j in 0 .. card_size - 1:    card_min[j] <= |{i | v[i] == values[j]}| <= card_max[j]
+        Aggregated version of count with bounded cardinalities:
+        forall j in 0 .. card_size - 1:
+           card_min[j] <= |{i | v[i] == values[j]}| <= card_max[j]
 
         |
 
         *Overload 8:*
-        Aggregated version of count with bounded cardinalities: forall j in 0 .. card_size - 1:    card_min[j] <= |{i | v[i] == values[j]}| <= card_max[j]
+        Aggregated version of count with bounded cardinalities:
+        forall j in 0 .. card_size - 1:
+           card_min[j] <= |{i | v[i] == values[j]}| <= card_max[j]
         """
         return _pywrapcp.Solver_Distribute(self, *args)
 
     def Deviation(self, vars: "std::vector< operations_research::IntVar * > const &", deviation_var: "IntVar", total_sum: "int64_t") -> "operations_research::Constraint *":
-        r""" Deviation constraint: sum_i |n * vars[i] - total_sum| <= deviation_var and sum_i vars[i] == total_sum n = #vars"""
+        r"""
+        Deviation constraint:
+        sum_i |n * vars[i] - total_sum| <= deviation_var and
+        sum_i vars[i] == total_sum
+        n = #vars
+        """
         return _pywrapcp.Solver_Deviation(self, vars, deviation_var, total_sum)
 
     def AllDifferent(self, *args) -> "operations_research::Constraint *":
         r"""
         *Overload 1:*
-        All variables are pairwise different. This corresponds to the stronger version of the propagation algorithm.
+        All variables are pairwise different. This corresponds to the
+        stronger version of the propagation algorithm.
 
         |
 
         *Overload 2:*
-        All variables are pairwise different.  If 'stronger_propagation' is true, stronger, and potentially slower propagation will occur. This API will be deprecated in the future.
+        All variables are pairwise different.  If 'stronger_propagation'
+        is true, stronger, and potentially slower propagation will
+        occur. This API will be deprecated in the future.
         """
         return _pywrapcp.Solver_AllDifferent(self, *args)
 
     def AllDifferentExcept(self, vars: "std::vector< operations_research::IntVar * > const &", escape_value: "int64_t") -> "operations_research::Constraint *":
-        r""" All variables are pairwise different, unless they are assigned to the escape value."""
+        r"""
+        All variables are pairwise different, unless they are assigned to
+        the escape value.
+        """
         return _pywrapcp.Solver_AllDifferentExcept(self, vars, escape_value)
 
     def SortingConstraint(self, vars: "std::vector< operations_research::IntVar * > const &", sorted: "std::vector< operations_research::IntVar * > const &") -> "operations_research::Constraint *":
-        r""" Creates a constraint binding the arrays of variables "vars" and "sorted_vars": sorted_vars[0] must be equal to the minimum of all variables in vars, and so on: the value of sorted_vars[i] must be equal to the i-th value of variables invars. This constraint propagates in both directions: from "vars" to "sorted_vars" and vice-versa. Behind the scenes, this constraint maintains that:   - sorted is always increasing.   - whatever the values of vars, there exists a permutation that     injects its values into the sorted variables. For more info, please have a look at:   https://mpi-inf.mpg.de/~mehlhorn/ftp/Mehlhorn-Thiel.pdf"""
+        r"""
+        Creates a constraint binding the arrays of variables "vars" and
+        "sorted_vars": sorted_vars[0] must be equal to the minimum of all
+        variables in vars, and so on: the value of sorted_vars[i] must be
+        equal to the i-th value of variables invars.
+
+        This constraint propagates in both directions: from "vars" to
+        "sorted_vars" and vice-versa.
+
+        Behind the scenes, this constraint maintains that:
+          - sorted is always increasing.
+          - whatever the values of vars, there exists a permutation that
+            injects its values into the sorted variables.
+
+        For more info, please have a look at:
+          https://mpi-inf.mpg.de/~mehlhorn/ftp/Mehlhorn-Thiel.pdf
+        """
         return _pywrapcp.Solver_SortingConstraint(self, vars, sorted)
 
     def LexicalLess(self, left: "std::vector< operations_research::IntVar * > const &", right: "std::vector< operations_research::IntVar * > const &") -> "operations_research::Constraint *":
-        r""" Creates a constraint that enforces that left is lexicographically less than right."""
+        r"""
+        Creates a constraint that enforces that left is lexicographically less
+        than right.
+        """
         return _pywrapcp.Solver_LexicalLess(self, left, right)
 
     def LexicalLessOrEqual(self, left: "std::vector< operations_research::IntVar * > const &", right: "std::vector< operations_research::IntVar * > const &") -> "operations_research::Constraint *":
-        r""" Creates a constraint that enforces that left is lexicographically less than or equal to right."""
+        r"""
+        Creates a constraint that enforces that left is lexicographically less
+        than or equal to right.
+        """
         return _pywrapcp.Solver_LexicalLessOrEqual(self, left, right)
 
     def InversePermutationConstraint(self, left: "std::vector< operations_research::IntVar * > const &", right: "std::vector< operations_research::IntVar * > const &") -> "operations_research::Constraint *":
-        r""" Creates a constraint that enforces that 'left' and 'right' both represent permutations of [0..left.size()-1], and that 'right' is the inverse permutation of 'left', i.e. for all i in [0..left.size()-1], right[left[i]] = i."""
+        r"""
+        Creates a constraint that enforces that 'left' and 'right' both
+        represent permutations of [0..left.size()-1], and that 'right' is
+        the inverse permutation of 'left', i.e. for all i in
+        [0..left.size()-1], right[left[i]] = i.
+        """
         return _pywrapcp.Solver_InversePermutationConstraint(self, left, right)
 
     def NullIntersect(self, first_vars: "std::vector< operations_research::IntVar * > const &", second_vars: "std::vector< operations_research::IntVar * > const &") -> "operations_research::Constraint *":
-        r""" Creates a constraint that states that all variables in the first vector are different from all variables in the second group. Thus the set of values in the first vector does not intersect with the set of values in the second vector."""
+        r"""
+        Creates a constraint that states that all variables in the first
+        vector are different from all variables in the second
+        group. Thus the set of values in the first vector does not
+        intersect with the set of values in the second vector.
+        """
         return _pywrapcp.Solver_NullIntersect(self, first_vars, second_vars)
 
     def NullIntersectExcept(self, first_vars: "std::vector< operations_research::IntVar * > const &", second_vars: "std::vector< operations_research::IntVar * > const &", escape_value: "int64_t") -> "operations_research::Constraint *":
-        r""" Creates a constraint that states that all variables in the first vector are different from all variables from the second group, unless they are assigned to the escape value. Thus the set of values in the first vector minus the escape value does not intersect with the set of values in the second vector."""
+        r"""
+        Creates a constraint that states that all variables in the first
+        vector are different from all variables from the second group,
+        unless they are assigned to the escape value. Thus the set of
+        values in the first vector minus the escape value does not
+        intersect with the set of values in the second vector.
+        """
         return _pywrapcp.Solver_NullIntersectExcept(self, first_vars, second_vars, escape_value)
 
     def Circuit(self, nexts: "std::vector< operations_research::IntVar * > const &") -> "operations_research::Constraint *":
@@ -4190,34 +4555,56 @@ pywrapcp    
         return _pywrapcp.Solver_Circuit(self, nexts)
 
     def SubCircuit(self, nexts: "std::vector< operations_research::IntVar * > const &") -> "operations_research::Constraint *":
-        r""" Force the "nexts" variable to create a complete Hamiltonian path for those that do not loop upon themselves."""
+        r"""
+        Force the "nexts" variable to create a complete Hamiltonian path
+        for those that do not loop upon themselves.
+        """
         return _pywrapcp.Solver_SubCircuit(self, nexts)
 
     def DelayedPathCumul(self, nexts: "std::vector< operations_research::IntVar * > const &", active: "std::vector< operations_research::IntVar * > const &", cumuls: "std::vector< operations_research::IntVar * > const &", transits: "std::vector< operations_research::IntVar * > const &") -> "operations_research::Constraint *":
-        r""" Delayed version of the same constraint: propagation on the nexts variables is delayed until all constraints have propagated."""
+        r"""
+        Delayed version of the same constraint: propagation on the nexts variables
+        is delayed until all constraints have propagated.
+        """
         return _pywrapcp.Solver_DelayedPathCumul(self, nexts, active, cumuls, transits)
 
     def PathCumul(self, *args) -> "operations_research::Constraint *":
         r"""
         *Overload 1:*
-        Creates a constraint which accumulates values along a path such that: cumuls[next[i]] = cumuls[i] + transits[i]. Active variables indicate if the corresponding next variable is active; this could be useful to model unperformed nodes in a routing problem.
+        Creates a constraint which accumulates values along a path such that:
+        cumuls[next[i]] = cumuls[i] + transits[i].
+        Active variables indicate if the corresponding next variable is active;
+        this could be useful to model unperformed nodes in a routing problem.
 
         |
 
         *Overload 2:*
-        Creates a constraint which accumulates values along a path such that: cumuls[next[i]] = cumuls[i] + transit_evaluator(i, next[i]). Active variables indicate if the corresponding next variable is active; this could be useful to model unperformed nodes in a routing problem. Ownership of transit_evaluator is taken and it must be a repeatable callback.
+        Creates a constraint which accumulates values along a path such that:
+        cumuls[next[i]] = cumuls[i] + transit_evaluator(i, next[i]).
+        Active variables indicate if the corresponding next variable is active;
+        this could be useful to model unperformed nodes in a routing problem.
+        Ownership of transit_evaluator is taken and it must be a repeatable
+        callback.
 
         |
 
         *Overload 3:*
-        Creates a constraint which accumulates values along a path such that: cumuls[next[i]] = cumuls[i] + transit_evaluator(i, next[i]) + slacks[i]. Active variables indicate if the corresponding next variable is active; this could be useful to model unperformed nodes in a routing problem. Ownership of transit_evaluator is taken and it must be a repeatable callback.
+        Creates a constraint which accumulates values along a path such that:
+        cumuls[next[i]] = cumuls[i] + transit_evaluator(i, next[i]) + slacks[i].
+        Active variables indicate if the corresponding next variable is active;
+        this could be useful to model unperformed nodes in a routing problem.
+        Ownership of transit_evaluator is taken and it must be a repeatable
+        callback.
         """
         return _pywrapcp.Solver_PathCumul(self, *args)
 
     def AllowedAssignments(self, *args) -> "operations_research::Constraint *":
         r"""
         *Overload 1:*
-        This method creates a constraint where the graph of the relation between the variables is given in extension. There are 'arity' variables involved in the relation and the graph is given by a integer tuple set.
+        This method creates a constraint where the graph of the relation
+        between the variables is given in extension. There are 'arity'
+        variables involved in the relation and the graph is given by a
+        integer tuple set.
 
         |
 
@@ -4233,23 +4620,34 @@ pywrapcp    
         return _pywrapcp.Solver_NonOverlappingBoxesConstraint(self, *args)
 
     def Pack(self, vars: "std::vector< operations_research::IntVar * > const &", number_of_bins: "int") -> "operations_research::Pack *":
-        r""" This constraint packs all variables onto 'number_of_bins' variables.  For any given variable, a value of 'number_of_bins' indicates that the variable is not assigned to any bin. Dimensions, i.e., cumulative constraints on this packing, can be added directly from the pack class."""
+        r"""
+        This constraint packs all variables onto 'number_of_bins'
+        variables.  For any given variable, a value of 'number_of_bins'
+        indicates that the variable is not assigned to any bin.
+        Dimensions, i.e., cumulative constraints on this packing, can be
+        added directly from the pack class.
+        """
         return _pywrapcp.Solver_Pack(self, vars, number_of_bins)
 
     def FixedDurationIntervalVar(self, *args) -> "operations_research::IntervalVar *":
         r"""
         *Overload 1:*
-        Creates an interval var with a fixed duration. The duration must be greater than 0. If optional is true, then the interval can be performed or unperformed. If optional is false, then the interval is always performed.
+        Creates an interval var with a fixed duration. The duration must
+        be greater than 0. If optional is true, then the interval can be
+        performed or unperformed. If optional is false, then the interval
+        is always performed.
 
         |
 
         *Overload 2:*
-        Creates a performed interval var with a fixed duration. The duration must be greater than 0.
+        Creates a performed interval var with a fixed duration. The duration must
+        be greater than 0.
 
         |
 
         *Overload 3:*
-        Creates an interval var with a fixed duration, and performed_variable. The duration must be greater than 0.
+        Creates an interval var with a fixed duration, and performed_variable.
+        The duration must be greater than 0.
         """
         return _pywrapcp.Solver_FixedDurationIntervalVar(self, *args)
 
@@ -4258,87 +4656,205 @@ pywrapcp    
         return _pywrapcp.Solver_FixedInterval(self, start, duration, name)
 
     def IntervalVar(self, start_min: "int64_t", start_max: "int64_t", duration_min: "int64_t", duration_max: "int64_t", end_min: "int64_t", end_max: "int64_t", optional: "bool", name: "std::string const &") -> "operations_research::IntervalVar *":
-        r""" Creates an interval var by specifying the bounds on start, duration, and end."""
+        r"""
+        Creates an interval var by specifying the bounds on start,
+        duration, and end.
+        """
         return _pywrapcp.Solver_IntervalVar(self, start_min, start_max, duration_min, duration_max, end_min, end_max, optional, name)
 
     def MirrorInterval(self, interval_var: "IntervalVar") -> "operations_research::IntervalVar *":
-        r""" Creates an interval var that is the mirror image of the given one, that is, the interval var obtained by reversing the axis."""
+        r"""
+        Creates an interval var that is the mirror image of the given one, that
+        is, the interval var obtained by reversing the axis.
+        """
         return _pywrapcp.Solver_MirrorInterval(self, interval_var)
 
     def FixedDurationStartSyncedOnStartIntervalVar(self, interval_var: "IntervalVar", duration: "int64_t", offset: "int64_t") -> "operations_research::IntervalVar *":
-        r""" Creates an interval var with a fixed duration whose start is synchronized with the start of another interval, with a given offset. The performed status is also in sync with the performed status of the given interval variable."""
+        r"""
+        Creates an interval var with a fixed duration whose start is
+        synchronized with the start of another interval, with a given
+        offset. The performed status is also in sync with the performed
+        status of the given interval variable.
+        """
         return _pywrapcp.Solver_FixedDurationStartSyncedOnStartIntervalVar(self, interval_var, duration, offset)
 
     def FixedDurationStartSyncedOnEndIntervalVar(self, interval_var: "IntervalVar", duration: "int64_t", offset: "int64_t") -> "operations_research::IntervalVar *":
-        r""" Creates an interval var with a fixed duration whose start is synchronized with the end of another interval, with a given offset. The performed status is also in sync with the performed status of the given interval variable."""
+        r"""
+        Creates an interval var with a fixed duration whose start is
+        synchronized with the end of another interval, with a given
+        offset. The performed status is also in sync with the performed
+        status of the given interval variable.
+        """
         return _pywrapcp.Solver_FixedDurationStartSyncedOnEndIntervalVar(self, interval_var, duration, offset)
 
     def FixedDurationEndSyncedOnStartIntervalVar(self, interval_var: "IntervalVar", duration: "int64_t", offset: "int64_t") -> "operations_research::IntervalVar *":
-        r""" Creates an interval var with a fixed duration whose end is synchronized with the start of another interval, with a given offset. The performed status is also in sync with the performed status of the given interval variable."""
+        r"""
+        Creates an interval var with a fixed duration whose end is
+        synchronized with the start of another interval, with a given
+        offset. The performed status is also in sync with the performed
+        status of the given interval variable.
+        """
         return _pywrapcp.Solver_FixedDurationEndSyncedOnStartIntervalVar(self, interval_var, duration, offset)
 
     def FixedDurationEndSyncedOnEndIntervalVar(self, interval_var: "IntervalVar", duration: "int64_t", offset: "int64_t") -> "operations_research::IntervalVar *":
-        r""" Creates an interval var with a fixed duration whose end is synchronized with the end of another interval, with a given offset. The performed status is also in sync with the performed status of the given interval variable."""
+        r"""
+        Creates an interval var with a fixed duration whose end is
+        synchronized with the end of another interval, with a given
+        offset. The performed status is also in sync with the performed
+        status of the given interval variable.
+        """
         return _pywrapcp.Solver_FixedDurationEndSyncedOnEndIntervalVar(self, interval_var, duration, offset)
 
     def IntervalRelaxedMin(self, interval_var: "IntervalVar") -> "operations_research::IntervalVar *":
-        r""" Creates and returns an interval variable that wraps around the given one, relaxing the min start and end. Relaxing means making unbounded when optional. If the variable is non-optional, this method returns interval_var. More precisely, such an interval variable behaves as follows: * When the underlying must be performed, the returned interval variable     behaves exactly as the underlying; * When the underlying may or may not be performed, the returned interval     variable behaves like the underlying, except that it is unbounded on     the min side; * When the underlying cannot be performed, the returned interval variable     is of duration 0 and must be performed in an interval unbounded on     both sides. This is very useful to implement propagators that may only modify the start max or end max."""
+        r"""
+         Creates and returns an interval variable that wraps around the given one,
+         relaxing the min start and end. Relaxing means making unbounded when
+         optional. If the variable is non-optional, this method returns
+         interval_var.
+
+         More precisely, such an interval variable behaves as follows:
+        When the underlying must be performed, the returned interval variable
+             behaves exactly as the underlying;
+        When the underlying may or may not be performed, the returned interval
+             variable behaves like the underlying, except that it is unbounded on
+             the min side;
+        When the underlying cannot be performed, the returned interval variable
+             is of duration 0 and must be performed in an interval unbounded on
+             both sides.
+
+         This is very useful to implement propagators that may only modify
+         the start max or end max.
+        """
         return _pywrapcp.Solver_IntervalRelaxedMin(self, interval_var)
 
     def IntervalRelaxedMax(self, interval_var: "IntervalVar") -> "operations_research::IntervalVar *":
-        r""" Creates and returns an interval variable that wraps around the given one, relaxing the max start and end. Relaxing means making unbounded when optional. If the variable is non optional, this method returns interval_var. More precisely, such an interval variable behaves as follows: * When the underlying must be performed, the returned interval variable     behaves exactly as the underlying; * When the underlying may or may not be performed, the returned interval     variable behaves like the underlying, except that it is unbounded on     the max side; * When the underlying cannot be performed, the returned interval variable     is of duration 0 and must be performed in an interval unbounded on     both sides. This is very useful for implementing propagators that may only modify the start min or end min."""
+        r"""
+         Creates and returns an interval variable that wraps around the given one,
+         relaxing the max start and end. Relaxing means making unbounded when
+         optional. If the variable is non optional, this method returns
+         interval_var.
+
+         More precisely, such an interval variable behaves as follows:
+        When the underlying must be performed, the returned interval variable
+             behaves exactly as the underlying;
+        When the underlying may or may not be performed, the returned interval
+             variable behaves like the underlying, except that it is unbounded on
+             the max side;
+        When the underlying cannot be performed, the returned interval variable
+             is of duration 0 and must be performed in an interval unbounded on
+             both sides.
+
+         This is very useful for implementing propagators that may only modify
+         the start min or end min.
+        """
         return _pywrapcp.Solver_IntervalRelaxedMax(self, interval_var)
 
     def TemporalDisjunction(self, *args) -> "operations_research::Constraint *":
         r"""
         *Overload 1:*
-        This constraint implements a temporal disjunction between two interval vars t1 and t2. 'alt' indicates which alternative was chosen (alt == 0 is equivalent to t1 before t2).
+        This constraint implements a temporal disjunction between two
+        interval vars t1 and t2. 'alt' indicates which alternative was
+        chosen (alt == 0 is equivalent to t1 before t2).
 
         |
 
         *Overload 2:*
-        This constraint implements a temporal disjunction between two interval vars.
+        This constraint implements a temporal disjunction between two
+        interval vars.
         """
         return _pywrapcp.Solver_TemporalDisjunction(self, *args)
 
     def DisjunctiveConstraint(self, intervals: "std::vector< operations_research::IntervalVar * > const &", name: "std::string const &") -> "operations_research::DisjunctiveConstraint *":
-        r""" This constraint forces all interval vars into an non-overlapping sequence. Intervals with zero duration can be scheduled anywhere."""
+        r"""
+        This constraint forces all interval vars into an non-overlapping
+        sequence. Intervals with zero duration can be scheduled anywhere.
+        """
         return _pywrapcp.Solver_DisjunctiveConstraint(self, intervals, name)
 
     def Cumulative(self, *args) -> "operations_research::Constraint *":
         r"""
         *Overload 1:*
-        This constraint forces that, for any integer t, the sum of the demands corresponding to an interval containing t does not exceed the given capacity. Intervals and demands should be vectors of equal size. Demands should only contain non-negative values. Zero values are supported, and the corresponding intervals are filtered out, as they neither impact nor are impacted by this constraint.
+        This constraint forces that, for any integer t, the sum of the demands
+        corresponding to an interval containing t does not exceed the given
+        capacity.
+
+        Intervals and demands should be vectors of equal size.
+
+        Demands should only contain non-negative values. Zero values are
+        supported, and the corresponding intervals are filtered out, as they
+        neither impact nor are impacted by this constraint.
 
         |
 
         *Overload 2:*
-        This constraint forces that, for any integer t, the sum of the demands corresponding to an interval containing t does not exceed the given capacity. Intervals and demands should be vectors of equal size. Demands should only contain non-negative values. Zero values are supported, and the corresponding intervals are filtered out, as they neither impact nor are impacted by this constraint.
+        This constraint forces that, for any integer t, the sum of the demands
+        corresponding to an interval containing t does not exceed the given
+        capacity.
+
+        Intervals and demands should be vectors of equal size.
+
+        Demands should only contain non-negative values. Zero values are
+        supported, and the corresponding intervals are filtered out, as they
+        neither impact nor are impacted by this constraint.
 
         |
 
         *Overload 3:*
-        This constraint forces that, for any integer t, the sum of the demands corresponding to an interval containing t does not exceed the given capacity. Intervals and demands should be vectors of equal size. Demands should only contain non-negative values. Zero values are supported, and the corresponding intervals are filtered out, as they neither impact nor are impacted by this constraint.
+        This constraint forces that, for any integer t, the sum of the demands
+        corresponding to an interval containing t does not exceed the given
+        capacity.
+
+        Intervals and demands should be vectors of equal size.
+
+        Demands should only contain non-negative values. Zero values are
+        supported, and the corresponding intervals are filtered out, as they
+        neither impact nor are impacted by this constraint.
 
         |
 
         *Overload 4:*
-        This constraint enforces that, for any integer t, the sum of the demands corresponding to an interval containing t does not exceed the given capacity. Intervals and demands should be vectors of equal size. Demands should only contain non-negative values. Zero values are supported, and the corresponding intervals are filtered out, as they neither impact nor are impacted by this constraint.
+        This constraint enforces that, for any integer t, the sum of the demands
+        corresponding to an interval containing t does not exceed the given
+        capacity.
+
+        Intervals and demands should be vectors of equal size.
+
+        Demands should only contain non-negative values. Zero values are
+        supported, and the corresponding intervals are filtered out, as they
+        neither impact nor are impacted by this constraint.
 
         |
 
         *Overload 5:*
-        This constraint enforces that, for any integer t, the sum of demands corresponding to an interval containing t does not exceed the given capacity. Intervals and demands should be vectors of equal size. Demands should be positive.
+        This constraint enforces that, for any integer t, the sum of demands
+        corresponding to an interval containing t does not exceed the given
+        capacity.
+
+        Intervals and demands should be vectors of equal size.
+
+        Demands should be positive.
 
         |
 
         *Overload 6:*
-        This constraint enforces that, for any integer t, the sum of demands corresponding to an interval containing t does not exceed the given capacity. Intervals and demands should be vectors of equal size. Demands should be positive.
+        This constraint enforces that, for any integer t, the sum of demands
+        corresponding to an interval containing t does not exceed the given
+        capacity.
+
+        Intervals and demands should be vectors of equal size.
+
+        Demands should be positive.
         """
         return _pywrapcp.Solver_Cumulative(self, *args)
 
     def Cover(self, vars: "std::vector< operations_research::IntervalVar * > const &", target_var: "IntervalVar") -> "operations_research::Constraint *":
-        r""" This constraint states that the target_var is the convex hull of the intervals. If none of the interval variables is performed, then the target var is unperformed too. Also, if the target variable is unperformed, then all the intervals variables are unperformed too."""
+        r"""
+        This constraint states that the target_var is the convex hull of
+        the intervals. If none of the interval variables is performed,
+        then the target var is unperformed too. Also, if the target
+        variable is unperformed, then all the intervals variables are
+        unperformed too.
+        """
         return _pywrapcp.Solver_Cover(self, vars, target_var)
 
     def Assignment(self, *args) -> "operations_research::Assignment *":
@@ -4361,7 +4877,8 @@ pywrapcp    
         |
 
         *Overload 2:*
-        Collect the first solution of the search. The variables will need to be added later.
+        Collect the first solution of the search. The variables will need to
+        be added later.
         """
         return _pywrapcp.Solver_FirstSolutionCollector(self, *args)
 
@@ -4373,19 +4890,27 @@ pywrapcp    
         |
 
         *Overload 2:*
-        Collect the last solution of the search. The variables will need to be added later.
+        Collect the last solution of the search. The variables will need to
+        be added later.
         """
         return _pywrapcp.Solver_LastSolutionCollector(self, *args)
 
     def BestValueSolutionCollector(self, *args) -> "operations_research::SolutionCollector *":
         r"""
         *Overload 1:*
-        Collect the solution corresponding to the optimal value of the objective of 'assignment'; if 'assignment' does not have an objective no solution is collected. This collector only collects one solution corresponding to the best objective value (the first one found).
+        Collect the solution corresponding to the optimal value of the objective
+        of 'assignment'; if 'assignment' does not have an objective no solution is
+        collected. This collector only collects one solution corresponding to the
+        best objective value (the first one found).
 
         |
 
         *Overload 2:*
-        Collect the solution corresponding to the optimal value of the objective of 'assignment'; if 'assignment' does not have an objective no solution is collected. This collector only collects one solution corresponding to the best objective value (the first one found). The variables will need to be added later.
+        Collect the solution corresponding to the optimal value of the
+        objective of 'assignment'; if 'assignment' does not have an objective no
+        solution is collected. This collector only collects one solution
+        corresponding to the best objective value (the first one
+        found). The variables will need to be added later.
         """
         return _pywrapcp.Solver_BestValueSolutionCollector(self, *args)
 
@@ -4397,7 +4922,8 @@ pywrapcp    
         |
 
         *Overload 2:*
-        Collect all solutions of the search. The variables will need to be added later.
+        Collect all solutions of the search. The variables will need to
+        be added later.
         """
         return _pywrapcp.Solver_AllSolutionCollector(self, *args)
 
@@ -4416,12 +4942,14 @@ pywrapcp    
     def WeightedMinimize(self, *args) -> "operations_research::OptimizeVar *":
         r"""
         *Overload 1:*
-        Creates a minimization weighted objective. The actual objective is scalar_prod(sub_objectives, weights).
+        Creates a minimization weighted objective. The actual objective is
+        scalar_prod(sub_objectives, weights).
 
         |
 
         *Overload 2:*
-        Creates a minimization weighted objective. The actual objective is scalar_prod(sub_objectives, weights).
+        Creates a minimization weighted objective. The actual objective is
+        scalar_prod(sub_objectives, weights).
         """
         return _pywrapcp.Solver_WeightedMinimize(self, *args)
 
@@ -4450,7 +4978,24 @@ pywrapcp    
         return _pywrapcp.Solver_WeightedOptimize(self, *args)
 
     def TabuSearch(self, maximize: "bool", v: "IntVar", step: "int64_t", vars: "std::vector< operations_research::IntVar * > const &", keep_tenure: "int64_t", forbid_tenure: "int64_t", tabu_factor: "double") -> "operations_research::SearchMonitor *":
-        r""" MetaHeuristics which try to get the search out of local optima. Creates a Tabu Search monitor. In the context of local search the behavior is similar to MakeOptimize(), creating an objective in a given sense. The behavior differs once a local optimum is reached: thereafter solutions which degrade the value of the objective are allowed if they are not "tabu". A solution is "tabu" if it doesn't respect the following rules: - improving the best solution found so far - variables in the "keep" list must keep their value, variables in the "forbid" list must not take the value they have in the list. Variables with new values enter the tabu lists after each new solution found and leave the lists after a given number of iterations (called tenure). Only the variables passed to the method can enter the lists. The tabu criterion is softened by the tabu factor which gives the number of "tabu" violations which is tolerated; a factor of 1 means no violations allowed; a factor of 0 means all violations are allowed."""
+        r"""
+        MetaHeuristics which try to get the search out of local optima.
+        Creates a Tabu Search monitor.
+        In the context of local search the behavior is similar to MakeOptimize(),
+        creating an objective in a given sense. The behavior differs once a local
+        optimum is reached: thereafter solutions which degrade the value of the
+        objective are allowed if they are not "tabu". A solution is "tabu" if it
+        doesn't respect the following rules:
+        - improving the best solution found so far
+        - variables in the "keep" list must keep their value, variables in the
+        "forbid" list must not take the value they have in the list.
+        Variables with new values enter the tabu lists after each new solution
+        found and leave the lists after a given number of iterations (called
+        tenure). Only the variables passed to the method can enter the lists.
+        The tabu criterion is softened by the tabu factor which gives the number
+        of "tabu" violations which is tolerated; a factor of 1 means no violations
+        allowed; a factor of 0 means all violations are allowed.
+        """
         return _pywrapcp.Solver_TabuSearch(self, maximize, v, step, vars, keep_tenure, forbid_tenure, tabu_factor)
 
     def SimulatedAnnealing(self, maximize: "bool", v: "IntVar", step: "int64_t", initial_temperature: "int64_t") -> "operations_research::SearchMonitor *":
@@ -4458,32 +5003,49 @@ pywrapcp    
         return _pywrapcp.Solver_SimulatedAnnealing(self, maximize, v, step, initial_temperature)
 
     def LubyRestart(self, scale_factor: "int") -> "operations_research::SearchMonitor *":
-        r""" This search monitor will restart the search periodically. At the iteration n, it will restart after scale_factor * Luby(n) failures where Luby is the Luby Strategy (i.e. 1 1 2 1 1 2 4 1 1 2 1 1 2 4 8...)."""
+        r"""
+        This search monitor will restart the search periodically.
+        At the iteration n, it will restart after scale_factor * Luby(n) failures
+        where Luby is the Luby Strategy (i.e. 1 1 2 1 1 2 4 1 1 2 1 1 2 4 8...).
+        """
         return _pywrapcp.Solver_LubyRestart(self, scale_factor)
 
     def ConstantRestart(self, frequency: "int") -> "operations_research::SearchMonitor *":
-        r""" This search monitor will restart the search periodically after 'frequency' failures."""
+        r"""
+        This search monitor will restart the search periodically after 'frequency'
+        failures.
+        """
         return _pywrapcp.Solver_ConstantRestart(self, frequency)
 
     def TimeLimit(self, *args) -> "operations_research::RegularLimit *":
         return _pywrapcp.Solver_TimeLimit(self, *args)
 
     def BranchesLimit(self, branches: "int64_t") -> "operations_research::RegularLimit *":
-        r""" Creates a search limit that constrains the number of branches explored in the search tree."""
+        r"""
+        Creates a search limit that constrains the number of branches
+        explored in the search tree.
+        """
         return _pywrapcp.Solver_BranchesLimit(self, branches)
 
     def FailuresLimit(self, failures: "int64_t") -> "operations_research::RegularLimit *":
-        r""" Creates a search limit that constrains the number of failures that can happen when exploring the search tree."""
+        r"""
+        Creates a search limit that constrains the number of failures
+        that can happen when exploring the search tree.
+        """
         return _pywrapcp.Solver_FailuresLimit(self, failures)
 
     def SolutionsLimit(self, solutions: "int64_t") -> "operations_research::RegularLimit *":
-        r""" Creates a search limit that constrains the number of solutions found during the search."""
+        r"""
+        Creates a search limit that constrains the number of solutions found
+        during the search.
+        """
         return _pywrapcp.Solver_SolutionsLimit(self, solutions)
 
     def Limit(self, *args) -> "operations_research::SearchLimit *":
         r"""
         *Overload 1:*
-        Limits the search with the 'time', 'branches', 'failures' and 'solutions' limits. 'smart_time_check' reduces the calls to the wall
+        Limits the search with the 'time', 'branches', 'failures' and
+        'solutions' limits. 'smart_time_check' reduces the calls to the wall
 
         |
 
@@ -4493,19 +5055,27 @@ pywrapcp    
         |
 
         *Overload 3:*
-        Creates a search limit that is reached when either of the underlying limit is reached. That is, the returned limit is more stringent than both argument limits.
+        Creates a search limit that is reached when either of the underlying limit
+        is reached. That is, the returned limit is more stringent than both
+        argument limits.
         """
         return _pywrapcp.Solver_Limit(self, *args)
 
     def CustomLimit(self, limiter: "std::function< bool () >") -> "operations_research::SearchLimit *":
-        r""" Callback-based search limit. Search stops when limiter returns true; if this happens at a leaf the corresponding solution will be rejected."""
+        r"""
+        Callback-based search limit. Search stops when limiter returns true; if
+        this happens at a leaf the corresponding solution will be rejected.
+        """
         return _pywrapcp.Solver_CustomLimit(self, limiter)
 
     def SearchLog(self, *args) -> "operations_research::SearchMonitor *":
         return _pywrapcp.Solver_SearchLog(self, *args)
 
     def SearchTrace(self, prefix: "std::string const &") -> "operations_research::SearchMonitor *":
-        r""" Creates a search monitor that will trace precisely the behavior of the search. Use this only for low level debugging."""
+        r"""
+        Creates a search monitor that will trace precisely the behavior of the
+        search. Use this only for low level debugging.
+        """
         return _pywrapcp.Solver_SearchTrace(self, prefix)
 
     def PrintModelVisitor(self) -> "operations_research::ModelVisitor *":
@@ -4551,30 +5121,54 @@ pywrapcp    
         return _pywrapcp.Solver_DefaultPhase(self, *args)
 
     def ScheduleOrPostpone(self, var: "IntervalVar", est: "int64_t", marker: "int64_t *const") -> "operations_research::Decision *":
-        r""" Returns a decision that tries to schedule a task at a given time. On the Apply branch, it will set that interval var as performed and set its start to 'est'. On the Refute branch, it will just update the 'marker' to 'est' + 1. This decision is used in the INTERVAL_SET_TIMES_FORWARD strategy."""
+        r"""
+        Returns a decision that tries to schedule a task at a given time.
+        On the Apply branch, it will set that interval var as performed and set
+        its start to 'est'. On the Refute branch, it will just update the
+        'marker' to 'est' + 1. This decision is used in the
+        INTERVAL_SET_TIMES_FORWARD strategy.
+        """
         return _pywrapcp.Solver_ScheduleOrPostpone(self, var, est, marker)
 
     def ScheduleOrExpedite(self, var: "IntervalVar", est: "int64_t", marker: "int64_t *const") -> "operations_research::Decision *":
-        r""" Returns a decision that tries to schedule a task at a given time. On the Apply branch, it will set that interval var as performed and set its end to 'est'. On the Refute branch, it will just update the 'marker' to 'est' - 1. This decision is used in the INTERVAL_SET_TIMES_BACKWARD strategy."""
+        r"""
+        Returns a decision that tries to schedule a task at a given time.
+        On the Apply branch, it will set that interval var as performed and set
+        its end to 'est'. On the Refute branch, it will just update the
+        'marker' to 'est' - 1. This decision is used in the
+        INTERVAL_SET_TIMES_BACKWARD strategy.
+        """
         return _pywrapcp.Solver_ScheduleOrExpedite(self, var, est, marker)
 
     def RankFirstInterval(self, sequence: "SequenceVar", index: "int") -> "operations_research::Decision *":
-        r""" Returns a decision that tries to rank first the ith interval var in the sequence variable."""
+        r"""
+        Returns a decision that tries to rank first the ith interval var
+        in the sequence variable.
+        """
         return _pywrapcp.Solver_RankFirstInterval(self, sequence, index)
 
     def RankLastInterval(self, sequence: "SequenceVar", index: "int") -> "operations_research::Decision *":
-        r""" Returns a decision that tries to rank last the ith interval var in the sequence variable."""
+        r"""
+        Returns a decision that tries to rank last the ith interval var
+        in the sequence variable.
+        """
         return _pywrapcp.Solver_RankLastInterval(self, sequence, index)
 
     def Phase(self, *args) -> "operations_research::DecisionBuilder *":
         return _pywrapcp.Solver_Phase(self, *args)
 
     def DecisionBuilderFromAssignment(self, assignment: "Assignment", db: "DecisionBuilder", vars: "std::vector< operations_research::IntVar * > const &") -> "operations_research::DecisionBuilder *":
-        r""" Returns a decision builder for which the left-most leaf corresponds to assignment, the rest of the tree being explored using 'db'."""
+        r"""
+        Returns a decision builder for which the left-most leaf corresponds
+        to assignment, the rest of the tree being explored using 'db'.
+        """
         return _pywrapcp.Solver_DecisionBuilderFromAssignment(self, assignment, db, vars)
 
     def ConstraintAdder(self, ct: "Constraint") -> "operations_research::DecisionBuilder *":
-        r""" Returns a decision builder that will add the given constraint to the model."""
+        r"""
+        Returns a decision builder that will add the given constraint to
+        the model.
+        """
         return _pywrapcp.Solver_ConstraintAdder(self, ct)
 
     def SolveOnce(self, db: "DecisionBuilder", monitors: "std::vector< operations_research::SearchMonitor * > const &") -> "operations_research::DecisionBuilder *":
@@ -4584,11 +5178,17 @@ pywrapcp    
         return _pywrapcp.Solver_NestedOptimize(self, *args)
 
     def RestoreAssignment(self, assignment: "Assignment") -> "operations_research::DecisionBuilder *":
-        r""" Returns a DecisionBuilder which restores an Assignment (calls void Assignment::Restore())"""
+        r"""
+        Returns a DecisionBuilder which restores an Assignment
+        (calls void Assignment::Restore())
+        """
         return _pywrapcp.Solver_RestoreAssignment(self, assignment)
 
     def StoreAssignment(self, assignment: "Assignment") -> "operations_research::DecisionBuilder *":
-        r""" Returns a DecisionBuilder which stores an Assignment (calls void Assignment::Store())"""
+        r"""
+        Returns a DecisionBuilder which stores an Assignment
+        (calls void Assignment::Store())
+        """
         return _pywrapcp.Solver_StoreAssignment(self, assignment)
 
     def Operator(self, *args) -> "operations_research::LocalSearchOperator *":
@@ -4600,12 +5200,21 @@ pywrapcp    
     def MoveTowardTargetOperator(self, *args) -> "operations_research::LocalSearchOperator *":
         r"""
         *Overload 1:*
-        Creates a local search operator that tries to move the assignment of some variables toward a target. The target is given as an Assignment. This operator generates neighbors in which the only difference compared to the current state is that one variable that belongs to the target assignment is set to its target value.
+        Creates a local search operator that tries to move the assignment of some
+        variables toward a target. The target is given as an Assignment. This
+        operator generates neighbors in which the only difference compared to the
+        current state is that one variable that belongs to the target assignment
+        is set to its target value.
 
         |
 
         *Overload 2:*
-        Creates a local search operator that tries to move the assignment of some variables toward a target. The target is given either as two vectors: a vector of variables and a vector of associated target values. The two vectors should be of the same length. This operator generates neighbors in which the only difference compared to the current state is that one variable that belongs to the given vector is set to its target value.
+        Creates a local search operator that tries to move the assignment of some
+        variables toward a target. The target is given either as two vectors: a
+        vector of variables and a vector of associated target values. The two
+        vectors should be of the same length. This operator generates neighbors in
+        which the only difference compared to the current state is that one
+        variable that belongs to the given vector is set to its target value.
         """
         return _pywrapcp.Solver_MoveTowardTargetOperator(self, *args)
 
@@ -4615,17 +5224,26 @@ pywrapcp    
     def RandomConcatenateOperators(self, *args) -> "operations_research::LocalSearchOperator *":
         r"""
         *Overload 1:*
-        Randomized version of local search concatenator; calls a random operator at each call to MakeNextNeighbor().
+        Randomized version of local search concatenator; calls a random operator
+        at each call to MakeNextNeighbor().
 
         |
 
         *Overload 2:*
-        Randomized version of local search concatenator; calls a random operator at each call to MakeNextNeighbor(). The provided seed is used to initialize the random number generator.
+        Randomized version of local search concatenator; calls a random operator
+        at each call to MakeNextNeighbor(). The provided seed is used to
+        initialize the random number generator.
         """
         return _pywrapcp.Solver_RandomConcatenateOperators(self, *args)
 
     def NeighborhoodLimit(self, op: "LocalSearchOperator", limit: "int64_t") -> "operations_research::LocalSearchOperator *":
-        r""" Creates a local search operator that wraps another local search operator and limits the number of neighbors explored (i.e., calls to MakeNextNeighbor from the current solution (between two calls to Start()). When this limit is reached, MakeNextNeighbor() returns false. The counter is cleared when Start() is called."""
+        r"""
+        Creates a local search operator that wraps another local search
+        operator and limits the number of neighbors explored (i.e., calls
+        to MakeNextNeighbor from the current solution (between two calls
+        to Start()). When this limit is reached, MakeNextNeighbor()
+        returns false. The counter is cleared when Start() is called.
+        """
         return _pywrapcp.Solver_NeighborhoodLimit(self, op, limit)
 
     def LocalSearchPhase(self, *args) -> "operations_research::DecisionBuilder *":
@@ -4635,15 +5253,24 @@ pywrapcp    
         return _pywrapcp.Solver_LocalSearchPhaseParameters(self, *args)
 
     def SearchDepth(self) -> "int":
-        r""" Gets the search depth of the current active search. Returns -1 if there is no active search opened."""
+        r"""
+        Gets the search depth of the current active search. Returns -1 if
+        there is no active search opened.
+        """
         return _pywrapcp.Solver_SearchDepth(self)
 
     def SearchLeftDepth(self) -> "int":
-        r""" Gets the search left depth of the current active search. Returns -1 if there is no active search opened."""
+        r"""
+        Gets the search left depth of the current active search. Returns -1 if
+        there is no active search opened.
+        """
         return _pywrapcp.Solver_SearchLeftDepth(self)
 
     def SolveDepth(self) -> "int":
-        r""" Gets the number of nested searches. It returns 0 outside search, 1 during the top level search, 2 or more in case of nested searches."""
+        r"""
+        Gets the number of nested searches. It returns 0 outside search,
+        1 during the top level search, 2 or more in case of nested searches.
+        """
         return _pywrapcp.Solver_SolveDepth(self)
 
     def Rand64(self, size: "int64_t") -> "int64_t":
@@ -4663,7 +5290,10 @@ pywrapcp    
         return _pywrapcp.Solver_LocalSearchProfile(self)
 
     def Constraints(self) -> "int":
-        r""" Counts the number of constraints that have been added to the solver before the search."""
+        r"""
+        Counts the number of constraints that have been added
+        to the solver before the search.
+        """
         return _pywrapcp.Solver_Constraints(self)
 
     def Accept(self, visitor: "operations_research::ModelVisitor *const") -> "void":
@@ -4678,7 +5308,10 @@ pywrapcp    
         return _pywrapcp.Solver_RestartCurrentSearch(self)
 
     def ShouldFail(self) -> "void":
-        r""" These methods are only useful for the SWIG wrappers, which need a way to externally cause the Solver to fail."""
+        r"""
+        These methods are only useful for the SWIG wrappers, which need a way
+        to externally cause the Solver to fail.
+        """
         return _pywrapcp.Solver_ShouldFail(self)
 
     def __str__(self) -> "std::string":
@@ -4738,7 +5371,11 @@ pywrapcp    
     return _pywrapcp.Solver_MemoryUsage()
 
 class BaseObject(object):
-    r""" A BaseObject is the root of all reversibly allocated objects. A DebugString method and the associated << operator are implemented as a convenience."""
+    r"""
+    A BaseObject is the root of all reversibly allocated objects.
+    A DebugString method and the associated << operator are implemented
+    as a convenience.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -4767,7 +5404,12 @@ pywrapcp    
 _pywrapcp.BaseObject_swigregister(BaseObject)
 
 class PropagationBaseObject(BaseObject):
-    r""" NOLINT The PropagationBaseObject is a subclass of BaseObject that is also friend to the Solver class. It allows accessing methods useful when writing new constraints or new expressions."""
+    r"""
+    NOLINT
+    The PropagationBaseObject is a subclass of BaseObject that is also
+    friend to the Solver class. It allows accessing methods useful when
+    writing new constraints or new expressions.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
@@ -4798,7 +5440,10 @@ pywrapcp    
 _pywrapcp.PropagationBaseObject_swigregister(PropagationBaseObject)
 
 class Decision(BaseObject):
-    r""" A Decision represents a choice point in the search tree. The two main methods are Apply() to go left, or Refute() to go right."""
+    r"""
+    A Decision represents a choice point in the search tree. The two main
+    methods are Apply() to go left, or Refute() to go right.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -4835,7 +5480,10 @@ pywrapcp    
 _pywrapcp.Decision_swigregister(Decision)
 
 class DecisionBuilder(BaseObject):
-    r""" A DecisionBuilder is responsible for creating the search tree. The important method is Next(), which returns the next decision to execute."""
+    r"""
+    A DecisionBuilder is responsible for creating the search tree. The
+    important method is Next(), which returns the next decision to execute.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -4848,7 +5496,12 @@ pywrapcp    
     __swig_destroy__ = _pywrapcp.delete_DecisionBuilder
 
     def NextWrapper(self, s: "Solver") -> "operations_research::Decision *":
-        r""" This is the main method of the decision builder class. It must return a decision (an instance of the class Decision). If it returns nullptr, this means that the decision builder has finished its work."""
+        r"""
+        This is the main method of the decision builder class. It must
+        return a decision (an instance of the class Decision). If it
+        returns nullptr, this means that the decision builder has finished
+        its work.
+        """
         return _pywrapcp.DecisionBuilder_NextWrapper(self, s)
 
     def DebugString(self) -> "std::string":
@@ -4868,13 +5521,26 @@ pywrapcp    
 _pywrapcp.DecisionBuilder_swigregister(DecisionBuilder)
 
 class Demon(BaseObject):
-    r""" A Demon is the base element of a propagation queue. It is the main   object responsible for implementing the actual propagation   of the constraint and pruning the inconsistent values in the domains   of the variables. The main concept is that demons are listeners that are   attached to the variables and listen to their modifications. There are two methods:  - Run() is the actual method called when the demon is processed.  - priority() returns its priority. Standard priorities are slow, normal    or fast. "immediate" is reserved for variables and is treated separately."""
+    r"""
+    A Demon is the base element of a propagation queue. It is the main
+      object responsible for implementing the actual propagation
+      of the constraint and pruning the inconsistent values in the domains
+      of the variables. The main concept is that demons are listeners that are
+      attached to the variables and listen to their modifications.
+    There are two methods:
+     - Run() is the actual method called when the demon is processed.
+     - priority() returns its priority. Standard priorities are slow, normal
+       or fast. "immediate" is reserved for variables and is treated separately.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
 
     def __init__(self):
-        r""" This indicates the priority of a demon. Immediate demons are treated separately and corresponds to variables."""
+        r"""
+        This indicates the priority of a demon. Immediate demons are treated
+        separately and corresponds to variables.
+        """
         if self.__class__ == Demon:
             _self = None
         else:
@@ -4887,14 +5553,21 @@ pywrapcp    
         return _pywrapcp.Demon_RunWrapper(self, s)
 
     def Priority(self) -> "operations_research::Solver::DemonPriority":
-        r""" This method returns the priority of the demon. Usually a demon is fast, slow or normal. Immediate demons are reserved for internal use to maintain variables."""
+        r"""
+        This method returns the priority of the demon. Usually a demon is
+        fast, slow or normal. Immediate demons are reserved for internal
+        use to maintain variables.
+        """
         return _pywrapcp.Demon_Priority(self)
 
     def DebugString(self) -> "std::string":
         return _pywrapcp.Demon_DebugString(self)
 
     def Inhibit(self, s: "Solver") -> "void":
-        r""" This method inhibits the demon in the search tree below the current position."""
+        r"""
+        This method inhibits the demon in the search tree below the
+        current position.
+        """
         return _pywrapcp.Demon_Inhibit(self, s)
 
     def Desinhibit(self, s: "Solver") -> "void":
@@ -4909,7 +5582,14 @@ pywrapcp    
 _pywrapcp.Demon_swigregister(Demon)
 
 class Constraint(PropagationBaseObject):
-    r""" A constraint is the main modeling object. It provides two methods:   - Post() is responsible for creating the demons and attaching them to     immediate demons().   - InitialPropagate() is called once just after Post and performs     the initial propagation. The subsequent propagations will be performed     by the demons Posted during the post() method."""
+    r"""
+    A constraint is the main modeling object. It provides two methods:
+      - Post() is responsible for creating the demons and attaching them to
+        immediate demons().
+      - InitialPropagate() is called once just after Post and performs
+        the initial propagation. The subsequent propagations will be performed
+        by the demons Posted during the post() method.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -4922,18 +5602,28 @@ pywrapcp    
     __swig_destroy__ = _pywrapcp.delete_Constraint
 
     def Post(self) -> "void":
-        r""" This method is called when the constraint is processed by the solver. Its main usage is to attach demons to variables."""
+        r"""
+        This method is called when the constraint is processed by the
+        solver. Its main usage is to attach demons to variables.
+        """
         return _pywrapcp.Constraint_Post(self)
 
     def InitialPropagateWrapper(self) -> "void":
-        r""" This method performs the initial propagation of the constraint. It is called just after the post."""
+        r"""
+        This method performs the initial propagation of the
+        constraint. It is called just after the post.
+        """
         return _pywrapcp.Constraint_InitialPropagateWrapper(self)
 
     def DebugString(self) -> "std::string":
         return _pywrapcp.Constraint_DebugString(self)
 
     def Var(self) -> "operations_research::IntVar *":
-        r""" Creates a Boolean variable representing the status of the constraint (false = constraint is violated, true = constraint is satisfied). It returns nullptr if the constraint does not support this API."""
+        r"""
+        Creates a Boolean variable representing the status of the constraint
+        (false = constraint is violated, true = constraint is satisfied). It
+        returns nullptr if the constraint does not support this API.
+        """
         return _pywrapcp.Constraint_Var(self)
 
     def __repr__(self) -> "std::string":
@@ -5045,7 +5735,10 @@ pywrapcp    
         return _pywrapcp.SearchMonitor_RefuteDecision(self, d)
 
     def AfterDecision(self, d: "Decision", apply: "bool") -> "void":
-        r""" Just after refuting or applying the decision, apply is true after Apply. This is called only if the Apply() or Refute() methods have not failed."""
+        r"""
+        Just after refuting or applying the decision, apply is true after Apply.
+        This is called only if the Apply() or Refute() methods have not failed.
+        """
         return _pywrapcp.SearchMonitor_AfterDecision(self, d, apply)
 
     def BeginFail(self) -> "void":
@@ -5065,11 +5758,19 @@ pywrapcp    
         return _pywrapcp.SearchMonitor_EndInitialPropagation(self)
 
     def AcceptSolution(self) -> "bool":
-        r""" This method is called when a solution is found. It asserts whether the solution is valid. A value of false indicates that the solution should be discarded."""
+        r"""
+        This method is called when a solution is found. It asserts whether the
+        solution is valid. A value of false indicates that the solution
+        should be discarded.
+        """
         return _pywrapcp.SearchMonitor_AcceptSolution(self)
 
     def AtSolution(self) -> "bool":
-        r""" This method is called when a valid solution is found. If the return value is true, then search will resume after. If the result is false, then search will stop there."""
+        r"""
+        This method is called when a valid solution is found. If the
+        return value is true, then search will resume after. If the result
+        is false, then search will stop there.
+        """
         return _pywrapcp.SearchMonitor_AtSolution(self)
 
     def NoMoreSolutions(self) -> "void":
@@ -5077,10 +5778,14 @@ pywrapcp    
         return _pywrapcp.SearchMonitor_NoMoreSolutions(self)
 
     def LocalOptimum(self) -> "bool":
-        r""" When a local optimum is reached. If 'true' is returned, the last solution is discarded and the search proceeds with the next one."""
+        r"""
+        When a local optimum is reached. If 'true' is returned, the last solution
+        is discarded and the search proceeds with the next one.
+        """
         return _pywrapcp.SearchMonitor_LocalOptimum(self)
 
     def AcceptDelta(self, delta: "Assignment", deltadelta: "Assignment") -> "bool":
+        
         return _pywrapcp.SearchMonitor_AcceptDelta(self, delta, deltadelta)
 
     def AcceptNeighbor(self) -> "void":
@@ -5104,7 +5809,15 @@ pywrapcp    
 _pywrapcp.SearchMonitor_swigregister(SearchMonitor)
 
 class IntExpr(PropagationBaseObject):
-    r""" The class IntExpr is the base of all integer expressions in constraint programming. It contains the basic protocol for an expression:   - setting and modifying its bound   - querying if it is bound   - listening to events modifying its bounds   - casting it into a variable (instance of IntVar)"""
+    r"""
+    The class IntExpr is the base of all integer expressions in
+    constraint programming.
+    It contains the basic protocol for an expression:
+      - setting and modifying its bound
+      - querying if it is bound
+      - listening to events modifying its bounds
+      - casting it into a variable (instance of IntVar)
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -5144,7 +5857,12 @@ pywrapcp    
         return _pywrapcp.IntExpr_Var(self)
 
     def VarWithName(self, name: "std::string const &") -> "operations_research::IntVar *":
-        r""" Creates a variable from the expression and set the name of the resulting var. If the expression is already a variable, then it will set the name of the expression, possibly overwriting it. This is just a shortcut to Var() followed by set_name()."""
+        r"""
+        Creates a variable from the expression and set the name of the
+        resulting var. If the expression is already a variable, then it
+        will set the name of the expression, possibly overwriting it.
+        This is just a shortcut to Var() followed by set_name().
+        """
         return _pywrapcp.IntExpr_VarWithName(self, name)
 
     def WhenRange(self, *args) -> "void":
@@ -5235,7 +5953,22 @@ pywrapcp    
 _pywrapcp.IntExpr_swigregister(IntExpr)
 
 class IntVarIterator(BaseObject):
-    r""" The class Iterator has two direct subclasses. HoleIterators iterates over all holes, that is value removed between the current min and max of the variable since the last time the variable was processed in the queue. DomainIterators iterates over all elements of the variable domain. Both iterators are not robust to domain changes. Hole iterators can also report values outside the current min and max of the variable. HoleIterators should only be called from a demon attached to the variable that has created this iterator. IntVar* current_var; std::unique_ptr<IntVarIterator> it(current_var->MakeHoleIterator(false)); for (const int64_t hole : InitAndGetValues(it)) {   /// use the hole }"""
+    r"""
+     The class Iterator has two direct subclasses. HoleIterators
+     iterates over all holes, that is value removed between the
+     current min and max of the variable since the last time the
+     variable was processed in the queue. DomainIterators iterates
+     over all elements of the variable domain. Both iterators are not
+     robust to domain changes. Hole iterators can also report values outside
+     the current min and max of the variable.
+     HoleIterators should only be called from a demon attached to the
+     variable that has created this iterator.
+     IntVar* current_var;
+     std::unique_ptr<IntVarIterator> it(current_var->MakeHoleIterator(false));
+     for (const int64_t hole : InitAndGetValues(it)) {
+    use the hole
+     }
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -5283,7 +6016,11 @@ pywrapcp    
 _pywrapcp.IntVarIterator_swigregister(IntVarIterator)
 
 class IntVar(IntExpr):
-    r""" The class IntVar is a subset of IntExpr. In addition to the IntExpr protocol, it offers persistence, removing values from the domains, and a finer model for events."""
+    r"""
+    The class IntVar is a subset of IntExpr. In addition to the
+    IntExpr protocol, it offers persistence, removing values from the domains,
+    and a finer model for events.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -5297,7 +6034,10 @@ pywrapcp    
         return _pywrapcp.IntVar_Var(self)
 
     def Value(self) -> "int64_t":
-        r""" This method returns the value of the variable. This method checks before that the variable is bound."""
+        r"""
+        This method returns the value of the variable. This method checks
+        before that the variable is bound.
+        """
         return _pywrapcp.IntVar_Value(self)
 
     def RemoveValue(self, v: "int64_t") -> "void":
@@ -5305,7 +6045,10 @@ pywrapcp    
         return _pywrapcp.IntVar_RemoveValue(self, v)
 
     def RemoveInterval(self, l: "int64_t", u: "int64_t") -> "void":
-        r""" This method removes the interval 'l' .. 'u' from the domain of the variable. It assumes that 'l' <= 'u'."""
+        r"""
+        This method removes the interval 'l' .. 'u' from the domain of
+        the variable. It assumes that 'l' <= 'u'.
+        """
         return _pywrapcp.IntVar_RemoveInterval(self, l, u)
 
     def RemoveValues(self, values: "std::vector< int64_t > const &") -> "void":
@@ -5319,24 +6062,28 @@ pywrapcp    
     def WhenBound(self, *args) -> "void":
         r"""
         *Overload 1:*
-        This method attaches a demon that will be awakened when the variable is bound.
+        This method attaches a demon that will be awakened when the
+        variable is bound.
 
         |
 
         *Overload 2:*
-        This method attaches a closure that will be awakened when the variable is bound.
+        This method attaches a closure that will be awakened when the
+        variable is bound.
         """
         return _pywrapcp.IntVar_WhenBound(self, *args)
 
     def WhenDomain(self, *args) -> "void":
         r"""
         *Overload 1:*
-        This method attaches a demon that will watch any domain modification of the domain of the variable.
+        This method attaches a demon that will watch any domain
+        modification of the domain of the variable.
 
         |
 
         *Overload 2:*
-        This method attaches a closure that will watch any domain modification of the domain of the variable.
+        This method attaches a closure that will watch any domain
+        modification of the domain of the variable.
         """
         return _pywrapcp.IntVar_WhenDomain(self, *args)
 
@@ -5345,15 +6092,26 @@ pywrapcp    
         return _pywrapcp.IntVar_Size(self)
 
     def Contains(self, v: "int64_t") -> "bool":
-        r""" This method returns whether the value 'v' is in the domain of the variable."""
+        r"""
+        This method returns whether the value 'v' is in the domain of the
+        variable.
+        """
         return _pywrapcp.IntVar_Contains(self, v)
 
     def HoleIteratorAux(self, reversible: "bool") -> "operations_research::IntVarIterator *":
-        r""" Creates a hole iterator. When 'reversible' is false, the returned object is created on the normal C++ heap and the solver does NOT take ownership of the object."""
+        r"""
+        Creates a hole iterator. When 'reversible' is false, the returned
+        object is created on the normal C++ heap and the solver does NOT
+        take ownership of the object.
+        """
         return _pywrapcp.IntVar_HoleIteratorAux(self, reversible)
 
     def DomainIteratorAux(self, reversible: "bool") -> "operations_research::IntVarIterator *":
-        r""" Creates a domain iterator. When 'reversible' is false, the returned object is created on the normal C++ heap and the solver does NOT take ownership of the object."""
+        r"""
+        Creates a domain iterator. When 'reversible' is false, the
+        returned object is created on the normal C++ heap and the solver
+        does NOT take ownership of the object.
+        """
         return _pywrapcp.IntVar_DomainIteratorAux(self, reversible)
 
     def OldMin(self) -> "int64_t":
@@ -5381,7 +6139,11 @@ pywrapcp    
 _pywrapcp.IntVar_swigregister(IntVar)
 
 class SolutionCollector(SearchMonitor):
-    r""" This class is the root class of all solution collectors. It implements a basic query API to be used independently of the collector used."""
+    r"""
+    This class is the root class of all solution collectors.
+    It implements a basic query API to be used independently
+    of the collector used.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -5419,7 +6181,10 @@ pywrapcp    
         return _pywrapcp.SolutionCollector_Branches(self, n)
 
     def Failures(self, n: "int") -> "int64_t":
-        r""" Returns the number of failures encountered at the time of the nth solution."""
+        r"""
+        Returns the number of failures encountered at the time of the nth
+        solution.
+        """
         return _pywrapcp.SolutionCollector_Failures(self, n)
 
     def ObjectiveValue(self, n: "int") -> "int64_t":
@@ -5447,22 +6212,37 @@ pywrapcp    
         return _pywrapcp.SolutionCollector_PerformedValue(self, n, var)
 
     def ForwardSequence(self, n: "int", var: "SequenceVar") -> "std::vector< int > const &":
-        r""" This is a shortcut to get the ForwardSequence of 'var' in the nth solution. The forward sequence is the list of ranked interval variables starting from the start of the sequence."""
+        r"""
+        This is a shortcut to get the ForwardSequence of 'var' in the
+        nth solution. The forward sequence is the list of ranked interval
+        variables starting from the start of the sequence.
+        """
         return _pywrapcp.SolutionCollector_ForwardSequence(self, n, var)
 
     def BackwardSequence(self, n: "int", var: "SequenceVar") -> "std::vector< int > const &":
-        r""" This is a shortcut to get the BackwardSequence of 'var' in the nth solution. The backward sequence is the list of ranked interval variables starting from the end of the sequence."""
+        r"""
+        This is a shortcut to get the BackwardSequence of 'var' in the
+        nth solution. The backward sequence is the list of ranked interval
+        variables starting from the end of the sequence.
+        """
         return _pywrapcp.SolutionCollector_BackwardSequence(self, n, var)
 
     def Unperformed(self, n: "int", var: "SequenceVar") -> "std::vector< int > const &":
-        r""" This is a shortcut to get the list of unperformed of 'var' in the nth solution."""
+        r"""
+        This is a shortcut to get the list of unperformed of 'var' in the
+        nth solution.
+        """
         return _pywrapcp.SolutionCollector_Unperformed(self, n, var)
 
 # Register SolutionCollector in _pywrapcp:
 _pywrapcp.SolutionCollector_swigregister(SolutionCollector)
 
 class OptimizeVar(SearchMonitor):
-    r""" This class encapsulates an objective. It requires the direction (minimize or maximize), the variable to optimize, and the improvement step."""
+    r"""
+    This class encapsulates an objective. It requires the direction
+    (minimize or maximize), the variable to optimize, and the
+    improvement step.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -5518,7 +6298,12 @@ pywrapcp    
         return _pywrapcp.SearchLimit_Crossed(self)
 
     def Check(self) -> "bool":
-        r""" This method is called to check the status of the limit. A return value of true indicates that we have indeed crossed the limit. In that case, this method will not be called again and the remaining search will be discarded."""
+        r"""
+        This method is called to check the status of the limit. A return
+        value of true indicates that we have indeed crossed the limit. In
+        that case, this method will not be called again and the remaining
+        search will be discarded.
+        """
         return _pywrapcp.SearchLimit_Check(self)
 
     def Init(self) -> "void":
@@ -5542,7 +6327,18 @@ pywrapcp    
 _pywrapcp.SearchLimit_swigregister(SearchLimit)
 
 class IntervalVar(PropagationBaseObject):
-    r""" Interval variables are often used in scheduling. The main characteristics of an IntervalVar are the start position, duration, and end date. All these characteristics can be queried and set, and demons can be posted on their modifications. An important aspect is optionality: an IntervalVar can be performed or not. If unperformed, then it simply does not exist, and its characteristics cannot be accessed any more. An interval var is automatically marked as unperformed when it is not consistent anymore (start greater than end, duration < 0...)"""
+    r"""
+    Interval variables are often used in scheduling. The main characteristics
+    of an IntervalVar are the start position, duration, and end
+    date. All these characteristics can be queried and set, and demons can
+    be posted on their modifications.
+
+    An important aspect is optionality: an IntervalVar can be performed or not.
+    If unperformed, then it simply does not exist, and its characteristics
+    cannot be accessed any more. An interval var is automatically marked
+    as unperformed when it is not consistent anymore (start greater
+    than end, duration < 0...)
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -5550,7 +6346,10 @@ pywrapcp    
         raise AttributeError("No constructor defined - class is abstract")
 
     def StartMin(self) -> "int64_t":
-        r""" These methods query, set, and watch the start position of the interval var."""
+        r"""
+        These methods query, set, and watch the start position of the
+        interval var.
+        """
         return _pywrapcp.IntervalVar_StartMin(self)
 
     def StartMax(self) -> "int64_t":
@@ -5634,7 +6433,10 @@ pywrapcp    
         return _pywrapcp.IntervalVar_WhenEndBound(self, *args)
 
     def MustBePerformed(self) -> "bool":
-        r""" These methods query, set, and watch the performed status of the interval var."""
+        r"""
+        These methods query, set, and watch the performed status of the
+        interval var.
+        """
         return _pywrapcp.IntervalVar_MustBePerformed(self)
 
     def MayBePerformed(self) -> "bool":
@@ -5668,7 +6470,11 @@ pywrapcp    
         return _pywrapcp.IntervalVar_WhenAnything(self, *args)
 
     def StartExpr(self) -> "operations_research::IntExpr *":
-        r""" These methods create expressions encapsulating the start, end and duration of the interval var. Please note that these must not be used if the interval var is unperformed."""
+        r"""
+        These methods create expressions encapsulating the start, end
+        and duration of the interval var. Please note that these must not
+        be used if the interval var is unperformed.
+        """
         return _pywrapcp.IntervalVar_StartExpr(self)
 
     def DurationExpr(self) -> "operations_research::IntExpr *":
@@ -5681,7 +6487,11 @@ pywrapcp    
         return _pywrapcp.IntervalVar_PerformedExpr(self)
 
     def SafeStartExpr(self, unperformed_value: "int64_t") -> "operations_research::IntExpr *":
-        r""" These methods create expressions encapsulating the start, end and duration of the interval var. If the interval var is unperformed, they will return the unperformed_value."""
+        r"""
+        These methods create expressions encapsulating the start, end
+        and duration of the interval var. If the interval var is
+        unperformed, they will return the unperformed_value.
+        """
         return _pywrapcp.IntervalVar_SafeStartExpr(self, unperformed_value)
 
     def SafeDurationExpr(self, unperformed_value: "int64_t") -> "operations_research::IntExpr *":
@@ -5778,7 +6588,14 @@ pywrapcp    
 _pywrapcp.IntervalVar_swigregister(IntervalVar)
 
 class SequenceVar(PropagationBaseObject):
-    r""" A sequence variable is a variable whose domain is a set of possible orderings of the interval variables. It allows ordering of tasks. It has two sets of methods: ComputePossibleFirstsAndLasts(), which returns the list of interval variables that can be ranked first or last; and RankFirst/RankNotFirst/RankLast/RankNotLast, which can be used to create the search decision."""
+    r"""
+    A sequence variable is a variable whose domain is a set of possible
+    orderings of the interval variables. It allows ordering of tasks. It
+    has two sets of methods: ComputePossibleFirstsAndLasts(), which
+    returns the list of interval variables that can be ranked first or
+    last; and RankFirst/RankNotFirst/RankLast/RankNotLast, which can be
+    used to create the search decision.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -5789,19 +6606,31 @@ pywrapcp    
         return _pywrapcp.SequenceVar_DebugString(self)
 
     def RankFirst(self, index: "int") -> "void":
-        r""" Ranks the index_th interval var first of all unranked interval vars. After that, it will no longer be considered ranked."""
+        r"""
+        Ranks the index_th interval var first of all unranked interval
+        vars. After that, it will no longer be considered ranked.
+        """
         return _pywrapcp.SequenceVar_RankFirst(self, index)
 
     def RankNotFirst(self, index: "int") -> "void":
-        r""" Indicates that the index_th interval var will not be ranked first of all currently unranked interval vars."""
+        r"""
+        Indicates that the index_th interval var will not be ranked first
+        of all currently unranked interval vars.
+        """
         return _pywrapcp.SequenceVar_RankNotFirst(self, index)
 
     def RankLast(self, index: "int") -> "void":
-        r""" Ranks the index_th interval var first of all unranked interval vars. After that, it will no longer be considered ranked."""
+        r"""
+        Ranks the index_th interval var first of all unranked interval
+        vars. After that, it will no longer be considered ranked.
+        """
         return _pywrapcp.SequenceVar_RankLast(self, index)
 
     def RankNotLast(self, index: "int") -> "void":
-        r""" Indicates that the index_th interval var will not be ranked first of all currently unranked interval vars."""
+        r"""
+        Indicates that the index_th interval var will not be ranked first
+        of all currently unranked interval vars.
+        """
         return _pywrapcp.SequenceVar_RankNotLast(self, index)
 
     def Interval(self, index: "int") -> "operations_research::IntervalVar *":
@@ -5994,7 +6823,21 @@ pywrapcp    
 _pywrapcp.IntervalVarElement_swigregister(IntervalVarElement)
 
 class SequenceVarElement(AssignmentElement):
-    r""" The SequenceVarElement stores a partial representation of ranked interval variables in the underlying sequence variable. This representation consists of three vectors:   - the forward sequence. That is the list of interval variables     ranked first in the sequence.  The first element of the backward     sequence is the first interval in the sequence variable.   - the backward sequence. That is the list of interval variables     ranked last in the sequence. The first element of the backward     sequence is the last interval in the sequence variable.   - The list of unperformed interval variables.  Furthermore, if all performed variables are ranked, then by  convention, the forward_sequence will contain all such variables  and the backward_sequence will be empty."""
+    r"""
+    The SequenceVarElement stores a partial representation of ranked
+    interval variables in the underlying sequence variable.
+    This representation consists of three vectors:
+      - the forward sequence. That is the list of interval variables
+        ranked first in the sequence.  The first element of the backward
+        sequence is the first interval in the sequence variable.
+      - the backward sequence. That is the list of interval variables
+        ranked last in the sequence. The first element of the backward
+        sequence is the last interval in the sequence variable.
+      - The list of unperformed interval variables.
+     Furthermore, if all performed variables are ranked, then by
+     convention, the forward_sequence will contain all such variables
+     and the backward_sequence will be empty.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -6037,7 +6880,10 @@ pywrapcp    
 _pywrapcp.SequenceVarElement_swigregister(SequenceVarElement)
 
 class Assignment(PropagationBaseObject):
-    r""" An Assignment is a variable -> domains mapping, used to report solutions to the user."""
+    r"""
+    An Assignment is a variable -> domains mapping, used
+    to report solutions to the user.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -6292,46 +7138,80 @@ pywrapcp    
     def AddWeightedSumLessOrEqualConstantDimension(self, *args) -> "void":
         r"""
         *Overload 1:*
-        Dimensions are additional constraints than can restrict what is possible with the pack constraint. It can be used to set capacity limits, to count objects per bin, to compute unassigned penalties... This dimension imposes that for all bins b, the weighted sum (weights[i]) of all objects i assigned to 'b' is less or equal 'bounds[b]'.
+        Dimensions are additional constraints than can restrict what is
+        possible with the pack constraint. It can be used to set capacity
+        limits, to count objects per bin, to compute unassigned
+        penalties...
+        This dimension imposes that for all bins b, the weighted sum
+        (weights[i]) of all objects i assigned to 'b' is less or equal
+        'bounds[b]'.
 
         |
 
         *Overload 2:*
-        This dimension imposes that for all bins b, the weighted sum (weights->Run(i)) of all objects i assigned to 'b' is less or equal to 'bounds[b]'. Ownership of the callback is transferred to the pack constraint.
+        This dimension imposes that for all bins b, the weighted sum
+        (weights->Run(i)) of all objects i assigned to 'b' is less or
+        equal to 'bounds[b]'. Ownership of the callback is transferred to
+        the pack constraint.
 
         |
 
         *Overload 3:*
-        This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b) of all objects i assigned to 'b' is less or equal to 'bounds[b]'. Ownership of the callback is transferred to the pack constraint.
+        This dimension imposes that for all bins b, the weighted sum
+        (weights->Run(i, b) of all objects i assigned to 'b' is less or
+        equal to 'bounds[b]'. Ownership of the callback is transferred to
+        the pack constraint.
         """
         return _pywrapcp.Pack_AddWeightedSumLessOrEqualConstantDimension(self, *args)
 
     def AddWeightedSumEqualVarDimension(self, *args) -> "void":
         r"""
         *Overload 1:*
-        This dimension imposes that for all bins b, the weighted sum (weights[i]) of all objects i assigned to 'b' is equal to loads[b].
+        This dimension imposes that for all bins b, the weighted sum
+        (weights[i]) of all objects i assigned to 'b' is equal to loads[b].
 
         |
 
         *Overload 2:*
-        This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)) of all objects i assigned to 'b' is equal to loads[b].
+        This dimension imposes that for all bins b, the weighted sum
+        (weights->Run(i, b)) of all objects i assigned to 'b' is equal to
+        loads[b].
         """
         return _pywrapcp.Pack_AddWeightedSumEqualVarDimension(self, *args)
 
     def AddSumVariableWeightsLessOrEqualConstantDimension(self, usage: "std::vector< operations_research::IntVar * > const &", capacity: "std::vector< int64_t > const &") -> "void":
-        r""" This dimension imposes: forall b in bins,    sum (i in items: usage[i] * is_assigned(i, b)) <= capacity[b] where is_assigned(i, b) is true if and only if item i is assigned to the bin b. This can be used to model shapes of items by linking variables of the same item on parallel dimensions with an allowed assignment constraint."""
+        r"""
+        This dimension imposes:
+        forall b in bins,
+           sum (i in items: usage[i] * is_assigned(i, b)) <= capacity[b]
+        where is_assigned(i, b) is true if and only if item i is assigned
+        to the bin b.
+
+        This can be used to model shapes of items by linking variables of
+        the same item on parallel dimensions with an allowed assignment
+        constraint.
+        """
         return _pywrapcp.Pack_AddSumVariableWeightsLessOrEqualConstantDimension(self, usage, capacity)
 
     def AddWeightedSumOfAssignedDimension(self, weights: "std::vector< int64_t > const &", cost_var: "IntVar") -> "void":
-        r""" This dimension enforces that cost_var == sum of weights[i] for all objects 'i' assigned to a bin."""
+        r"""
+        This dimension enforces that cost_var == sum of weights[i] for
+        all objects 'i' assigned to a bin.
+        """
         return _pywrapcp.Pack_AddWeightedSumOfAssignedDimension(self, weights, cost_var)
 
     def AddCountUsedBinDimension(self, count_var: "IntVar") -> "void":
-        r""" This dimension links 'count_var' to the actual number of bins used in the pack."""
+        r"""
+        This dimension links 'count_var' to the actual number of bins used in the
+        pack.
+        """
         return _pywrapcp.Pack_AddCountUsedBinDimension(self, count_var)
 
     def AddCountAssignedItemsDimension(self, count_var: "IntVar") -> "void":
-        r""" This dimension links 'count_var' to the actual number of items assigned to a bin in the pack."""
+        r"""
+        This dimension links 'count_var' to the actual number of items
+        assigned to a bin in the pack.
+        """
         return _pywrapcp.Pack_AddCountAssignedItemsDimension(self, count_var)
 
     def Post(self) -> "void":
@@ -6358,7 +7238,12 @@ pywrapcp    
         return _pywrapcp.DisjunctiveConstraint_SequenceVar(self)
 
     def SetTransitionTime(self, transition_time: "operations_research::Solver::IndexEvaluator2") -> "void":
-        r""" Add a transition time between intervals.  It forces the distance between the end of interval a and start of interval b that follows it to be at least transition_time(a, b). This function must always return a positive or null value."""
+        r"""
+        Add a transition time between intervals.  It forces the distance between
+        the end of interval a and start of interval b that follows it to be at
+        least transition_time(a, b). This function must always return
+        a positive or null value.
+        """
         return _pywrapcp.DisjunctiveConstraint_SetTransitionTime(self, transition_time)
 
     def TransitionTime(self, before_index: "int", after_index: "int") -> "int64_t":
@@ -6368,18 +7253,24 @@ pywrapcp    
 _pywrapcp.DisjunctiveConstraint_swigregister(DisjunctiveConstraint)
 
 class RevInteger(object):
-    r""" This class adds reversibility to a POD type. It contains the stamp optimization. i.e. the SaveValue call is done only once per node of the search tree.  Please note that actual stamps always starts at 1, thus an initial value of 0 will always trigger the first SaveValue."""
+    r"""
+    This class adds reversibility to a POD type.
+    It contains the stamp optimization. i.e. the SaveValue call is done
+    only once per node of the search tree.  Please note that actual
+    stamps always starts at 1, thus an initial value of 0 will always
+    trigger the first SaveValue.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
 
-    def __init__(self, val: "long const &"):
+    def __init__(self, val: "long long const &"):
         _pywrapcp.RevInteger_swiginit(self, _pywrapcp.new_RevInteger(val))
 
-    def Value(self) -> "long const &":
+    def Value(self) -> "long long const &":
         return _pywrapcp.RevInteger_Value(self)
 
-    def SetValue(self, s: "Solver", val: "long const &") -> "void":
+    def SetValue(self, s: "Solver", val: "long long const &") -> "void":
         return _pywrapcp.RevInteger_SetValue(self, s, val)
     __swig_destroy__ = _pywrapcp.delete_RevInteger
 
@@ -6392,10 +7283,10 @@ pywrapcp    
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
 
-    def __init__(self, val: "long const &"):
+    def __init__(self, val: "long long const &"):
         _pywrapcp.NumericalRevInteger_swiginit(self, _pywrapcp.new_NumericalRevInteger(val))
 
-    def Add(self, s: "Solver", to_add: "long const &") -> "void":
+    def Add(self, s: "Solver", to_add: "long long const &") -> "void":
         return _pywrapcp.NumericalRevInteger_Add(self, s, to_add)
 
     def Incr(self, s: "Solver") -> "void":
@@ -6409,7 +7300,13 @@ pywrapcp    
 _pywrapcp.NumericalRevInteger_swigregister(NumericalRevInteger)
 
 class RevBool(object):
-    r""" This class adds reversibility to a POD type. It contains the stamp optimization. i.e. the SaveValue call is done only once per node of the search tree.  Please note that actual stamps always starts at 1, thus an initial value of 0 will always trigger the first SaveValue."""
+    r"""
+    This class adds reversibility to a POD type.
+    It contains the stamp optimization. i.e. the SaveValue call is done
+    only once per node of the search tree.  Please note that actual
+    stamps always starts at 1, thus an initial value of 0 will always
+    trigger the first SaveValue.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
@@ -6450,7 +7347,11 @@ pywrapcp    
         return _pywrapcp.IntVarContainer_Restore(self)
 
     def __eq__(self, container: "IntVarContainer") -> "bool":
-        r""" Returns true if this and 'container' both represent the same V* -> E map. Runs in linear time; requires that the == operator on the type E is well defined."""
+        r"""
+        Returns true if this and 'container' both represent the same V* -> E map.
+        Runs in linear time; requires that the == operator on the type E is well
+        defined.
+        """
         return _pywrapcp.IntVarContainer___eq__(self, container)
 
     def __ne__(self, container: "IntVarContainer") -> "bool":
@@ -6483,7 +7384,11 @@ pywrapcp    
         return _pywrapcp.IntervalVarContainer_Restore(self)
 
     def __eq__(self, container: "IntervalVarContainer") -> "bool":
-        r""" Returns true if this and 'container' both represent the same V* -> E map. Runs in linear time; requires that the == operator on the type E is well defined."""
+        r"""
+        Returns true if this and 'container' both represent the same V* -> E map.
+        Runs in linear time; requires that the == operator on the type E is well
+        defined.
+        """
         return _pywrapcp.IntervalVarContainer___eq__(self, container)
 
     def __ne__(self, container: "IntervalVarContainer") -> "bool":
@@ -6516,7 +7421,11 @@ pywrapcp    
         return _pywrapcp.SequenceVarContainer_Restore(self)
 
     def __eq__(self, container: "SequenceVarContainer") -> "bool":
-        r""" Returns true if this and 'container' both represent the same V* -> E map. Runs in linear time; requires that the == operator on the type E is well defined."""
+        r"""
+        Returns true if this and 'container' both represent the same V* -> E map.
+        Runs in linear time; requires that the == operator on the type E is well
+        defined.
+        """
         return _pywrapcp.SequenceVarContainer___eq__(self, container)
 
     def __ne__(self, container: "SequenceVarContainer") -> "bool":
@@ -6527,7 +7436,32 @@ pywrapcp    
 _pywrapcp.SequenceVarContainer_swigregister(SequenceVarContainer)
 
 class LocalSearchOperator(BaseObject):
-    r""" This class represent a reversible FIFO structure. The main difference w.r.t a standard FIFO structure is that a Solver is given as parameter to the modifiers such that the solver can store the backtrack information Iterator's traversing order should not be changed, as some algorithm depend on it to be consistent. It's main use is to store a list of demons in the various classes of variables. The base class for all local search operators. A local search operator is an object that defines the neighborhood of a solution. In other words, a neighborhood is the set of solutions which can be reached from a given solution using an operator. The behavior of the LocalSearchOperator class is similar to iterators. The operator is synchronized with an assignment (gives the current values of the variables); this is done in the Start() method. Then one can iterate over the neighbors using the MakeNextNeighbor method. This method returns an assignment which represents the incremental changes to the current solution. It also returns a second assignment representing the changes to the last solution defined by the neighborhood operator; this assignment is empty if the neighborhood operator cannot track this information."""
+    r"""
+    This class represent a reversible FIFO structure.
+    The main difference w.r.t a standard FIFO structure is that a Solver is
+    given as parameter to the modifiers such that the solver can store the
+    backtrack information
+    Iterator's traversing order should not be changed, as some algorithm
+    depend on it to be consistent.
+    It's main use is to store a list of demons in the various classes of
+    variables.
+    The base class for all local search operators.
+
+    A local search operator is an object that defines the neighborhood of a
+    solution. In other words, a neighborhood is the set of solutions which can
+    be reached from a given solution using an operator.
+
+    The behavior of the LocalSearchOperator class is similar to iterators.
+    The operator is synchronized with an assignment (gives the
+    current values of the variables); this is done in the Start() method.
+
+    Then one can iterate over the neighbors using the MakeNextNeighbor method.
+    This method returns an assignment which represents the incremental changes
+    to the current solution. It also returns a second assignment representing
+    the changes to the last solution defined by the neighborhood operator; this
+    assignment is empty if the neighborhood operator cannot track this
+    information.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -6558,7 +7492,10 @@ pywrapcp    
     __repr__ = _swig_repr
 
     def Start(self, assignment: "Assignment") -> "void":
-        r""" This method should not be overridden. Override OnStart() instead which is called before exiting this method."""
+        r"""
+        This method should not be overridden. Override OnStart() instead which is
+        called before exiting this method.
+        """
         return _pywrapcp.IntVarLocalSearchOperatorTemplate_Start(self, assignment)
 
     def IsIncremental(self) -> "bool":
@@ -6567,18 +7504,25 @@ pywrapcp    
     def Size(self) -> "int":
         return _pywrapcp.IntVarLocalSearchOperatorTemplate_Size(self)
 
-    def Value(self, index: "int64_t") -> "long const &":
-        r""" Returns the value in the current assignment of the variable of given index."""
+    def Value(self, index: "int64_t") -> "long long const &":
+        r"""
+        Returns the value in the current assignment of the variable of given
+        index.
+        """
         return _pywrapcp.IntVarLocalSearchOperatorTemplate_Value(self, index)
 
-    def OldValue(self, index: "int64_t") -> "long const &":
+    def OldValue(self, index: "int64_t") -> "long long const &":
         return _pywrapcp.IntVarLocalSearchOperatorTemplate_OldValue(self, index)
 
-    def SetValue(self, index: "int64_t", value: "long const &") -> "void":
+    def SetValue(self, index: "int64_t", value: "long long const &") -> "void":
         return _pywrapcp.IntVarLocalSearchOperatorTemplate_SetValue(self, index, value)
 
     def OnStart(self) -> "void":
-        r""" Called by Start() after synchronizing the operator with the current assignment. Should be overridden instead of Start() to avoid calling VarLocalSearchOperator::Start explicitly."""
+        r"""
+        Called by Start() after synchronizing the operator with the current
+        assignment. Should be overridden instead of Start() to avoid calling
+        VarLocalSearchOperator::Start explicitly.
+        """
         return _pywrapcp.IntVarLocalSearchOperatorTemplate_OnStart(self)
 
 # Register IntVarLocalSearchOperatorTemplate in _pywrapcp:
@@ -6597,11 +7541,22 @@ pywrapcp    
     __swig_destroy__ = _pywrapcp.delete_IntVarLocalSearchOperator
 
     def NextNeighbor(self, delta: "Assignment", deltadelta: "Assignment") -> "bool":
-        r""" Redefines MakeNextNeighbor to export a simpler interface. The calls to ApplyChanges() and RevertChanges() are factored in this method, hiding both delta and deltadelta from subclasses which only need to override MakeOneNeighbor(). Therefore this method should not be overridden. Override MakeOneNeighbor() instead."""
+        r"""
+        Redefines MakeNextNeighbor to export a simpler interface. The calls to
+        ApplyChanges() and RevertChanges() are factored in this method, hiding
+        both delta and deltadelta from subclasses which only need to override
+        MakeOneNeighbor().
+        Therefore this method should not be overridden. Override MakeOneNeighbor()
+        instead.
+        """
         return _pywrapcp.IntVarLocalSearchOperator_NextNeighbor(self, delta, deltadelta)
 
     def OneNeighbor(self) -> "bool":
-        r""" Creates a new neighbor. It returns false when the neighborhood is completely explored. MakeNextNeighbor() in a subclass of IntVarLocalSearchOperator."""
+        r"""
+        Creates a new neighbor. It returns false when the neighborhood is
+        completely explored.
+        MakeNextNeighbor() in a subclass of IntVarLocalSearchOperator.
+        """
         return _pywrapcp.IntVarLocalSearchOperator_OneNeighbor(self)
     def __disown__(self):
         self.this.disown()
@@ -6621,7 +7576,10 @@ pywrapcp    
     __repr__ = _swig_repr
 
     def Start(self, assignment: "Assignment") -> "void":
-        r""" This method should not be overridden. Override OnStart() instead which is called before exiting this method."""
+        r"""
+        This method should not be overridden. Override OnStart() instead which is
+        called before exiting this method.
+        """
         return _pywrapcp.SequenceVarLocalSearchOperatorTemplate_Start(self, assignment)
 
     def IsIncremental(self) -> "bool":
@@ -6631,7 +7589,10 @@ pywrapcp    
         return _pywrapcp.SequenceVarLocalSearchOperatorTemplate_Size(self)
 
     def Value(self, index: "int64_t") -> "std::vector< int > const &":
-        r""" Returns the value in the current assignment of the variable of given index."""
+        r"""
+        Returns the value in the current assignment of the variable of given
+        index.
+        """
         return _pywrapcp.SequenceVarLocalSearchOperatorTemplate_Value(self, index)
 
     def OldValue(self, index: "int64_t") -> "std::vector< int > const &":
@@ -6641,7 +7602,11 @@ pywrapcp    
         return _pywrapcp.SequenceVarLocalSearchOperatorTemplate_SetValue(self, index, value)
 
     def OnStart(self) -> "void":
-        r""" Called by Start() after synchronizing the operator with the current assignment. Should be overridden instead of Start() to avoid calling VarLocalSearchOperator::Start explicitly."""
+        r"""
+        Called by Start() after synchronizing the operator with the current
+        assignment. Should be overridden instead of Start() to avoid calling
+        VarLocalSearchOperator::Start explicitly.
+        """
         return _pywrapcp.SequenceVarLocalSearchOperatorTemplate_OnStart(self)
 
 # Register SequenceVarLocalSearchOperatorTemplate in _pywrapcp:
@@ -6658,7 +7623,35 @@ pywrapcp    
 _pywrapcp.SequenceVarLocalSearchOperator_swigregister(SequenceVarLocalSearchOperator)
 
 class BaseLns(IntVarLocalSearchOperator):
-    r""" This is the base class for building an Lns operator. An Lns fragment is a collection of variables which will be relaxed. Fragments are built with NextFragment(), which returns false if there are no more fragments to build. Optionally one can override InitFragments, which is called from LocalSearchOperator::Start to initialize fragment data. Here's a sample relaxing one variable at a time: class OneVarLns : public BaseLns {  public:   OneVarLns(const std::vector<IntVar*>& vars) : BaseLns(vars), index_(0) {}   virtual ~OneVarLns() {}   virtual void InitFragments() { index_ = 0; }   virtual bool NextFragment() {     const int size = Size();     if (index_ < size) {       AppendToFragment(index_);       ++index_;       return true;     } else {       return false;     }   }  private:   int index_; };"""
+    r"""
+    This is the base class for building an Lns operator. An Lns fragment is a
+    collection of variables which will be relaxed. Fragments are built with
+    NextFragment(), which returns false if there are no more fragments to build.
+    Optionally one can override InitFragments, which is called from
+    LocalSearchOperator::Start to initialize fragment data.
+
+    Here's a sample relaxing one variable at a time:
+
+    class OneVarLns : public BaseLns {
+     public:
+      OneVarLns(const std::vector<IntVar*>& vars) : BaseLns(vars), index_(0) {}
+      virtual ~OneVarLns() {}
+      virtual void InitFragments() { index_ = 0; }
+      virtual bool NextFragment() {
+        const int size = Size();
+        if (index_ < size) {
+          AppendToFragment(index_);
+          ++index_;
+          return true;
+        } else {
+          return false;
+        }
+      }
+
+     private:
+      int index_;
+    };
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
@@ -6697,7 +7690,12 @@ pywrapcp    
 _pywrapcp.BaseLns_swigregister(BaseLns)
 
 class ChangeValue(IntVarLocalSearchOperator):
-    r""" Defines operators which change the value of variables; each neighbor corresponds to *one* modified variable. Sub-classes have to define ModifyValue which determines what the new variable value is going to be (given the current value and the variable)."""
+    r"""
+    Defines operators which change the value of variables;
+    each neighbor corresponds to *one* modified variable.
+    Sub-classes have to define ModifyValue which determines what the new
+    variable value is going to be (given the current value and the variable).
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
@@ -6725,7 +7723,21 @@ pywrapcp    
 _pywrapcp.ChangeValue_swigregister(ChangeValue)
 
 class PathOperator(IntVarLocalSearchOperator):
-    r""" Base class of the local search operators dedicated to path modifications (a path is a set of nodes linked together by arcs). This family of neighborhoods supposes they are handling next variables representing the arcs (var[i] represents the node immediately after i on a path). Several services are provided: - arc manipulators (SetNext(), ReverseChain(), MoveChain()) - path inspectors (Next(), Prev(), IsPathEnd()) - path iterators: operators need a given number of nodes to define a   neighbor; this class provides the iteration on a given number of (base)   nodes which can be used to define a neighbor (through the BaseNode method) Subclasses only need to override MakeNeighbor to create neighbors using the services above (no direct manipulation of assignments)."""
+    r"""
+    Base class of the local search operators dedicated to path modifications
+    (a path is a set of nodes linked together by arcs).
+    This family of neighborhoods supposes they are handling next variables
+    representing the arcs (var[i] represents the node immediately after i on
+    a path).
+    Several services are provided:
+    - arc manipulators (SetNext(), ReverseChain(), MoveChain())
+    - path inspectors (Next(), Prev(), IsPathEnd())
+    - path iterators: operators need a given number of nodes to define a
+      neighbor; this class provides the iteration on a given number of (base)
+      nodes which can be used to define a neighbor (through the BaseNode method)
+    Subclasses only need to override MakeNeighbor to create neighbors using
+    the services above (no direct manipulation of assignments).
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -6740,7 +7752,38 @@ pywrapcp    
 _pywrapcp.PathOperator_swigregister(PathOperator)
 
 class LocalSearchFilter(BaseObject):
-    r""" Classes to which this template function can be applied to as of 04/2014. Usage: LocalSearchOperator* op = MakeLocalSearchOperator<Relocate>(...); class TwoOpt; class Relocate; class Exchange; class Cross; class MakeActiveOperator; class MakeInactiveOperator; class MakeChainInactiveOperator; class SwapActiveOperator; class ExtendedSwapActiveOperator; class MakeActiveAndRelocate; class RelocateAndMakeActiveOperator; class RelocateAndMakeInactiveOperator; Local Search Filters are used for fast neighbor pruning. Filtering a move is done in several phases: - in the Relax phase, filters determine which parts of their internals   will be changed by the candidate, and modify intermediary State - in the Accept phase, filters check that the candidate is feasible, - if the Accept phase succeeds, the solver may decide to trigger a   Synchronize phase that makes filters change their internal representation   to the last candidate, - otherwise (Accept fails or the solver does not want to synchronize),   a Revert phase makes filters erase any intermediary State generated by the   Relax and Accept phases. A given filter has phases called with the following pattern: (Relax.Accept.Synchronize | Relax.Accept.Revert | Relax.Revert)*. Filters's Revert() is always called in the reverse order their Accept() was called, to allow late filters to use state done/undone by early filters' Accept()/Revert()."""
+    r"""
+    Classes to which this template function can be applied to as of 04/2014.
+    Usage: LocalSearchOperator* op = MakeLocalSearchOperator<Relocate>(...);
+    class TwoOpt;
+    class Relocate;
+    class Exchange;
+    class Cross;
+    class MakeActiveOperator;
+    class MakeInactiveOperator;
+    class MakeChainInactiveOperator;
+    class SwapActiveOperator;
+    class ExtendedSwapActiveOperator;
+    class MakeActiveAndRelocate;
+    class RelocateAndMakeActiveOperator;
+    class RelocateAndMakeInactiveOperator;
+    Local Search Filters are used for fast neighbor pruning.
+    Filtering a move is done in several phases:
+    - in the Relax phase, filters determine which parts of their internals
+      will be changed by the candidate, and modify intermediary State
+    - in the Accept phase, filters check that the candidate is feasible,
+    - if the Accept phase succeeds, the solver may decide to trigger a
+      Synchronize phase that makes filters change their internal representation
+      to the last candidate,
+    - otherwise (Accept fails or the solver does not want to synchronize),
+      a Revert phase makes filters erase any intermediary State generated by the
+      Relax and Accept phases.
+    A given filter has phases called with the following pattern:
+    (Relax.Accept.Synchronize | Relax.Accept.Revert | Relax.Revert)*.
+    Filters's Revert() is always called in the reverse order their Accept() was
+    called, to allow late filters to use state done/undone by early filters'
+    Accept()/Revert().
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -6749,14 +7792,30 @@ pywrapcp    
     __repr__ = _swig_repr
 
     def Accept(self, delta: "Assignment", deltadelta: "Assignment", objective_min: "int64_t", objective_max: "int64_t") -> "bool":
-        r""" Accepts a "delta" given the assignment with which the filter has been synchronized; the delta holds the variables which have been modified and their new value. If the filter represents a part of the global objective, its contribution must be between objective_min and objective_max. Sample: supposing one wants to maintain a[0,1] + b[0,1] <= 1, for the assignment (a,1), (b,0), the delta (b,1) will be rejected but the delta (a,0) will be accepted. TODO(user): Remove arguments when there are no more need for those."""
+        r"""
+        Accepts a "delta" given the assignment with which the filter has been
+        synchronized; the delta holds the variables which have been modified and
+        their new value.
+        If the filter represents a part of the global objective, its contribution
+        must be between objective_min and objective_max.
+        Sample: supposing one wants to maintain a[0,1] + b[0,1] <= 1,
+        for the assignment (a,1), (b,0), the delta (b,1) will be rejected
+        but the delta (a,0) will be accepted.
+        TODO(user): Remove arguments when there are no more need for those.
+        """
         return _pywrapcp.LocalSearchFilter_Accept(self, delta, deltadelta, objective_min, objective_max)
 
     def IsIncremental(self) -> "bool":
         return _pywrapcp.LocalSearchFilter_IsIncremental(self)
 
     def Synchronize(self, assignment: "Assignment", delta: "Assignment") -> "void":
-        r""" Synchronizes the filter with the current solution, delta being the difference with the solution passed to the previous call to Synchronize() or IncrementalSynchronize(). 'delta' can be used to incrementally synchronizing the filter with the new solution by only considering the changes in delta."""
+        r"""
+        Synchronizes the filter with the current solution, delta being the
+        difference with the solution passed to the previous call to Synchronize()
+        or IncrementalSynchronize(). 'delta' can be used to incrementally
+        synchronizing the filter with the new solution by only considering the
+        changes in delta.
+        """
         return _pywrapcp.LocalSearchFilter_Synchronize(self, assignment, delta)
     __swig_destroy__ = _pywrapcp.delete_LocalSearchFilter
 
@@ -6764,7 +7823,11 @@ pywrapcp    
 _pywrapcp.LocalSearchFilter_swigregister(LocalSearchFilter)
 
 class LocalSearchFilterManager(BaseObject):
-    r""" Filter manager: when a move is made, filters are executed to decide whether the solution is feasible and compute parts of the new cost. This class schedules filter execution and composes costs as a sum."""
+    r"""
+    Filter manager: when a move is made, filters are executed to decide whether
+    the solution is feasible and compute parts of the new cost. This class
+    schedules filter execution and composes costs as a sum.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
@@ -6776,7 +7839,11 @@ pywrapcp    
         _pywrapcp.LocalSearchFilterManager_swiginit(self, _pywrapcp.new_LocalSearchFilterManager(*args))
 
     def Accept(self, monitor: "operations_research::LocalSearchMonitor *const", delta: "Assignment", deltadelta: "Assignment", objective_min: "int64_t", objective_max: "int64_t") -> "bool":
-        r""" Returns true iff all filters return true, and the sum of their accepted objectives is between objective_min and objective_max. The monitor has its Begin/EndFiltering events triggered."""
+        r"""
+        Returns true iff all filters return true, and the sum of their accepted
+        objectives is between objective_min and objective_max.
+        The monitor has its Begin/EndFiltering events triggered.
+        """
         return _pywrapcp.LocalSearchFilterManager_Accept(self, monitor, delta, deltadelta, objective_min, objective_max)
 
     def Synchronize(self, assignment: "Assignment", delta: "Assignment") -> "void":
@@ -6800,7 +7867,10 @@ pywrapcp    
     __swig_destroy__ = _pywrapcp.delete_IntVarLocalSearchFilter
 
     def Synchronize(self, assignment: "Assignment", delta: "Assignment") -> "void":
-        r""" This method should not be overridden. Override OnSynchronize() instead which is called before exiting this method."""
+        r"""
+        This method should not be overridden. Override OnSynchronize() instead
+        which is called before exiting this method.
+        """
         return _pywrapcp.IntVarLocalSearchFilter_Synchronize(self, assignment, delta)
 
     def Size(self) -> "int":
@@ -6997,7 +8067,30 @@ pywrapcp    
 
 
 class RoutingIndexManager(object):
-    r""" Manager for any NodeIndex <-> variable index conversion. The routing solver uses variable indices internally and through its API. These variable indices are tricky to manage directly because one Node can correspond to a multitude of variables, depending on the number of times they appear in the model, and if they're used as start and/or end points. This class aims to simplify variable index usage, allowing users to use NodeIndex instead. Usage:   .cpp}   auto starts_ends = ...;  /// These are NodeIndex.   RoutingIndexManager manager(10, 4, starts_ends);  // 10 nodes, 4 vehicles.   RoutingModel model(manager);"""
+    r"""
+    Manager for any NodeIndex <-> variable index conversion. The routing solver
+    uses variable indices internally and through its API. These variable indices
+    are tricky to manage directly because one Node can correspond to a multitude
+    of variables, depending on the number of times they appear in the model, and
+    if they're used as start and/or end points. This class aims to simplify
+    variable index usage, allowing users to use NodeIndex instead.
+
+    Usage:
+
+      .. code-block:: c++
+
+          auto starts_ends = ...;  /// These are NodeIndex.
+          RoutingIndexManager manager(10, 4, starts_ends);  // 10 nodes, 4 vehicles.
+          RoutingModel model(manager);
+
+    Then, use 'manager.NodeToIndex(node)' whenever model requires a variable
+    index.
+
+    Note: the mapping between node indices and variables indices is subject to
+    change so no assumption should be made on it. The only guarantee is that
+    indices range between 0 and n-1, where n = number of vehicles * 2 (for start
+    and end nodes) + number of non-start or end nodes.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
@@ -7038,7 +8131,10 @@ pywrapcp    
     return _pywrapcp.DefaultRoutingSearchParameters()
 
 def FindErrorInRoutingSearchParameters(search_parameters: "operations_research::RoutingSearchParameters const &") -> "std::string":
-    r""" Returns an empty std::string if the routing search parameters are valid, and a non-empty, human readable error description if they're not."""
+    r"""
+    Returns an empty std::string if the routing search parameters are valid, and
+    a non-empty, human readable error description if they're not.
+    """
     return _pywrapcp.FindErrorInRoutingSearchParameters(search_parameters)
 BOOL_UNSPECIFIED = _pywrapcp.BOOL_UNSPECIFIED
 BOOL_FALSE = _pywrapcp.BOOL_FALSE
@@ -7093,7 +8189,28 @@ pywrapcp    
         return _pywrapcp.RoutingModel_UnaryTransitCallbackOrNull(self, callback_index)
 
     def AddDimension(self, evaluator_index: "int", slack_max: "int64_t", capacity: "int64_t", fix_start_cumul_to_zero: "bool", name: "std::string const &") -> "bool":
-        r""" Model creation Methods to add dimensions to routes; dimensions represent quantities accumulated at nodes along the routes. They represent quantities such as weights or volumes carried along the route, or distance or times. Quantities at a node are represented by "cumul" variables and the increase or decrease of quantities between nodes are represented by "transit" variables. These variables are linked as follows: if j == next(i), cumul(j) = cumul(i) + transit(i) + slack(i) where slack is a positive slack variable (can represent waiting times for a time dimension). Setting the value of fix_start_cumul_to_zero to true will force the "cumul" variable of the start node of all vehicles to be equal to 0. Creates a dimension where the transit variable is constrained to be equal to evaluator(i, next(i)); 'slack_max' is the upper bound of the slack variable and 'capacity' is the upper bound of the cumul variables. 'name' is the name used to reference the dimension; this name is used to get cumul and transit variables from the routing model. Returns false if a dimension with the same name has already been created (and doesn't create the new dimension). Takes ownership of the callback 'evaluator'."""
+        r"""
+        Model creation
+        Methods to add dimensions to routes; dimensions represent quantities
+        accumulated at nodes along the routes. They represent quantities such as
+        weights or volumes carried along the route, or distance or times.
+        Quantities at a node are represented by "cumul" variables and the increase
+        or decrease of quantities between nodes are represented by "transit"
+        variables. These variables are linked as follows:
+        if j == next(i), cumul(j) = cumul(i) + transit(i) + slack(i)
+        where slack is a positive slack variable (can represent waiting times for
+        a time dimension).
+        Setting the value of fix_start_cumul_to_zero to true will force the
+        "cumul" variable of the start node of all vehicles to be equal to 0.
+        Creates a dimension where the transit variable is constrained to be
+        equal to evaluator(i, next(i)); 'slack_max' is the upper bound of the
+        slack variable and 'capacity' is the upper bound of the cumul variables.
+        'name' is the name used to reference the dimension; this name is used to
+        get cumul and transit variables from the routing model.
+        Returns false if a dimension with the same name has already been created
+        (and doesn't create the new dimension).
+        Takes ownership of the callback 'evaluator'.
+        """
         return _pywrapcp.RoutingModel_AddDimension(self, evaluator_index, slack_max, capacity, fix_start_cumul_to_zero, name)
 
     def AddDimensionWithVehicleTransits(self, evaluator_indices: "std::vector< int > const &", slack_max: "int64_t", capacity: "int64_t", fix_start_cumul_to_zero: "bool", name: "std::string const &") -> "bool":
@@ -7106,22 +8223,61 @@ pywrapcp    
         return _pywrapcp.RoutingModel_AddDimensionWithVehicleTransitAndCapacity(self, evaluator_indices, slack_max, vehicle_capacities, fix_start_cumul_to_zero, name)
 
     def AddConstantDimensionWithSlack(self, value: "int64_t", capacity: "int64_t", slack_max: "int64_t", fix_start_cumul_to_zero: "bool", name: "std::string const &") -> "std::pair< int,bool >":
-        r""" Creates a dimension where the transit variable is constrained to be equal to 'value'; 'capacity' is the upper bound of the cumul variables. 'name' is the name used to reference the dimension; this name is used to get cumul and transit variables from the routing model. Returns a pair consisting of an index to the registered unary transit callback and a bool denoting whether the dimension has been created. It is false if a dimension with the same name has already been created (and doesn't create the new dimension but still register a new callback)."""
+        r"""
+        Creates a dimension where the transit variable is constrained to be
+        equal to 'value'; 'capacity' is the upper bound of the cumul variables.
+        'name' is the name used to reference the dimension; this name is used to
+        get cumul and transit variables from the routing model.
+        Returns a pair consisting of an index to the registered unary transit
+        callback and a bool denoting whether the dimension has been created.
+        It is false if a dimension with the same name has already been created
+        (and doesn't create the new dimension but still register a new callback).
+        """
         return _pywrapcp.RoutingModel_AddConstantDimensionWithSlack(self, value, capacity, slack_max, fix_start_cumul_to_zero, name)
 
     def AddConstantDimension(self, value: "int64_t", capacity: "int64_t", fix_start_cumul_to_zero: "bool", name: "std::string const &") -> "std::pair< int,bool >":
         return _pywrapcp.RoutingModel_AddConstantDimension(self, value, capacity, fix_start_cumul_to_zero, name)
 
     def AddVectorDimension(self, values: "std::vector< int64_t >", capacity: "int64_t", fix_start_cumul_to_zero: "bool", name: "std::string const &") -> "std::pair< int,bool >":
-        r""" Creates a dimension where the transit variable is constrained to be equal to 'values[i]' for node i; 'capacity' is the upper bound of the cumul variables. 'name' is the name used to reference the dimension; this name is used to get cumul and transit variables from the routing model. Returns a pair consisting of an index to the registered unary transit callback and a bool denoting whether the dimension has been created. It is false if a dimension with the same name has already been created (and doesn't create the new dimension but still register a new callback)."""
+        r"""
+        Creates a dimension where the transit variable is constrained to be
+        equal to 'values[i]' for node i; 'capacity' is the upper bound of
+        the cumul variables. 'name' is the name used to reference the dimension;
+        this name is used to get cumul and transit variables from the routing
+        model.
+        Returns a pair consisting of an index to the registered unary transit
+        callback and a bool denoting whether the dimension has been created.
+        It is false if a dimension with the same name has already been created
+        (and doesn't create the new dimension but still register a new callback).
+        """
         return _pywrapcp.RoutingModel_AddVectorDimension(self, values, capacity, fix_start_cumul_to_zero, name)
 
     def AddMatrixDimension(self, values: "std::vector< std::vector< int64_t > >", capacity: "int64_t", fix_start_cumul_to_zero: "bool", name: "std::string const &") -> "std::pair< int,bool >":
-        r""" Creates a dimension where the transit variable is constrained to be equal to 'values[i][next(i)]' for node i; 'capacity' is the upper bound of the cumul variables. 'name' is the name used to reference the dimension; this name is used to get cumul and transit variables from the routing model. Returns a pair consisting of an index to the registered transit callback and a bool denoting whether the dimension has been created. It is false if a dimension with the same name has already been created (and doesn't create the new dimension but still register a new callback)."""
+        r"""
+        Creates a dimension where the transit variable is constrained to be
+        equal to 'values[i][next(i)]' for node i; 'capacity' is the upper bound of
+        the cumul variables. 'name' is the name used to reference the dimension;
+        this name is used to get cumul and transit variables from the routing
+        model.
+        Returns a pair consisting of an index to the registered transit callback
+        and a bool denoting whether the dimension has been created.
+        It is false if a dimension with the same name has already been created
+        (and doesn't create the new dimension but still register a new callback).
+        """
         return _pywrapcp.RoutingModel_AddMatrixDimension(self, values, capacity, fix_start_cumul_to_zero, name)
 
     def MakePathSpansAndTotalSlacks(self, dimension: "RoutingDimension", spans: "std::vector< operations_research::IntVar * >", total_slacks: "std::vector< operations_research::IntVar * >") -> "operations_research::Constraint *":
-        r""" For every vehicle of the routing model: - if total_slacks[vehicle] is not nullptr, constrains it to be the sum of   slacks on that vehicle, that is,   dimension->CumulVar(end) - dimension->CumulVar(start) -   sum_{node in path of vehicle} dimension->FixedTransitVar(node). - if spans[vehicle] is not nullptr, constrains it to be   dimension->CumulVar(end) - dimension->CumulVar(start) This does stronger propagation than a decomposition, and takes breaks into account."""
+        r"""
+        For every vehicle of the routing model:
+        - if total_slacks[vehicle] is not nullptr, constrains it to be the sum of
+          slacks on that vehicle, that is,
+          dimension->CumulVar(end) - dimension->CumulVar(start) -
+          sum_{node in path of vehicle} dimension->FixedTransitVar(node).
+        - if spans[vehicle] is not nullptr, constrains it to be
+          dimension->CumulVar(end) - dimension->CumulVar(start)
+        This does stronger propagation than a decomposition, and takes breaks into
+        account.
+        """
         return _pywrapcp.RoutingModel_MakePathSpansAndTotalSlacks(self, dimension, spans, total_slacks)
 
     def GetAllDimensionNames(self) -> "std::vector< std::string >":
@@ -7137,7 +8293,10 @@ pywrapcp    
         return _pywrapcp.RoutingModel_GetDimensionsWithSoftOrSpanCosts(self)
 
     def GetGlobalDimensionCumulOptimizers(self) -> "std::vector< std::unique_ptr< operations_research::GlobalDimensionCumulOptimizer > > const &":
-        r""" Returns [global|local]_dimension_optimizers_, which are empty if the model has not been closed."""
+        r"""
+        Returns [global|local]_dimension_optimizers_, which are empty if the model
+        has not been closed.
+        """
         return _pywrapcp.RoutingModel_GetGlobalDimensionCumulOptimizers(self)
 
     def GetGlobalDimensionCumulMPOptimizers(self) -> "std::vector< std::unique_ptr< operations_research::GlobalDimensionCumulOptimizer > > const &":
@@ -7150,7 +8309,10 @@ pywrapcp    
         return _pywrapcp.RoutingModel_GetLocalDimensionCumulMPOptimizers(self)
 
     def GetMutableGlobalCumulOptimizer(self, dimension: "RoutingDimension") -> "operations_research::GlobalDimensionCumulOptimizer *":
-        r""" Returns the global/local dimension cumul optimizer for a given dimension, or nullptr if there is none."""
+        r"""
+        Returns the global/local dimension cumul optimizer for a given dimension,
+        or nullptr if there is none.
+        """
         return _pywrapcp.RoutingModel_GetMutableGlobalCumulOptimizer(self, dimension)
 
     def GetMutableGlobalCumulMPOptimizer(self, dimension: "RoutingDimension") -> "operations_research::GlobalDimensionCumulOptimizer *":
@@ -7171,11 +8333,19 @@ pywrapcp    
         return _pywrapcp.RoutingModel_GetDimensionOrDie(self, dimension_name)
 
     def GetMutableDimension(self, dimension_name: "std::string const &") -> "operations_research::RoutingDimension *":
-        r""" Returns a dimension from its name. Returns nullptr if the dimension does not exist."""
+        r"""
+        Returns a dimension from its name. Returns nullptr if the dimension does
+        not exist.
+        """
         return _pywrapcp.RoutingModel_GetMutableDimension(self, dimension_name)
 
     def SetPrimaryConstrainedDimension(self, dimension_name: "std::string const &") -> "void":
-        r""" Set the given dimension as "primary constrained". As of August 2013, this is only used by ArcIsMoreConstrainedThanArc(). "dimension" must be the name of an existing dimension, or be empty, in which case there will not be a primary dimension after this call."""
+        r"""
+        Set the given dimension as "primary constrained". As of August 2013, this
+        is only used by ArcIsMoreConstrainedThanArc().
+        "dimension" must be the name of an existing dimension, or be empty, in
+        which case there will not be a primary dimension after this call.
+        """
         return _pywrapcp.RoutingModel_SetPrimaryConstrainedDimension(self, dimension_name)
 
     def GetPrimaryConstrainedDimension(self) -> "std::string const &":
@@ -7183,11 +8353,31 @@ pywrapcp    
         return _pywrapcp.RoutingModel_GetPrimaryConstrainedDimension(self)
 
     def GetDimensionResourceGroupIndices(self, dimension: "RoutingDimension") -> "std::vector< int > const &":
-        r""" Returns the indices of resource groups for this dimension. This method can only be called after the model has been closed."""
+        r"""
+        Returns the indices of resource groups for this dimension. This method can
+        only be called after the model has been closed.
+        """
         return _pywrapcp.RoutingModel_GetDimensionResourceGroupIndices(self, dimension)
 
     def AddDisjunction(self, *args) -> "operations_research::RoutingModel::DisjunctionIndex":
-        r""" Adds a disjunction constraint on the indices: exactly 'max_cardinality' of the indices are active. Start and end indices of any vehicle cannot be part of a disjunction. If a penalty is given, at most 'max_cardinality' of the indices can be active, and if less are active, 'penalty' is payed per inactive index. This is equivalent to adding the constraint:     p + Sum(i)active[i] == max_cardinality where p is an integer variable, and the following cost to the cost function:     p * penalty. 'penalty' must be positive to make the disjunction optional; a negative penalty will force 'max_cardinality' indices of the disjunction to be performed, and therefore p == 0. Note: passing a vector with a single index will model an optional index with a penalty cost if it is not visited."""
+        r"""
+        Adds a disjunction constraint on the indices: exactly 'max_cardinality' of
+        the indices are active. Start and end indices of any vehicle cannot be
+        part of a disjunction.
+
+        If a penalty is given, at most 'max_cardinality' of the indices can be
+        active, and if less are active, 'penalty' is payed per inactive index.
+        This is equivalent to adding the constraint:
+            p + Sum(i)active[i] == max_cardinality
+        where p is an integer variable, and the following cost to the cost
+        function:
+            p * penalty.
+        'penalty' must be positive to make the disjunction optional; a negative
+        penalty will force 'max_cardinality' indices of the disjunction to be
+        performed, and therefore p == 0.
+        Note: passing a vector with a single index will model an optional index
+        with a penalty cost if it is not visited.
+        """
         return _pywrapcp.RoutingModel_AddDisjunction(self, *args)
 
     def GetDisjunctionIndices(self, index: "int64_t") -> "std::vector< operations_research::RoutingModel::DisjunctionIndex > const &":
@@ -7199,7 +8389,10 @@ pywrapcp    
         return _pywrapcp.RoutingModel_GetDisjunctionPenalty(self, index)
 
     def GetDisjunctionMaxCardinality(self, index: "operations_research::RoutingModel::DisjunctionIndex") -> "int64_t":
-        r""" Returns the maximum number of possible active nodes of the node disjunction of index 'index'."""
+        r"""
+        Returns the maximum number of possible active nodes of the node
+        disjunction of index 'index'.
+        """
         return _pywrapcp.RoutingModel_GetDisjunctionMaxCardinality(self, index)
 
     def GetNumberOfDisjunctions(self) -> "int":
@@ -7207,19 +8400,39 @@ pywrapcp    
         return _pywrapcp.RoutingModel_GetNumberOfDisjunctions(self)
 
     def GetPerfectBinaryDisjunctions(self) -> "std::vector< std::pair< int64_t,int64_t > >":
-        r""" Returns the list of all perfect binary disjunctions, as pairs of variable indices: a disjunction is "perfect" when its variables do not appear in any other disjunction. Each pair is sorted (lowest variable index first), and the output vector is also sorted (lowest pairs first)."""
+        r"""
+        Returns the list of all perfect binary disjunctions, as pairs of variable
+        indices: a disjunction is "perfect" when its variables do not appear in
+        any other disjunction. Each pair is sorted (lowest variable index first),
+        and the output vector is also sorted (lowest pairs first).
+        """
         return _pywrapcp.RoutingModel_GetPerfectBinaryDisjunctions(self)
 
     def IgnoreDisjunctionsAlreadyForcedToZero(self) -> "void":
-        r""" SPECIAL: Makes the solver ignore all the disjunctions whose active variables are all trivially zero (i.e. Max() == 0), by setting their max_cardinality to 0. This can be useful when using the BaseBinaryDisjunctionNeighborhood operators, in the context of arc-based routing."""
+        r"""
+        SPECIAL: Makes the solver ignore all the disjunctions whose active
+        variables are all trivially zero (i.e. Max() == 0), by setting their
+        max_cardinality to 0.
+        This can be useful when using the BaseBinaryDisjunctionNeighborhood
+        operators, in the context of arc-based routing.
+        """
         return _pywrapcp.RoutingModel_IgnoreDisjunctionsAlreadyForcedToZero(self)
 
     def AddSoftSameVehicleConstraint(self, indices: "std::vector< int64_t > const &", cost: "int64_t") -> "void":
-        r""" Adds a soft constraint to force a set of variable indices to be on the same vehicle. If all nodes are not on the same vehicle, each extra vehicle used adds 'cost' to the cost function."""
+        r"""
+        Adds a soft constraint to force a set of variable indices to be on the
+        same vehicle. If all nodes are not on the same vehicle, each extra vehicle
+        used adds 'cost' to the cost function.
+        """
         return _pywrapcp.RoutingModel_AddSoftSameVehicleConstraint(self, indices, cost)
 
     def SetAllowedVehiclesForIndex(self, vehicles: "std::vector< int > const &", index: "int64_t") -> "void":
-        r""" Sets the vehicles which can visit a given node. If the node is in a disjunction, this will not prevent it from being unperformed. Specifying an empty vector of vehicles has no effect (all vehicles will be allowed to visit the node)."""
+        r"""
+        Sets the vehicles which can visit a given node. If the node is in a
+        disjunction, this will not prevent it from being unperformed.
+        Specifying an empty vector of vehicles has no effect (all vehicles
+        will be allowed to visit the node).
+        """
         return _pywrapcp.RoutingModel_SetAllowedVehiclesForIndex(self, vehicles, index)
 
     def IsVehicleAllowedForIndex(self, vehicle: "int", index: "int64_t") -> "bool":
@@ -7227,15 +8440,37 @@ pywrapcp    
         return _pywrapcp.RoutingModel_IsVehicleAllowedForIndex(self, vehicle, index)
 
     def AddPickupAndDelivery(self, pickup: "int64_t", delivery: "int64_t") -> "void":
-        r""" Notifies that index1 and index2 form a pair of nodes which should belong to the same route. This methods helps the search find better solutions, especially in the local search phase. It should be called each time you have an equality constraint linking the vehicle variables of two node (including for instance pickup and delivery problems):     Solver* const solver = routing.solver();     int64_t index1 = manager.NodeToIndex(node1);     int64_t index2 = manager.NodeToIndex(node2);     solver->AddConstraint(solver->MakeEquality(         routing.VehicleVar(index1),         routing.VehicleVar(index2)));     routing.AddPickupAndDelivery(index1, index2);"""
+        r"""
+        Notifies that index1 and index2 form a pair of nodes which should belong
+        to the same route. This methods helps the search find better solutions,
+        especially in the local search phase.
+        It should be called each time you have an equality constraint linking
+        the vehicle variables of two node (including for instance pickup and
+        delivery problems):
+            Solver* const solver = routing.solver();
+            int64_t index1 = manager.NodeToIndex(node1);
+            int64_t index2 = manager.NodeToIndex(node2);
+            solver->AddConstraint(solver->MakeEquality(
+                routing.VehicleVar(index1),
+                routing.VehicleVar(index2)));
+            routing.AddPickupAndDelivery(index1, index2);
+        """
         return _pywrapcp.RoutingModel_AddPickupAndDelivery(self, pickup, delivery)
 
     def AddPickupAndDeliverySets(self, pickup_disjunction: "operations_research::RoutingModel::DisjunctionIndex", delivery_disjunction: "operations_research::RoutingModel::DisjunctionIndex") -> "void":
-        r""" Same as AddPickupAndDelivery but notifying that the performed node from the disjunction of index 'pickup_disjunction' is on the same route as the performed node from the disjunction of index 'delivery_disjunction'."""
+        r"""
+        Same as AddPickupAndDelivery but notifying that the performed node from
+        the disjunction of index 'pickup_disjunction' is on the same route as the
+        performed node from the disjunction of index 'delivery_disjunction'.
+        """
         return _pywrapcp.RoutingModel_AddPickupAndDeliverySets(self, pickup_disjunction, delivery_disjunction)
 
     def GetPickupIndexPairs(self, node_index: "int64_t") -> "std::vector< std::pair< int,int > > const &":
-        r""" Returns pairs for which the node is a pickup; the first element of each pair is the index in the pickup and delivery pairs list in which the pickup appears, the second element is its index in the pickups list."""
+        r"""
+        Returns pairs for which the node is a pickup; the first element of each
+        pair is the index in the pickup and delivery pairs list in which the
+        pickup appears, the second element is its index in the pickups list.
+        """
         return _pywrapcp.RoutingModel_GetPickupIndexPairs(self, node_index)
 
     def GetDeliveryIndexPairs(self, node_index: "int64_t") -> "std::vector< std::pair< int,int > > const &":
@@ -7243,7 +8478,10 @@ pywrapcp    
         return _pywrapcp.RoutingModel_GetDeliveryIndexPairs(self, node_index)
 
     def SetPickupAndDeliveryPolicyOfAllVehicles(self, policy: "operations_research::RoutingModel::PickupAndDeliveryPolicy") -> "void":
-        r""" Sets the Pickup and delivery policy of all vehicles. It is equivalent to calling SetPickupAndDeliveryPolicyOfVehicle on all vehicles."""
+        r"""
+        Sets the Pickup and delivery policy of all vehicles. It is equivalent to
+        calling SetPickupAndDeliveryPolicyOfVehicle on all vehicles.
+        """
         return _pywrapcp.RoutingModel_SetPickupAndDeliveryPolicyOfAllVehicles(self, policy)
 
     def SetPickupAndDeliveryPolicyOfVehicle(self, policy: "operations_research::RoutingModel::PickupAndDeliveryPolicy", vehicle: "int") -> "void":
@@ -7253,16 +8491,32 @@ pywrapcp    
         return _pywrapcp.RoutingModel_GetPickupAndDeliveryPolicyOfVehicle(self, vehicle)
 
     def GetNumOfSingletonNodes(self) -> "int":
-        r""" Returns the number of non-start/end nodes which do not appear in a pickup/delivery pair."""
+        r"""
+        Returns the number of non-start/end nodes which do not appear in a
+        pickup/delivery pair.
+        """
         return _pywrapcp.RoutingModel_GetNumOfSingletonNodes(self)
     TYPE_ADDED_TO_VEHICLE = _pywrapcp.RoutingModel_TYPE_ADDED_TO_VEHICLE
     r""" When visited, the number of types 'T' on the vehicle increases by one."""
     ADDED_TYPE_REMOVED_FROM_VEHICLE = _pywrapcp.RoutingModel_ADDED_TYPE_REMOVED_FROM_VEHICLE
-    r""" When visited, one instance of type 'T' previously added to the route (TYPE_ADDED_TO_VEHICLE), if any, is removed from the vehicle. If the type was not previously added to the route or all added instances have already been removed, this visit has no effect on the types."""
+    r"""
+    When visited, one instance of type 'T' previously added to the route
+    (TYPE_ADDED_TO_VEHICLE), if any, is removed from the vehicle.
+    If the type was not previously added to the route or all added instances
+    have already been removed, this visit has no effect on the types.
+    """
     TYPE_ON_VEHICLE_UP_TO_VISIT = _pywrapcp.RoutingModel_TYPE_ON_VEHICLE_UP_TO_VISIT
-    r""" With the following policy, the visit enforces that type 'T' is considered on the route from its start until this node is visited."""
+    r"""
+    With the following policy, the visit enforces that type 'T' is
+    considered on the route from its start until this node is visited.
+    """
     TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED = _pywrapcp.RoutingModel_TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED
-    r""" The visit doesn't have an impact on the number of types 'T' on the route, as it's (virtually) added and removed directly. This policy can be used for visits which are part of an incompatibility or requirement set without affecting the type count on the route."""
+    r"""
+    The visit doesn't have an impact on the number of types 'T' on the
+    route, as it's (virtually) added and removed directly.
+    This policy can be used for visits which are part of an incompatibility
+    or requirement set without affecting the type count on the route.
+    """
 
     def SetVisitType(self, index: "int64_t", type: "int", type_policy: "operations_research::RoutingModel::VisitTypePolicy") -> "void":
         return _pywrapcp.RoutingModel_SetVisitType(self, index, type, type_policy)
@@ -7280,14 +8534,23 @@ pywrapcp    
         return _pywrapcp.RoutingModel_GetVisitTypePolicy(self, index)
 
     def CloseVisitTypes(self) -> "void":
-        r""" This function should be called once all node visit types have been set and prior to adding any incompatibilities/requirements. "close" types."""
+        r"""
+        This function should be called once all node visit types have been set and
+        prior to adding any incompatibilities/requirements.
+        "close" types.
+        """
         return _pywrapcp.RoutingModel_CloseVisitTypes(self)
 
     def GetNumberOfVisitTypes(self) -> "int":
         return _pywrapcp.RoutingModel_GetNumberOfVisitTypes(self)
 
     def AddHardTypeIncompatibility(self, type1: "int", type2: "int") -> "void":
-        r""" Incompatibilities: Two nodes with "hard" incompatible types cannot share the same route at all, while with a "temporal" incompatibility they can't be on the same route at the same time."""
+        r"""
+        Incompatibilities:
+        Two nodes with "hard" incompatible types cannot share the same route at
+        all, while with a "temporal" incompatibility they can't be on the same
+        route at the same time.
+        """
         return _pywrapcp.RoutingModel_AddHardTypeIncompatibility(self, type1, type2)
 
     def AddTemporalTypeIncompatibility(self, type1: "int", type2: "int") -> "void":
@@ -7301,26 +8564,54 @@ pywrapcp    
         return _pywrapcp.RoutingModel_GetTemporalTypeIncompatibilitiesOfType(self, type)
 
     def HasHardTypeIncompatibilities(self) -> "bool":
-        r""" Returns true iff any hard (resp. temporal) type incompatibilities have been added to the model."""
+        r"""
+        Returns true iff any hard (resp. temporal) type incompatibilities have
+        been added to the model.
+        """
         return _pywrapcp.RoutingModel_HasHardTypeIncompatibilities(self)
 
     def HasTemporalTypeIncompatibilities(self) -> "bool":
         return _pywrapcp.RoutingModel_HasTemporalTypeIncompatibilities(self)
 
     def AddSameVehicleRequiredTypeAlternatives(self, dependent_type: "int", required_type_alternatives: "absl::flat_hash_set< int >") -> "void":
-        r""" Requirements: NOTE: As of 2019-04, cycles in the requirement graph are not supported, and lead to the dependent nodes being skipped if possible (otherwise the model is considered infeasible). The following functions specify that "dependent_type" requires at least one of the types in "required_type_alternatives". For same-vehicle requirements, a node of dependent type type_D requires at least one node of type type_R among the required alternatives on the same route."""
+        r"""
+        Requirements:
+        NOTE: As of 2019-04, cycles in the requirement graph are not supported,
+        and lead to the dependent nodes being skipped if possible (otherwise
+        the model is considered infeasible).
+        The following functions specify that "dependent_type" requires at least
+        one of the types in "required_type_alternatives".
+
+        For same-vehicle requirements, a node of dependent type type_D requires at
+        least one node of type type_R among the required alternatives on the same
+        route.
+        """
         return _pywrapcp.RoutingModel_AddSameVehicleRequiredTypeAlternatives(self, dependent_type, required_type_alternatives)
 
     def AddRequiredTypeAlternativesWhenAddingType(self, dependent_type: "int", required_type_alternatives: "absl::flat_hash_set< int >") -> "void":
-        r""" If type_D depends on type_R when adding type_D, any node_D of type_D and VisitTypePolicy TYPE_ADDED_TO_VEHICLE or TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED requires at least one type_R on its vehicle at the time node_D is visited."""
+        r"""
+        If type_D depends on type_R when adding type_D, any node_D of type_D and
+        VisitTypePolicy TYPE_ADDED_TO_VEHICLE or
+        TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED requires at least one type_R on its
+        vehicle at the time node_D is visited.
+        """
         return _pywrapcp.RoutingModel_AddRequiredTypeAlternativesWhenAddingType(self, dependent_type, required_type_alternatives)
 
     def AddRequiredTypeAlternativesWhenRemovingType(self, dependent_type: "int", required_type_alternatives: "absl::flat_hash_set< int >") -> "void":
-        r""" The following requirements apply when visiting dependent nodes that remove their type from the route, i.e. type_R must be on the vehicle when type_D of VisitTypePolicy ADDED_TYPE_REMOVED_FROM_VEHICLE, TYPE_ON_VEHICLE_UP_TO_VISIT or TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED is visited."""
+        r"""
+        The following requirements apply when visiting dependent nodes that remove
+        their type from the route, i.e. type_R must be on the vehicle when type_D
+        of VisitTypePolicy ADDED_TYPE_REMOVED_FROM_VEHICLE,
+        TYPE_ON_VEHICLE_UP_TO_VISIT or TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED is
+        visited.
+        """
         return _pywrapcp.RoutingModel_AddRequiredTypeAlternativesWhenRemovingType(self, dependent_type, required_type_alternatives)
 
     def GetSameVehicleRequiredTypeAlternativesOfType(self, type: "int") -> "std::vector< absl::flat_hash_set< int > > const &":
-        r""" Returns the set of same-vehicle requirement alternatives for the given type."""
+        r"""
+        Returns the set of same-vehicle requirement alternatives for the given
+        type.
+        """
         return _pywrapcp.RoutingModel_GetSameVehicleRequiredTypeAlternativesOfType(self, type)
 
     def GetRequiredTypeAlternativesWhenAddingType(self, type: "int") -> "std::vector< absl::flat_hash_set< int > > const &":
@@ -7332,30 +8623,54 @@ pywrapcp    
         return _pywrapcp.RoutingModel_GetRequiredTypeAlternativesWhenRemovingType(self, type)
 
     def HasSameVehicleTypeRequirements(self) -> "bool":
-        r""" Returns true iff any same-route (resp. temporal) type requirements have been added to the model."""
+        r"""
+        Returns true iff any same-route (resp. temporal) type requirements have
+        been added to the model.
+        """
         return _pywrapcp.RoutingModel_HasSameVehicleTypeRequirements(self)
 
     def HasTemporalTypeRequirements(self) -> "bool":
         return _pywrapcp.RoutingModel_HasTemporalTypeRequirements(self)
 
     def HasTypeRegulations(self) -> "bool":
-        r""" Returns true iff the model has any incompatibilities or requirements set on node types."""
+        r"""
+        Returns true iff the model has any incompatibilities or requirements set
+        on node types.
+        """
         return _pywrapcp.RoutingModel_HasTypeRegulations(self)
 
     def UnperformedPenalty(self, var_index: "int64_t") -> "int64_t":
-        r""" Get the "unperformed" penalty of a node. This is only well defined if the node is only part of a single Disjunction, and that disjunction has a penalty. For forced active nodes returns max int64_t. In all other cases, this returns 0."""
+        r"""
+        Get the "unperformed" penalty of a node. This is only well defined if the
+        node is only part of a single Disjunction, and that disjunction has a
+        penalty. For forced active nodes returns max int64_t. In all other cases,
+        this returns 0.
+        """
         return _pywrapcp.RoutingModel_UnperformedPenalty(self, var_index)
 
     def UnperformedPenaltyOrValue(self, default_value: "int64_t", var_index: "int64_t") -> "int64_t":
-        r""" Same as above except that it returns default_value instead of 0 when penalty is not well defined (default value is passed as first argument to simplify the usage of the method in a callback)."""
+        r"""
+        Same as above except that it returns default_value instead of 0 when
+        penalty is not well defined (default value is passed as first argument to
+        simplify the usage of the method in a callback).
+        """
         return _pywrapcp.RoutingModel_UnperformedPenaltyOrValue(self, default_value, var_index)
 
     def GetDepot(self) -> "int64_t":
-        r""" Returns the variable index of the first starting or ending node of all routes. If all routes start  and end at the same node (single depot), this is the node returned."""
+        r"""
+        Returns the variable index of the first starting or ending node of all
+        routes. If all routes start  and end at the same node (single depot), this
+        is the node returned.
+        """
         return _pywrapcp.RoutingModel_GetDepot(self)
 
     def SetMaximumNumberOfActiveVehicles(self, max_active_vehicles: "int") -> "void":
-        r""" Constrains the maximum number of active vehicles, aka the number of vehicles which do not have an empty route. For instance, this can be used to limit the number of routes in the case where there are fewer drivers than vehicles and that the fleet of vehicle is heterogeneous."""
+        r"""
+        Constrains the maximum number of active vehicles, aka the number of
+        vehicles which do not have an empty route. For instance, this can be used
+        to limit the number of routes in the case where there are fewer drivers
+        than vehicles and that the fleet of vehicle is heterogeneous.
+        """
         return _pywrapcp.RoutingModel_SetMaximumNumberOfActiveVehicles(self, max_active_vehicles)
 
     def GetMaximumNumberOfActiveVehicles(self) -> "int":
@@ -7363,7 +8678,11 @@ pywrapcp    
         return _pywrapcp.RoutingModel_GetMaximumNumberOfActiveVehicles(self)
 
     def SetArcCostEvaluatorOfAllVehicles(self, evaluator_index: "int") -> "void":
-        r""" Sets the cost function of the model such that the cost of a segment of a route between node 'from' and 'to' is evaluator(from, to), whatever the route or vehicle performing the route."""
+        r"""
+        Sets the cost function of the model such that the cost of a segment of a
+        route between node 'from' and 'to' is evaluator(from, to), whatever the
+        route or vehicle performing the route.
+        """
         return _pywrapcp.RoutingModel_SetArcCostEvaluatorOfAllVehicles(self, evaluator_index)
 
     def SetArcCostEvaluatorOfVehicle(self, evaluator_index: "int", vehicle: "int") -> "void":
@@ -7371,7 +8690,10 @@ pywrapcp    
         return _pywrapcp.RoutingModel_SetArcCostEvaluatorOfVehicle(self, evaluator_index, vehicle)
 
     def SetFixedCostOfAllVehicles(self, cost: "int64_t") -> "void":
-        r""" Sets the fixed cost of all vehicle routes. It is equivalent to calling SetFixedCostOfVehicle on all vehicle routes."""
+        r"""
+        Sets the fixed cost of all vehicle routes. It is equivalent to calling
+        SetFixedCostOfVehicle on all vehicle routes.
+        """
         return _pywrapcp.RoutingModel_SetFixedCostOfAllVehicles(self, cost)
 
     def SetFixedCostOfVehicle(self, cost: "int64_t", vehicle: "int") -> "void":
@@ -7379,11 +8701,31 @@ pywrapcp    
         return _pywrapcp.RoutingModel_SetFixedCostOfVehicle(self, cost, vehicle)
 
     def GetFixedCostOfVehicle(self, vehicle: "int") -> "int64_t":
-        r""" Returns the route fixed cost taken into account if the route of the vehicle is not empty, aka there's at least one node on the route other than the first and last nodes."""
+        r"""
+        Returns the route fixed cost taken into account if the route of the
+        vehicle is not empty, aka there's at least one node on the route other
+        than the first and last nodes.
+        """
         return _pywrapcp.RoutingModel_GetFixedCostOfVehicle(self, vehicle)
 
     def SetAmortizedCostFactorsOfAllVehicles(self, linear_cost_factor: "int64_t", quadratic_cost_factor: "int64_t") -> "void":
-        r""" The following methods set the linear and quadratic cost factors of vehicles (must be positive values). The default value of these parameters is zero for all vehicles. When set, the cost_ of the model will contain terms aiming at reducing the number of vehicles used in the model, by adding the following to the objective for every vehicle v: INDICATOR(v used in the model) *   [linear_cost_factor_of_vehicle_[v]    - quadratic_cost_factor_of_vehicle_[v]*(square of length of route v)] i.e. for every used vehicle, we add the linear factor as fixed cost, and subtract the square of the route length multiplied by the quadratic factor. This second term aims at making the routes as dense as possible. Sets the linear and quadratic cost factor of all vehicles."""
+        r"""
+        The following methods set the linear and quadratic cost factors of
+        vehicles (must be positive values). The default value of these parameters
+        is zero for all vehicles.
+
+        When set, the cost_ of the model will contain terms aiming at reducing the
+        number of vehicles used in the model, by adding the following to the
+        objective for every vehicle v:
+        INDICATOR(v used in the model) *
+          [linear_cost_factor_of_vehicle_[v]
+           - quadratic_cost_factor_of_vehicle_[v]*(square of length of route v)]
+        i.e. for every used vehicle, we add the linear factor as fixed cost, and
+        subtract the square of the route length multiplied by the quadratic
+        factor. This second term aims at making the routes as dense as possible.
+
+        Sets the linear and quadratic cost factor of all vehicles.
+        """
         return _pywrapcp.RoutingModel_SetAmortizedCostFactorsOfAllVehicles(self, linear_cost_factor, quadratic_cost_factor)
 
     def SetAmortizedCostFactorsOfVehicle(self, linear_cost_factor: "int64_t", quadratic_cost_factor: "int64_t", vehicle: "int") -> "void":
@@ -7403,11 +8745,18 @@ pywrapcp    
         return _pywrapcp.RoutingModel_AreEmptyRouteCostsConsideredForVehicle(self, vehicle)
 
     def SetFirstSolutionEvaluator(self, evaluator: "operations_research::Solver::IndexEvaluator2") -> "void":
-        r""" Gets/sets the evaluator used during the search. Only relevant when RoutingSearchParameters.first_solution_strategy = EVALUATOR_STRATEGY. Takes ownership of evaluator."""
+        r"""
+        Gets/sets the evaluator used during the search. Only relevant when
+        RoutingSearchParameters.first_solution_strategy = EVALUATOR_STRATEGY.
+        Takes ownership of evaluator.
+        """
         return _pywrapcp.RoutingModel_SetFirstSolutionEvaluator(self, evaluator)
 
     def AddLocalSearchOperator(self, ls_operator: "LocalSearchOperator") -> "void":
-        r""" Adds a local search operator to the set of operators used to solve the vehicle routing problem."""
+        r"""
+        Adds a local search operator to the set of operators used to solve the
+        vehicle routing problem.
+        """
         return _pywrapcp.RoutingModel_AddLocalSearchOperator(self, ls_operator)
 
     def AddSearchMonitor(self, monitor: "SearchMonitor") -> "void":
@@ -7415,55 +8764,116 @@ pywrapcp    
         return _pywrapcp.RoutingModel_AddSearchMonitor(self, monitor)
 
     def AddAtSolutionCallback(self, callback: "std::function< void () >") -> "void":
-        r""" Adds a callback called each time a solution is found during the search. This is a shortcut to creating a monitor to call the callback on AtSolution() and adding it with AddSearchMonitor."""
+        r"""
+        Adds a callback called each time a solution is found during the search.
+        This is a shortcut to creating a monitor to call the callback on
+        AtSolution() and adding it with AddSearchMonitor.
+        """
         return _pywrapcp.RoutingModel_AddAtSolutionCallback(self, callback)
 
     def AddVariableMinimizedByFinalizer(self, var: "IntVar") -> "void":
-        r""" Adds a variable to minimize in the solution finalizer. The solution finalizer is called each time a solution is found during the search and allows to instantiate secondary variables (such as dimension cumul variables)."""
+        r"""
+        Adds a variable to minimize in the solution finalizer. The solution
+        finalizer is called each time a solution is found during the search and
+        allows to instantiate secondary variables (such as dimension cumul
+        variables).
+        """
         return _pywrapcp.RoutingModel_AddVariableMinimizedByFinalizer(self, var)
 
     def AddVariableMaximizedByFinalizer(self, var: "IntVar") -> "void":
-        r""" Adds a variable to maximize in the solution finalizer (see above for information on the solution finalizer)."""
+        r"""
+        Adds a variable to maximize in the solution finalizer (see above for
+        information on the solution finalizer).
+        """
         return _pywrapcp.RoutingModel_AddVariableMaximizedByFinalizer(self, var)
 
     def AddWeightedVariableMinimizedByFinalizer(self, var: "IntVar", cost: "int64_t") -> "void":
-        r""" Adds a variable to minimize in the solution finalizer, with a weighted priority: the higher the more priority it has."""
+        r"""
+        Adds a variable to minimize in the solution finalizer, with a weighted
+        priority: the higher the more priority it has.
+        """
         return _pywrapcp.RoutingModel_AddWeightedVariableMinimizedByFinalizer(self, var, cost)
 
     def AddVariableTargetToFinalizer(self, var: "IntVar", target: "int64_t") -> "void":
-        r""" Add a variable to set the closest possible to the target value in the solution finalizer."""
+        r"""
+        Add a variable to set the closest possible to the target value in the
+        solution finalizer.
+        """
         return _pywrapcp.RoutingModel_AddVariableTargetToFinalizer(self, var, target)
 
     def CloseModel(self) -> "void":
-        r""" Closes the current routing model; after this method is called, no modification to the model can be done, but RoutesToAssignment becomes available. Note that CloseModel() is automatically called by Solve() and other methods that produce solution. This is equivalent to calling CloseModelWithParameters(DefaultRoutingSearchParameters())."""
+        r"""
+        Closes the current routing model; after this method is called, no
+        modification to the model can be done, but RoutesToAssignment becomes
+        available. Note that CloseModel() is automatically called by Solve() and
+        other methods that produce solution.
+        This is equivalent to calling
+        CloseModelWithParameters(DefaultRoutingSearchParameters()).
+        """
         return _pywrapcp.RoutingModel_CloseModel(self)
 
     def CloseModelWithParameters(self, search_parameters: "operations_research::RoutingSearchParameters const &") -> "void":
-        r""" Same as above taking search parameters (as of 10/2015 some the parameters have to be set when closing the model)."""
+        r"""
+        Same as above taking search parameters (as of 10/2015 some the parameters
+        have to be set when closing the model).
+        """
         return _pywrapcp.RoutingModel_CloseModelWithParameters(self, search_parameters)
 
     def Solve(self, assignment: "Assignment"=None) -> "operations_research::Assignment const *":
-        r""" Solves the current routing model; closes the current model. This is equivalent to calling SolveWithParameters(DefaultRoutingSearchParameters()) or SolveFromAssignmentWithParameters(assignment,                                   DefaultRoutingSearchParameters())."""
+        r"""
+        Solves the current routing model; closes the current model.
+        This is equivalent to calling
+        SolveWithParameters(DefaultRoutingSearchParameters())
+        or
+        SolveFromAssignmentWithParameters(assignment,
+                                          DefaultRoutingSearchParameters()).
+        """
         return _pywrapcp.RoutingModel_Solve(self, assignment)
 
     def SolveWithParameters(self, search_parameters: "operations_research::RoutingSearchParameters const &", solutions: "std::vector< operations_research::Assignment const * > *"=None) -> "operations_research::Assignment const *":
-        r""" Solves the current routing model with the given parameters. If 'solutions' is specified, it will contain the k best solutions found during the search (from worst to best, including the one returned by this method), where k corresponds to the 'number_of_solutions_to_collect' in 'search_parameters'. Note that the Assignment returned by the method and the ones in solutions are owned by the underlying solver and should not be deleted."""
+        r"""
+        Solves the current routing model with the given parameters. If 'solutions'
+        is specified, it will contain the k best solutions found during the search
+        (from worst to best, including the one returned by this method), where k
+        corresponds to the 'number_of_solutions_to_collect' in
+        'search_parameters'. Note that the Assignment returned by the method and
+        the ones in solutions are owned by the underlying solver and should not be
+        deleted.
+        """
         return _pywrapcp.RoutingModel_SolveWithParameters(self, search_parameters, solutions)
 
     def SolveFromAssignmentWithParameters(self, assignment: "Assignment", search_parameters: "operations_research::RoutingSearchParameters const &", solutions: "std::vector< operations_research::Assignment const * > *"=None) -> "operations_research::Assignment const *":
-        r""" Same as above, except that if assignment is not null, it will be used as the initial solution."""
+        r"""
+        Same as above, except that if assignment is not null, it will be used as
+        the initial solution.
+        """
         return _pywrapcp.RoutingModel_SolveFromAssignmentWithParameters(self, assignment, search_parameters, solutions)
 
     def SolveFromAssignmentsWithParameters(self, assignments: "std::vector< operations_research::Assignment const * > const &", search_parameters: "operations_research::RoutingSearchParameters const &", solutions: "std::vector< operations_research::Assignment const * > *"=None) -> "operations_research::Assignment const *":
-        r""" Same as above but will try all assignments in order as first solutions until one succeeds."""
+        r"""
+        Same as above but will try all assignments in order as first solutions
+        until one succeeds.
+        """
         return _pywrapcp.RoutingModel_SolveFromAssignmentsWithParameters(self, assignments, search_parameters, solutions)
 
     def SetAssignmentFromOtherModelAssignment(self, target_assignment: "Assignment", source_model: "RoutingModel", source_assignment: "Assignment") -> "void":
-        r""" Given a "source_model" and its "source_assignment", resets "target_assignment" with the IntVar variables (nexts_, and vehicle_vars_ if costs aren't homogeneous across vehicles) of "this" model, with the values set according to those in "other_assignment". The objective_element of target_assignment is set to this->cost_."""
+        r"""
+        Given a "source_model" and its "source_assignment", resets
+        "target_assignment" with the IntVar variables (nexts_, and vehicle_vars_
+        if costs aren't homogeneous across vehicles) of "this" model, with the
+        values set according to those in "other_assignment".
+        The objective_element of target_assignment is set to this->cost_.
+        """
         return _pywrapcp.RoutingModel_SetAssignmentFromOtherModelAssignment(self, target_assignment, source_model, source_assignment)
 
     def ComputeLowerBound(self) -> "int64_t":
-        r""" Computes a lower bound to the routing problem solving a linear assignment problem. The routing model must be closed before calling this method. Note that problems with node disjunction constraints (including optional nodes) and non-homogenous costs are not supported (the method returns 0 in these cases)."""
+        r"""
+        Computes a lower bound to the routing problem solving a linear assignment
+        problem. The routing model must be closed before calling this method.
+        Note that problems with node disjunction constraints (including optional
+        nodes) and non-homogenous costs are not supported (the method returns 0 in
+        these cases).
+        """
         return _pywrapcp.RoutingModel_ComputeLowerBound(self)
 
     def status(self) -> "operations_research::RoutingModel::Status":
@@ -7471,50 +8881,137 @@ pywrapcp    
         return _pywrapcp.RoutingModel_status(self)
 
     def ApplyLocks(self, locks: "std::vector< int64_t > const &") -> "operations_research::IntVar *":
-        r""" Applies a lock chain to the next search. 'locks' represents an ordered vector of nodes representing a partial route which will be fixed during the next search; it will constrain next variables such that: next[locks[i]] == locks[i+1]. Returns the next variable at the end of the locked chain; this variable is not locked. An assignment containing the locks can be obtained by calling PreAssignment()."""
+        r"""
+        Applies a lock chain to the next search. 'locks' represents an ordered
+        vector of nodes representing a partial route which will be fixed during
+        the next search; it will constrain next variables such that:
+        next[locks[i]] == locks[i+1].
+
+        Returns the next variable at the end of the locked chain; this variable is
+        not locked. An assignment containing the locks can be obtained by calling
+        PreAssignment().
+        """
         return _pywrapcp.RoutingModel_ApplyLocks(self, locks)
 
     def ApplyLocksToAllVehicles(self, locks: "std::vector< std::vector< int64_t > > const &", close_routes: "bool") -> "bool":
-        r""" Applies lock chains to all vehicles to the next search, such that locks[p] is the lock chain for route p. Returns false if the locks do not contain valid routes; expects that the routes do not contain the depots, i.e. there are empty vectors in place of empty routes. If close_routes is set to true, adds the end nodes to the route of each vehicle and deactivates other nodes. An assignment containing the locks can be obtained by calling PreAssignment()."""
+        r"""
+        Applies lock chains to all vehicles to the next search, such that locks[p]
+        is the lock chain for route p. Returns false if the locks do not contain
+        valid routes; expects that the routes do not contain the depots,
+        i.e. there are empty vectors in place of empty routes.
+        If close_routes is set to true, adds the end nodes to the route of each
+        vehicle and deactivates other nodes.
+        An assignment containing the locks can be obtained by calling
+        PreAssignment().
+        """
         return _pywrapcp.RoutingModel_ApplyLocksToAllVehicles(self, locks, close_routes)
 
     def PreAssignment(self) -> "operations_research::Assignment const *const":
-        r""" Returns an assignment used to fix some of the variables of the problem. In practice, this assignment locks partial routes of the problem. This can be used in the context of locking the parts of the routes which have already been driven in online routing problems."""
+        r"""
+        Returns an assignment used to fix some of the variables of the problem.
+        In practice, this assignment locks partial routes of the problem. This
+        can be used in the context of locking the parts of the routes which have
+        already been driven in online routing problems.
+        """
         return _pywrapcp.RoutingModel_PreAssignment(self)
 
     def MutablePreAssignment(self) -> "operations_research::Assignment *":
         return _pywrapcp.RoutingModel_MutablePreAssignment(self)
 
     def WriteAssignment(self, file_name: "std::string const &") -> "bool":
-        r""" Writes the current solution to a file containing an AssignmentProto. Returns false if the file cannot be opened or if there is no current solution."""
+        r"""
+        Writes the current solution to a file containing an AssignmentProto.
+        Returns false if the file cannot be opened or if there is no current
+        solution.
+        """
         return _pywrapcp.RoutingModel_WriteAssignment(self, file_name)
 
     def ReadAssignment(self, file_name: "std::string const &") -> "operations_research::Assignment *":
-        r""" Reads an assignment from a file and returns the current solution. Returns nullptr if the file cannot be opened or if the assignment is not valid."""
+        r"""
+        Reads an assignment from a file and returns the current solution.
+        Returns nullptr if the file cannot be opened or if the assignment is not
+        valid.
+        """
         return _pywrapcp.RoutingModel_ReadAssignment(self, file_name)
 
     def RestoreAssignment(self, solution: "Assignment") -> "operations_research::Assignment *":
-        r""" Restores an assignment as a solution in the routing model and returns the new solution. Returns nullptr if the assignment is not valid."""
+        r"""
+        Restores an assignment as a solution in the routing model and returns the
+        new solution. Returns nullptr if the assignment is not valid.
+        """
         return _pywrapcp.RoutingModel_RestoreAssignment(self, solution)
 
     def ReadAssignmentFromRoutes(self, routes: "std::vector< std::vector< int64_t > > const &", ignore_inactive_indices: "bool") -> "operations_research::Assignment *":
-        r""" Restores the routes as the current solution. Returns nullptr if the solution cannot be restored (routes do not contain a valid solution). Note that calling this method will run the solver to assign values to the dimension variables; this may take considerable amount of time, especially when using dimensions with slack."""
+        r"""
+        Restores the routes as the current solution. Returns nullptr if the
+        solution cannot be restored (routes do not contain a valid solution). Note
+        that calling this method will run the solver to assign values to the
+        dimension variables; this may take considerable amount of time, especially
+        when using dimensions with slack.
+        """
         return _pywrapcp.RoutingModel_ReadAssignmentFromRoutes(self, routes, ignore_inactive_indices)
 
     def RoutesToAssignment(self, routes: "std::vector< std::vector< int64_t > > const &", ignore_inactive_indices: "bool", close_routes: "bool", assignment: "Assignment") -> "bool":
-        r""" Fills an assignment from a specification of the routes of the vehicles. The routes are specified as lists of variable indices that appear on the routes of the vehicles. The indices of the outer vector in 'routes' correspond to vehicles IDs, the inner vector contains the variable indices on the routes for the given vehicle. The inner vectors must not contain the start and end indices, as these are determined by the routing model.  Sets the value of NextVars in the assignment, adding the variables to the assignment if necessary. The method does not touch other variables in the assignment. The method can only be called after the model is closed.  With ignore_inactive_indices set to false, this method will fail (return nullptr) in case some of the route contain indices that are deactivated in the model; when set to true, these indices will be skipped.  Returns true if routes were successfully loaded. However, such assignment still might not be a valid solution to the routing problem due to more complex constraints; it is advisible to call solver()->CheckSolution() afterwards."""
+        r"""
+        Fills an assignment from a specification of the routes of the
+        vehicles. The routes are specified as lists of variable indices that
+        appear on the routes of the vehicles. The indices of the outer vector in
+        'routes' correspond to vehicles IDs, the inner vector contains the
+        variable indices on the routes for the given vehicle. The inner vectors
+        must not contain the start and end indices, as these are determined by the
+        routing model.  Sets the value of NextVars in the assignment, adding the
+        variables to the assignment if necessary. The method does not touch other
+        variables in the assignment. The method can only be called after the model
+        is closed.  With ignore_inactive_indices set to false, this method will
+        fail (return nullptr) in case some of the route contain indices that are
+        deactivated in the model; when set to true, these indices will be
+        skipped.  Returns true if routes were successfully
+        loaded. However, such assignment still might not be a valid
+        solution to the routing problem due to more complex constraints;
+        it is advisible to call solver()->CheckSolution() afterwards.
+        """
         return _pywrapcp.RoutingModel_RoutesToAssignment(self, routes, ignore_inactive_indices, close_routes, assignment)
 
     def AssignmentToRoutes(self, assignment: "Assignment", routes: "std::vector< std::vector< int64_t > > *const") -> "void":
-        r""" Converts the solution in the given assignment to routes for all vehicles. Expects that assignment contains a valid solution (i.e. routes for all vehicles end with an end index for that vehicle)."""
+        r"""
+        Converts the solution in the given assignment to routes for all vehicles.
+        Expects that assignment contains a valid solution (i.e. routes for all
+        vehicles end with an end index for that vehicle).
+        """
         return _pywrapcp.RoutingModel_AssignmentToRoutes(self, assignment, routes)
 
     def CompactAssignment(self, assignment: "Assignment") -> "operations_research::Assignment *":
-        r""" Converts the solution in the given assignment to routes for all vehicles. If the returned vector is route_indices, route_indices[i][j] is the index for jth location visited on route i. Note that contrary to AssignmentToRoutes, the vectors do include start and end locations. Returns a compacted version of the given assignment, in which all vehicles with id lower or equal to some N have non-empty routes, and all vehicles with id greater than N have empty routes. Does not take ownership of the returned object. If found, the cost of the compact assignment is the same as in the original assignment and it preserves the values of 'active' variables. Returns nullptr if a compact assignment was not found. This method only works in homogenous mode, and it only swaps equivalent vehicles (vehicles with the same start and end nodes). When creating the compact assignment, the empty plan is replaced by the route assigned to the compatible vehicle with the highest id. Note that with more complex constraints on vehicle variables, this method might fail even if a compact solution exists. This method changes the vehicle and dimension variables as necessary. While compacting the solution, only basic checks on vehicle variables are performed; if one of these checks fails no attempts to repair it are made (instead, the method returns nullptr)."""
+        r"""
+        Converts the solution in the given assignment to routes for all vehicles.
+        If the returned vector is route_indices, route_indices[i][j] is the index
+        for jth location visited on route i. Note that contrary to
+        AssignmentToRoutes, the vectors do include start and end locations.
+        Returns a compacted version of the given assignment, in which all vehicles
+        with id lower or equal to some N have non-empty routes, and all vehicles
+        with id greater than N have empty routes. Does not take ownership of the
+        returned object.
+        If found, the cost of the compact assignment is the same as in the
+        original assignment and it preserves the values of 'active' variables.
+        Returns nullptr if a compact assignment was not found.
+        This method only works in homogenous mode, and it only swaps equivalent
+        vehicles (vehicles with the same start and end nodes). When creating the
+        compact assignment, the empty plan is replaced by the route assigned to
+        the compatible vehicle with the highest id. Note that with more complex
+        constraints on vehicle variables, this method might fail even if a compact
+        solution exists.
+        This method changes the vehicle and dimension variables as necessary.
+        While compacting the solution, only basic checks on vehicle variables are
+        performed; if one of these checks fails no attempts to repair it are made
+        (instead, the method returns nullptr).
+        """
         return _pywrapcp.RoutingModel_CompactAssignment(self, assignment)
 
     def CompactAndCheckAssignment(self, assignment: "Assignment") -> "operations_research::Assignment *":
-        r""" Same as CompactAssignment() but also checks the validity of the final compact solution; if it is not valid, no attempts to repair it are made (instead, the method returns nullptr)."""
+        r"""
+        Same as CompactAssignment() but also checks the validity of the final
+        compact solution; if it is not valid, no attempts to repair it are made
+        (instead, the method returns nullptr).
+        """
         return _pywrapcp.RoutingModel_CompactAndCheckAssignment(self, assignment)
 
     def AddToAssignment(self, var: "IntVar") -> "void":
@@ -7525,15 +9022,35 @@ pywrapcp    
         return _pywrapcp.RoutingModel_AddIntervalToAssignment(self, interval)
 
     def PackCumulsOfOptimizerDimensionsFromAssignment(self, original_assignment: "Assignment", duration_limit: "absl::Duration") -> "operations_research::Assignment const *":
-        r""" For every dimension in the model with an optimizer in local/global_dimension_optimizers_, this method tries to pack the cumul values of the dimension, such that: - The cumul costs (span costs, soft lower and upper bound costs, etc) are   minimized. - The cumuls of the ends of the routes are minimized for this given   minimal cumul cost. - Given these minimal end cumuls, the route start cumuls are maximized. Returns the assignment resulting from allocating these packed cumuls with the solver, and nullptr if these cumuls could not be set by the solver."""
+        r"""
+        For every dimension in the model with an optimizer in
+        local/global_dimension_optimizers_, this method tries to pack the cumul
+        values of the dimension, such that:
+        - The cumul costs (span costs, soft lower and upper bound costs, etc) are
+          minimized.
+        - The cumuls of the ends of the routes are minimized for this given
+          minimal cumul cost.
+        - Given these minimal end cumuls, the route start cumuls are maximized.
+        Returns the assignment resulting from allocating these packed cumuls with
+        the solver, and nullptr if these cumuls could not be set by the solver.
+        """
         return _pywrapcp.RoutingModel_PackCumulsOfOptimizerDimensionsFromAssignment(self, original_assignment, duration_limit)
 
     def AddLocalSearchFilter(self, filter: "LocalSearchFilter") -> "void":
-        r""" Adds a custom local search filter to the list of filters used to speed up local search by pruning unfeasible variable assignments. Calling this method after the routing model has been closed (CloseModel() or Solve() has been called) has no effect. The routing model does not take ownership of the filter."""
+        r"""
+        Adds a custom local search filter to the list of filters used to speed up
+        local search by pruning unfeasible variable assignments.
+        Calling this method after the routing model has been closed (CloseModel()
+        or Solve() has been called) has no effect.
+        The routing model does not take ownership of the filter.
+        """
         return _pywrapcp.RoutingModel_AddLocalSearchFilter(self, filter)
 
     def Start(self, vehicle: "int") -> "int64_t":
-        r""" Model inspection. Returns the variable index of the starting node of a vehicle route."""
+        r"""
+        Model inspection.
+        Returns the variable index of the starting node of a vehicle route.
+        """
         return _pywrapcp.RoutingModel_Start(self, vehicle)
 
     def End(self, vehicle: "int") -> "int64_t":
@@ -7549,11 +9066,18 @@ pywrapcp    
         return _pywrapcp.RoutingModel_IsEnd(self, index)
 
     def VehicleIndex(self, index: "int64_t") -> "int":
-        r""" Returns the vehicle of the given start/end index, and -1 if the given index is not a vehicle start/end."""
+        r"""
+        Returns the vehicle of the given start/end index, and -1 if the given
+        index is not a vehicle start/end.
+        """
         return _pywrapcp.RoutingModel_VehicleIndex(self, index)
 
     def Next(self, assignment: "Assignment", index: "int64_t") -> "int64_t":
-        r""" Assignment inspection Returns the variable index of the node directly after the node corresponding to 'index' in 'assignment'."""
+        r"""
+        Assignment inspection
+        Returns the variable index of the node directly after the node
+        corresponding to 'index' in 'assignment'.
+        """
         return _pywrapcp.RoutingModel_Next(self, assignment, index)
 
     def IsVehicleUsed(self, assignment: "Assignment", vehicle: "int") -> "bool":
@@ -7561,7 +9085,10 @@ pywrapcp    
         return _pywrapcp.RoutingModel_IsVehicleUsed(self, assignment, vehicle)
 
     def NextVar(self, index: "int64_t") -> "operations_research::IntVar *":
-        r""" Returns the next variable of the node corresponding to index. Note that NextVar(index) == index is equivalent to ActiveVar(index) == 0."""
+        r"""
+        Returns the next variable of the node corresponding to index. Note that
+        NextVar(index) == index is equivalent to ActiveVar(index) == 0.
+        """
         return _pywrapcp.RoutingModel_NextVar(self, index)
 
     def ActiveVar(self, index: "int64_t") -> "operations_research::IntVar *":
@@ -7569,15 +9096,24 @@ pywrapcp    
         return _pywrapcp.RoutingModel_ActiveVar(self, index)
 
     def ActiveVehicleVar(self, vehicle: "int") -> "operations_research::IntVar *":
-        r""" Returns the active variable of the vehicle. It will be equal to 1 iff the route of the vehicle is not empty, 0 otherwise."""
+        r"""
+        Returns the active variable of the vehicle. It will be equal to 1 iff the
+        route of the vehicle is not empty, 0 otherwise.
+        """
         return _pywrapcp.RoutingModel_ActiveVehicleVar(self, vehicle)
 
     def VehicleCostsConsideredVar(self, vehicle: "int") -> "operations_research::IntVar *":
-        r""" Returns the variable specifying whether or not costs are considered for vehicle."""
+        r"""
+        Returns the variable specifying whether or not costs are considered for
+        vehicle.
+        """
         return _pywrapcp.RoutingModel_VehicleCostsConsideredVar(self, vehicle)
 
     def VehicleVar(self, index: "int64_t") -> "operations_research::IntVar *":
-        r""" Returns the vehicle variable of the node corresponding to index. Note that VehicleVar(index) == -1 is equivalent to ActiveVar(index) == 0."""
+        r"""
+        Returns the vehicle variable of the node corresponding to index. Note that
+        VehicleVar(index) == -1 is equivalent to ActiveVar(index) == 0.
+        """
         return _pywrapcp.RoutingModel_VehicleVar(self, index)
 
     def CostVar(self) -> "operations_research::IntVar *":
@@ -7585,7 +9121,10 @@ pywrapcp    
         return _pywrapcp.RoutingModel_CostVar(self)
 
     def GetArcCostForVehicle(self, from_index: "int64_t", to_index: "int64_t", vehicle: "int64_t") -> "int64_t":
-        r""" Returns the cost of the transit arc between two nodes for a given vehicle. Input are variable indices of node. This returns 0 if vehicle < 0."""
+        r"""
+        Returns the cost of the transit arc between two nodes for a given vehicle.
+        Input are variable indices of node. This returns 0 if vehicle < 0.
+        """
         return _pywrapcp.RoutingModel_GetArcCostForVehicle(self, from_index, to_index, vehicle)
 
     def CostsAreHomogeneousAcrossVehicles(self) -> "bool":
@@ -7593,15 +9132,28 @@ pywrapcp    
         return _pywrapcp.RoutingModel_CostsAreHomogeneousAcrossVehicles(self)
 
     def GetHomogeneousCost(self, from_index: "int64_t", to_index: "int64_t") -> "int64_t":
-        r""" Returns the cost of the segment between two nodes supposing all vehicle costs are the same (returns the cost for the first vehicle otherwise)."""
+        r"""
+        Returns the cost of the segment between two nodes supposing all vehicle
+        costs are the same (returns the cost for the first vehicle otherwise).
+        """
         return _pywrapcp.RoutingModel_GetHomogeneousCost(self, from_index, to_index)
 
     def GetArcCostForFirstSolution(self, from_index: "int64_t", to_index: "int64_t") -> "int64_t":
-        r""" Returns the cost of the arc in the context of the first solution strategy. This is typically a simplification of the actual cost; see the .cc."""
+        r"""
+        Returns the cost of the arc in the context of the first solution strategy.
+        This is typically a simplification of the actual cost; see the .cc.
+        """
         return _pywrapcp.RoutingModel_GetArcCostForFirstSolution(self, from_index, to_index)
 
     def GetArcCostForClass(self, from_index: "int64_t", to_index: "int64_t", cost_class_index: "int64_t") -> "int64_t":
-        r""" Returns the cost of the segment between two nodes for a given cost class. Input are variable indices of nodes and the cost class. Unlike GetArcCostForVehicle(), if cost_class is kNoCost, then the returned cost won't necessarily be zero: only some of the components of the cost that depend on the cost class will be omited. See the code for details."""
+        r"""
+        Returns the cost of the segment between two nodes for a given cost
+        class. Input are variable indices of nodes and the cost class.
+        Unlike GetArcCostForVehicle(), if cost_class is kNoCost, then the
+        returned cost won't necessarily be zero: only some of the components
+        of the cost that depend on the cost class will be omited. See the code
+        for details.
+        """
         return _pywrapcp.RoutingModel_GetArcCostForClass(self, from_index, to_index, cost_class_index)
 
     def GetCostClassIndexOfVehicle(self, vehicle: "int64_t") -> "operations_research::RoutingModel::CostClassIndex":
@@ -7609,7 +9161,10 @@ pywrapcp    
         return _pywrapcp.RoutingModel_GetCostClassIndexOfVehicle(self, vehicle)
 
     def HasVehicleWithCostClassIndex(self, cost_class_index: "operations_research::RoutingModel::CostClassIndex") -> "bool":
-        r""" Returns true iff the model contains a vehicle with the given cost_class_index."""
+        r"""
+        Returns true iff the model contains a vehicle with the given
+        cost_class_index.
+        """
         return _pywrapcp.RoutingModel_HasVehicleWithCostClassIndex(self, cost_class_index)
 
     def GetCostClassesCount(self) -> "int":
@@ -7624,7 +9179,10 @@ pywrapcp    
         return _pywrapcp.RoutingModel_GetVehicleClassIndexOfVehicle(self, vehicle)
 
     def GetVehicleOfClass(self, vehicle_class: "operations_research::RoutingModel::VehicleClassIndex") -> "int":
-        r""" Returns a vehicle of the given vehicle class, and -1 if there are no vehicles for this class."""
+        r"""
+        Returns a vehicle of the given vehicle class, and -1 if there are no
+        vehicles for this class.
+        """
         return _pywrapcp.RoutingModel_GetVehicleOfClass(self, vehicle_class)
 
     def GetVehicleClassesCount(self) -> "int":
@@ -7639,15 +9197,47 @@ pywrapcp    
         return _pywrapcp.RoutingModel_GetVehicleTypeContainer(self)
 
     def ArcIsMoreConstrainedThanArc(self, _from: "int64_t", to1: "int64_t", to2: "int64_t") -> "bool":
-        r""" Returns whether the arc from->to1 is more constrained than from->to2, taking into account, in order: - whether the destination node isn't an end node - whether the destination node is mandatory - whether the destination node is bound to the same vehicle as the source - the "primary constrained" dimension (see SetPrimaryConstrainedDimension) It then breaks ties using, in order: - the arc cost (taking unperformed penalties into account) - the size of the vehicle vars of "to1" and "to2" (lowest size wins) - the value: the lowest value of the indices to1 and to2 wins. See the .cc for details. The more constrained arc is typically preferable when building a first solution. This method is intended to be used as a callback for the BestValueByComparisonSelector value selector. Args:   from: the variable index of the source node   to1: the variable index of the first candidate destination node.   to2: the variable index of the second candidate destination node."""
+        r"""
+        Returns whether the arc from->to1 is more constrained than from->to2,
+        taking into account, in order:
+        - whether the destination node isn't an end node
+        - whether the destination node is mandatory
+        - whether the destination node is bound to the same vehicle as the source
+        - the "primary constrained" dimension (see SetPrimaryConstrainedDimension)
+        It then breaks ties using, in order:
+        - the arc cost (taking unperformed penalties into account)
+        - the size of the vehicle vars of "to1" and "to2" (lowest size wins)
+        - the value: the lowest value of the indices to1 and to2 wins.
+        See the .cc for details.
+        The more constrained arc is typically preferable when building a
+        first solution. This method is intended to be used as a callback for the
+        BestValueByComparisonSelector value selector.
+        Args:
+          from: the variable index of the source node
+          to1: the variable index of the first candidate destination node.
+          to2: the variable index of the second candidate destination node.
+        """
         return _pywrapcp.RoutingModel_ArcIsMoreConstrainedThanArc(self, _from, to1, to2)
 
     def DebugOutputAssignment(self, solution_assignment: "Assignment", dimension_to_print: "std::string const &") -> "std::string":
-        r""" Print some debugging information about an assignment, including the feasible intervals of the CumulVar for dimension "dimension_to_print" at each step of the routes. If "dimension_to_print" is omitted, all dimensions will be printed."""
+        r"""
+        Print some debugging information about an assignment, including the
+        feasible intervals of the CumulVar for dimension "dimension_to_print"
+        at each step of the routes.
+        If "dimension_to_print" is omitted, all dimensions will be printed.
+        """
         return _pywrapcp.RoutingModel_DebugOutputAssignment(self, solution_assignment, dimension_to_print)
 
     def solver(self) -> "operations_research::Solver *":
-        r""" Returns a vector cumul_bounds, for which cumul_bounds[i][j] is a pair containing the minimum and maximum of the CumulVar of the jth node on route i. - cumul_bounds[i][j].first is the minimum. - cumul_bounds[i][j].second is the maximum. Returns the underlying constraint solver. Can be used to add extra constraints and/or modify search algorithms."""
+        r"""
+        Returns a vector cumul_bounds, for which cumul_bounds[i][j] is a pair
+        containing the minimum and maximum of the CumulVar of the jth node on
+        route i.
+        - cumul_bounds[i][j].first is the minimum.
+        - cumul_bounds[i][j].second is the maximum.
+        Returns the underlying constraint solver. Can be used to add extra
+        constraints and/or modify search algorithms.
+        """
         return _pywrapcp.RoutingModel_solver(self)
 
     def CheckLimit(self) -> "bool":
@@ -7659,7 +9249,10 @@ pywrapcp    
         return _pywrapcp.RoutingModel_RemainingTime(self)
 
     def nodes(self) -> "int":
-        r""" Sizes and indices Returns the number of nodes in the model."""
+        r"""
+        Sizes and indices
+        Returns the number of nodes in the model.
+        """
         return _pywrapcp.RoutingModel_nodes(self)
 
     def vehicles(self) -> "int":
@@ -7671,7 +9264,10 @@ pywrapcp    
         return _pywrapcp.RoutingModel_Size(self)
 
     def GetNumberOfDecisionsInFirstSolution(self, search_parameters: "operations_research::RoutingSearchParameters const &") -> "int64_t":
-        r""" Returns statistics on first solution search, number of decisions sent to filters, number of decisions rejected by filters."""
+        r"""
+        Returns statistics on first solution search, number of decisions sent to
+        filters, number of decisions rejected by filters.
+        """
         return _pywrapcp.RoutingModel_GetNumberOfDecisionsInFirstSolution(self, search_parameters)
 
     def GetNumberOfRejectsInFirstSolution(self, search_parameters: "operations_research::RoutingSearchParameters const &") -> "int64_t":
@@ -7686,11 +9282,38 @@ pywrapcp    
         return _pywrapcp.RoutingModel_IsMatchingModel(self)
 
     def MakeGuidedSlackFinalizer(self, dimension: "RoutingDimension", initializer: "std::function< int64_t (int64_t) >") -> "operations_research::DecisionBuilder *":
-        r""" The next few members are in the public section only for testing purposes. MakeGuidedSlackFinalizer creates a DecisionBuilder for the slacks of a dimension using a callback to choose which values to start with. The finalizer works only when all next variables in the model have been fixed. It has the following two characteristics: 1. It follows the routes defined by the nexts variables when choosing a    variable to make a decision on. 2. When it comes to choose a value for the slack of node i, the decision    builder first calls the callback with argument i, and supposingly the    returned value is x it creates decisions slack[i] = x, slack[i] = x +    1, slack[i] = x - 1, slack[i] = x + 2, etc."""
+        r"""
+        The next few members are in the public section only for testing purposes.
+
+        MakeGuidedSlackFinalizer creates a DecisionBuilder for the slacks of a
+        dimension using a callback to choose which values to start with.
+        The finalizer works only when all next variables in the model have
+        been fixed. It has the following two characteristics:
+        1. It follows the routes defined by the nexts variables when choosing a
+           variable to make a decision on.
+        2. When it comes to choose a value for the slack of node i, the decision
+           builder first calls the callback with argument i, and supposingly the
+           returned value is x it creates decisions slack[i] = x, slack[i] = x +
+           1, slack[i] = x - 1, slack[i] = x + 2, etc.
+        """
         return _pywrapcp.RoutingModel_MakeGuidedSlackFinalizer(self, dimension, initializer)
 
     def MakeSelfDependentDimensionFinalizer(self, dimension: "RoutingDimension") -> "operations_research::DecisionBuilder *":
-        r""" MakeSelfDependentDimensionFinalizer is a finalizer for the slacks of a self-dependent dimension. It makes an extensive use of the caches of the state dependent transits. In detail, MakeSelfDependentDimensionFinalizer returns a composition of a local search decision builder with a greedy descent operator for the cumul of the start of each route and a guided slack finalizer. Provided there are no time windows and the maximum slacks are large enough, once the cumul of the start of route is fixed, the guided finalizer can find optimal values of the slacks for the rest of the route in time proportional to the length of the route. Therefore the composed finalizer generally works in time O(log(t)*n*m), where t is the latest possible departute time, n is the number of nodes in the network and m is the number of vehicles."""
+        r"""
+        MakeSelfDependentDimensionFinalizer is a finalizer for the slacks of a
+        self-dependent dimension. It makes an extensive use of the caches of the
+        state dependent transits.
+        In detail, MakeSelfDependentDimensionFinalizer returns a composition of a
+        local search decision builder with a greedy descent operator for the cumul
+        of the start of each route and a guided slack finalizer. Provided there
+        are no time windows and the maximum slacks are large enough, once the
+        cumul of the start of route is fixed, the guided finalizer can find
+        optimal values of the slacks for the rest of the route in time
+        proportional to the length of the route. Therefore the composed finalizer
+        generally works in time O(log(t)*n*m), where t is the latest possible
+        departute time, n is the number of nodes in the network and m is the
+        number of vehicles.
+        """
         return _pywrapcp.RoutingModel_MakeSelfDependentDimensionFinalizer(self, dimension)
 
 # Register RoutingModel in _pywrapcp:
@@ -7717,7 +9340,18 @@ pywrapcp    
 RoutingModelVisitor.kRemoveValues = _pywrapcp.cvar.RoutingModelVisitor_kRemoveValues
 
 class GlobalVehicleBreaksConstraint(Constraint):
-    r""" GlobalVehicleBreaksConstraint ensures breaks constraints are enforced on all vehicles in the dimension passed to its constructor. It is intended to be used for dimensions representing time. A break constraint ensures break intervals fit on the route of a vehicle. For a given vehicle, it forces break intervals to be disjoint from visit intervals, where visit intervals start at CumulVar(node) and last for node_visit_transit[node]. Moreover, it ensures that there is enough time between two consecutive nodes of a route to do transit and vehicle breaks, i.e. if Next(nodeA) = nodeB, CumulVar(nodeA) = tA and CumulVar(nodeB) = tB, then SlackVar(nodeA) >= sum_{breaks [tA, tB)} duration(break)."""
+    r"""
+    GlobalVehicleBreaksConstraint ensures breaks constraints are enforced on
+    all vehicles in the dimension passed to its constructor.
+    It is intended to be used for dimensions representing time.
+    A break constraint ensures break intervals fit on the route of a vehicle.
+    For a given vehicle, it forces break intervals to be disjoint from visit
+    intervals, where visit intervals start at CumulVar(node) and last for
+    node_visit_transit[node]. Moreover, it ensures that there is enough time
+    between two consecutive nodes of a route to do transit and vehicle breaks,
+    i.e. if Next(nodeA) = nodeB, CumulVar(nodeA) = tA and CumulVar(nodeB) = tB,
+    then SlackVar(nodeA) >= sum_{breaks [tA, tB)} duration(break).
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
@@ -7779,7 +9413,48 @@ pywrapcp    
 _pywrapcp.TypeRequirementChecker_swigregister(TypeRequirementChecker)
 
 class TypeRegulationsConstraint(Constraint):
-    r""" The following constraint ensures that incompatibilities and requirements between types are respected. It verifies both "hard" and "temporal" incompatibilities. Two nodes with hard incompatible types cannot be served by the same vehicle at all, while with a temporal incompatibility they can't be on the same route at the same time. The VisitTypePolicy of a node determines how visiting it impacts the type count on the route. For example, for - three temporally incompatible types T1 T2 and T3 - 2 pairs of nodes a1/r1 and a2/r2 of type T1 and T2 respectively, with     - a1 and a2 of VisitTypePolicy TYPE_ADDED_TO_VEHICLE     - r1 and r2 of policy ADDED_TYPE_REMOVED_FROM_VEHICLE - 3 nodes A, UV and AR of type T3, respectively with type policies   TYPE_ADDED_TO_VEHICLE, TYPE_ON_VEHICLE_UP_TO_VISIT and   TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED the configurations UV --> a1 --> r1 --> a2 --> r2,   a1 --> r1 --> a2 --> r2 --> A and a1 --> r1 --> AR --> a2 --> r2 are acceptable, whereas the configurations a1 --> a2 --> r1 --> ..., or A --> a1 --> r1 --> ..., or a1 --> r1 --> UV --> ... are not feasible. It also verifies same-vehicle and temporal type requirements. A node of type T_d with a same-vehicle requirement for type T_r needs to be served by the same vehicle as a node of type T_r. Temporal requirements, on the other hand, can take effect either when the dependent type is being added to the route or when it's removed from it, which is determined by the dependent node's VisitTypePolicy. In the above example: - If T3 is required on the same vehicle as T1, A, AR or UV must be on the   same vehicle as a1. - If T2 is required when adding T1, a2 must be visited *before* a1, and if   r2 is also visited on the route, it must be *after* a1, i.e. T2 must be on   the vehicle when a1 is visited:   ... --> a2 --> ... --> a1 --> ... --> r2 --> ... - If T3 is required when removing T1, T3 needs to be on the vehicle when   r1 is visited:   ... --> A --> ... --> r1 --> ...   OR   ... --> r1 --> ... --> UV --> ..."""
+    r"""
+    The following constraint ensures that incompatibilities and requirements
+    between types are respected.
+
+    It verifies both "hard" and "temporal" incompatibilities.
+    Two nodes with hard incompatible types cannot be served by the same vehicle
+    at all, while with a temporal incompatibility they can't be on the same
+    route at the same time.
+    The VisitTypePolicy of a node determines how visiting it impacts the type
+    count on the route.
+
+    For example, for
+    - three temporally incompatible types T1 T2 and T3
+    - 2 pairs of nodes a1/r1 and a2/r2 of type T1 and T2 respectively, with
+        - a1 and a2 of VisitTypePolicy TYPE_ADDED_TO_VEHICLE
+        - r1 and r2 of policy ADDED_TYPE_REMOVED_FROM_VEHICLE
+    - 3 nodes A, UV and AR of type T3, respectively with type policies
+      TYPE_ADDED_TO_VEHICLE, TYPE_ON_VEHICLE_UP_TO_VISIT and
+      TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED
+    the configurations
+    UV --> a1 --> r1 --> a2 --> r2,   a1 --> r1 --> a2 --> r2 --> A and
+    a1 --> r1 --> AR --> a2 --> r2 are acceptable, whereas the configurations
+    a1 --> a2 --> r1 --> ..., or A --> a1 --> r1 --> ..., or
+    a1 --> r1 --> UV --> ... are not feasible.
+
+    It also verifies same-vehicle and temporal type requirements.
+    A node of type T_d with a same-vehicle requirement for type T_r needs to be
+    served by the same vehicle as a node of type T_r.
+    Temporal requirements, on the other hand, can take effect either when the
+    dependent type is being added to the route or when it's removed from it,
+    which is determined by the dependent node's VisitTypePolicy.
+    In the above example:
+    - If T3 is required on the same vehicle as T1, A, AR or UV must be on the
+      same vehicle as a1.
+    - If T2 is required when adding T1, a2 must be visited *before* a1, and if
+      r2 is also visited on the route, it must be *after* a1, i.e. T2 must be on
+      the vehicle when a1 is visited:
+      ... --> a2 --> ... --> a1 --> ... --> r2 --> ...
+    - If T3 is required when removing T1, T3 needs to be on the vehicle when
+      r1 is visited:
+      ... --> A --> ... --> r1 --> ...   OR   ... --> r1 --> ... --> UV --> ...
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
@@ -7798,7 +9473,27 @@ pywrapcp    
 _pywrapcp.TypeRegulationsConstraint_swigregister(TypeRegulationsConstraint)
 
 class RoutingDimension(object):
-    r""" Dimensions represent quantities accumulated at nodes along the routes. They represent quantities such as weights or volumes carried along the route, or distance or times. Quantities at a node are represented by "cumul" variables and the increase or decrease of quantities between nodes are represented by "transit" variables. These variables are linked as follows: if j == next(i), cumuls(j) = cumuls(i) + transits(i) + slacks(i) +             state_dependent_transits(i) where slack is a positive slack variable (can represent waiting times for a time dimension), and state_dependent_transits is a non-purely functional version of transits_. Favour transits over state_dependent_transits when possible, because purely functional callbacks allow more optimisations and make the model faster and easier to solve. for a given vehicle, it is passed as an external vector, it would be better to have this information here."""
+    r"""
+    Dimensions represent quantities accumulated at nodes along the routes. They
+    represent quantities such as weights or volumes carried along the route, or
+    distance or times.
+
+    Quantities at a node are represented by "cumul" variables and the increase
+    or decrease of quantities between nodes are represented by "transit"
+    variables. These variables are linked as follows:
+
+    if j == next(i),
+    cumuls(j) = cumuls(i) + transits(i) + slacks(i) +
+                state_dependent_transits(i)
+
+    where slack is a positive slack variable (can represent waiting times for
+    a time dimension), and state_dependent_transits is a non-purely functional
+    version of transits_. Favour transits over state_dependent_transits when
+    possible, because purely functional callbacks allow more optimisations and
+    make the model faster and easier to solve.
+    for a given vehicle, it is passed as an external vector, it would be better
+    to have this information here.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -7812,15 +9507,25 @@ pywrapcp    
         return _pywrapcp.RoutingDimension_model(self)
 
     def GetTransitValue(self, from_index: "int64_t", to_index: "int64_t", vehicle: "int64_t") -> "int64_t":
-        r""" Returns the transition value for a given pair of nodes (as var index); this value is the one taken by the corresponding transit variable when the 'next' variable for 'from_index' is bound to 'to_index'."""
+        r"""
+        Returns the transition value for a given pair of nodes (as var index);
+        this value is the one taken by the corresponding transit variable when
+        the 'next' variable for 'from_index' is bound to 'to_index'.
+        """
         return _pywrapcp.RoutingDimension_GetTransitValue(self, from_index, to_index, vehicle)
 
     def GetTransitValueFromClass(self, from_index: "int64_t", to_index: "int64_t", vehicle_class: "int64_t") -> "int64_t":
-        r""" Same as above but taking a vehicle class of the dimension instead of a vehicle (the class of a vehicle can be obtained with vehicle_to_class())."""
+        r"""
+        Same as above but taking a vehicle class of the dimension instead of a
+        vehicle (the class of a vehicle can be obtained with vehicle_to_class()).
+        """
         return _pywrapcp.RoutingDimension_GetTransitValueFromClass(self, from_index, to_index, vehicle_class)
 
     def CumulVar(self, index: "int64_t") -> "operations_research::IntVar *":
-        r""" Get the cumul, transit and slack variables for the given node (given as int64_t var index)."""
+        r"""
+        Get the cumul, transit and slack variables for the given node (given as
+        int64_t var index).
+        """
         return _pywrapcp.RoutingDimension_CumulVar(self, index)
 
     def TransitVar(self, index: "int64_t") -> "operations_research::IntVar *":
@@ -7833,62 +9538,146 @@ pywrapcp    
         return _pywrapcp.RoutingDimension_SlackVar(self, index)
 
     def SetSpanUpperBoundForVehicle(self, upper_bound: "int64_t", vehicle: "int") -> "void":
-        r""" Sets an upper bound on the dimension span on a given vehicle. This is the preferred way to limit the "length" of the route of a vehicle according to a dimension."""
+        r"""
+        Sets an upper bound on the dimension span on a given vehicle. This is the
+        preferred way to limit the "length" of the route of a vehicle according to
+        a dimension.
+        """
         return _pywrapcp.RoutingDimension_SetSpanUpperBoundForVehicle(self, upper_bound, vehicle)
 
     def SetSpanCostCoefficientForVehicle(self, coefficient: "int64_t", vehicle: "int") -> "void":
-        r""" Sets a cost proportional to the dimension span on a given vehicle, or on all vehicles at once. "coefficient" must be nonnegative. This is handy to model costs proportional to idle time when the dimension represents time. The cost for a vehicle is   span_cost = coefficient * (dimension end value - dimension start value)."""
+        r"""
+        Sets a cost proportional to the dimension span on a given vehicle,
+        or on all vehicles at once. "coefficient" must be nonnegative.
+        This is handy to model costs proportional to idle time when the dimension
+        represents time.
+        The cost for a vehicle is
+          span_cost = coefficient * (dimension end value - dimension start value).
+        """
         return _pywrapcp.RoutingDimension_SetSpanCostCoefficientForVehicle(self, coefficient, vehicle)
 
     def SetSpanCostCoefficientForAllVehicles(self, coefficient: "int64_t") -> "void":
         return _pywrapcp.RoutingDimension_SetSpanCostCoefficientForAllVehicles(self, coefficient)
 
     def SetGlobalSpanCostCoefficient(self, coefficient: "int64_t") -> "void":
-        r""" Sets a cost proportional to the *global* dimension span, that is the difference between the largest value of route end cumul variables and the smallest value of route start cumul variables. In other words: global_span_cost =   coefficient * (Max(dimension end value) - Min(dimension start value))."""
+        r"""
+        Sets a cost proportional to the *global* dimension span, that is the
+        difference between the largest value of route end cumul variables and
+        the smallest value of route start cumul variables.
+        In other words:
+        global_span_cost =
+          coefficient * (Max(dimension end value) - Min(dimension start value)).
+        """
         return _pywrapcp.RoutingDimension_SetGlobalSpanCostCoefficient(self, coefficient)
 
     def SetCumulVarSoftUpperBound(self, index: "int64_t", upper_bound: "int64_t", coefficient: "int64_t") -> "void":
-        r""" Sets a soft upper bound to the cumul variable of a given variable index. If the value of the cumul variable is greater than the bound, a cost proportional to the difference between this value and the bound is added to the cost function of the model:   cumulVar <= upper_bound -> cost = 0    cumulVar > upper_bound -> cost = coefficient * (cumulVar - upper_bound) This is also handy to model tardiness costs when the dimension represents time."""
+        r"""
+        Sets a soft upper bound to the cumul variable of a given variable index.
+        If the value of the cumul variable is greater than the bound, a cost
+        proportional to the difference between this value and the bound is added
+        to the cost function of the model:
+          cumulVar <= upper_bound -> cost = 0
+           cumulVar > upper_bound -> cost = coefficient * (cumulVar - upper_bound)
+        This is also handy to model tardiness costs when the dimension represents
+        time.
+        """
         return _pywrapcp.RoutingDimension_SetCumulVarSoftUpperBound(self, index, upper_bound, coefficient)
 
     def HasCumulVarSoftUpperBound(self, index: "int64_t") -> "bool":
-        r""" Returns true if a soft upper bound has been set for a given variable index."""
+        r"""
+        Returns true if a soft upper bound has been set for a given variable
+        index.
+        """
         return _pywrapcp.RoutingDimension_HasCumulVarSoftUpperBound(self, index)
 
     def GetCumulVarSoftUpperBound(self, index: "int64_t") -> "int64_t":
-        r""" Returns the soft upper bound of a cumul variable for a given variable index. The "hard" upper bound of the variable is returned if no soft upper bound has been set."""
+        r"""
+        Returns the soft upper bound of a cumul variable for a given variable
+        index. The "hard" upper bound of the variable is returned if no soft upper
+        bound has been set.
+        """
         return _pywrapcp.RoutingDimension_GetCumulVarSoftUpperBound(self, index)
 
     def GetCumulVarSoftUpperBoundCoefficient(self, index: "int64_t") -> "int64_t":
-        r""" Returns the cost coefficient of the soft upper bound of a cumul variable for a given variable index. If no soft upper bound has been set, 0 is returned."""
+        r"""
+        Returns the cost coefficient of the soft upper bound of a cumul variable
+        for a given variable index. If no soft upper bound has been set, 0 is
+        returned.
+        """
         return _pywrapcp.RoutingDimension_GetCumulVarSoftUpperBoundCoefficient(self, index)
 
     def SetCumulVarSoftLowerBound(self, index: "int64_t", lower_bound: "int64_t", coefficient: "int64_t") -> "void":
-        r""" Sets a soft lower bound to the cumul variable of a given variable index. If the value of the cumul variable is less than the bound, a cost proportional to the difference between this value and the bound is added to the cost function of the model:   cumulVar > lower_bound -> cost = 0   cumulVar <= lower_bound -> cost = coefficient * (lower_bound -               cumulVar). This is also handy to model earliness costs when the dimension represents time."""
+        r"""
+        Sets a soft lower bound to the cumul variable of a given variable index.
+        If the value of the cumul variable is less than the bound, a cost
+        proportional to the difference between this value and the bound is added
+        to the cost function of the model:
+          cumulVar > lower_bound -> cost = 0
+          cumulVar <= lower_bound -> cost = coefficient * (lower_bound -
+                      cumulVar).
+        This is also handy to model earliness costs when the dimension represents
+        time.
+        """
         return _pywrapcp.RoutingDimension_SetCumulVarSoftLowerBound(self, index, lower_bound, coefficient)
 
     def HasCumulVarSoftLowerBound(self, index: "int64_t") -> "bool":
-        r""" Returns true if a soft lower bound has been set for a given variable index."""
+        r"""
+        Returns true if a soft lower bound has been set for a given variable
+        index.
+        """
         return _pywrapcp.RoutingDimension_HasCumulVarSoftLowerBound(self, index)
 
     def GetCumulVarSoftLowerBound(self, index: "int64_t") -> "int64_t":
-        r""" Returns the soft lower bound of a cumul variable for a given variable index. The "hard" lower bound of the variable is returned if no soft lower bound has been set."""
+        r"""
+        Returns the soft lower bound of a cumul variable for a given variable
+        index. The "hard" lower bound of the variable is returned if no soft lower
+        bound has been set.
+        """
         return _pywrapcp.RoutingDimension_GetCumulVarSoftLowerBound(self, index)
 
     def GetCumulVarSoftLowerBoundCoefficient(self, index: "int64_t") -> "int64_t":
-        r""" Returns the cost coefficient of the soft lower bound of a cumul variable for a given variable index. If no soft lower bound has been set, 0 is returned."""
+        r"""
+        Returns the cost coefficient of the soft lower bound of a cumul variable
+        for a given variable index. If no soft lower bound has been set, 0 is
+        returned.
+        """
         return _pywrapcp.RoutingDimension_GetCumulVarSoftLowerBoundCoefficient(self, index)
 
     def SetBreakIntervalsOfVehicle(self, breaks: "std::vector< operations_research::IntervalVar * >", vehicle: "int", node_visit_transits: "std::vector< int64_t >") -> "void":
-        r""" Sets the breaks for a given vehicle. Breaks are represented by IntervalVars. They may interrupt transits between nodes and increase the value of corresponding slack variables. A break may take place before the start of a vehicle, after the end of a vehicle, or during a travel i -> j. In that case, the interval [break.Start(), break.End()) must be a subset of [CumulVar(i) + pre_travel(i, j), CumulVar(j) - post_travel(i, j)). In other words, a break may not overlap any node n's visit, given by [CumulVar(n) - post_travel(_, n), CumulVar(n) + pre_travel(n, _)). This formula considers post_travel(_, start) and pre_travel(end, _) to be 0; pre_travel will never be called on any (_, start) and post_travel will never we called on any (end, _). If pre_travel_evaluator or post_travel_evaluator is -1, it will be taken as a function that always returns 0. Deprecated, sets pre_travel(i, j) = node_visit_transit[i]."""
+        r"""
+        Sets the breaks for a given vehicle. Breaks are represented by
+        IntervalVars. They may interrupt transits between nodes and increase
+        the value of corresponding slack variables.
+        A break may take place before the start of a vehicle, after the end of
+        a vehicle, or during a travel i -> j.
+
+        In that case, the interval [break.Start(), break.End()) must be a subset
+        of [CumulVar(i) + pre_travel(i, j), CumulVar(j) - post_travel(i, j)). In
+        other words, a break may not overlap any node n's visit, given by
+        [CumulVar(n) - post_travel(_, n), CumulVar(n) + pre_travel(n, _)).
+        This formula considers post_travel(_, start) and pre_travel(end, _) to be
+        0; pre_travel will never be called on any (_, start) and post_travel will
+        never we called on any (end, _). If pre_travel_evaluator or
+        post_travel_evaluator is -1, it will be taken as a function that always
+        returns 0.
+        Deprecated, sets pre_travel(i, j) = node_visit_transit[i].
+        """
         return _pywrapcp.RoutingDimension_SetBreakIntervalsOfVehicle(self, breaks, vehicle, node_visit_transits)
 
     def SetBreakDistanceDurationOfVehicle(self, distance: "int64_t", duration: "int64_t", vehicle: "int") -> "void":
-        r""" With breaks supposed to be consecutive, this forces the distance between breaks of size at least minimum_break_duration to be at most distance. This supposes that the time until route start and after route end are infinite breaks."""
+        r"""
+        With breaks supposed to be consecutive, this forces the distance between
+        breaks of size at least minimum_break_duration to be at most distance.
+        This supposes that the time until route start and after route end are
+        infinite breaks.
+        """
         return _pywrapcp.RoutingDimension_SetBreakDistanceDurationOfVehicle(self, distance, duration, vehicle)
 
     def InitializeBreaks(self) -> "void":
-        r""" Sets up vehicle_break_intervals_, vehicle_break_distance_duration_, pre_travel_evaluators and post_travel_evaluators."""
+        r"""
+        Sets up vehicle_break_intervals_, vehicle_break_distance_duration_,
+        pre_travel_evaluators and post_travel_evaluators.
+        """
         return _pywrapcp.RoutingDimension_InitializeBreaks(self)
 
     def HasBreakConstraints(self) -> "bool":
@@ -7906,7 +9695,15 @@ pywrapcp    
         return _pywrapcp.RoutingDimension_base_dimension(self)
 
     def ShortestTransitionSlack(self, node: "int64_t") -> "int64_t":
-        r""" It makes sense to use the function only for self-dependent dimension. For such dimensions the value of the slack of a node determines the transition cost of the next transit. Provided that   1. cumul[node] is fixed,   2. next[node] and next[next[node]] (if exists) are fixed, the value of slack[node] for which cumul[next[node]] + transit[next[node]] is minimized can be found in O(1) using this function."""
+        r"""
+        It makes sense to use the function only for self-dependent dimension.
+        For such dimensions the value of the slack of a node determines the
+        transition cost of the next transit. Provided that
+          1. cumul[node] is fixed,
+          2. next[node] and next[next[node]] (if exists) are fixed,
+        the value of slack[node] for which cumul[next[node]] + transit[next[node]]
+        is minimized can be found in O(1) using this function.
+        """
         return _pywrapcp.RoutingDimension_ShortestTransitionSlack(self, node)
 
     def name(self) -> "std::string const &":
@@ -7942,11 +9739,19 @@ pywrapcp    
 
 
 def MakeSetValuesFromTargets(solver: "Solver", variables: "std::vector< operations_research::IntVar * >", targets: "std::vector< int64_t >") -> "operations_research::DecisionBuilder *":
-    r""" A decision builder which tries to assign values to variables as close as possible to target values first."""
+    r"""
+    A decision builder which tries to assign values to variables as close as
+    possible to target values first.
+    """
     return _pywrapcp.MakeSetValuesFromTargets(solver, variables, targets)
 
 def SolveModelWithSat(model: "RoutingModel", search_parameters: "operations_research::RoutingSearchParameters const &", initial_solution: "Assignment", solution: "Assignment") -> "bool":
-    r""" Attempts to solve the model using the cp-sat solver. As of 5/2019, will solve the TSP corresponding to the model if it has a single vehicle. Therefore the resulting solution might not actually be feasible. Will return false if a solution could not be found."""
+    r"""
+    Attempts to solve the model using the cp-sat solver. As of 5/2019, will
+    solve the TSP corresponding to the model if it has a single vehicle.
+    Therefore the resulting solution might not actually be feasible. Will return
+    false if a solution could not be found.
+    """
     return _pywrapcp.SolveModelWithSat(model, search_parameters, initial_solution, solution)
 
@@ -7965,7 +9770,11 @@ pywrapcp
View Source
class DefaultPhaseParameters(object):
-    r""" This struct holds all parameters for the default search. DefaultPhaseParameters is only used by Solver::MakeDefaultPhase methods. Note this is for advanced users only."""
+    r"""
+    This struct holds all parameters for the default search.
+    DefaultPhaseParameters is only used by Solver::MakeDefaultPhase methods.
+    Note this is for advanced users only.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
@@ -7977,15 +9786,35 @@ pywrapcp    
     NONE = _pywrapcp.DefaultPhaseParameters_NONE
     NORMAL = _pywrapcp.DefaultPhaseParameters_NORMAL
     VERBOSE = _pywrapcp.DefaultPhaseParameters_VERBOSE
-    var_selection_schema = property(_pywrapcp.DefaultPhaseParameters_var_selection_schema_get, _pywrapcp.DefaultPhaseParameters_var_selection_schema_set, doc=r""" This parameter describes how the next variable to instantiate will be chosen.""")
+    var_selection_schema = property(_pywrapcp.DefaultPhaseParameters_var_selection_schema_get, _pywrapcp.DefaultPhaseParameters_var_selection_schema_set, doc=r"""
+    This parameter describes how the next variable to instantiate
+    will be chosen.
+    """)
     value_selection_schema = property(_pywrapcp.DefaultPhaseParameters_value_selection_schema_get, _pywrapcp.DefaultPhaseParameters_value_selection_schema_set, doc=r""" This parameter describes which value to select for a given var.""")
-    initialization_splits = property(_pywrapcp.DefaultPhaseParameters_initialization_splits_get, _pywrapcp.DefaultPhaseParameters_initialization_splits_set, doc=r""" Maximum number of intervals that the initialization of impacts will scan per variable.""")
-    run_all_heuristics = property(_pywrapcp.DefaultPhaseParameters_run_all_heuristics_get, _pywrapcp.DefaultPhaseParameters_run_all_heuristics_set, doc=r""" The default phase will run heuristics periodically. This parameter indicates if we should run all heuristics, or a randomly selected one.""")
-    heuristic_period = property(_pywrapcp.DefaultPhaseParameters_heuristic_period_get, _pywrapcp.DefaultPhaseParameters_heuristic_period_set, doc=r""" The distance in nodes between each run of the heuristics. A negative or null value will mean that we will not run heuristics at all.""")
+    initialization_splits = property(_pywrapcp.DefaultPhaseParameters_initialization_splits_get, _pywrapcp.DefaultPhaseParameters_initialization_splits_set, doc=r"""
+    Maximum number of intervals that the initialization of impacts will scan
+    per variable.
+    """)
+    run_all_heuristics = property(_pywrapcp.DefaultPhaseParameters_run_all_heuristics_get, _pywrapcp.DefaultPhaseParameters_run_all_heuristics_set, doc=r"""
+    The default phase will run heuristics periodically. This parameter
+    indicates if we should run all heuristics, or a randomly selected
+    one.
+    """)
+    heuristic_period = property(_pywrapcp.DefaultPhaseParameters_heuristic_period_get, _pywrapcp.DefaultPhaseParameters_heuristic_period_set, doc=r"""
+    The distance in nodes between each run of the heuristics. A
+    negative or null value will mean that we will not run heuristics
+    at all.
+    """)
     heuristic_num_failures_limit = property(_pywrapcp.DefaultPhaseParameters_heuristic_num_failures_limit_get, _pywrapcp.DefaultPhaseParameters_heuristic_num_failures_limit_set, doc=r""" The failure limit for each heuristic that we run.""")
-    persistent_impact = property(_pywrapcp.DefaultPhaseParameters_persistent_impact_get, _pywrapcp.DefaultPhaseParameters_persistent_impact_set, doc=r""" Whether to keep the impact from the first search for other searches, or to recompute the impact for each new search.""")
+    persistent_impact = property(_pywrapcp.DefaultPhaseParameters_persistent_impact_get, _pywrapcp.DefaultPhaseParameters_persistent_impact_set, doc=r"""
+    Whether to keep the impact from the first search for other searches,
+    or to recompute the impact for each new search.
+    """)
     random_seed = property(_pywrapcp.DefaultPhaseParameters_random_seed_get, _pywrapcp.DefaultPhaseParameters_random_seed_set, doc=r""" Seed used to initialize the random part in some heuristics.""")
-    display_level = property(_pywrapcp.DefaultPhaseParameters_display_level_get, _pywrapcp.DefaultPhaseParameters_display_level_set, doc=r""" This represents the amount of information displayed by the default search. NONE means no display, VERBOSE means extra information.""")
+    display_level = property(_pywrapcp.DefaultPhaseParameters_display_level_get, _pywrapcp.DefaultPhaseParameters_display_level_set, doc=r"""
+    This represents the amount of information displayed by the default search.
+    NONE means no display, VERBOSE means extra information.
+    """)
     decision_builder = property(_pywrapcp.DefaultPhaseParameters_decision_builder_get, _pywrapcp.DefaultPhaseParameters_decision_builder_set, doc=r""" When defined, this overrides the default impact based decision builder.""")
 
     def __init__(self):
@@ -7995,7 +9824,9 @@ pywrapcp    
 
         
-

This struct holds all parameters for the default search. DefaultPhaseParameters is only used by Solver::MakeDefaultPhase methods. Note this is for advanced users only.

+

This struct holds all parameters for the default search. +DefaultPhaseParameters is only used by Solver::MakeDefaultPhase methods. +Note this is for advanced users only.

@@ -8106,7 +9937,8 @@ pywrapcp var_selection_schema
-

This parameter describes how the next variable to instantiate will be chosen.

+

This parameter describes how the next variable to instantiate +will be chosen.

@@ -8128,7 +9960,8 @@ pywrapcp initialization_splits
-

Maximum number of intervals that the initialization of impacts will scan per variable.

+

Maximum number of intervals that the initialization of impacts will scan +per variable.

@@ -8139,7 +9972,9 @@ pywrapcp run_all_heuristics
-

The default phase will run heuristics periodically. This parameter indicates if we should run all heuristics, or a randomly selected one.

+

The default phase will run heuristics periodically. This parameter +indicates if we should run all heuristics, or a randomly selected +one.

@@ -8150,7 +9985,9 @@ pywrapcp heuristic_period
-

The distance in nodes between each run of the heuristics. A negative or null value will mean that we will not run heuristics at all.

+

The distance in nodes between each run of the heuristics. A +negative or null value will mean that we will not run heuristics +at all.

@@ -8172,7 +10009,8 @@ pywrapcp persistent_impact
-

Whether to keep the impact from the first search for other searches, or to recompute the impact for each new search.

+

Whether to keep the impact from the first search for other searches, +or to recompute the impact for each new search.

@@ -8194,7 +10032,8 @@ pywrapcp display_level
-

This represents the amount of information displayed by the default search. NONE means no display, VERBOSE means extra information.

+

This represents the amount of information displayed by the default search. +NONE means no display, VERBOSE means extra information.

@@ -8223,7 +10062,25 @@ pywrapcp
View Source
class Solver(object):
-    r""" Solver Class A solver represents the main computation engine. It implements the entire range of Constraint Programming protocols:   - Reversibility   - Propagation   - Search Usually, Constraint Programming code consists of   - the creation of the Solver,   - the creation of the decision variables of the model,   - the creation of the constraints of the model and their addition to the     solver() through the AddConstraint() method,   - the creation of the main DecisionBuilder class,   - the launch of the solve() method with the decision builder. For the time being, Solver is neither MT_SAFE nor MT_HOT."""
+    r"""
+    Solver Class
+
+    A solver represents the main computation engine. It implements the entire
+    range of Constraint Programming protocols:
+      - Reversibility
+      - Propagation
+      - Search
+
+    Usually, Constraint Programming code consists of
+      - the creation of the Solver,
+      - the creation of the decision variables of the model,
+      - the creation of the constraints of the model and their addition to the
+        solver() through the AddConstraint() method,
+      - the creation of the main DecisionBuilder class,
+      - the launch of the solve() method with the decision builder.
+
+    For the time being, Solver is neither MT_SAFE nor MT_HOT.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
@@ -8232,29 +10089,85 @@ pywrapcp    
     INT_VAR_SIMPLE = _pywrapcp.Solver_INT_VAR_SIMPLE
     r""" The simple selection is CHOOSE_FIRST_UNBOUND."""
     CHOOSE_FIRST_UNBOUND = _pywrapcp.Solver_CHOOSE_FIRST_UNBOUND
-    r""" Select the first unbound variable. Variables are considered in the order of the vector of IntVars used to create the selector."""
+    r"""
+    Select the first unbound variable.
+    Variables are considered in the order of the vector of IntVars used
+    to create the selector.
+    """
     CHOOSE_RANDOM = _pywrapcp.Solver_CHOOSE_RANDOM
     r""" Randomly select one of the remaining unbound variables."""
     CHOOSE_MIN_SIZE_LOWEST_MIN = _pywrapcp.Solver_CHOOSE_MIN_SIZE_LOWEST_MIN
-    r""" Among unbound variables, select the variable with the smallest size, i.e., the smallest number of possible values. In case of a tie, the selected variables is the one with the lowest min value. In case of a tie, the first one is selected, first being defined by the order in the vector of IntVars used to create the selector."""
+    r"""
+    Among unbound variables, select the variable with the smallest size,
+    i.e., the smallest number of possible values.
+    In case of a tie, the selected variables is the one with the lowest min
+    value.
+    In case of a tie, the first one is selected, first being defined by the
+    order in the vector of IntVars used to create the selector.
+    """
     CHOOSE_MIN_SIZE_HIGHEST_MIN = _pywrapcp.Solver_CHOOSE_MIN_SIZE_HIGHEST_MIN
-    r""" Among unbound variables, select the variable with the smallest size, i.e., the smallest number of possible values. In case of a tie, the selected variable is the one with the highest min value. In case of a tie, the first one is selected, first being defined by the order in the vector of IntVars used to create the selector."""
+    r"""
+    Among unbound variables, select the variable with the smallest size,
+    i.e., the smallest number of possible values.
+    In case of a tie, the selected variable is the one with the highest min
+    value.
+    In case of a tie, the first one is selected, first being defined by the
+    order in the vector of IntVars used to create the selector.
+    """
     CHOOSE_MIN_SIZE_LOWEST_MAX = _pywrapcp.Solver_CHOOSE_MIN_SIZE_LOWEST_MAX
-    r""" Among unbound variables, select the variable with the smallest size, i.e., the smallest number of possible values. In case of a tie, the selected variables is the one with the lowest max value. In case of a tie, the first one is selected, first being defined by the order in the vector of IntVars used to create the selector."""
+    r"""
+    Among unbound variables, select the variable with the smallest size,
+    i.e., the smallest number of possible values.
+    In case of a tie, the selected variables is the one with the lowest max
+    value.
+    In case of a tie, the first one is selected, first being defined by the
+    order in the vector of IntVars used to create the selector.
+    """
     CHOOSE_MIN_SIZE_HIGHEST_MAX = _pywrapcp.Solver_CHOOSE_MIN_SIZE_HIGHEST_MAX
-    r""" Among unbound variables, select the variable with the smallest size, i.e., the smallest number of possible values. In case of a tie, the selected variable is the one with the highest max value. In case of a tie, the first one is selected, first being defined by the order in the vector of IntVars used to create the selector."""
+    r"""
+    Among unbound variables, select the variable with the smallest size,
+    i.e., the smallest number of possible values.
+    In case of a tie, the selected variable is the one with the highest max
+    value.
+    In case of a tie, the first one is selected, first being defined by the
+    order in the vector of IntVars used to create the selector.
+    """
     CHOOSE_LOWEST_MIN = _pywrapcp.Solver_CHOOSE_LOWEST_MIN
-    r""" Among unbound variables, select the variable with the smallest minimal value. In case of a tie, the first one is selected, "first" defined by the order in the vector of IntVars used to create the selector."""
+    r"""
+    Among unbound variables, select the variable with the smallest minimal
+    value.
+    In case of a tie, the first one is selected, "first" defined by the
+    order in the vector of IntVars used to create the selector.
+    """
     CHOOSE_HIGHEST_MAX = _pywrapcp.Solver_CHOOSE_HIGHEST_MAX
-    r""" Among unbound variables, select the variable with the highest maximal value. In case of a tie, the first one is selected, first being defined by the order in the vector of IntVars used to create the selector."""
+    r"""
+    Among unbound variables, select the variable with the highest maximal
+    value.
+    In case of a tie, the first one is selected, first being defined by the
+    order in the vector of IntVars used to create the selector.
+    """
     CHOOSE_MIN_SIZE = _pywrapcp.Solver_CHOOSE_MIN_SIZE
-    r""" Among unbound variables, select the variable with the smallest size. In case of a tie, the first one is selected, first being defined by the order in the vector of IntVars used to create the selector."""
+    r"""
+    Among unbound variables, select the variable with the smallest size.
+    In case of a tie, the first one is selected, first being defined by the
+    order in the vector of IntVars used to create the selector.
+    """
     CHOOSE_MAX_SIZE = _pywrapcp.Solver_CHOOSE_MAX_SIZE
-    r""" Among unbound variables, select the variable with the highest size. In case of a tie, the first one is selected, first being defined by the order in the vector of IntVars used to create the selector."""
+    r"""
+    Among unbound variables, select the variable with the highest size.
+    In case of a tie, the first one is selected, first being defined by the
+    order in the vector of IntVars used to create the selector.
+    """
     CHOOSE_MAX_REGRET_ON_MIN = _pywrapcp.Solver_CHOOSE_MAX_REGRET_ON_MIN
-    r""" Among unbound variables, select the variable with the largest gap between the first and the second values of the domain."""
+    r"""
+    Among unbound variables, select the variable with the largest
+    gap between the first and the second values of the domain.
+    """
     CHOOSE_PATH = _pywrapcp.Solver_CHOOSE_PATH
-    r""" Selects the next unbound variable on a path, the path being defined by the variables: var[i] corresponds to the index of the next of i."""
+    r"""
+    Selects the next unbound variable on a path, the path being defined by
+    the variables: var[i] corresponds to the index of the next of i.
+    """
     INT_VALUE_DEFAULT = _pywrapcp.Solver_INT_VALUE_DEFAULT
     r""" The default behavior is ASSIGN_MIN_VALUE."""
     INT_VALUE_SIMPLE = _pywrapcp.Solver_INT_VALUE_SIMPLE
@@ -8266,11 +10179,21 @@ pywrapcp    
     ASSIGN_RANDOM_VALUE = _pywrapcp.Solver_ASSIGN_RANDOM_VALUE
     r""" Selects randomly one of the possible values of the selected variable."""
     ASSIGN_CENTER_VALUE = _pywrapcp.Solver_ASSIGN_CENTER_VALUE
-    r""" Selects the first possible value which is the closest to the center of the domain of the selected variable. The center is defined as (min + max) / 2."""
+    r"""
+    Selects the first possible value which is the closest to the center
+    of the domain of the selected variable.
+    The center is defined as (min + max) / 2.
+    """
     SPLIT_LOWER_HALF = _pywrapcp.Solver_SPLIT_LOWER_HALF
-    r""" Split the domain in two around the center, and choose the lower part first."""
+    r"""
+    Split the domain in two around the center, and choose the lower
+    part first.
+    """
     SPLIT_UPPER_HALF = _pywrapcp.Solver_SPLIT_UPPER_HALF
-    r""" Split the domain in two around the center, and choose the lower part first."""
+    r"""
+    Split the domain in two around the center, and choose the lower
+    part first.
+    """
     SEQUENCE_DEFAULT = _pywrapcp.Solver_SEQUENCE_DEFAULT
     SEQUENCE_SIMPLE = _pywrapcp.Solver_SEQUENCE_SIMPLE
     CHOOSE_MIN_SLACK_RANK_FORWARD = _pywrapcp.Solver_CHOOSE_MIN_SLACK_RANK_FORWARD
@@ -8280,49 +10203,177 @@ pywrapcp    
     INTERVAL_SIMPLE = _pywrapcp.Solver_INTERVAL_SIMPLE
     r""" The simple is INTERVAL_SET_TIMES_FORWARD."""
     INTERVAL_SET_TIMES_FORWARD = _pywrapcp.Solver_INTERVAL_SET_TIMES_FORWARD
-    r""" Selects the variable with the lowest starting time of all variables, and fixes its starting time to this lowest value."""
+    r"""
+    Selects the variable with the lowest starting time of all variables,
+    and fixes its starting time to this lowest value.
+    """
     INTERVAL_SET_TIMES_BACKWARD = _pywrapcp.Solver_INTERVAL_SET_TIMES_BACKWARD
-    r""" Selects the variable with the highest ending time of all variables, and fixes the ending time to this highest values."""
+    r"""
+    Selects the variable with the highest ending time of all variables,
+    and fixes the ending time to this highest values.
+    """
     TWOOPT = _pywrapcp.Solver_TWOOPT
-    r""" Operator which reverses a sub-chain of a path. It is called TwoOpt because it breaks two arcs on the path; resulting paths are called two-optimal. Possible neighbors for the path 1 -> 2 -> 3 -> 4 -> 5 (where (1, 5) are first and last nodes of the path and can therefore not be moved):   1 -> [3 -> 2] -> 4  -> 5   1 -> [4 -> 3  -> 2] -> 5   1 ->  2 -> [4 -> 3] -> 5"""
+    r"""
+    Operator which reverses a sub-chain of a path. It is called TwoOpt
+    because it breaks two arcs on the path; resulting paths are called
+    two-optimal.
+    Possible neighbors for the path 1 -> 2 -> 3 -> 4 -> 5
+    (where (1, 5) are first and last nodes of the path and can therefore not
+    be moved):
+      1 -> [3 -> 2] -> 4  -> 5
+      1 -> [4 -> 3  -> 2] -> 5
+      1 ->  2 -> [4 -> 3] -> 5
+    """
     OROPT = _pywrapcp.Solver_OROPT
-    r""" Relocate: OROPT and RELOCATE. Operator which moves a sub-chain of a path to another position; the specified chain length is the fixed length of the chains being moved. When this length is 1, the operator simply moves a node to another position. Possible neighbors for the path 1 -> 2 -> 3 -> 4 -> 5, for a chain length of 2 (where (1, 5) are first and last nodes of the path and can therefore not be moved):   1 ->  4 -> [2 -> 3] -> 5   1 -> [3 -> 4] -> 2  -> 5 Using Relocate with chain lengths of 1, 2 and 3 together is equivalent to the OrOpt operator on a path. The OrOpt operator is a limited  version of 3Opt (breaks 3 arcs on a path)."""
+    r"""
+    Relocate: OROPT and RELOCATE.
+    Operator which moves a sub-chain of a path to another position; the
+    specified chain length is the fixed length of the chains being moved.
+    When this length is 1, the operator simply moves a node to another
+    position.
+    Possible neighbors for the path 1 -> 2 -> 3 -> 4 -> 5, for a chain
+    length of 2 (where (1, 5) are first and last nodes of the path and can
+    therefore not be moved):
+      1 ->  4 -> [2 -> 3] -> 5
+      1 -> [3 -> 4] -> 2  -> 5
+
+    Using Relocate with chain lengths of 1, 2 and 3 together is equivalent
+    to the OrOpt operator on a path. The OrOpt operator is a limited
+     version of 3Opt (breaks 3 arcs on a path).
+    """
     RELOCATE = _pywrapcp.Solver_RELOCATE
     r""" Relocate neighborhood with length of 1 (see OROPT comment)."""
     EXCHANGE = _pywrapcp.Solver_EXCHANGE
-    r""" Operator which exchanges the positions of two nodes. Possible neighbors for the path 1 -> 2 -> 3 -> 4 -> 5 (where (1, 5) are first and last nodes of the path and can therefore not be moved):   1 -> [3] -> [2] ->  4  -> 5   1 -> [4] ->  3  -> [2] -> 5   1 ->  2  -> [4] -> [3] -> 5"""
+    r"""
+    Operator which exchanges the positions of two nodes.
+    Possible neighbors for the path 1 -> 2 -> 3 -> 4 -> 5
+    (where (1, 5) are first and last nodes of the path and can therefore not
+    be moved):
+      1 -> [3] -> [2] ->  4  -> 5
+      1 -> [4] ->  3  -> [2] -> 5
+      1 ->  2  -> [4] -> [3] -> 5
+    """
     CROSS = _pywrapcp.Solver_CROSS
-    r""" Operator which cross exchanges the starting chains of 2 paths, including exchanging the whole paths. First and last nodes are not moved. Possible neighbors for the paths 1 -> 2 -> 3 -> 4 -> 5 and 6 -> 7 -> 8 (where (1, 5) and (6, 8) are first and last nodes of the paths and can therefore not be moved):   1 -> [7] -> 3 -> 4 -> 5  6 -> [2] -> 8   1 -> [7] -> 4 -> 5       6 -> [2 -> 3] -> 8   1 -> [7] -> 5            6 -> [2 -> 3 -> 4] -> 8"""
+    r"""
+    Operator which cross exchanges the starting chains of 2 paths, including
+    exchanging the whole paths.
+    First and last nodes are not moved.
+    Possible neighbors for the paths 1 -> 2 -> 3 -> 4 -> 5 and 6 -> 7 -> 8
+    (where (1, 5) and (6, 8) are first and last nodes of the paths and can
+    therefore not be moved):
+      1 -> [7] -> 3 -> 4 -> 5  6 -> [2] -> 8
+      1 -> [7] -> 4 -> 5       6 -> [2 -> 3] -> 8
+      1 -> [7] -> 5            6 -> [2 -> 3 -> 4] -> 8
+    """
     MAKEACTIVE = _pywrapcp.Solver_MAKEACTIVE
-    r""" Operator which inserts an inactive node into a path. Possible neighbors for the path 1 -> 2 -> 3 -> 4 with 5 inactive (where 1 and 4 are first and last nodes of the path) are:   1 -> [5] ->  2  ->  3  -> 4   1 ->  2  -> [5] ->  3  -> 4   1 ->  2  ->  3  -> [5] -> 4"""
+    r"""
+    Operator which inserts an inactive node into a path.
+    Possible neighbors for the path 1 -> 2 -> 3 -> 4 with 5 inactive
+    (where 1 and 4 are first and last nodes of the path) are:
+      1 -> [5] ->  2  ->  3  -> 4
+      1 ->  2  -> [5] ->  3  -> 4
+      1 ->  2  ->  3  -> [5] -> 4
+    """
     MAKEINACTIVE = _pywrapcp.Solver_MAKEINACTIVE
-    r""" Operator which makes path nodes inactive. Possible neighbors for the path 1 -> 2 -> 3 -> 4 (where 1 and 4 are first and last nodes of the path) are:   1 -> 3 -> 4 with 2 inactive   1 -> 2 -> 4 with 3 inactive"""
+    r"""
+    Operator which makes path nodes inactive.
+    Possible neighbors for the path 1 -> 2 -> 3 -> 4 (where 1 and 4 are
+    first and last nodes of the path) are:
+      1 -> 3 -> 4 with 2 inactive
+      1 -> 2 -> 4 with 3 inactive
+    """
     MAKECHAININACTIVE = _pywrapcp.Solver_MAKECHAININACTIVE
-    r""" Operator which makes a "chain" of path nodes inactive. Possible neighbors for the path 1 -> 2 -> 3 -> 4 (where 1 and 4 are first and last nodes of the path) are:   1 -> 3 -> 4 with 2 inactive   1 -> 2 -> 4 with 3 inactive   1 -> 4 with 2 and 3 inactive"""
+    r"""
+    Operator which makes a "chain" of path nodes inactive.
+    Possible neighbors for the path 1 -> 2 -> 3 -> 4 (where 1 and 4 are
+    first and last nodes of the path) are:
+      1 -> 3 -> 4 with 2 inactive
+      1 -> 2 -> 4 with 3 inactive
+      1 -> 4 with 2 and 3 inactive
+    """
     SWAPACTIVE = _pywrapcp.Solver_SWAPACTIVE
-    r""" Operator which replaces an active node by an inactive one. Possible neighbors for the path 1 -> 2 -> 3 -> 4 with 5 inactive (where 1 and 4 are first and last nodes of the path) are:   1 -> [5] ->  3  -> 4 with 2 inactive   1 ->  2  -> [5] -> 4 with 3 inactive"""
+    r"""
+    Operator which replaces an active node by an inactive one.
+    Possible neighbors for the path 1 -> 2 -> 3 -> 4 with 5 inactive
+    (where 1 and 4 are first and last nodes of the path) are:
+      1 -> [5] ->  3  -> 4 with 2 inactive
+      1 ->  2  -> [5] -> 4 with 3 inactive
+    """
     EXTENDEDSWAPACTIVE = _pywrapcp.Solver_EXTENDEDSWAPACTIVE
-    r""" Operator which makes an inactive node active and an active one inactive. It is similar to SwapActiveOperator except that it tries to insert the inactive node in all possible positions instead of just the position of the node made inactive. Possible neighbors for the path 1 -> 2 -> 3 -> 4 with 5 inactive (where 1 and 4 are first and last nodes of the path) are:   1 -> [5] ->  3  -> 4 with 2 inactive   1 ->  3  -> [5] -> 4 with 2 inactive   1 -> [5] ->  2  -> 4 with 3 inactive   1 ->  2  -> [5] -> 4 with 3 inactive"""
+    r"""
+    Operator which makes an inactive node active and an active one inactive.
+    It is similar to SwapActiveOperator except that it tries to insert the
+    inactive node in all possible positions instead of just the position of
+    the node made inactive.
+    Possible neighbors for the path 1 -> 2 -> 3 -> 4 with 5 inactive
+    (where 1 and 4 are first and last nodes of the path) are:
+      1 -> [5] ->  3  -> 4 with 2 inactive
+      1 ->  3  -> [5] -> 4 with 2 inactive
+      1 -> [5] ->  2  -> 4 with 3 inactive
+      1 ->  2  -> [5] -> 4 with 3 inactive
+    """
     PATHLNS = _pywrapcp.Solver_PATHLNS
-    r""" Operator which relaxes two sub-chains of three consecutive arcs each. Each sub-chain is defined by a start node and the next three arcs. Those six arcs are relaxed to build a new neighbor. PATHLNS explores all possible pairs of starting nodes and so defines n^2 neighbors, n being the number of nodes. Note that the two sub-chains can be part of the same path; they even may overlap."""
+    r"""
+    Operator which relaxes two sub-chains of three consecutive arcs each.
+    Each sub-chain is defined by a start node and the next three arcs. Those
+    six arcs are relaxed to build a new neighbor.
+    PATHLNS explores all possible pairs of starting nodes and so defines
+    n^2 neighbors, n being the number of nodes.
+    Note that the two sub-chains can be part of the same path; they even may
+    overlap.
+    """
     FULLPATHLNS = _pywrapcp.Solver_FULLPATHLNS
-    r""" Operator which relaxes one entire path and all inactive nodes, thus defining num_paths neighbors."""
+    r"""
+    Operator which relaxes one entire path and all inactive nodes, thus
+    defining num_paths neighbors.
+    """
     UNACTIVELNS = _pywrapcp.Solver_UNACTIVELNS
-    r""" Operator which relaxes all inactive nodes and one sub-chain of six consecutive arcs. That way the path can be improved by inserting inactive nodes or swapping arcs."""
+    r"""
+    Operator which relaxes all inactive nodes and one sub-chain of six
+    consecutive arcs. That way the path can be improved by inserting
+    inactive nodes or swapping arcs.
+    """
     INCREMENT = _pywrapcp.Solver_INCREMENT
-    r""" Operator which defines one neighbor per variable. Each neighbor tries to increment by one the value of the corresponding variable. When a new solution is found the neighborhood is rebuilt from scratch, i.e., tries to increment values in the variable order. Consider for instance variables x and y. x is incremented one by one to its max, and when it is not possible to increment x anymore, y is incremented once. If this is a solution, then next neighbor tries to increment x."""
+    r"""
+    Operator which defines one neighbor per variable. Each neighbor tries to
+    increment by one the value of the corresponding variable. When a new
+    solution is found the neighborhood is rebuilt from scratch, i.e., tries
+    to increment values in the variable order.
+    Consider for instance variables x and y. x is incremented one by one to
+    its max, and when it is not possible to increment x anymore, y is
+    incremented once. If this is a solution, then next neighbor tries to
+    increment x.
+    """
     DECREMENT = _pywrapcp.Solver_DECREMENT
-    r""" Operator which defines a neighborhood to decrement values. The behavior is the same as INCREMENT, except values are decremented instead of incremented."""
+    r"""
+    Operator which defines a neighborhood to decrement values.
+    The behavior is the same as INCREMENT, except values are decremented
+    instead of incremented.
+    """
     SIMPLELNS = _pywrapcp.Solver_SIMPLELNS
-    r""" Operator which defines one neighbor per variable. Each neighbor relaxes one variable. When a new solution is found the neighborhood is rebuilt from scratch. Consider for instance variables x and y. First x is relaxed and the solver is looking for the best possible solution (with only x relaxed). Then y is relaxed, and the solver is looking for a new solution. If a new solution is found, then the next variable to be relaxed is x."""
+    r"""
+    Operator which defines one neighbor per variable. Each neighbor relaxes
+    one variable.
+    When a new solution is found the neighborhood is rebuilt from scratch.
+    Consider for instance variables x and y. First x is relaxed and the
+    solver is looking for the best possible solution (with only x relaxed).
+    Then y is relaxed, and the solver is looking for a new solution.
+    If a new solution is found, then the next variable to be relaxed is x.
+    """
     GE = _pywrapcp.Solver_GE
     r""" Move is accepted when the current objective value >= objective.Min."""
     LE = _pywrapcp.Solver_LE
     r""" Move is accepted when the current objective value <= objective.Max."""
     EQ = _pywrapcp.Solver_EQ
-    r""" Move is accepted when the current objective value is in the interval objective.Min .. objective.Max."""
+    r"""
+    Move is accepted when the current objective value is in the interval
+    objective.Min .. objective.Max.
+    """
     DELAYED_PRIORITY = _pywrapcp.Solver_DELAYED_PRIORITY
-    r""" DELAYED_PRIORITY is the lowest priority: Demons will be processed after VAR_PRIORITY and NORMAL_PRIORITY demons."""
+    r"""
+    DELAYED_PRIORITY is the lowest priority: Demons will be processed after
+    VAR_PRIORITY and NORMAL_PRIORITY demons.
+    """
     VAR_PRIORITY = _pywrapcp.Solver_VAR_PRIORITY
     r""" VAR_PRIORITY is between DELAYED_PRIORITY and NORMAL_PRIORITY."""
     NORMAL_PRIORITY = _pywrapcp.Solver_NORMAL_PRIORITY
@@ -8347,7 +10398,41 @@ pywrapcp    
         return _pywrapcp.Solver_DefaultSolverParameters()
 
     def AddConstraint(self, c: "Constraint") -> "void":
-        r""" Adds the constraint 'c' to the model. After calling this method, and until there is a backtrack that undoes the addition, any assignment of variables to values must satisfy the given constraint in order to be considered feasible. There are two fairly different use cases: - the most common use case is modeling: the given constraint is really part of the problem that the user is trying to solve. In this use case, AddConstraint is called outside of search (i.e., with state() == OUTSIDE_SEARCH). Most users should only use AddConstraint in this way. In this case, the constraint will belong to the model forever: it cannot not be removed by backtracking. - a rarer use case is that 'c' is not a real constraint of the model. It may be a constraint generated by a branching decision (a constraint whose goal is to restrict the search space), a symmetry breaking constraint (a constraint that does restrict the search space, but in a way that cannot have an impact on the quality of the solutions in the subtree), or an inferred constraint that, while having no semantic value to the model (it does not restrict the set of solutions), is worth having because we believe it may strengthen the propagation. In these cases, it happens that the constraint is added during the search (i.e., with state() == IN_SEARCH or state() == IN_ROOT_NODE). When a constraint is added during a search, it applies only to the subtree of the search tree rooted at the current node, and will be automatically removed by backtracking. This method does not take ownership of the constraint. If the constraint has been created by any factory method (Solver::MakeXXX), it will automatically be deleted. However, power users who implement their own constraints should do: solver.AddConstraint(solver.RevAlloc(new MyConstraint(...));"""
+        r"""
+        Adds the constraint 'c' to the model.
+
+        After calling this method, and until there is a backtrack that undoes the
+        addition, any assignment of variables to values must satisfy the given
+        constraint in order to be considered feasible. There are two fairly
+        different use cases:
+
+        - the most common use case is modeling: the given constraint is really
+        part of the problem that the user is trying to solve. In this use case,
+        AddConstraint is called outside of search (i.e., with state() ==
+        OUTSIDE_SEARCH). Most users should only use AddConstraint in this
+        way. In this case, the constraint will belong to the model forever: it
+        cannot not be removed by backtracking.
+
+        - a rarer use case is that 'c' is not a real constraint of the model. It
+        may be a constraint generated by a branching decision (a constraint whose
+        goal is to restrict the search space), a symmetry breaking constraint (a
+        constraint that does restrict the search space, but in a way that cannot
+        have an impact on the quality of the solutions in the subtree), or an
+        inferred constraint that, while having no semantic value to the model (it
+        does not restrict the set of solutions), is worth having because we
+        believe it may strengthen the propagation. In these cases, it happens
+        that the constraint is added during the search (i.e., with state() ==
+        IN_SEARCH or state() == IN_ROOT_NODE). When a constraint is
+        added during a search, it applies only to the subtree of the search tree
+        rooted at the current node, and will be automatically removed by
+        backtracking.
+
+        This method does not take ownership of the constraint. If the constraint
+        has been created by any factory method (Solver::MakeXXX), it will
+        automatically be deleted. However, power users who implement their own
+        constraints should do: solver.AddConstraint(solver.RevAlloc(new
+        MyConstraint(...));
+        """
         return _pywrapcp.Solver_AddConstraint(self, c)
 
     def Solve(self, *args) -> "bool":
@@ -8373,7 +10458,11 @@ pywrapcp    
         return _pywrapcp.Solver_CheckAssignment(self, solution)
 
     def CheckConstraint(self, ct: "Constraint") -> "bool":
-        r""" Checks whether adding this constraint will lead to an immediate failure. It will return false if the model is already inconsistent, or if adding the constraint makes it inconsistent."""
+        r"""
+        Checks whether adding this constraint will lead to an immediate
+        failure. It will return false if the model is already inconsistent, or if
+        adding the constraint makes it inconsistent.
+        """
         return _pywrapcp.Solver_CheckConstraint(self, ct)
 
     def Fail(self) -> "void":
@@ -8386,7 +10475,10 @@ pywrapcp    
         return _pywrapcp.Solver_MemoryUsage()
 
     def WallTime(self) -> "int64_t":
-        r""" DEPRECATED: Use Now() instead. Time elapsed, in ms since the creation of the solver."""
+        r"""
+        DEPRECATED: Use Now() instead.
+        Time elapsed, in ms since the creation of the solver.
+        """
         return _pywrapcp.Solver_WallTime(self)
 
     def Branches(self) -> "int64_t":
@@ -8406,7 +10498,10 @@ pywrapcp    
         return _pywrapcp.Solver_AcceptedNeighbors(self)
 
     def Stamp(self) -> "uint64_t":
-        r""" The stamp indicates how many moves in the search tree we have performed. It is useful to detect if we need to update same lazy structures."""
+        r"""
+        The stamp indicates how many moves in the search tree we have performed.
+        It is useful to detect if we need to update same lazy structures.
+        """
         return _pywrapcp.Solver_Stamp(self)
 
     def FailStamp(self) -> "uint64_t":
@@ -8486,7 +10581,14 @@ pywrapcp    
         return _pywrapcp.Solver_ScalProd(self, *args)
 
     def MonotonicElement(self, values: "operations_research::Solver::IndexEvaluator1", increasing: "bool", index: "IntVar") -> "operations_research::IntExpr *":
-        r""" Function based element. The constraint takes ownership of the callback.  The callback must be monotonic. It must be able to cope with any possible value in the domain of 'index' (potentially negative ones too). Furtermore, monotonicity is not checked. Thus giving a non-monotonic function, or specifying an incorrect increasing parameter will result in undefined behavior."""
+        r"""
+        Function based element. The constraint takes ownership of the
+        callback.  The callback must be monotonic. It must be able to
+        cope with any possible value in the domain of 'index'
+        (potentially negative ones too). Furtermore, monotonicity is not
+        checked. Thus giving a non-monotonic function, or specifying an
+        incorrect increasing parameter will result in undefined behavior.
+        """
         return _pywrapcp.Solver_MonotonicElement(self, values, increasing, index)
 
     def Element(self, *args) -> "operations_research::IntExpr *":
@@ -8502,7 +10604,9 @@ pywrapcp    
         |
 
         *Overload 3:*
-        Function-based element. The constraint takes ownership of the callback. The callback must be able to cope with any possible value in the domain of 'index' (potentially negative ones too).
+        Function-based element. The constraint takes ownership of the
+        callback. The callback must be able to cope with any possible
+        value in the domain of 'index' (potentially negative ones too).
 
         |
 
@@ -8517,7 +10621,10 @@ pywrapcp    
         return _pywrapcp.Solver_Element(self, *args)
 
     def IndexExpression(self, vars: "std::vector< operations_research::IntVar * > const &", value: "int64_t") -> "operations_research::IntExpr *":
-        r""" Returns the expression expr such that vars[expr] == value. It assumes that vars are all different."""
+        r"""
+        Returns the expression expr such that vars[expr] == value.
+        It assumes that vars are all different.
+        """
         return _pywrapcp.Solver_IndexExpression(self, vars, value)
 
     def Min(self, *args) -> "operations_research::IntExpr *":
@@ -8569,7 +10676,10 @@ pywrapcp    
         return _pywrapcp.Solver_ConvexPiecewiseExpr(self, expr, early_cost, early_date, late_date, late_cost)
 
     def SemiContinuousExpr(self, expr: "IntExpr", fixed_charge: "int64_t", step: "int64_t") -> "operations_research::IntExpr *":
-        r""" Semi continuous Expression (x <= 0 -> f(x) = 0; x > 0 -> f(x) = ax + b) a >= 0 and b >= 0"""
+        r"""
+        Semi continuous Expression (x <= 0 -> f(x) = 0; x > 0 -> f(x) = ax + b)
+        a >= 0 and b >= 0
+        """
         return _pywrapcp.Solver_SemiContinuousExpr(self, expr, fixed_charge, step)
 
     def ConditionalExpression(self, condition: "IntVar", expr: "IntExpr", unperformed_value: "int64_t") -> "operations_research::IntExpr *":
@@ -8712,15 +10822,27 @@ pywrapcp    
         return _pywrapcp.Solver_AbsEquality(self, var, abs_var)
 
     def IndexOfConstraint(self, vars: "std::vector< operations_research::IntVar * > const &", index: "IntVar", target: "int64_t") -> "operations_research::Constraint *":
-        r""" This constraint is a special case of the element constraint with an array of integer variables, where the variables are all different and the index variable is constrained such that vars[index] == target."""
+        r"""
+        This constraint is a special case of the element constraint with
+        an array of integer variables, where the variables are all
+        different and the index variable is constrained such that
+        vars[index] == target.
+        """
         return _pywrapcp.Solver_IndexOfConstraint(self, vars, index, target)
 
     def ConstraintInitialPropagateCallback(self, ct: "Constraint") -> "operations_research::Demon *":
-        r""" This method is a specialized case of the MakeConstraintDemon method to call the InitiatePropagate of the constraint 'ct'."""
+        r"""
+        This method is a specialized case of the MakeConstraintDemon
+        method to call the InitiatePropagate of the constraint 'ct'.
+        """
         return _pywrapcp.Solver_ConstraintInitialPropagateCallback(self, ct)
 
     def DelayedConstraintInitialPropagateCallback(self, ct: "Constraint") -> "operations_research::Demon *":
-        r""" This method is a specialized case of the MakeConstraintDemon method to call the InitiatePropagate of the constraint 'ct' with low priority."""
+        r"""
+        This method is a specialized case of the MakeConstraintDemon
+        method to call the InitiatePropagate of the constraint 'ct' with
+        low priority.
+        """
         return _pywrapcp.Solver_DelayedConstraintInitialPropagateCallback(self, ct)
 
     def ClosureDemon(self, closure: "operations_research::Solver::Closure") -> "operations_research::Demon *":
@@ -8794,72 +10916,130 @@ pywrapcp    
         |
 
         *Overload 4:*
-        Aggregated version of count with bounded cardinalities: forall j in 0 .. card_size - 1: card_min <= |{i | v[i] == j}| <= card_max
+        Aggregated version of count with bounded cardinalities:
+        forall j in 0 .. card_size - 1: card_min <= |{i | v[i] == j}| <= card_max
 
         |
 
         *Overload 5:*
-        Aggregated version of count with bounded cardinalities: forall j in 0 .. card_size - 1:    card_min[j] <= |{i | v[i] == j}| <= card_max[j]
+        Aggregated version of count with bounded cardinalities:
+        forall j in 0 .. card_size - 1:
+           card_min[j] <= |{i | v[i] == j}| <= card_max[j]
 
         |
 
         *Overload 6:*
-        Aggregated version of count with bounded cardinalities: forall j in 0 .. card_size - 1:    card_min[j] <= |{i | v[i] == j}| <= card_max[j]
+        Aggregated version of count with bounded cardinalities:
+        forall j in 0 .. card_size - 1:
+           card_min[j] <= |{i | v[i] == j}| <= card_max[j]
 
         |
 
         *Overload 7:*
-        Aggregated version of count with bounded cardinalities: forall j in 0 .. card_size - 1:    card_min[j] <= |{i | v[i] == values[j]}| <= card_max[j]
+        Aggregated version of count with bounded cardinalities:
+        forall j in 0 .. card_size - 1:
+           card_min[j] <= |{i | v[i] == values[j]}| <= card_max[j]
 
         |
 
         *Overload 8:*
-        Aggregated version of count with bounded cardinalities: forall j in 0 .. card_size - 1:    card_min[j] <= |{i | v[i] == values[j]}| <= card_max[j]
+        Aggregated version of count with bounded cardinalities:
+        forall j in 0 .. card_size - 1:
+           card_min[j] <= |{i | v[i] == values[j]}| <= card_max[j]
         """
         return _pywrapcp.Solver_Distribute(self, *args)
 
     def Deviation(self, vars: "std::vector< operations_research::IntVar * > const &", deviation_var: "IntVar", total_sum: "int64_t") -> "operations_research::Constraint *":
-        r""" Deviation constraint: sum_i |n * vars[i] - total_sum| <= deviation_var and sum_i vars[i] == total_sum n = #vars"""
+        r"""
+        Deviation constraint:
+        sum_i |n * vars[i] - total_sum| <= deviation_var and
+        sum_i vars[i] == total_sum
+        n = #vars
+        """
         return _pywrapcp.Solver_Deviation(self, vars, deviation_var, total_sum)
 
     def AllDifferent(self, *args) -> "operations_research::Constraint *":
         r"""
         *Overload 1:*
-        All variables are pairwise different. This corresponds to the stronger version of the propagation algorithm.
+        All variables are pairwise different. This corresponds to the
+        stronger version of the propagation algorithm.
 
         |
 
         *Overload 2:*
-        All variables are pairwise different.  If 'stronger_propagation' is true, stronger, and potentially slower propagation will occur. This API will be deprecated in the future.
+        All variables are pairwise different.  If 'stronger_propagation'
+        is true, stronger, and potentially slower propagation will
+        occur. This API will be deprecated in the future.
         """
         return _pywrapcp.Solver_AllDifferent(self, *args)
 
     def AllDifferentExcept(self, vars: "std::vector< operations_research::IntVar * > const &", escape_value: "int64_t") -> "operations_research::Constraint *":
-        r""" All variables are pairwise different, unless they are assigned to the escape value."""
+        r"""
+        All variables are pairwise different, unless they are assigned to
+        the escape value.
+        """
         return _pywrapcp.Solver_AllDifferentExcept(self, vars, escape_value)
 
     def SortingConstraint(self, vars: "std::vector< operations_research::IntVar * > const &", sorted: "std::vector< operations_research::IntVar * > const &") -> "operations_research::Constraint *":
-        r""" Creates a constraint binding the arrays of variables "vars" and "sorted_vars": sorted_vars[0] must be equal to the minimum of all variables in vars, and so on: the value of sorted_vars[i] must be equal to the i-th value of variables invars. This constraint propagates in both directions: from "vars" to "sorted_vars" and vice-versa. Behind the scenes, this constraint maintains that:   - sorted is always increasing.   - whatever the values of vars, there exists a permutation that     injects its values into the sorted variables. For more info, please have a look at:   https://mpi-inf.mpg.de/~mehlhorn/ftp/Mehlhorn-Thiel.pdf"""
+        r"""
+        Creates a constraint binding the arrays of variables "vars" and
+        "sorted_vars": sorted_vars[0] must be equal to the minimum of all
+        variables in vars, and so on: the value of sorted_vars[i] must be
+        equal to the i-th value of variables invars.
+
+        This constraint propagates in both directions: from "vars" to
+        "sorted_vars" and vice-versa.
+
+        Behind the scenes, this constraint maintains that:
+          - sorted is always increasing.
+          - whatever the values of vars, there exists a permutation that
+            injects its values into the sorted variables.
+
+        For more info, please have a look at:
+          https://mpi-inf.mpg.de/~mehlhorn/ftp/Mehlhorn-Thiel.pdf
+        """
         return _pywrapcp.Solver_SortingConstraint(self, vars, sorted)
 
     def LexicalLess(self, left: "std::vector< operations_research::IntVar * > const &", right: "std::vector< operations_research::IntVar * > const &") -> "operations_research::Constraint *":
-        r""" Creates a constraint that enforces that left is lexicographically less than right."""
+        r"""
+        Creates a constraint that enforces that left is lexicographically less
+        than right.
+        """
         return _pywrapcp.Solver_LexicalLess(self, left, right)
 
     def LexicalLessOrEqual(self, left: "std::vector< operations_research::IntVar * > const &", right: "std::vector< operations_research::IntVar * > const &") -> "operations_research::Constraint *":
-        r""" Creates a constraint that enforces that left is lexicographically less than or equal to right."""
+        r"""
+        Creates a constraint that enforces that left is lexicographically less
+        than or equal to right.
+        """
         return _pywrapcp.Solver_LexicalLessOrEqual(self, left, right)
 
     def InversePermutationConstraint(self, left: "std::vector< operations_research::IntVar * > const &", right: "std::vector< operations_research::IntVar * > const &") -> "operations_research::Constraint *":
-        r""" Creates a constraint that enforces that 'left' and 'right' both represent permutations of [0..left.size()-1], and that 'right' is the inverse permutation of 'left', i.e. for all i in [0..left.size()-1], right[left[i]] = i."""
+        r"""
+        Creates a constraint that enforces that 'left' and 'right' both
+        represent permutations of [0..left.size()-1], and that 'right' is
+        the inverse permutation of 'left', i.e. for all i in
+        [0..left.size()-1], right[left[i]] = i.
+        """
         return _pywrapcp.Solver_InversePermutationConstraint(self, left, right)
 
     def NullIntersect(self, first_vars: "std::vector< operations_research::IntVar * > const &", second_vars: "std::vector< operations_research::IntVar * > const &") -> "operations_research::Constraint *":
-        r""" Creates a constraint that states that all variables in the first vector are different from all variables in the second group. Thus the set of values in the first vector does not intersect with the set of values in the second vector."""
+        r"""
+        Creates a constraint that states that all variables in the first
+        vector are different from all variables in the second
+        group. Thus the set of values in the first vector does not
+        intersect with the set of values in the second vector.
+        """
         return _pywrapcp.Solver_NullIntersect(self, first_vars, second_vars)
 
     def NullIntersectExcept(self, first_vars: "std::vector< operations_research::IntVar * > const &", second_vars: "std::vector< operations_research::IntVar * > const &", escape_value: "int64_t") -> "operations_research::Constraint *":
-        r""" Creates a constraint that states that all variables in the first vector are different from all variables from the second group, unless they are assigned to the escape value. Thus the set of values in the first vector minus the escape value does not intersect with the set of values in the second vector."""
+        r"""
+        Creates a constraint that states that all variables in the first
+        vector are different from all variables from the second group,
+        unless they are assigned to the escape value. Thus the set of
+        values in the first vector minus the escape value does not
+        intersect with the set of values in the second vector.
+        """
         return _pywrapcp.Solver_NullIntersectExcept(self, first_vars, second_vars, escape_value)
 
     def Circuit(self, nexts: "std::vector< operations_research::IntVar * > const &") -> "operations_research::Constraint *":
@@ -8867,34 +11047,56 @@ pywrapcp    
         return _pywrapcp.Solver_Circuit(self, nexts)
 
     def SubCircuit(self, nexts: "std::vector< operations_research::IntVar * > const &") -> "operations_research::Constraint *":
-        r""" Force the "nexts" variable to create a complete Hamiltonian path for those that do not loop upon themselves."""
+        r"""
+        Force the "nexts" variable to create a complete Hamiltonian path
+        for those that do not loop upon themselves.
+        """
         return _pywrapcp.Solver_SubCircuit(self, nexts)
 
     def DelayedPathCumul(self, nexts: "std::vector< operations_research::IntVar * > const &", active: "std::vector< operations_research::IntVar * > const &", cumuls: "std::vector< operations_research::IntVar * > const &", transits: "std::vector< operations_research::IntVar * > const &") -> "operations_research::Constraint *":
-        r""" Delayed version of the same constraint: propagation on the nexts variables is delayed until all constraints have propagated."""
+        r"""
+        Delayed version of the same constraint: propagation on the nexts variables
+        is delayed until all constraints have propagated.
+        """
         return _pywrapcp.Solver_DelayedPathCumul(self, nexts, active, cumuls, transits)
 
     def PathCumul(self, *args) -> "operations_research::Constraint *":
         r"""
         *Overload 1:*
-        Creates a constraint which accumulates values along a path such that: cumuls[next[i]] = cumuls[i] + transits[i]. Active variables indicate if the corresponding next variable is active; this could be useful to model unperformed nodes in a routing problem.
+        Creates a constraint which accumulates values along a path such that:
+        cumuls[next[i]] = cumuls[i] + transits[i].
+        Active variables indicate if the corresponding next variable is active;
+        this could be useful to model unperformed nodes in a routing problem.
 
         |
 
         *Overload 2:*
-        Creates a constraint which accumulates values along a path such that: cumuls[next[i]] = cumuls[i] + transit_evaluator(i, next[i]). Active variables indicate if the corresponding next variable is active; this could be useful to model unperformed nodes in a routing problem. Ownership of transit_evaluator is taken and it must be a repeatable callback.
+        Creates a constraint which accumulates values along a path such that:
+        cumuls[next[i]] = cumuls[i] + transit_evaluator(i, next[i]).
+        Active variables indicate if the corresponding next variable is active;
+        this could be useful to model unperformed nodes in a routing problem.
+        Ownership of transit_evaluator is taken and it must be a repeatable
+        callback.
 
         |
 
         *Overload 3:*
-        Creates a constraint which accumulates values along a path such that: cumuls[next[i]] = cumuls[i] + transit_evaluator(i, next[i]) + slacks[i]. Active variables indicate if the corresponding next variable is active; this could be useful to model unperformed nodes in a routing problem. Ownership of transit_evaluator is taken and it must be a repeatable callback.
+        Creates a constraint which accumulates values along a path such that:
+        cumuls[next[i]] = cumuls[i] + transit_evaluator(i, next[i]) + slacks[i].
+        Active variables indicate if the corresponding next variable is active;
+        this could be useful to model unperformed nodes in a routing problem.
+        Ownership of transit_evaluator is taken and it must be a repeatable
+        callback.
         """
         return _pywrapcp.Solver_PathCumul(self, *args)
 
     def AllowedAssignments(self, *args) -> "operations_research::Constraint *":
         r"""
         *Overload 1:*
-        This method creates a constraint where the graph of the relation between the variables is given in extension. There are 'arity' variables involved in the relation and the graph is given by a integer tuple set.
+        This method creates a constraint where the graph of the relation
+        between the variables is given in extension. There are 'arity'
+        variables involved in the relation and the graph is given by a
+        integer tuple set.
 
         |
 
@@ -8910,23 +11112,34 @@ pywrapcp    
         return _pywrapcp.Solver_NonOverlappingBoxesConstraint(self, *args)
 
     def Pack(self, vars: "std::vector< operations_research::IntVar * > const &", number_of_bins: "int") -> "operations_research::Pack *":
-        r""" This constraint packs all variables onto 'number_of_bins' variables.  For any given variable, a value of 'number_of_bins' indicates that the variable is not assigned to any bin. Dimensions, i.e., cumulative constraints on this packing, can be added directly from the pack class."""
+        r"""
+        This constraint packs all variables onto 'number_of_bins'
+        variables.  For any given variable, a value of 'number_of_bins'
+        indicates that the variable is not assigned to any bin.
+        Dimensions, i.e., cumulative constraints on this packing, can be
+        added directly from the pack class.
+        """
         return _pywrapcp.Solver_Pack(self, vars, number_of_bins)
 
     def FixedDurationIntervalVar(self, *args) -> "operations_research::IntervalVar *":
         r"""
         *Overload 1:*
-        Creates an interval var with a fixed duration. The duration must be greater than 0. If optional is true, then the interval can be performed or unperformed. If optional is false, then the interval is always performed.
+        Creates an interval var with a fixed duration. The duration must
+        be greater than 0. If optional is true, then the interval can be
+        performed or unperformed. If optional is false, then the interval
+        is always performed.
 
         |
 
         *Overload 2:*
-        Creates a performed interval var with a fixed duration. The duration must be greater than 0.
+        Creates a performed interval var with a fixed duration. The duration must
+        be greater than 0.
 
         |
 
         *Overload 3:*
-        Creates an interval var with a fixed duration, and performed_variable. The duration must be greater than 0.
+        Creates an interval var with a fixed duration, and performed_variable.
+        The duration must be greater than 0.
         """
         return _pywrapcp.Solver_FixedDurationIntervalVar(self, *args)
 
@@ -8935,87 +11148,205 @@ pywrapcp    
         return _pywrapcp.Solver_FixedInterval(self, start, duration, name)
 
     def IntervalVar(self, start_min: "int64_t", start_max: "int64_t", duration_min: "int64_t", duration_max: "int64_t", end_min: "int64_t", end_max: "int64_t", optional: "bool", name: "std::string const &") -> "operations_research::IntervalVar *":
-        r""" Creates an interval var by specifying the bounds on start, duration, and end."""
+        r"""
+        Creates an interval var by specifying the bounds on start,
+        duration, and end.
+        """
         return _pywrapcp.Solver_IntervalVar(self, start_min, start_max, duration_min, duration_max, end_min, end_max, optional, name)
 
     def MirrorInterval(self, interval_var: "IntervalVar") -> "operations_research::IntervalVar *":
-        r""" Creates an interval var that is the mirror image of the given one, that is, the interval var obtained by reversing the axis."""
+        r"""
+        Creates an interval var that is the mirror image of the given one, that
+        is, the interval var obtained by reversing the axis.
+        """
         return _pywrapcp.Solver_MirrorInterval(self, interval_var)
 
     def FixedDurationStartSyncedOnStartIntervalVar(self, interval_var: "IntervalVar", duration: "int64_t", offset: "int64_t") -> "operations_research::IntervalVar *":
-        r""" Creates an interval var with a fixed duration whose start is synchronized with the start of another interval, with a given offset. The performed status is also in sync with the performed status of the given interval variable."""
+        r"""
+        Creates an interval var with a fixed duration whose start is
+        synchronized with the start of another interval, with a given
+        offset. The performed status is also in sync with the performed
+        status of the given interval variable.
+        """
         return _pywrapcp.Solver_FixedDurationStartSyncedOnStartIntervalVar(self, interval_var, duration, offset)
 
     def FixedDurationStartSyncedOnEndIntervalVar(self, interval_var: "IntervalVar", duration: "int64_t", offset: "int64_t") -> "operations_research::IntervalVar *":
-        r""" Creates an interval var with a fixed duration whose start is synchronized with the end of another interval, with a given offset. The performed status is also in sync with the performed status of the given interval variable."""
+        r"""
+        Creates an interval var with a fixed duration whose start is
+        synchronized with the end of another interval, with a given
+        offset. The performed status is also in sync with the performed
+        status of the given interval variable.
+        """
         return _pywrapcp.Solver_FixedDurationStartSyncedOnEndIntervalVar(self, interval_var, duration, offset)
 
     def FixedDurationEndSyncedOnStartIntervalVar(self, interval_var: "IntervalVar", duration: "int64_t", offset: "int64_t") -> "operations_research::IntervalVar *":
-        r""" Creates an interval var with a fixed duration whose end is synchronized with the start of another interval, with a given offset. The performed status is also in sync with the performed status of the given interval variable."""
+        r"""
+        Creates an interval var with a fixed duration whose end is
+        synchronized with the start of another interval, with a given
+        offset. The performed status is also in sync with the performed
+        status of the given interval variable.
+        """
         return _pywrapcp.Solver_FixedDurationEndSyncedOnStartIntervalVar(self, interval_var, duration, offset)
 
     def FixedDurationEndSyncedOnEndIntervalVar(self, interval_var: "IntervalVar", duration: "int64_t", offset: "int64_t") -> "operations_research::IntervalVar *":
-        r""" Creates an interval var with a fixed duration whose end is synchronized with the end of another interval, with a given offset. The performed status is also in sync with the performed status of the given interval variable."""
+        r"""
+        Creates an interval var with a fixed duration whose end is
+        synchronized with the end of another interval, with a given
+        offset. The performed status is also in sync with the performed
+        status of the given interval variable.
+        """
         return _pywrapcp.Solver_FixedDurationEndSyncedOnEndIntervalVar(self, interval_var, duration, offset)
 
     def IntervalRelaxedMin(self, interval_var: "IntervalVar") -> "operations_research::IntervalVar *":
-        r""" Creates and returns an interval variable that wraps around the given one, relaxing the min start and end. Relaxing means making unbounded when optional. If the variable is non-optional, this method returns interval_var. More precisely, such an interval variable behaves as follows: * When the underlying must be performed, the returned interval variable     behaves exactly as the underlying; * When the underlying may or may not be performed, the returned interval     variable behaves like the underlying, except that it is unbounded on     the min side; * When the underlying cannot be performed, the returned interval variable     is of duration 0 and must be performed in an interval unbounded on     both sides. This is very useful to implement propagators that may only modify the start max or end max."""
+        r"""
+         Creates and returns an interval variable that wraps around the given one,
+         relaxing the min start and end. Relaxing means making unbounded when
+         optional. If the variable is non-optional, this method returns
+         interval_var.
+
+         More precisely, such an interval variable behaves as follows:
+        When the underlying must be performed, the returned interval variable
+             behaves exactly as the underlying;
+        When the underlying may or may not be performed, the returned interval
+             variable behaves like the underlying, except that it is unbounded on
+             the min side;
+        When the underlying cannot be performed, the returned interval variable
+             is of duration 0 and must be performed in an interval unbounded on
+             both sides.
+
+         This is very useful to implement propagators that may only modify
+         the start max or end max.
+        """
         return _pywrapcp.Solver_IntervalRelaxedMin(self, interval_var)
 
     def IntervalRelaxedMax(self, interval_var: "IntervalVar") -> "operations_research::IntervalVar *":
-        r""" Creates and returns an interval variable that wraps around the given one, relaxing the max start and end. Relaxing means making unbounded when optional. If the variable is non optional, this method returns interval_var. More precisely, such an interval variable behaves as follows: * When the underlying must be performed, the returned interval variable     behaves exactly as the underlying; * When the underlying may or may not be performed, the returned interval     variable behaves like the underlying, except that it is unbounded on     the max side; * When the underlying cannot be performed, the returned interval variable     is of duration 0 and must be performed in an interval unbounded on     both sides. This is very useful for implementing propagators that may only modify the start min or end min."""
+        r"""
+         Creates and returns an interval variable that wraps around the given one,
+         relaxing the max start and end. Relaxing means making unbounded when
+         optional. If the variable is non optional, this method returns
+         interval_var.
+
+         More precisely, such an interval variable behaves as follows:
+        When the underlying must be performed, the returned interval variable
+             behaves exactly as the underlying;
+        When the underlying may or may not be performed, the returned interval
+             variable behaves like the underlying, except that it is unbounded on
+             the max side;
+        When the underlying cannot be performed, the returned interval variable
+             is of duration 0 and must be performed in an interval unbounded on
+             both sides.
+
+         This is very useful for implementing propagators that may only modify
+         the start min or end min.
+        """
         return _pywrapcp.Solver_IntervalRelaxedMax(self, interval_var)
 
     def TemporalDisjunction(self, *args) -> "operations_research::Constraint *":
         r"""
         *Overload 1:*
-        This constraint implements a temporal disjunction between two interval vars t1 and t2. 'alt' indicates which alternative was chosen (alt == 0 is equivalent to t1 before t2).
+        This constraint implements a temporal disjunction between two
+        interval vars t1 and t2. 'alt' indicates which alternative was
+        chosen (alt == 0 is equivalent to t1 before t2).
 
         |
 
         *Overload 2:*
-        This constraint implements a temporal disjunction between two interval vars.
+        This constraint implements a temporal disjunction between two
+        interval vars.
         """
         return _pywrapcp.Solver_TemporalDisjunction(self, *args)
 
     def DisjunctiveConstraint(self, intervals: "std::vector< operations_research::IntervalVar * > const &", name: "std::string const &") -> "operations_research::DisjunctiveConstraint *":
-        r""" This constraint forces all interval vars into an non-overlapping sequence. Intervals with zero duration can be scheduled anywhere."""
+        r"""
+        This constraint forces all interval vars into an non-overlapping
+        sequence. Intervals with zero duration can be scheduled anywhere.
+        """
         return _pywrapcp.Solver_DisjunctiveConstraint(self, intervals, name)
 
     def Cumulative(self, *args) -> "operations_research::Constraint *":
         r"""
         *Overload 1:*
-        This constraint forces that, for any integer t, the sum of the demands corresponding to an interval containing t does not exceed the given capacity. Intervals and demands should be vectors of equal size. Demands should only contain non-negative values. Zero values are supported, and the corresponding intervals are filtered out, as they neither impact nor are impacted by this constraint.
+        This constraint forces that, for any integer t, the sum of the demands
+        corresponding to an interval containing t does not exceed the given
+        capacity.
+
+        Intervals and demands should be vectors of equal size.
+
+        Demands should only contain non-negative values. Zero values are
+        supported, and the corresponding intervals are filtered out, as they
+        neither impact nor are impacted by this constraint.
 
         |
 
         *Overload 2:*
-        This constraint forces that, for any integer t, the sum of the demands corresponding to an interval containing t does not exceed the given capacity. Intervals and demands should be vectors of equal size. Demands should only contain non-negative values. Zero values are supported, and the corresponding intervals are filtered out, as they neither impact nor are impacted by this constraint.
+        This constraint forces that, for any integer t, the sum of the demands
+        corresponding to an interval containing t does not exceed the given
+        capacity.
+
+        Intervals and demands should be vectors of equal size.
+
+        Demands should only contain non-negative values. Zero values are
+        supported, and the corresponding intervals are filtered out, as they
+        neither impact nor are impacted by this constraint.
 
         |
 
         *Overload 3:*
-        This constraint forces that, for any integer t, the sum of the demands corresponding to an interval containing t does not exceed the given capacity. Intervals and demands should be vectors of equal size. Demands should only contain non-negative values. Zero values are supported, and the corresponding intervals are filtered out, as they neither impact nor are impacted by this constraint.
+        This constraint forces that, for any integer t, the sum of the demands
+        corresponding to an interval containing t does not exceed the given
+        capacity.
+
+        Intervals and demands should be vectors of equal size.
+
+        Demands should only contain non-negative values. Zero values are
+        supported, and the corresponding intervals are filtered out, as they
+        neither impact nor are impacted by this constraint.
 
         |
 
         *Overload 4:*
-        This constraint enforces that, for any integer t, the sum of the demands corresponding to an interval containing t does not exceed the given capacity. Intervals and demands should be vectors of equal size. Demands should only contain non-negative values. Zero values are supported, and the corresponding intervals are filtered out, as they neither impact nor are impacted by this constraint.
+        This constraint enforces that, for any integer t, the sum of the demands
+        corresponding to an interval containing t does not exceed the given
+        capacity.
+
+        Intervals and demands should be vectors of equal size.
+
+        Demands should only contain non-negative values. Zero values are
+        supported, and the corresponding intervals are filtered out, as they
+        neither impact nor are impacted by this constraint.
 
         |
 
         *Overload 5:*
-        This constraint enforces that, for any integer t, the sum of demands corresponding to an interval containing t does not exceed the given capacity. Intervals and demands should be vectors of equal size. Demands should be positive.
+        This constraint enforces that, for any integer t, the sum of demands
+        corresponding to an interval containing t does not exceed the given
+        capacity.
+
+        Intervals and demands should be vectors of equal size.
+
+        Demands should be positive.
 
         |
 
         *Overload 6:*
-        This constraint enforces that, for any integer t, the sum of demands corresponding to an interval containing t does not exceed the given capacity. Intervals and demands should be vectors of equal size. Demands should be positive.
+        This constraint enforces that, for any integer t, the sum of demands
+        corresponding to an interval containing t does not exceed the given
+        capacity.
+
+        Intervals and demands should be vectors of equal size.
+
+        Demands should be positive.
         """
         return _pywrapcp.Solver_Cumulative(self, *args)
 
     def Cover(self, vars: "std::vector< operations_research::IntervalVar * > const &", target_var: "IntervalVar") -> "operations_research::Constraint *":
-        r""" This constraint states that the target_var is the convex hull of the intervals. If none of the interval variables is performed, then the target var is unperformed too. Also, if the target variable is unperformed, then all the intervals variables are unperformed too."""
+        r"""
+        This constraint states that the target_var is the convex hull of
+        the intervals. If none of the interval variables is performed,
+        then the target var is unperformed too. Also, if the target
+        variable is unperformed, then all the intervals variables are
+        unperformed too.
+        """
         return _pywrapcp.Solver_Cover(self, vars, target_var)
 
     def Assignment(self, *args) -> "operations_research::Assignment *":
@@ -9038,7 +11369,8 @@ pywrapcp    
         |
 
         *Overload 2:*
-        Collect the first solution of the search. The variables will need to be added later.
+        Collect the first solution of the search. The variables will need to
+        be added later.
         """
         return _pywrapcp.Solver_FirstSolutionCollector(self, *args)
 
@@ -9050,19 +11382,27 @@ pywrapcp    
         |
 
         *Overload 2:*
-        Collect the last solution of the search. The variables will need to be added later.
+        Collect the last solution of the search. The variables will need to
+        be added later.
         """
         return _pywrapcp.Solver_LastSolutionCollector(self, *args)
 
     def BestValueSolutionCollector(self, *args) -> "operations_research::SolutionCollector *":
         r"""
         *Overload 1:*
-        Collect the solution corresponding to the optimal value of the objective of 'assignment'; if 'assignment' does not have an objective no solution is collected. This collector only collects one solution corresponding to the best objective value (the first one found).
+        Collect the solution corresponding to the optimal value of the objective
+        of 'assignment'; if 'assignment' does not have an objective no solution is
+        collected. This collector only collects one solution corresponding to the
+        best objective value (the first one found).
 
         |
 
         *Overload 2:*
-        Collect the solution corresponding to the optimal value of the objective of 'assignment'; if 'assignment' does not have an objective no solution is collected. This collector only collects one solution corresponding to the best objective value (the first one found). The variables will need to be added later.
+        Collect the solution corresponding to the optimal value of the
+        objective of 'assignment'; if 'assignment' does not have an objective no
+        solution is collected. This collector only collects one solution
+        corresponding to the best objective value (the first one
+        found). The variables will need to be added later.
         """
         return _pywrapcp.Solver_BestValueSolutionCollector(self, *args)
 
@@ -9074,7 +11414,8 @@ pywrapcp    
         |
 
         *Overload 2:*
-        Collect all solutions of the search. The variables will need to be added later.
+        Collect all solutions of the search. The variables will need to
+        be added later.
         """
         return _pywrapcp.Solver_AllSolutionCollector(self, *args)
 
@@ -9093,12 +11434,14 @@ pywrapcp    
     def WeightedMinimize(self, *args) -> "operations_research::OptimizeVar *":
         r"""
         *Overload 1:*
-        Creates a minimization weighted objective. The actual objective is scalar_prod(sub_objectives, weights).
+        Creates a minimization weighted objective. The actual objective is
+        scalar_prod(sub_objectives, weights).
 
         |
 
         *Overload 2:*
-        Creates a minimization weighted objective. The actual objective is scalar_prod(sub_objectives, weights).
+        Creates a minimization weighted objective. The actual objective is
+        scalar_prod(sub_objectives, weights).
         """
         return _pywrapcp.Solver_WeightedMinimize(self, *args)
 
@@ -9127,7 +11470,24 @@ pywrapcp    
         return _pywrapcp.Solver_WeightedOptimize(self, *args)
 
     def TabuSearch(self, maximize: "bool", v: "IntVar", step: "int64_t", vars: "std::vector< operations_research::IntVar * > const &", keep_tenure: "int64_t", forbid_tenure: "int64_t", tabu_factor: "double") -> "operations_research::SearchMonitor *":
-        r""" MetaHeuristics which try to get the search out of local optima. Creates a Tabu Search monitor. In the context of local search the behavior is similar to MakeOptimize(), creating an objective in a given sense. The behavior differs once a local optimum is reached: thereafter solutions which degrade the value of the objective are allowed if they are not "tabu". A solution is "tabu" if it doesn't respect the following rules: - improving the best solution found so far - variables in the "keep" list must keep their value, variables in the "forbid" list must not take the value they have in the list. Variables with new values enter the tabu lists after each new solution found and leave the lists after a given number of iterations (called tenure). Only the variables passed to the method can enter the lists. The tabu criterion is softened by the tabu factor which gives the number of "tabu" violations which is tolerated; a factor of 1 means no violations allowed; a factor of 0 means all violations are allowed."""
+        r"""
+        MetaHeuristics which try to get the search out of local optima.
+        Creates a Tabu Search monitor.
+        In the context of local search the behavior is similar to MakeOptimize(),
+        creating an objective in a given sense. The behavior differs once a local
+        optimum is reached: thereafter solutions which degrade the value of the
+        objective are allowed if they are not "tabu". A solution is "tabu" if it
+        doesn't respect the following rules:
+        - improving the best solution found so far
+        - variables in the "keep" list must keep their value, variables in the
+        "forbid" list must not take the value they have in the list.
+        Variables with new values enter the tabu lists after each new solution
+        found and leave the lists after a given number of iterations (called
+        tenure). Only the variables passed to the method can enter the lists.
+        The tabu criterion is softened by the tabu factor which gives the number
+        of "tabu" violations which is tolerated; a factor of 1 means no violations
+        allowed; a factor of 0 means all violations are allowed.
+        """
         return _pywrapcp.Solver_TabuSearch(self, maximize, v, step, vars, keep_tenure, forbid_tenure, tabu_factor)
 
     def SimulatedAnnealing(self, maximize: "bool", v: "IntVar", step: "int64_t", initial_temperature: "int64_t") -> "operations_research::SearchMonitor *":
@@ -9135,32 +11495,49 @@ pywrapcp    
         return _pywrapcp.Solver_SimulatedAnnealing(self, maximize, v, step, initial_temperature)
 
     def LubyRestart(self, scale_factor: "int") -> "operations_research::SearchMonitor *":
-        r""" This search monitor will restart the search periodically. At the iteration n, it will restart after scale_factor * Luby(n) failures where Luby is the Luby Strategy (i.e. 1 1 2 1 1 2 4 1 1 2 1 1 2 4 8...)."""
+        r"""
+        This search monitor will restart the search periodically.
+        At the iteration n, it will restart after scale_factor * Luby(n) failures
+        where Luby is the Luby Strategy (i.e. 1 1 2 1 1 2 4 1 1 2 1 1 2 4 8...).
+        """
         return _pywrapcp.Solver_LubyRestart(self, scale_factor)
 
     def ConstantRestart(self, frequency: "int") -> "operations_research::SearchMonitor *":
-        r""" This search monitor will restart the search periodically after 'frequency' failures."""
+        r"""
+        This search monitor will restart the search periodically after 'frequency'
+        failures.
+        """
         return _pywrapcp.Solver_ConstantRestart(self, frequency)
 
     def TimeLimit(self, *args) -> "operations_research::RegularLimit *":
         return _pywrapcp.Solver_TimeLimit(self, *args)
 
     def BranchesLimit(self, branches: "int64_t") -> "operations_research::RegularLimit *":
-        r""" Creates a search limit that constrains the number of branches explored in the search tree."""
+        r"""
+        Creates a search limit that constrains the number of branches
+        explored in the search tree.
+        """
         return _pywrapcp.Solver_BranchesLimit(self, branches)
 
     def FailuresLimit(self, failures: "int64_t") -> "operations_research::RegularLimit *":
-        r""" Creates a search limit that constrains the number of failures that can happen when exploring the search tree."""
+        r"""
+        Creates a search limit that constrains the number of failures
+        that can happen when exploring the search tree.
+        """
         return _pywrapcp.Solver_FailuresLimit(self, failures)
 
     def SolutionsLimit(self, solutions: "int64_t") -> "operations_research::RegularLimit *":
-        r""" Creates a search limit that constrains the number of solutions found during the search."""
+        r"""
+        Creates a search limit that constrains the number of solutions found
+        during the search.
+        """
         return _pywrapcp.Solver_SolutionsLimit(self, solutions)
 
     def Limit(self, *args) -> "operations_research::SearchLimit *":
         r"""
         *Overload 1:*
-        Limits the search with the 'time', 'branches', 'failures' and 'solutions' limits. 'smart_time_check' reduces the calls to the wall
+        Limits the search with the 'time', 'branches', 'failures' and
+        'solutions' limits. 'smart_time_check' reduces the calls to the wall
 
         |
 
@@ -9170,19 +11547,27 @@ pywrapcp    
         |
 
         *Overload 3:*
-        Creates a search limit that is reached when either of the underlying limit is reached. That is, the returned limit is more stringent than both argument limits.
+        Creates a search limit that is reached when either of the underlying limit
+        is reached. That is, the returned limit is more stringent than both
+        argument limits.
         """
         return _pywrapcp.Solver_Limit(self, *args)
 
     def CustomLimit(self, limiter: "std::function< bool () >") -> "operations_research::SearchLimit *":
-        r""" Callback-based search limit. Search stops when limiter returns true; if this happens at a leaf the corresponding solution will be rejected."""
+        r"""
+        Callback-based search limit. Search stops when limiter returns true; if
+        this happens at a leaf the corresponding solution will be rejected.
+        """
         return _pywrapcp.Solver_CustomLimit(self, limiter)
 
     def SearchLog(self, *args) -> "operations_research::SearchMonitor *":
         return _pywrapcp.Solver_SearchLog(self, *args)
 
     def SearchTrace(self, prefix: "std::string const &") -> "operations_research::SearchMonitor *":
-        r""" Creates a search monitor that will trace precisely the behavior of the search. Use this only for low level debugging."""
+        r"""
+        Creates a search monitor that will trace precisely the behavior of the
+        search. Use this only for low level debugging.
+        """
         return _pywrapcp.Solver_SearchTrace(self, prefix)
 
     def PrintModelVisitor(self) -> "operations_research::ModelVisitor *":
@@ -9228,30 +11613,54 @@ pywrapcp    
         return _pywrapcp.Solver_DefaultPhase(self, *args)
 
     def ScheduleOrPostpone(self, var: "IntervalVar", est: "int64_t", marker: "int64_t *const") -> "operations_research::Decision *":
-        r""" Returns a decision that tries to schedule a task at a given time. On the Apply branch, it will set that interval var as performed and set its start to 'est'. On the Refute branch, it will just update the 'marker' to 'est' + 1. This decision is used in the INTERVAL_SET_TIMES_FORWARD strategy."""
+        r"""
+        Returns a decision that tries to schedule a task at a given time.
+        On the Apply branch, it will set that interval var as performed and set
+        its start to 'est'. On the Refute branch, it will just update the
+        'marker' to 'est' + 1. This decision is used in the
+        INTERVAL_SET_TIMES_FORWARD strategy.
+        """
         return _pywrapcp.Solver_ScheduleOrPostpone(self, var, est, marker)
 
     def ScheduleOrExpedite(self, var: "IntervalVar", est: "int64_t", marker: "int64_t *const") -> "operations_research::Decision *":
-        r""" Returns a decision that tries to schedule a task at a given time. On the Apply branch, it will set that interval var as performed and set its end to 'est'. On the Refute branch, it will just update the 'marker' to 'est' - 1. This decision is used in the INTERVAL_SET_TIMES_BACKWARD strategy."""
+        r"""
+        Returns a decision that tries to schedule a task at a given time.
+        On the Apply branch, it will set that interval var as performed and set
+        its end to 'est'. On the Refute branch, it will just update the
+        'marker' to 'est' - 1. This decision is used in the
+        INTERVAL_SET_TIMES_BACKWARD strategy.
+        """
         return _pywrapcp.Solver_ScheduleOrExpedite(self, var, est, marker)
 
     def RankFirstInterval(self, sequence: "SequenceVar", index: "int") -> "operations_research::Decision *":
-        r""" Returns a decision that tries to rank first the ith interval var in the sequence variable."""
+        r"""
+        Returns a decision that tries to rank first the ith interval var
+        in the sequence variable.
+        """
         return _pywrapcp.Solver_RankFirstInterval(self, sequence, index)
 
     def RankLastInterval(self, sequence: "SequenceVar", index: "int") -> "operations_research::Decision *":
-        r""" Returns a decision that tries to rank last the ith interval var in the sequence variable."""
+        r"""
+        Returns a decision that tries to rank last the ith interval var
+        in the sequence variable.
+        """
         return _pywrapcp.Solver_RankLastInterval(self, sequence, index)
 
     def Phase(self, *args) -> "operations_research::DecisionBuilder *":
         return _pywrapcp.Solver_Phase(self, *args)
 
     def DecisionBuilderFromAssignment(self, assignment: "Assignment", db: "DecisionBuilder", vars: "std::vector< operations_research::IntVar * > const &") -> "operations_research::DecisionBuilder *":
-        r""" Returns a decision builder for which the left-most leaf corresponds to assignment, the rest of the tree being explored using 'db'."""
+        r"""
+        Returns a decision builder for which the left-most leaf corresponds
+        to assignment, the rest of the tree being explored using 'db'.
+        """
         return _pywrapcp.Solver_DecisionBuilderFromAssignment(self, assignment, db, vars)
 
     def ConstraintAdder(self, ct: "Constraint") -> "operations_research::DecisionBuilder *":
-        r""" Returns a decision builder that will add the given constraint to the model."""
+        r"""
+        Returns a decision builder that will add the given constraint to
+        the model.
+        """
         return _pywrapcp.Solver_ConstraintAdder(self, ct)
 
     def SolveOnce(self, db: "DecisionBuilder", monitors: "std::vector< operations_research::SearchMonitor * > const &") -> "operations_research::DecisionBuilder *":
@@ -9261,11 +11670,17 @@ pywrapcp    
         return _pywrapcp.Solver_NestedOptimize(self, *args)
 
     def RestoreAssignment(self, assignment: "Assignment") -> "operations_research::DecisionBuilder *":
-        r""" Returns a DecisionBuilder which restores an Assignment (calls void Assignment::Restore())"""
+        r"""
+        Returns a DecisionBuilder which restores an Assignment
+        (calls void Assignment::Restore())
+        """
         return _pywrapcp.Solver_RestoreAssignment(self, assignment)
 
     def StoreAssignment(self, assignment: "Assignment") -> "operations_research::DecisionBuilder *":
-        r""" Returns a DecisionBuilder which stores an Assignment (calls void Assignment::Store())"""
+        r"""
+        Returns a DecisionBuilder which stores an Assignment
+        (calls void Assignment::Store())
+        """
         return _pywrapcp.Solver_StoreAssignment(self, assignment)
 
     def Operator(self, *args) -> "operations_research::LocalSearchOperator *":
@@ -9277,12 +11692,21 @@ pywrapcp    
     def MoveTowardTargetOperator(self, *args) -> "operations_research::LocalSearchOperator *":
         r"""
         *Overload 1:*
-        Creates a local search operator that tries to move the assignment of some variables toward a target. The target is given as an Assignment. This operator generates neighbors in which the only difference compared to the current state is that one variable that belongs to the target assignment is set to its target value.
+        Creates a local search operator that tries to move the assignment of some
+        variables toward a target. The target is given as an Assignment. This
+        operator generates neighbors in which the only difference compared to the
+        current state is that one variable that belongs to the target assignment
+        is set to its target value.
 
         |
 
         *Overload 2:*
-        Creates a local search operator that tries to move the assignment of some variables toward a target. The target is given either as two vectors: a vector of variables and a vector of associated target values. The two vectors should be of the same length. This operator generates neighbors in which the only difference compared to the current state is that one variable that belongs to the given vector is set to its target value.
+        Creates a local search operator that tries to move the assignment of some
+        variables toward a target. The target is given either as two vectors: a
+        vector of variables and a vector of associated target values. The two
+        vectors should be of the same length. This operator generates neighbors in
+        which the only difference compared to the current state is that one
+        variable that belongs to the given vector is set to its target value.
         """
         return _pywrapcp.Solver_MoveTowardTargetOperator(self, *args)
 
@@ -9292,17 +11716,26 @@ pywrapcp    
     def RandomConcatenateOperators(self, *args) -> "operations_research::LocalSearchOperator *":
         r"""
         *Overload 1:*
-        Randomized version of local search concatenator; calls a random operator at each call to MakeNextNeighbor().
+        Randomized version of local search concatenator; calls a random operator
+        at each call to MakeNextNeighbor().
 
         |
 
         *Overload 2:*
-        Randomized version of local search concatenator; calls a random operator at each call to MakeNextNeighbor(). The provided seed is used to initialize the random number generator.
+        Randomized version of local search concatenator; calls a random operator
+        at each call to MakeNextNeighbor(). The provided seed is used to
+        initialize the random number generator.
         """
         return _pywrapcp.Solver_RandomConcatenateOperators(self, *args)
 
     def NeighborhoodLimit(self, op: "LocalSearchOperator", limit: "int64_t") -> "operations_research::LocalSearchOperator *":
-        r""" Creates a local search operator that wraps another local search operator and limits the number of neighbors explored (i.e., calls to MakeNextNeighbor from the current solution (between two calls to Start()). When this limit is reached, MakeNextNeighbor() returns false. The counter is cleared when Start() is called."""
+        r"""
+        Creates a local search operator that wraps another local search
+        operator and limits the number of neighbors explored (i.e., calls
+        to MakeNextNeighbor from the current solution (between two calls
+        to Start()). When this limit is reached, MakeNextNeighbor()
+        returns false. The counter is cleared when Start() is called.
+        """
         return _pywrapcp.Solver_NeighborhoodLimit(self, op, limit)
 
     def LocalSearchPhase(self, *args) -> "operations_research::DecisionBuilder *":
@@ -9312,15 +11745,24 @@ pywrapcp    
         return _pywrapcp.Solver_LocalSearchPhaseParameters(self, *args)
 
     def SearchDepth(self) -> "int":
-        r""" Gets the search depth of the current active search. Returns -1 if there is no active search opened."""
+        r"""
+        Gets the search depth of the current active search. Returns -1 if
+        there is no active search opened.
+        """
         return _pywrapcp.Solver_SearchDepth(self)
 
     def SearchLeftDepth(self) -> "int":
-        r""" Gets the search left depth of the current active search. Returns -1 if there is no active search opened."""
+        r"""
+        Gets the search left depth of the current active search. Returns -1 if
+        there is no active search opened.
+        """
         return _pywrapcp.Solver_SearchLeftDepth(self)
 
     def SolveDepth(self) -> "int":
-        r""" Gets the number of nested searches. It returns 0 outside search, 1 during the top level search, 2 or more in case of nested searches."""
+        r"""
+        Gets the number of nested searches. It returns 0 outside search,
+        1 during the top level search, 2 or more in case of nested searches.
+        """
         return _pywrapcp.Solver_SolveDepth(self)
 
     def Rand64(self, size: "int64_t") -> "int64_t":
@@ -9340,7 +11782,10 @@ pywrapcp    
         return _pywrapcp.Solver_LocalSearchProfile(self)
 
     def Constraints(self) -> "int":
-        r""" Counts the number of constraints that have been added to the solver before the search."""
+        r"""
+        Counts the number of constraints that have been added
+        to the solver before the search.
+        """
         return _pywrapcp.Solver_Constraints(self)
 
     def Accept(self, visitor: "operations_research::ModelVisitor *const") -> "void":
@@ -9355,7 +11800,10 @@ pywrapcp    
         return _pywrapcp.Solver_RestartCurrentSearch(self)
 
     def ShouldFail(self) -> "void":
-        r""" These methods are only useful for the SWIG wrappers, which need a way to externally cause the Solver to fail."""
+        r"""
+        These methods are only useful for the SWIG wrappers, which need a way
+        to externally cause the Solver to fail.
+        """
         return _pywrapcp.Solver_ShouldFail(self)
 
     def __str__(self) -> "std::string":
@@ -9406,7 +11854,29 @@ pywrapcp    
 
         
-

Solver Class A solver represents the main computation engine. It implements the entire range of Constraint Programming protocols: - Reversibility - Propagation - Search Usually, Constraint Programming code consists of - the creation of the Solver, - the creation of the decision variables of the model, - the creation of the constraints of the model and their addition to the solver() through the AddConstraint() method, - the creation of the main DecisionBuilder class, - the launch of the solve() method with the decision builder. For the time being, Solver is neither MT_SAFE nor MT_HOT.

+

Solver Class

+ +

A solver represents the main computation engine. It implements the entire +range of Constraint Programming protocols:

+ +
    +
  • Reversibility
  • +
  • Propagation
  • +
  • Search
  • +
+ +

Usually, Constraint Programming code consists of

+ +
    +
  • the creation of the Solver,
  • +
  • the creation of the decision variables of the model,
  • +
  • the creation of the constraints of the model and their addition to the +solver() through the AddConstraint() method,
  • +
  • the creation of the main DecisionBuilder class,
  • +
  • the launch of the solve() method with the decision builder.
  • +
+ +

For the time being, Solver is neither MT_SAFE nor MT_HOT.

@@ -9469,7 +11939,9 @@ pywrapcp CHOOSE_FIRST_UNBOUND = 2
-

Select the first unbound variable. Variables are considered in the order of the vector of IntVars used to create the selector.

+

Select the first unbound variable. +Variables are considered in the order of the vector of IntVars used +to create the selector.

@@ -9491,7 +11963,12 @@ pywrapcp CHOOSE_MIN_SIZE_LOWEST_MIN = 4
-

Among unbound variables, select the variable with the smallest size, i.e., the smallest number of possible values. In case of a tie, the selected variables is the one with the lowest min value. In case of a tie, the first one is selected, first being defined by the order in the vector of IntVars used to create the selector.

+

Among unbound variables, select the variable with the smallest size, +i.e., the smallest number of possible values. +In case of a tie, the selected variables is the one with the lowest min +value. +In case of a tie, the first one is selected, first being defined by the +order in the vector of IntVars used to create the selector.

@@ -9502,7 +11979,12 @@ pywrapcp CHOOSE_MIN_SIZE_HIGHEST_MIN = 5
-

Among unbound variables, select the variable with the smallest size, i.e., the smallest number of possible values. In case of a tie, the selected variable is the one with the highest min value. In case of a tie, the first one is selected, first being defined by the order in the vector of IntVars used to create the selector.

+

Among unbound variables, select the variable with the smallest size, +i.e., the smallest number of possible values. +In case of a tie, the selected variable is the one with the highest min +value. +In case of a tie, the first one is selected, first being defined by the +order in the vector of IntVars used to create the selector.

@@ -9513,7 +11995,12 @@ pywrapcp CHOOSE_MIN_SIZE_LOWEST_MAX = 6
-

Among unbound variables, select the variable with the smallest size, i.e., the smallest number of possible values. In case of a tie, the selected variables is the one with the lowest max value. In case of a tie, the first one is selected, first being defined by the order in the vector of IntVars used to create the selector.

+

Among unbound variables, select the variable with the smallest size, +i.e., the smallest number of possible values. +In case of a tie, the selected variables is the one with the lowest max +value. +In case of a tie, the first one is selected, first being defined by the +order in the vector of IntVars used to create the selector.

@@ -9524,7 +12011,12 @@ pywrapcp CHOOSE_MIN_SIZE_HIGHEST_MAX = 7
-

Among unbound variables, select the variable with the smallest size, i.e., the smallest number of possible values. In case of a tie, the selected variable is the one with the highest max value. In case of a tie, the first one is selected, first being defined by the order in the vector of IntVars used to create the selector.

+

Among unbound variables, select the variable with the smallest size, +i.e., the smallest number of possible values. +In case of a tie, the selected variable is the one with the highest max +value. +In case of a tie, the first one is selected, first being defined by the +order in the vector of IntVars used to create the selector.

@@ -9535,7 +12027,10 @@ pywrapcp CHOOSE_LOWEST_MIN = 8
-

Among unbound variables, select the variable with the smallest minimal value. In case of a tie, the first one is selected, "first" defined by the order in the vector of IntVars used to create the selector.

+

Among unbound variables, select the variable with the smallest minimal +value. +In case of a tie, the first one is selected, "first" defined by the +order in the vector of IntVars used to create the selector.

@@ -9546,7 +12041,10 @@ pywrapcp CHOOSE_HIGHEST_MAX = 9
-

Among unbound variables, select the variable with the highest maximal value. In case of a tie, the first one is selected, first being defined by the order in the vector of IntVars used to create the selector.

+

Among unbound variables, select the variable with the highest maximal +value. +In case of a tie, the first one is selected, first being defined by the +order in the vector of IntVars used to create the selector.

@@ -9557,7 +12055,9 @@ pywrapcp CHOOSE_MIN_SIZE = 10
-

Among unbound variables, select the variable with the smallest size. In case of a tie, the first one is selected, first being defined by the order in the vector of IntVars used to create the selector.

+

Among unbound variables, select the variable with the smallest size. +In case of a tie, the first one is selected, first being defined by the +order in the vector of IntVars used to create the selector.

@@ -9568,7 +12068,9 @@ pywrapcp CHOOSE_MAX_SIZE = 11
-

Among unbound variables, select the variable with the highest size. In case of a tie, the first one is selected, first being defined by the order in the vector of IntVars used to create the selector.

+

Among unbound variables, select the variable with the highest size. +In case of a tie, the first one is selected, first being defined by the +order in the vector of IntVars used to create the selector.

@@ -9579,7 +12081,8 @@ pywrapcp CHOOSE_MAX_REGRET_ON_MIN = 12
-

Among unbound variables, select the variable with the largest gap between the first and the second values of the domain.

+

Among unbound variables, select the variable with the largest +gap between the first and the second values of the domain.

@@ -9590,7 +12093,8 @@ pywrapcp CHOOSE_PATH = 13
-

Selects the next unbound variable on a path, the path being defined by the variables: var[i] corresponds to the index of the next of i.

+

Selects the next unbound variable on a path, the path being defined by +the variables: var[i] corresponds to the index of the next of i.

@@ -9656,7 +12160,9 @@ pywrapcp ASSIGN_CENTER_VALUE = 5
-

Selects the first possible value which is the closest to the center of the domain of the selected variable. The center is defined as (min + max) / 2.

+

Selects the first possible value which is the closest to the center +of the domain of the selected variable. +The center is defined as (min + max) / 2.

@@ -9667,7 +12173,8 @@ pywrapcp SPLIT_LOWER_HALF = 6
-

Split the domain in two around the center, and choose the lower part first.

+

Split the domain in two around the center, and choose the lower +part first.

@@ -9678,7 +12185,8 @@ pywrapcp SPLIT_UPPER_HALF = 7
-

Split the domain in two around the center, and choose the lower part first.

+

Split the domain in two around the center, and choose the lower +part first.

@@ -9747,7 +12255,8 @@ pywrapcp INTERVAL_SET_TIMES_FORWARD = 2
-

Selects the variable with the lowest starting time of all variables, and fixes its starting time to this lowest value.

+

Selects the variable with the lowest starting time of all variables, +and fixes its starting time to this lowest value.

@@ -9758,7 +12267,8 @@ pywrapcp INTERVAL_SET_TIMES_BACKWARD = 3
-

Selects the variable with the highest ending time of all variables, and fixes the ending time to this highest values.

+

Selects the variable with the highest ending time of all variables, +and fixes the ending time to this highest values.

@@ -9769,7 +12279,15 @@ pywrapcp TWOOPT = 0
-

Operator which reverses a sub-chain of a path. It is called TwoOpt because it breaks two arcs on the path; resulting paths are called two-optimal. Possible neighbors for the path 1 -> 2 -> 3 -> 4 -> 5 (where (1, 5) are first and last nodes of the path and can therefore not be moved): 1 -> [3 -> 2] -> 4 -> 5 1 -> [4 -> 3 -> 2] -> 5 1 -> 2 -> [4 -> 3] -> 5

+

Operator which reverses a sub-chain of a path. It is called TwoOpt +because it breaks two arcs on the path; resulting paths are called +two-optimal. +Possible neighbors for the path 1 -> 2 -> 3 -> 4 -> 5 +(where (1, 5) are first and last nodes of the path and can therefore not +be moved): + 1 -> [3 -> 2] -> 4 -> 5 + 1 -> [4 -> 3 -> 2] -> 5 + 1 -> 2 -> [4 -> 3] -> 5

@@ -9780,7 +12298,20 @@ pywrapcp OROPT = 1
-

Relocate: OROPT and RELOCATE. Operator which moves a sub-chain of a path to another position; the specified chain length is the fixed length of the chains being moved. When this length is 1, the operator simply moves a node to another position. Possible neighbors for the path 1 -> 2 -> 3 -> 4 -> 5, for a chain length of 2 (where (1, 5) are first and last nodes of the path and can therefore not be moved): 1 -> 4 -> [2 -> 3] -> 5 1 -> [3 -> 4] -> 2 -> 5 Using Relocate with chain lengths of 1, 2 and 3 together is equivalent to the OrOpt operator on a path. The OrOpt operator is a limited version of 3Opt (breaks 3 arcs on a path).

+

Relocate: OROPT and RELOCATE. +Operator which moves a sub-chain of a path to another position; the +specified chain length is the fixed length of the chains being moved. +When this length is 1, the operator simply moves a node to another +position. +Possible neighbors for the path 1 -> 2 -> 3 -> 4 -> 5, for a chain +length of 2 (where (1, 5) are first and last nodes of the path and can +therefore not be moved): + 1 -> 4 -> [2 -> 3] -> 5 + 1 -> [3 -> 4] -> 2 -> 5

+ +

Using Relocate with chain lengths of 1, 2 and 3 together is equivalent +to the OrOpt operator on a path. The OrOpt operator is a limited + version of 3Opt (breaks 3 arcs on a path).

@@ -9802,7 +12333,13 @@ pywrapcp EXCHANGE = 3
-

Operator which exchanges the positions of two nodes. Possible neighbors for the path 1 -> 2 -> 3 -> 4 -> 5 (where (1, 5) are first and last nodes of the path and can therefore not be moved): 1 -> [3] -> [2] -> 4 -> 5 1 -> [4] -> 3 -> [2] -> 5 1 -> 2 -> [4] -> [3] -> 5

+

Operator which exchanges the positions of two nodes. +Possible neighbors for the path 1 -> 2 -> 3 -> 4 -> 5 +(where (1, 5) are first and last nodes of the path and can therefore not +be moved): + 1 -> [3] -> [2] -> 4 -> 5 + 1 -> [4] -> 3 -> [2] -> 5 + 1 -> 2 -> [4] -> [3] -> 5

@@ -9813,7 +12350,15 @@ pywrapcp CROSS = 4
-

Operator which cross exchanges the starting chains of 2 paths, including exchanging the whole paths. First and last nodes are not moved. Possible neighbors for the paths 1 -> 2 -> 3 -> 4 -> 5 and 6 -> 7 -> 8 (where (1, 5) and (6, 8) are first and last nodes of the paths and can therefore not be moved): 1 -> [7] -> 3 -> 4 -> 5 6 -> [2] -> 8 1 -> [7] -> 4 -> 5 6 -> [2 -> 3] -> 8 1 -> [7] -> 5 6 -> [2 -> 3 -> 4] -> 8

+

Operator which cross exchanges the starting chains of 2 paths, including +exchanging the whole paths. +First and last nodes are not moved. +Possible neighbors for the paths 1 -> 2 -> 3 -> 4 -> 5 and 6 -> 7 -> 8 +(where (1, 5) and (6, 8) are first and last nodes of the paths and can +therefore not be moved): + 1 -> [7] -> 3 -> 4 -> 5 6 -> [2] -> 8 + 1 -> [7] -> 4 -> 5 6 -> [2 -> 3] -> 8 + 1 -> [7] -> 5 6 -> [2 -> 3 -> 4] -> 8

@@ -9824,7 +12369,12 @@ pywrapcp MAKEACTIVE = 5
-

Operator which inserts an inactive node into a path. Possible neighbors for the path 1 -> 2 -> 3 -> 4 with 5 inactive (where 1 and 4 are first and last nodes of the path) are: 1 -> [5] -> 2 -> 3 -> 4 1 -> 2 -> [5] -> 3 -> 4 1 -> 2 -> 3 -> [5] -> 4

+

Operator which inserts an inactive node into a path. +Possible neighbors for the path 1 -> 2 -> 3 -> 4 with 5 inactive +(where 1 and 4 are first and last nodes of the path) are: + 1 -> [5] -> 2 -> 3 -> 4 + 1 -> 2 -> [5] -> 3 -> 4 + 1 -> 2 -> 3 -> [5] -> 4

@@ -9835,7 +12385,11 @@ pywrapcp MAKEINACTIVE = 6
-

Operator which makes path nodes inactive. Possible neighbors for the path 1 -> 2 -> 3 -> 4 (where 1 and 4 are first and last nodes of the path) are: 1 -> 3 -> 4 with 2 inactive 1 -> 2 -> 4 with 3 inactive

+

Operator which makes path nodes inactive. +Possible neighbors for the path 1 -> 2 -> 3 -> 4 (where 1 and 4 are +first and last nodes of the path) are: + 1 -> 3 -> 4 with 2 inactive + 1 -> 2 -> 4 with 3 inactive

@@ -9846,7 +12400,12 @@ pywrapcp MAKECHAININACTIVE = 7
-

Operator which makes a "chain" of path nodes inactive. Possible neighbors for the path 1 -> 2 -> 3 -> 4 (where 1 and 4 are first and last nodes of the path) are: 1 -> 3 -> 4 with 2 inactive 1 -> 2 -> 4 with 3 inactive 1 -> 4 with 2 and 3 inactive

+

Operator which makes a "chain" of path nodes inactive. +Possible neighbors for the path 1 -> 2 -> 3 -> 4 (where 1 and 4 are +first and last nodes of the path) are: + 1 -> 3 -> 4 with 2 inactive + 1 -> 2 -> 4 with 3 inactive + 1 -> 4 with 2 and 3 inactive

@@ -9857,7 +12416,11 @@ pywrapcp SWAPACTIVE = 8
-

Operator which replaces an active node by an inactive one. Possible neighbors for the path 1 -> 2 -> 3 -> 4 with 5 inactive (where 1 and 4 are first and last nodes of the path) are: 1 -> [5] -> 3 -> 4 with 2 inactive 1 -> 2 -> [5] -> 4 with 3 inactive

+

Operator which replaces an active node by an inactive one. +Possible neighbors for the path 1 -> 2 -> 3 -> 4 with 5 inactive +(where 1 and 4 are first and last nodes of the path) are: + 1 -> [5] -> 3 -> 4 with 2 inactive + 1 -> 2 -> [5] -> 4 with 3 inactive

@@ -9868,7 +12431,16 @@ pywrapcp EXTENDEDSWAPACTIVE = 9
-

Operator which makes an inactive node active and an active one inactive. It is similar to SwapActiveOperator except that it tries to insert the inactive node in all possible positions instead of just the position of the node made inactive. Possible neighbors for the path 1 -> 2 -> 3 -> 4 with 5 inactive (where 1 and 4 are first and last nodes of the path) are: 1 -> [5] -> 3 -> 4 with 2 inactive 1 -> 3 -> [5] -> 4 with 2 inactive 1 -> [5] -> 2 -> 4 with 3 inactive 1 -> 2 -> [5] -> 4 with 3 inactive

+

Operator which makes an inactive node active and an active one inactive. +It is similar to SwapActiveOperator except that it tries to insert the +inactive node in all possible positions instead of just the position of +the node made inactive. +Possible neighbors for the path 1 -> 2 -> 3 -> 4 with 5 inactive +(where 1 and 4 are first and last nodes of the path) are: + 1 -> [5] -> 3 -> 4 with 2 inactive + 1 -> 3 -> [5] -> 4 with 2 inactive + 1 -> [5] -> 2 -> 4 with 3 inactive + 1 -> 2 -> [5] -> 4 with 3 inactive

@@ -9879,7 +12451,13 @@ pywrapcp PATHLNS = 10
-

Operator which relaxes two sub-chains of three consecutive arcs each. Each sub-chain is defined by a start node and the next three arcs. Those six arcs are relaxed to build a new neighbor. PATHLNS explores all possible pairs of starting nodes and so defines n^2 neighbors, n being the number of nodes. Note that the two sub-chains can be part of the same path; they even may overlap.

+

Operator which relaxes two sub-chains of three consecutive arcs each. +Each sub-chain is defined by a start node and the next three arcs. Those +six arcs are relaxed to build a new neighbor. +PATHLNS explores all possible pairs of starting nodes and so defines +n^2 neighbors, n being the number of nodes. +Note that the two sub-chains can be part of the same path; they even may +overlap.

@@ -9890,7 +12468,8 @@ pywrapcp FULLPATHLNS = 11
-

Operator which relaxes one entire path and all inactive nodes, thus defining num_paths neighbors.

+

Operator which relaxes one entire path and all inactive nodes, thus +defining num_paths neighbors.

@@ -9901,7 +12480,9 @@ pywrapcp UNACTIVELNS = 12
-

Operator which relaxes all inactive nodes and one sub-chain of six consecutive arcs. That way the path can be improved by inserting inactive nodes or swapping arcs.

+

Operator which relaxes all inactive nodes and one sub-chain of six +consecutive arcs. That way the path can be improved by inserting +inactive nodes or swapping arcs.

@@ -9912,7 +12493,14 @@ pywrapcp INCREMENT = 13
-

Operator which defines one neighbor per variable. Each neighbor tries to increment by one the value of the corresponding variable. When a new solution is found the neighborhood is rebuilt from scratch, i.e., tries to increment values in the variable order. Consider for instance variables x and y. x is incremented one by one to its max, and when it is not possible to increment x anymore, y is incremented once. If this is a solution, then next neighbor tries to increment x.

+

Operator which defines one neighbor per variable. Each neighbor tries to +increment by one the value of the corresponding variable. When a new +solution is found the neighborhood is rebuilt from scratch, i.e., tries +to increment values in the variable order. +Consider for instance variables x and y. x is incremented one by one to +its max, and when it is not possible to increment x anymore, y is +incremented once. If this is a solution, then next neighbor tries to +increment x.

@@ -9923,7 +12511,9 @@ pywrapcp DECREMENT = 14
-

Operator which defines a neighborhood to decrement values. The behavior is the same as INCREMENT, except values are decremented instead of incremented.

+

Operator which defines a neighborhood to decrement values. +The behavior is the same as INCREMENT, except values are decremented +instead of incremented.

@@ -9934,7 +12524,13 @@ pywrapcp SIMPLELNS = 15
-

Operator which defines one neighbor per variable. Each neighbor relaxes one variable. When a new solution is found the neighborhood is rebuilt from scratch. Consider for instance variables x and y. First x is relaxed and the solver is looking for the best possible solution (with only x relaxed). Then y is relaxed, and the solver is looking for a new solution. If a new solution is found, then the next variable to be relaxed is x.

+

Operator which defines one neighbor per variable. Each neighbor relaxes +one variable. +When a new solution is found the neighborhood is rebuilt from scratch. +Consider for instance variables x and y. First x is relaxed and the +solver is looking for the best possible solution (with only x relaxed). +Then y is relaxed, and the solver is looking for a new solution. +If a new solution is found, then the next variable to be relaxed is x.

@@ -9967,7 +12563,8 @@ pywrapcp EQ = 2
-

Move is accepted when the current objective value is in the interval objective.Min .. objective.Max.

+

Move is accepted when the current objective value is in the interval +objective.Min .. objective.Max.

@@ -9978,7 +12575,8 @@ pywrapcp DELAYED_PRIORITY = 0
-

DELAYED_PRIORITY is the lowest priority: Demons will be processed after VAR_PRIORITY and NORMAL_PRIORITY demons.

+

DELAYED_PRIORITY is the lowest priority: Demons will be processed after +VAR_PRIORITY and NORMAL_PRIORITY demons.

@@ -10062,13 +12660,80 @@ pywrapcp
View Source
    def AddConstraint(self, c: "Constraint") -> "void":
-        r""" Adds the constraint 'c' to the model. After calling this method, and until there is a backtrack that undoes the addition, any assignment of variables to values must satisfy the given constraint in order to be considered feasible. There are two fairly different use cases: - the most common use case is modeling: the given constraint is really part of the problem that the user is trying to solve. In this use case, AddConstraint is called outside of search (i.e., with state() == OUTSIDE_SEARCH). Most users should only use AddConstraint in this way. In this case, the constraint will belong to the model forever: it cannot not be removed by backtracking. - a rarer use case is that 'c' is not a real constraint of the model. It may be a constraint generated by a branching decision (a constraint whose goal is to restrict the search space), a symmetry breaking constraint (a constraint that does restrict the search space, but in a way that cannot have an impact on the quality of the solutions in the subtree), or an inferred constraint that, while having no semantic value to the model (it does not restrict the set of solutions), is worth having because we believe it may strengthen the propagation. In these cases, it happens that the constraint is added during the search (i.e., with state() == IN_SEARCH or state() == IN_ROOT_NODE). When a constraint is added during a search, it applies only to the subtree of the search tree rooted at the current node, and will be automatically removed by backtracking. This method does not take ownership of the constraint. If the constraint has been created by any factory method (Solver::MakeXXX), it will automatically be deleted. However, power users who implement their own constraints should do: solver.AddConstraint(solver.RevAlloc(new MyConstraint(...));"""
+        r"""
+        Adds the constraint 'c' to the model.
+
+        After calling this method, and until there is a backtrack that undoes the
+        addition, any assignment of variables to values must satisfy the given
+        constraint in order to be considered feasible. There are two fairly
+        different use cases:
+
+        - the most common use case is modeling: the given constraint is really
+        part of the problem that the user is trying to solve. In this use case,
+        AddConstraint is called outside of search (i.e., with state() ==
+        OUTSIDE_SEARCH). Most users should only use AddConstraint in this
+        way. In this case, the constraint will belong to the model forever: it
+        cannot not be removed by backtracking.
+
+        - a rarer use case is that 'c' is not a real constraint of the model. It
+        may be a constraint generated by a branching decision (a constraint whose
+        goal is to restrict the search space), a symmetry breaking constraint (a
+        constraint that does restrict the search space, but in a way that cannot
+        have an impact on the quality of the solutions in the subtree), or an
+        inferred constraint that, while having no semantic value to the model (it
+        does not restrict the set of solutions), is worth having because we
+        believe it may strengthen the propagation. In these cases, it happens
+        that the constraint is added during the search (i.e., with state() ==
+        IN_SEARCH or state() == IN_ROOT_NODE). When a constraint is
+        added during a search, it applies only to the subtree of the search tree
+        rooted at the current node, and will be automatically removed by
+        backtracking.
+
+        This method does not take ownership of the constraint. If the constraint
+        has been created by any factory method (Solver::MakeXXX), it will
+        automatically be deleted. However, power users who implement their own
+        constraints should do: solver.AddConstraint(solver.RevAlloc(new
+        MyConstraint(...));
+        """
         return _pywrapcp.Solver_AddConstraint(self, c)
 
-

Adds the constraint 'c' to the model. After calling this method, and until there is a backtrack that undoes the addition, any assignment of variables to values must satisfy the given constraint in order to be considered feasible. There are two fairly different use cases: - the most common use case is modeling: the given constraint is really part of the problem that the user is trying to solve. In this use case, AddConstraint is called outside of search (i.e., with state() == OUTSIDE_SEARCH). Most users should only use AddConstraint in this way. In this case, the constraint will belong to the model forever: it cannot not be removed by backtracking. - a rarer use case is that 'c' is not a real constraint of the model. It may be a constraint generated by a branching decision (a constraint whose goal is to restrict the search space), a symmetry breaking constraint (a constraint that does restrict the search space, but in a way that cannot have an impact on the quality of the solutions in the subtree), or an inferred constraint that, while having no semantic value to the model (it does not restrict the set of solutions), is worth having because we believe it may strengthen the propagation. In these cases, it happens that the constraint is added during the search (i.e., with state() == IN_SEARCH or state() == IN_ROOT_NODE). When a constraint is added during a search, it applies only to the subtree of the search tree rooted at the current node, and will be automatically removed by backtracking. This method does not take ownership of the constraint. If the constraint has been created by any factory method (Solver::MakeXXX), it will automatically be deleted. However, power users who implement their own constraints should do: solver.AddConstraint(solver.RevAlloc(new MyConstraint(...));

+

Adds the constraint 'c' to the model.

+ +

After calling this method, and until there is a backtrack that undoes the +addition, any assignment of variables to values must satisfy the given +constraint in order to be considered feasible. There are two fairly +different use cases:

+ +
    +
  • the most common use case is modeling: the given constraint is really +part of the problem that the user is trying to solve. In this use case, +AddConstraint is called outside of search (i.e., with state() == +OUTSIDE_SEARCH). Most users should only use AddConstraint in this +way. In this case, the constraint will belong to the model forever: it +cannot not be removed by backtracking.

  • +
  • a rarer use case is that 'c' is not a real constraint of the model. It +may be a constraint generated by a branching decision (a constraint whose +goal is to restrict the search space), a symmetry breaking constraint (a +constraint that does restrict the search space, but in a way that cannot +have an impact on the quality of the solutions in the subtree), or an +inferred constraint that, while having no semantic value to the model (it +does not restrict the set of solutions), is worth having because we +believe it may strengthen the propagation. In these cases, it happens +that the constraint is added during the search (i.e., with state() == +IN_SEARCH or state() == IN_ROOT_NODE). When a constraint is +added during a search, it applies only to the subtree of the search tree +rooted at the current node, and will be automatically removed by +backtracking.

  • +
+ +

This method does not take ownership of the constraint. If the constraint +has been created by any factory method (Solver::MakeXXX), it will +automatically be deleted. However, power users who implement their own +constraints should do: solver.AddConstraint(solver.RevAlloc(new +MyConstraint(...));

@@ -10220,13 +12885,19 @@ pywrapcp
View Source
    def CheckConstraint(self, ct: "Constraint") -> "bool":
-        r""" Checks whether adding this constraint will lead to an immediate failure. It will return false if the model is already inconsistent, or if adding the constraint makes it inconsistent."""
+        r"""
+        Checks whether adding this constraint will lead to an immediate
+        failure. It will return false if the model is already inconsistent, or if
+        adding the constraint makes it inconsistent.
+        """
         return _pywrapcp.Solver_CheckConstraint(self, ct)
 
-

Checks whether adding this constraint will lead to an immediate failure. It will return false if the model is already inconsistent, or if adding the constraint makes it inconsistent.

+

Checks whether adding this constraint will lead to an immediate +failure. It will return false if the model is already inconsistent, or if +adding the constraint makes it inconsistent.

@@ -10288,13 +12959,17 @@ pywrapcp
View Source
    def WallTime(self) -> "int64_t":
-        r""" DEPRECATED: Use Now() instead. Time elapsed, in ms since the creation of the solver."""
+        r"""
+        DEPRECATED: Use Now() instead.
+        Time elapsed, in ms since the creation of the solver.
+        """
         return _pywrapcp.Solver_WallTime(self)
 
-

DEPRECATED: Use Now() instead. Time elapsed, in ms since the creation of the solver.

+

DEPRECATED: Use Now() instead. +Time elapsed, in ms since the creation of the solver.

@@ -10398,13 +13073,17 @@ pywrapcp
View Source
    def Stamp(self) -> "uint64_t":
-        r""" The stamp indicates how many moves in the search tree we have performed. It is useful to detect if we need to update same lazy structures."""
+        r"""
+        The stamp indicates how many moves in the search tree we have performed.
+        It is useful to detect if we need to update same lazy structures.
+        """
         return _pywrapcp.Solver_Stamp(self)
 
-

The stamp indicates how many moves in the search tree we have performed. It is useful to detect if we need to update same lazy structures.

+

The stamp indicates how many moves in the search tree we have performed. +It is useful to detect if we need to update same lazy structures.

@@ -10656,13 +13335,25 @@ scalar product

View Source
    def MonotonicElement(self, values: "operations_research::Solver::IndexEvaluator1", increasing: "bool", index: "IntVar") -> "operations_research::IntExpr *":
-        r""" Function based element. The constraint takes ownership of the callback.  The callback must be monotonic. It must be able to cope with any possible value in the domain of 'index' (potentially negative ones too). Furtermore, monotonicity is not checked. Thus giving a non-monotonic function, or specifying an incorrect increasing parameter will result in undefined behavior."""
+        r"""
+        Function based element. The constraint takes ownership of the
+        callback.  The callback must be monotonic. It must be able to
+        cope with any possible value in the domain of 'index'
+        (potentially negative ones too). Furtermore, monotonicity is not
+        checked. Thus giving a non-monotonic function, or specifying an
+        incorrect increasing parameter will result in undefined behavior.
+        """
         return _pywrapcp.Solver_MonotonicElement(self, values, increasing, index)
 
-

Function based element. The constraint takes ownership of the callback. The callback must be monotonic. It must be able to cope with any possible value in the domain of 'index' (potentially negative ones too). Furtermore, monotonicity is not checked. Thus giving a non-monotonic function, or specifying an incorrect increasing parameter will result in undefined behavior.

+

Function based element. The constraint takes ownership of the +callback. The callback must be monotonic. It must be able to +cope with any possible value in the domain of 'index' +(potentially negative ones too). Furtermore, monotonicity is not +checked. Thus giving a non-monotonic function, or specifying an +incorrect increasing parameter will result in undefined behavior.

@@ -10690,7 +13381,9 @@ scalar product

| *Overload 3:* - Function-based element. The constraint takes ownership of the callback. The callback must be able to cope with any possible value in the domain of 'index' (potentially negative ones too). + Function-based element. The constraint takes ownership of the + callback. The callback must be able to cope with any possible + value in the domain of 'index' (potentially negative ones too). | @@ -10718,7 +13411,9 @@ values[index]

|

Overload 3: -Function-based element. The constraint takes ownership of the callback. The callback must be able to cope with any possible value in the domain of 'index' (potentially negative ones too).

+Function-based element. The constraint takes ownership of the +callback. The callback must be able to cope with any possible +value in the domain of 'index' (potentially negative ones too).

|

@@ -10748,13 +13443,17 @@ vars[expr]

View Source
    def IndexExpression(self, vars: "std::vector< operations_research::IntVar * > const &", value: "int64_t") -> "operations_research::IntExpr *":
-        r""" Returns the expression expr such that vars[expr] == value. It assumes that vars are all different."""
+        r"""
+        Returns the expression expr such that vars[expr] == value.
+        It assumes that vars are all different.
+        """
         return _pywrapcp.Solver_IndexExpression(self, vars, value)
 
-

Returns the expression expr such that vars[expr] == value. It assumes that vars are all different.

+

Returns the expression expr such that vars[expr] == value. +It assumes that vars are all different.

@@ -10916,13 +13615,17 @@ std::max(expr, value)

View Source
    def SemiContinuousExpr(self, expr: "IntExpr", fixed_charge: "int64_t", step: "int64_t") -> "operations_research::IntExpr *":
-        r""" Semi continuous Expression (x <= 0 -> f(x) = 0; x > 0 -> f(x) = ax + b) a >= 0 and b >= 0"""
+        r"""
+        Semi continuous Expression (x <= 0 -> f(x) = 0; x > 0 -> f(x) = ax + b)
+        a >= 0 and b >= 0
+        """
         return _pywrapcp.Solver_SemiContinuousExpr(self, expr, fixed_charge, step)
 
-

Semi continuous Expression (x <= 0 -> f(x) = 0; x > 0 -> f(x) = ax + b) a >= 0 and b >= 0

+

Semi continuous Expression (x <= 0 -> f(x) = 0; x > 0 -> f(x) = ax + b) +a >= 0 and b >= 0

@@ -11863,13 +14566,21 @@ std::max(expr, value)

View Source
    def IndexOfConstraint(self, vars: "std::vector< operations_research::IntVar * > const &", index: "IntVar", target: "int64_t") -> "operations_research::Constraint *":
-        r""" This constraint is a special case of the element constraint with an array of integer variables, where the variables are all different and the index variable is constrained such that vars[index] == target."""
+        r"""
+        This constraint is a special case of the element constraint with
+        an array of integer variables, where the variables are all
+        different and the index variable is constrained such that
+        vars[index] == target.
+        """
         return _pywrapcp.Solver_IndexOfConstraint(self, vars, index, target)
 
-

This constraint is a special case of the element constraint with an array of integer variables, where the variables are all different and the index variable is constrained such that vars[index] == target.

+

This constraint is a special case of the element constraint with +an array of integer variables, where the variables are all +different and the index variable is constrained such that +vars[index] == target.

@@ -11885,13 +14596,17 @@ std::max(expr, value)

View Source
    def ConstraintInitialPropagateCallback(self, ct: "Constraint") -> "operations_research::Demon *":
-        r""" This method is a specialized case of the MakeConstraintDemon method to call the InitiatePropagate of the constraint 'ct'."""
+        r"""
+        This method is a specialized case of the MakeConstraintDemon
+        method to call the InitiatePropagate of the constraint 'ct'.
+        """
         return _pywrapcp.Solver_ConstraintInitialPropagateCallback(self, ct)
 
-

This method is a specialized case of the MakeConstraintDemon method to call the InitiatePropagate of the constraint 'ct'.

+

This method is a specialized case of the MakeConstraintDemon +method to call the InitiatePropagate of the constraint 'ct'.

@@ -11907,13 +14622,19 @@ std::max(expr, value)

View Source
    def DelayedConstraintInitialPropagateCallback(self, ct: "Constraint") -> "operations_research::Demon *":
-        r""" This method is a specialized case of the MakeConstraintDemon method to call the InitiatePropagate of the constraint 'ct' with low priority."""
+        r"""
+        This method is a specialized case of the MakeConstraintDemon
+        method to call the InitiatePropagate of the constraint 'ct' with
+        low priority.
+        """
         return _pywrapcp.Solver_DelayedConstraintInitialPropagateCallback(self, ct)
 
-

This method is a specialized case of the MakeConstraintDemon method to call the InitiatePropagate of the constraint 'ct' with low priority.

+

This method is a specialized case of the MakeConstraintDemon +method to call the InitiatePropagate of the constraint 'ct' with +low priority.

@@ -12189,27 +14910,36 @@ expr should not be in the list of forbidden intervals [start[i]..end[i]].

| *Overload 4:* - Aggregated version of count with bounded cardinalities: forall j in 0 .. card_size - 1: card_min <= |{i | v[i] == j}| <= card_max + Aggregated version of count with bounded cardinalities: + forall j in 0 .. card_size - 1: card_min <= |{i | v[i] == j}| <= card_max | *Overload 5:* - Aggregated version of count with bounded cardinalities: forall j in 0 .. card_size - 1: card_min[j] <= |{i | v[i] == j}| <= card_max[j] + Aggregated version of count with bounded cardinalities: + forall j in 0 .. card_size - 1: + card_min[j] <= |{i | v[i] == j}| <= card_max[j] | *Overload 6:* - Aggregated version of count with bounded cardinalities: forall j in 0 .. card_size - 1: card_min[j] <= |{i | v[i] == j}| <= card_max[j] + Aggregated version of count with bounded cardinalities: + forall j in 0 .. card_size - 1: + card_min[j] <= |{i | v[i] == j}| <= card_max[j] | *Overload 7:* - Aggregated version of count with bounded cardinalities: forall j in 0 .. card_size - 1: card_min[j] <= |{i | v[i] == values[j]}| <= card_max[j] + Aggregated version of count with bounded cardinalities: + forall j in 0 .. card_size - 1: + card_min[j] <= |{i | v[i] == values[j]}| <= card_max[j] | *Overload 8:* - Aggregated version of count with bounded cardinalities: forall j in 0 .. card_size - 1: card_min[j] <= |{i | v[i] == values[j]}| <= card_max[j] + Aggregated version of count with bounded cardinalities: + forall j in 0 .. card_size - 1: + card_min[j] <= |{i | v[i] == values[j]}| <= card_max[j] """ return _pywrapcp.Solver_Distribute(self, *args)
@@ -12232,27 +14962,36 @@ Aggregated version of count: |{i | v[i] == j}| == cards[j]

|

Overload 4: -Aggregated version of count with bounded cardinalities: forall j in 0 .. card_size - 1: card_min <= |{i | v[i] == j}| <= card_max

+Aggregated version of count with bounded cardinalities: +forall j in 0 .. card_size - 1: card_min <= |{i | v[i] == j}| <= card_max

|

Overload 5: -Aggregated version of count with bounded cardinalities: forall j in 0 .. card_size - 1: card_min[j] <= |{i | v[i] == j}| <= card_max[j]

+Aggregated version of count with bounded cardinalities: +forall j in 0 .. card_size - 1: + card_min[j] <= |{i | v[i] == j}| <= card_max[j]

|

Overload 6: -Aggregated version of count with bounded cardinalities: forall j in 0 .. card_size - 1: card_min[j] <= |{i | v[i] == j}| <= card_max[j]

+Aggregated version of count with bounded cardinalities: +forall j in 0 .. card_size - 1: + card_min[j] <= |{i | v[i] == j}| <= card_max[j]

|

Overload 7: -Aggregated version of count with bounded cardinalities: forall j in 0 .. card_size - 1: card_min[j] <= |{i | v[i] == values[j]}| <= card_max[j]

+Aggregated version of count with bounded cardinalities: +forall j in 0 .. card_size - 1: + card_min[j] <= |{i | v[i] == values[j]}| <= card_max[j]

|

Overload 8: -Aggregated version of count with bounded cardinalities: forall j in 0 .. card_size - 1: card_min[j] <= |{i | v[i] == values[j]}| <= card_max[j]

+Aggregated version of count with bounded cardinalities: +forall j in 0 .. card_size - 1: + card_min[j] <= |{i | v[i] == values[j]}| <= card_max[j]

@@ -12273,13 +15012,21 @@ Aggregated version of count with bounded cardinalities: forall j in 0 .. card_si
View Source
    def Deviation(self, vars: "std::vector< operations_research::IntVar * > const &", deviation_var: "IntVar", total_sum: "int64_t") -> "operations_research::Constraint *":
-        r""" Deviation constraint: sum_i |n * vars[i] - total_sum| <= deviation_var and sum_i vars[i] == total_sum n = #vars"""
+        r"""
+        Deviation constraint:
+        sum_i |n * vars[i] - total_sum| <= deviation_var and
+        sum_i vars[i] == total_sum
+        n = #vars
+        """
         return _pywrapcp.Solver_Deviation(self, vars, deviation_var, total_sum)
 
-

Deviation constraint: sum_i |n * vars[i] - total_sum| <= deviation_var and sum_i vars[i] == total_sum n = #vars

+

Deviation constraint: +sum_i |n * vars[i] - total_sum| <= deviation_var and +sum_i vars[i] == total_sum +n = #vars

@@ -12297,12 +15044,15 @@ Aggregated version of count with bounded cardinalities: forall j in 0 .. card_si
    def AllDifferent(self, *args) -> "operations_research::Constraint *":
         r"""
         *Overload 1:*
-        All variables are pairwise different. This corresponds to the stronger version of the propagation algorithm.
+        All variables are pairwise different. This corresponds to the
+        stronger version of the propagation algorithm.
 
         |
 
         *Overload 2:*
-        All variables are pairwise different.  If 'stronger_propagation' is true, stronger, and potentially slower propagation will occur. This API will be deprecated in the future.
+        All variables are pairwise different.  If 'stronger_propagation'
+        is true, stronger, and potentially slower propagation will
+        occur. This API will be deprecated in the future.
         """
         return _pywrapcp.Solver_AllDifferent(self, *args)
 
@@ -12310,12 +15060,15 @@ Aggregated version of count with bounded cardinalities: forall j in 0 .. card_si

Overload 1: -All variables are pairwise different. This corresponds to the stronger version of the propagation algorithm.

+All variables are pairwise different. This corresponds to the +stronger version of the propagation algorithm.

|

Overload 2: -All variables are pairwise different. If 'stronger_propagation' is true, stronger, and potentially slower propagation will occur. This API will be deprecated in the future.

+All variables are pairwise different. If 'stronger_propagation' +is true, stronger, and potentially slower propagation will +occur. This API will be deprecated in the future.

@@ -12335,13 +15088,17 @@ All variables are pairwise different. If 'stronger_propagation' is true, strong
View Source
    def AllDifferentExcept(self, vars: "std::vector< operations_research::IntVar * > const &", escape_value: "int64_t") -> "operations_research::Constraint *":
-        r""" All variables are pairwise different, unless they are assigned to the escape value."""
+        r"""
+        All variables are pairwise different, unless they are assigned to
+        the escape value.
+        """
         return _pywrapcp.Solver_AllDifferentExcept(self, vars, escape_value)
 
-

All variables are pairwise different, unless they are assigned to the escape value.

+

All variables are pairwise different, unless they are assigned to +the escape value.

@@ -12361,13 +15118,46 @@ All variables are pairwise different. If 'stronger_propagation' is true, strong
View Source
    def SortingConstraint(self, vars: "std::vector< operations_research::IntVar * > const &", sorted: "std::vector< operations_research::IntVar * > const &") -> "operations_research::Constraint *":
-        r""" Creates a constraint binding the arrays of variables "vars" and "sorted_vars": sorted_vars[0] must be equal to the minimum of all variables in vars, and so on: the value of sorted_vars[i] must be equal to the i-th value of variables invars. This constraint propagates in both directions: from "vars" to "sorted_vars" and vice-versa. Behind the scenes, this constraint maintains that:   - sorted is always increasing.   - whatever the values of vars, there exists a permutation that     injects its values into the sorted variables. For more info, please have a look at:   https://mpi-inf.mpg.de/~mehlhorn/ftp/Mehlhorn-Thiel.pdf"""
+        r"""
+        Creates a constraint binding the arrays of variables "vars" and
+        "sorted_vars": sorted_vars[0] must be equal to the minimum of all
+        variables in vars, and so on: the value of sorted_vars[i] must be
+        equal to the i-th value of variables invars.
+
+        This constraint propagates in both directions: from "vars" to
+        "sorted_vars" and vice-versa.
+
+        Behind the scenes, this constraint maintains that:
+          - sorted is always increasing.
+          - whatever the values of vars, there exists a permutation that
+            injects its values into the sorted variables.
+
+        For more info, please have a look at:
+          https://mpi-inf.mpg.de/~mehlhorn/ftp/Mehlhorn-Thiel.pdf
+        """
         return _pywrapcp.Solver_SortingConstraint(self, vars, sorted)
 
-

Creates a constraint binding the arrays of variables "vars" and "sorted_vars": sorted_vars[0] must be equal to the minimum of all variables in vars, and so on: the value of sorted_vars[i] must be equal to the i-th value of variables invars. This constraint propagates in both directions: from "vars" to "sorted_vars" and vice-versa. Behind the scenes, this constraint maintains that: - sorted is always increasing. - whatever the values of vars, there exists a permutation that injects its values into the sorted variables. For more info, please have a look at: https://mpi-inf.mpg.de/~mehlhorn/ftp/Mehlhorn-Thiel.pdf

+

Creates a constraint binding the arrays of variables "vars" and +"sorted_vars": sorted_vars[0] must be equal to the minimum of all +variables in vars, and so on: the value of sorted_vars[i] must be +equal to the i-th value of variables invars.

+ +

This constraint propagates in both directions: from "vars" to +"sorted_vars" and vice-versa.

+ +

Behind the scenes, this constraint maintains that:

+ +
    +
  • sorted is always increasing.
  • +
  • whatever the values of vars, there exists a permutation that +injects its values into the sorted variables.
  • +
+ +

For more info, please have a look at: + https://mpi-inf.mpg.de/~mehlhorn/ftp/Mehlhorn-Thiel.pdf

@@ -12387,13 +15177,17 @@ All variables are pairwise different. If 'stronger_propagation' is true, strong
View Source
    def LexicalLess(self, left: "std::vector< operations_research::IntVar * > const &", right: "std::vector< operations_research::IntVar * > const &") -> "operations_research::Constraint *":
-        r""" Creates a constraint that enforces that left is lexicographically less than right."""
+        r"""
+        Creates a constraint that enforces that left is lexicographically less
+        than right.
+        """
         return _pywrapcp.Solver_LexicalLess(self, left, right)
 
-

Creates a constraint that enforces that left is lexicographically less than right.

+

Creates a constraint that enforces that left is lexicographically less +than right.

@@ -12413,13 +15207,17 @@ All variables are pairwise different. If 'stronger_propagation' is true, strong
View Source
    def LexicalLessOrEqual(self, left: "std::vector< operations_research::IntVar * > const &", right: "std::vector< operations_research::IntVar * > const &") -> "operations_research::Constraint *":
-        r""" Creates a constraint that enforces that left is lexicographically less than or equal to right."""
+        r"""
+        Creates a constraint that enforces that left is lexicographically less
+        than or equal to right.
+        """
         return _pywrapcp.Solver_LexicalLessOrEqual(self, left, right)
 
-

Creates a constraint that enforces that left is lexicographically less than or equal to right.

+

Creates a constraint that enforces that left is lexicographically less +than or equal to right.

@@ -12439,13 +15237,21 @@ All variables are pairwise different. If 'stronger_propagation' is true, strong
View Source
    def InversePermutationConstraint(self, left: "std::vector< operations_research::IntVar * > const &", right: "std::vector< operations_research::IntVar * > const &") -> "operations_research::Constraint *":
-        r""" Creates a constraint that enforces that 'left' and 'right' both represent permutations of [0..left.size()-1], and that 'right' is the inverse permutation of 'left', i.e. for all i in [0..left.size()-1], right[left[i]] = i."""
+        r"""
+        Creates a constraint that enforces that 'left' and 'right' both
+        represent permutations of [0..left.size()-1], and that 'right' is
+        the inverse permutation of 'left', i.e. for all i in
+        [0..left.size()-1], right[left[i]] = i.
+        """
         return _pywrapcp.Solver_InversePermutationConstraint(self, left, right)
 
-

Creates a constraint that enforces that 'left' and 'right' both represent permutations of [0..left.size()-1], and that 'right' is the inverse permutation of 'left', i.e. for all i in [0..left.size()-1], right[left[i]] = i.

+

Creates a constraint that enforces that 'left' and 'right' both +represent permutations of [0..left.size()-1], and that 'right' is +the inverse permutation of 'left', i.e. for all i in +[0..left.size()-1], right[left[i]] = i.

@@ -12465,13 +15271,21 @@ All variables are pairwise different. If 'stronger_propagation' is true, strong
View Source
    def NullIntersect(self, first_vars: "std::vector< operations_research::IntVar * > const &", second_vars: "std::vector< operations_research::IntVar * > const &") -> "operations_research::Constraint *":
-        r""" Creates a constraint that states that all variables in the first vector are different from all variables in the second group. Thus the set of values in the first vector does not intersect with the set of values in the second vector."""
+        r"""
+        Creates a constraint that states that all variables in the first
+        vector are different from all variables in the second
+        group. Thus the set of values in the first vector does not
+        intersect with the set of values in the second vector.
+        """
         return _pywrapcp.Solver_NullIntersect(self, first_vars, second_vars)
 
-

Creates a constraint that states that all variables in the first vector are different from all variables in the second group. Thus the set of values in the first vector does not intersect with the set of values in the second vector.

+

Creates a constraint that states that all variables in the first +vector are different from all variables in the second +group. Thus the set of values in the first vector does not +intersect with the set of values in the second vector.

@@ -12492,13 +15306,23 @@ All variables are pairwise different. If 'stronger_propagation' is true, strong
View Source
    def NullIntersectExcept(self, first_vars: "std::vector< operations_research::IntVar * > const &", second_vars: "std::vector< operations_research::IntVar * > const &", escape_value: "int64_t") -> "operations_research::Constraint *":
-        r""" Creates a constraint that states that all variables in the first vector are different from all variables from the second group, unless they are assigned to the escape value. Thus the set of values in the first vector minus the escape value does not intersect with the set of values in the second vector."""
+        r"""
+        Creates a constraint that states that all variables in the first
+        vector are different from all variables from the second group,
+        unless they are assigned to the escape value. Thus the set of
+        values in the first vector minus the escape value does not
+        intersect with the set of values in the second vector.
+        """
         return _pywrapcp.Solver_NullIntersectExcept(self, first_vars, second_vars, escape_value)
 
-

Creates a constraint that states that all variables in the first vector are different from all variables from the second group, unless they are assigned to the escape value. Thus the set of values in the first vector minus the escape value does not intersect with the set of values in the second vector.

+

Creates a constraint that states that all variables in the first +vector are different from all variables from the second group, +unless they are assigned to the escape value. Thus the set of +values in the first vector minus the escape value does not +intersect with the set of values in the second vector.

@@ -12542,13 +15366,17 @@ All variables are pairwise different. If 'stronger_propagation' is true, strong
View Source
    def SubCircuit(self, nexts: "std::vector< operations_research::IntVar * > const &") -> "operations_research::Constraint *":
-        r""" Force the "nexts" variable to create a complete Hamiltonian path for those that do not loop upon themselves."""
+        r"""
+        Force the "nexts" variable to create a complete Hamiltonian path
+        for those that do not loop upon themselves.
+        """
         return _pywrapcp.Solver_SubCircuit(self, nexts)
 
-

Force the "nexts" variable to create a complete Hamiltonian path for those that do not loop upon themselves.

+

Force the "nexts" variable to create a complete Hamiltonian path +for those that do not loop upon themselves.

@@ -12570,13 +15398,17 @@ All variables are pairwise different. If 'stronger_propagation' is true, strong
View Source
    def DelayedPathCumul(self, nexts: "std::vector< operations_research::IntVar * > const &", active: "std::vector< operations_research::IntVar * > const &", cumuls: "std::vector< operations_research::IntVar * > const &", transits: "std::vector< operations_research::IntVar * > const &") -> "operations_research::Constraint *":
-        r""" Delayed version of the same constraint: propagation on the nexts variables is delayed until all constraints have propagated."""
+        r"""
+        Delayed version of the same constraint: propagation on the nexts variables
+        is delayed until all constraints have propagated.
+        """
         return _pywrapcp.Solver_DelayedPathCumul(self, nexts, active, cumuls, transits)
 
-

Delayed version of the same constraint: propagation on the nexts variables is delayed until all constraints have propagated.

+

Delayed version of the same constraint: propagation on the nexts variables +is delayed until all constraints have propagated.

@@ -12594,17 +15426,30 @@ All variables are pairwise different. If 'stronger_propagation' is true, strong
    def PathCumul(self, *args) -> "operations_research::Constraint *":
         r"""
         *Overload 1:*
-        Creates a constraint which accumulates values along a path such that: cumuls[next[i]] = cumuls[i] + transits[i]. Active variables indicate if the corresponding next variable is active; this could be useful to model unperformed nodes in a routing problem.
+        Creates a constraint which accumulates values along a path such that:
+        cumuls[next[i]] = cumuls[i] + transits[i].
+        Active variables indicate if the corresponding next variable is active;
+        this could be useful to model unperformed nodes in a routing problem.
 
         |
 
         *Overload 2:*
-        Creates a constraint which accumulates values along a path such that: cumuls[next[i]] = cumuls[i] + transit_evaluator(i, next[i]). Active variables indicate if the corresponding next variable is active; this could be useful to model unperformed nodes in a routing problem. Ownership of transit_evaluator is taken and it must be a repeatable callback.
+        Creates a constraint which accumulates values along a path such that:
+        cumuls[next[i]] = cumuls[i] + transit_evaluator(i, next[i]).
+        Active variables indicate if the corresponding next variable is active;
+        this could be useful to model unperformed nodes in a routing problem.
+        Ownership of transit_evaluator is taken and it must be a repeatable
+        callback.
 
         |
 
         *Overload 3:*
-        Creates a constraint which accumulates values along a path such that: cumuls[next[i]] = cumuls[i] + transit_evaluator(i, next[i]) + slacks[i]. Active variables indicate if the corresponding next variable is active; this could be useful to model unperformed nodes in a routing problem. Ownership of transit_evaluator is taken and it must be a repeatable callback.
+        Creates a constraint which accumulates values along a path such that:
+        cumuls[next[i]] = cumuls[i] + transit_evaluator(i, next[i]) + slacks[i].
+        Active variables indicate if the corresponding next variable is active;
+        this could be useful to model unperformed nodes in a routing problem.
+        Ownership of transit_evaluator is taken and it must be a repeatable
+        callback.
         """
         return _pywrapcp.Solver_PathCumul(self, *args)
 
@@ -12612,17 +15457,30 @@ All variables are pairwise different. If 'stronger_propagation' is true, strong

Overload 1: -Creates a constraint which accumulates values along a path such that: cumuls[next[i]] = cumuls[i] + transits[i]. Active variables indicate if the corresponding next variable is active; this could be useful to model unperformed nodes in a routing problem.

+Creates a constraint which accumulates values along a path such that: +cumuls[next[i]] = cumuls[i] + transits[i]. +Active variables indicate if the corresponding next variable is active; +this could be useful to model unperformed nodes in a routing problem.

|

Overload 2: -Creates a constraint which accumulates values along a path such that: cumuls[next[i]] = cumuls[i] + transit_evaluator(i, next[i]). Active variables indicate if the corresponding next variable is active; this could be useful to model unperformed nodes in a routing problem. Ownership of transit_evaluator is taken and it must be a repeatable callback.

+Creates a constraint which accumulates values along a path such that: +cumuls[next[i]] = cumuls[i] + transit_evaluator(i, next[i]). +Active variables indicate if the corresponding next variable is active; +this could be useful to model unperformed nodes in a routing problem. +Ownership of transit_evaluator is taken and it must be a repeatable +callback.

|

Overload 3: -Creates a constraint which accumulates values along a path such that: cumuls[next[i]] = cumuls[i] + transit_evaluator(i, next[i]) + slacks[i]. Active variables indicate if the corresponding next variable is active; this could be useful to model unperformed nodes in a routing problem. Ownership of transit_evaluator is taken and it must be a repeatable callback.

+Creates a constraint which accumulates values along a path such that: +cumuls[next[i]] = cumuls[i] + transit_evaluator(i, next[i]) + slacks[i]. +Active variables indicate if the corresponding next variable is active; +this could be useful to model unperformed nodes in a routing problem. +Ownership of transit_evaluator is taken and it must be a repeatable +callback.

@@ -12640,7 +15498,10 @@ Creates a constraint which accumulates values along a path such that: cumuls[nex
    def AllowedAssignments(self, *args) -> "operations_research::Constraint *":
         r"""
         *Overload 1:*
-        This method creates a constraint where the graph of the relation between the variables is given in extension. There are 'arity' variables involved in the relation and the graph is given by a integer tuple set.
+        This method creates a constraint where the graph of the relation
+        between the variables is given in extension. There are 'arity'
+        variables involved in the relation and the graph is given by a
+        integer tuple set.
 
         |
 
@@ -12653,7 +15514,10 @@ Creates a constraint which accumulates values along a path such that: cumuls[nex
         
 
             

Overload 1: -This method creates a constraint where the graph of the relation between the variables is given in extension. There are 'arity' variables involved in the relation and the graph is given by a integer tuple set.

+This method creates a constraint where the graph of the relation +between the variables is given in extension. There are 'arity' +variables involved in the relation and the graph is given by a +integer tuple set.

|

@@ -12716,13 +15580,23 @@ Compatibility layer for Python API.

View Source
    def Pack(self, vars: "std::vector< operations_research::IntVar * > const &", number_of_bins: "int") -> "operations_research::Pack *":
-        r""" This constraint packs all variables onto 'number_of_bins' variables.  For any given variable, a value of 'number_of_bins' indicates that the variable is not assigned to any bin. Dimensions, i.e., cumulative constraints on this packing, can be added directly from the pack class."""
+        r"""
+        This constraint packs all variables onto 'number_of_bins'
+        variables.  For any given variable, a value of 'number_of_bins'
+        indicates that the variable is not assigned to any bin.
+        Dimensions, i.e., cumulative constraints on this packing, can be
+        added directly from the pack class.
+        """
         return _pywrapcp.Solver_Pack(self, vars, number_of_bins)
 
-

This constraint packs all variables onto 'number_of_bins' variables. For any given variable, a value of 'number_of_bins' indicates that the variable is not assigned to any bin. Dimensions, i.e., cumulative constraints on this packing, can be added directly from the pack class.

+

This constraint packs all variables onto 'number_of_bins' +variables. For any given variable, a value of 'number_of_bins' +indicates that the variable is not assigned to any bin. +Dimensions, i.e., cumulative constraints on this packing, can be +added directly from the pack class.

@@ -12740,17 +15614,22 @@ Compatibility layer for Python API.

    def FixedDurationIntervalVar(self, *args) -> "operations_research::IntervalVar *":
         r"""
         *Overload 1:*
-        Creates an interval var with a fixed duration. The duration must be greater than 0. If optional is true, then the interval can be performed or unperformed. If optional is false, then the interval is always performed.
+        Creates an interval var with a fixed duration. The duration must
+        be greater than 0. If optional is true, then the interval can be
+        performed or unperformed. If optional is false, then the interval
+        is always performed.
 
         |
 
         *Overload 2:*
-        Creates a performed interval var with a fixed duration. The duration must be greater than 0.
+        Creates a performed interval var with a fixed duration. The duration must
+        be greater than 0.
 
         |
 
         *Overload 3:*
-        Creates an interval var with a fixed duration, and performed_variable. The duration must be greater than 0.
+        Creates an interval var with a fixed duration, and performed_variable.
+        The duration must be greater than 0.
         """
         return _pywrapcp.Solver_FixedDurationIntervalVar(self, *args)
 
@@ -12758,17 +15637,22 @@ Compatibility layer for Python API.

Overload 1: -Creates an interval var with a fixed duration. The duration must be greater than 0. If optional is true, then the interval can be performed or unperformed. If optional is false, then the interval is always performed.

+Creates an interval var with a fixed duration. The duration must +be greater than 0. If optional is true, then the interval can be +performed or unperformed. If optional is false, then the interval +is always performed.

|

Overload 2: -Creates a performed interval var with a fixed duration. The duration must be greater than 0.

+Creates a performed interval var with a fixed duration. The duration must +be greater than 0.

|

Overload 3: -Creates an interval var with a fixed duration, and performed_variable. The duration must be greater than 0.

+Creates an interval var with a fixed duration, and performed_variable. +The duration must be greater than 0.

@@ -12821,13 +15705,17 @@ Creates an interval var with a fixed duration, and performed_variable. The durat
View Source
    def IntervalVar(self, start_min: "int64_t", start_max: "int64_t", duration_min: "int64_t", duration_max: "int64_t", end_min: "int64_t", end_max: "int64_t", optional: "bool", name: "std::string const &") -> "operations_research::IntervalVar *":
-        r""" Creates an interval var by specifying the bounds on start, duration, and end."""
+        r"""
+        Creates an interval var by specifying the bounds on start,
+        duration, and end.
+        """
         return _pywrapcp.Solver_IntervalVar(self, start_min, start_max, duration_min, duration_max, end_min, end_max, optional, name)
 
-

Creates an interval var by specifying the bounds on start, duration, and end.

+

Creates an interval var by specifying the bounds on start, +duration, and end.

@@ -12846,13 +15734,17 @@ Creates an interval var with a fixed duration, and performed_variable. The durat
View Source
    def MirrorInterval(self, interval_var: "IntervalVar") -> "operations_research::IntervalVar *":
-        r""" Creates an interval var that is the mirror image of the given one, that is, the interval var obtained by reversing the axis."""
+        r"""
+        Creates an interval var that is the mirror image of the given one, that
+        is, the interval var obtained by reversing the axis.
+        """
         return _pywrapcp.Solver_MirrorInterval(self, interval_var)
 
-

Creates an interval var that is the mirror image of the given one, that is, the interval var obtained by reversing the axis.

+

Creates an interval var that is the mirror image of the given one, that +is, the interval var obtained by reversing the axis.

@@ -12873,13 +15765,21 @@ Creates an interval var with a fixed duration, and performed_variable. The durat
View Source
    def FixedDurationStartSyncedOnStartIntervalVar(self, interval_var: "IntervalVar", duration: "int64_t", offset: "int64_t") -> "operations_research::IntervalVar *":
-        r""" Creates an interval var with a fixed duration whose start is synchronized with the start of another interval, with a given offset. The performed status is also in sync with the performed status of the given interval variable."""
+        r"""
+        Creates an interval var with a fixed duration whose start is
+        synchronized with the start of another interval, with a given
+        offset. The performed status is also in sync with the performed
+        status of the given interval variable.
+        """
         return _pywrapcp.Solver_FixedDurationStartSyncedOnStartIntervalVar(self, interval_var, duration, offset)
 
-

Creates an interval var with a fixed duration whose start is synchronized with the start of another interval, with a given offset. The performed status is also in sync with the performed status of the given interval variable.

+

Creates an interval var with a fixed duration whose start is +synchronized with the start of another interval, with a given +offset. The performed status is also in sync with the performed +status of the given interval variable.

@@ -12900,13 +15800,21 @@ Creates an interval var with a fixed duration, and performed_variable. The durat
View Source
    def FixedDurationStartSyncedOnEndIntervalVar(self, interval_var: "IntervalVar", duration: "int64_t", offset: "int64_t") -> "operations_research::IntervalVar *":
-        r""" Creates an interval var with a fixed duration whose start is synchronized with the end of another interval, with a given offset. The performed status is also in sync with the performed status of the given interval variable."""
+        r"""
+        Creates an interval var with a fixed duration whose start is
+        synchronized with the end of another interval, with a given
+        offset. The performed status is also in sync with the performed
+        status of the given interval variable.
+        """
         return _pywrapcp.Solver_FixedDurationStartSyncedOnEndIntervalVar(self, interval_var, duration, offset)
 
-

Creates an interval var with a fixed duration whose start is synchronized with the end of another interval, with a given offset. The performed status is also in sync with the performed status of the given interval variable.

+

Creates an interval var with a fixed duration whose start is +synchronized with the end of another interval, with a given +offset. The performed status is also in sync with the performed +status of the given interval variable.

@@ -12927,13 +15835,21 @@ Creates an interval var with a fixed duration, and performed_variable. The durat
View Source
    def FixedDurationEndSyncedOnStartIntervalVar(self, interval_var: "IntervalVar", duration: "int64_t", offset: "int64_t") -> "operations_research::IntervalVar *":
-        r""" Creates an interval var with a fixed duration whose end is synchronized with the start of another interval, with a given offset. The performed status is also in sync with the performed status of the given interval variable."""
+        r"""
+        Creates an interval var with a fixed duration whose end is
+        synchronized with the start of another interval, with a given
+        offset. The performed status is also in sync with the performed
+        status of the given interval variable.
+        """
         return _pywrapcp.Solver_FixedDurationEndSyncedOnStartIntervalVar(self, interval_var, duration, offset)
 
-

Creates an interval var with a fixed duration whose end is synchronized with the start of another interval, with a given offset. The performed status is also in sync with the performed status of the given interval variable.

+

Creates an interval var with a fixed duration whose end is +synchronized with the start of another interval, with a given +offset. The performed status is also in sync with the performed +status of the given interval variable.

@@ -12954,13 +15870,21 @@ Creates an interval var with a fixed duration, and performed_variable. The durat
View Source
    def FixedDurationEndSyncedOnEndIntervalVar(self, interval_var: "IntervalVar", duration: "int64_t", offset: "int64_t") -> "operations_research::IntervalVar *":
-        r""" Creates an interval var with a fixed duration whose end is synchronized with the end of another interval, with a given offset. The performed status is also in sync with the performed status of the given interval variable."""
+        r"""
+        Creates an interval var with a fixed duration whose end is
+        synchronized with the end of another interval, with a given
+        offset. The performed status is also in sync with the performed
+        status of the given interval variable.
+        """
         return _pywrapcp.Solver_FixedDurationEndSyncedOnEndIntervalVar(self, interval_var, duration, offset)
 
-

Creates an interval var with a fixed duration whose end is synchronized with the end of another interval, with a given offset. The performed status is also in sync with the performed status of the given interval variable.

+

Creates an interval var with a fixed duration whose end is +synchronized with the end of another interval, with a given +offset. The performed status is also in sync with the performed +status of the given interval variable.

@@ -12979,13 +15903,47 @@ Creates an interval var with a fixed duration, and performed_variable. The durat
View Source
    def IntervalRelaxedMin(self, interval_var: "IntervalVar") -> "operations_research::IntervalVar *":
-        r""" Creates and returns an interval variable that wraps around the given one, relaxing the min start and end. Relaxing means making unbounded when optional. If the variable is non-optional, this method returns interval_var. More precisely, such an interval variable behaves as follows: * When the underlying must be performed, the returned interval variable     behaves exactly as the underlying; * When the underlying may or may not be performed, the returned interval     variable behaves like the underlying, except that it is unbounded on     the min side; * When the underlying cannot be performed, the returned interval variable     is of duration 0 and must be performed in an interval unbounded on     both sides. This is very useful to implement propagators that may only modify the start max or end max."""
+        r"""
+         Creates and returns an interval variable that wraps around the given one,
+         relaxing the min start and end. Relaxing means making unbounded when
+         optional. If the variable is non-optional, this method returns
+         interval_var.
+
+         More precisely, such an interval variable behaves as follows:
+        When the underlying must be performed, the returned interval variable
+             behaves exactly as the underlying;
+        When the underlying may or may not be performed, the returned interval
+             variable behaves like the underlying, except that it is unbounded on
+             the min side;
+        When the underlying cannot be performed, the returned interval variable
+             is of duration 0 and must be performed in an interval unbounded on
+             both sides.
+
+         This is very useful to implement propagators that may only modify
+         the start max or end max.
+        """
         return _pywrapcp.Solver_IntervalRelaxedMin(self, interval_var)
 
-

Creates and returns an interval variable that wraps around the given one, relaxing the min start and end. Relaxing means making unbounded when optional. If the variable is non-optional, this method returns interval_var. More precisely, such an interval variable behaves as follows: * When the underlying must be performed, the returned interval variable behaves exactly as the underlying; * When the underlying may or may not be performed, the returned interval variable behaves like the underlying, except that it is unbounded on the min side; * When the underlying cannot be performed, the returned interval variable is of duration 0 and must be performed in an interval unbounded on both sides. This is very useful to implement propagators that may only modify the start max or end max.

+

Creates and returns an interval variable that wraps around the given one, + relaxing the min start and end. Relaxing means making unbounded when + optional. If the variable is non-optional, this method returns + interval_var.

+ +

More precisely, such an interval variable behaves as follows: +When the underlying must be performed, the returned interval variable + behaves exactly as the underlying; +When the underlying may or may not be performed, the returned interval + variable behaves like the underlying, except that it is unbounded on + the min side; +When the underlying cannot be performed, the returned interval variable + is of duration 0 and must be performed in an interval unbounded on + both sides.

+ +

This is very useful to implement propagators that may only modify + the start max or end max.

@@ -13004,13 +15962,47 @@ Creates an interval var with a fixed duration, and performed_variable. The durat
View Source
    def IntervalRelaxedMax(self, interval_var: "IntervalVar") -> "operations_research::IntervalVar *":
-        r""" Creates and returns an interval variable that wraps around the given one, relaxing the max start and end. Relaxing means making unbounded when optional. If the variable is non optional, this method returns interval_var. More precisely, such an interval variable behaves as follows: * When the underlying must be performed, the returned interval variable     behaves exactly as the underlying; * When the underlying may or may not be performed, the returned interval     variable behaves like the underlying, except that it is unbounded on     the max side; * When the underlying cannot be performed, the returned interval variable     is of duration 0 and must be performed in an interval unbounded on     both sides. This is very useful for implementing propagators that may only modify the start min or end min."""
+        r"""
+         Creates and returns an interval variable that wraps around the given one,
+         relaxing the max start and end. Relaxing means making unbounded when
+         optional. If the variable is non optional, this method returns
+         interval_var.
+
+         More precisely, such an interval variable behaves as follows:
+        When the underlying must be performed, the returned interval variable
+             behaves exactly as the underlying;
+        When the underlying may or may not be performed, the returned interval
+             variable behaves like the underlying, except that it is unbounded on
+             the max side;
+        When the underlying cannot be performed, the returned interval variable
+             is of duration 0 and must be performed in an interval unbounded on
+             both sides.
+
+         This is very useful for implementing propagators that may only modify
+         the start min or end min.
+        """
         return _pywrapcp.Solver_IntervalRelaxedMax(self, interval_var)
 
-

Creates and returns an interval variable that wraps around the given one, relaxing the max start and end. Relaxing means making unbounded when optional. If the variable is non optional, this method returns interval_var. More precisely, such an interval variable behaves as follows: * When the underlying must be performed, the returned interval variable behaves exactly as the underlying; * When the underlying may or may not be performed, the returned interval variable behaves like the underlying, except that it is unbounded on the max side; * When the underlying cannot be performed, the returned interval variable is of duration 0 and must be performed in an interval unbounded on both sides. This is very useful for implementing propagators that may only modify the start min or end min.

+

Creates and returns an interval variable that wraps around the given one, + relaxing the max start and end. Relaxing means making unbounded when + optional. If the variable is non optional, this method returns + interval_var.

+ +

More precisely, such an interval variable behaves as follows: +When the underlying must be performed, the returned interval variable + behaves exactly as the underlying; +When the underlying may or may not be performed, the returned interval + variable behaves like the underlying, except that it is unbounded on + the max side; +When the underlying cannot be performed, the returned interval variable + is of duration 0 and must be performed in an interval unbounded on + both sides.

+ +

This is very useful for implementing propagators that may only modify + the start min or end min.

@@ -13028,12 +16020,15 @@ Creates an interval var with a fixed duration, and performed_variable. The durat
    def TemporalDisjunction(self, *args) -> "operations_research::Constraint *":
         r"""
         *Overload 1:*
-        This constraint implements a temporal disjunction between two interval vars t1 and t2. 'alt' indicates which alternative was chosen (alt == 0 is equivalent to t1 before t2).
+        This constraint implements a temporal disjunction between two
+        interval vars t1 and t2. 'alt' indicates which alternative was
+        chosen (alt == 0 is equivalent to t1 before t2).
 
         |
 
         *Overload 2:*
-        This constraint implements a temporal disjunction between two interval vars.
+        This constraint implements a temporal disjunction between two
+        interval vars.
         """
         return _pywrapcp.Solver_TemporalDisjunction(self, *args)
 
@@ -13041,12 +16036,15 @@ Creates an interval var with a fixed duration, and performed_variable. The durat

Overload 1: -This constraint implements a temporal disjunction between two interval vars t1 and t2. 'alt' indicates which alternative was chosen (alt == 0 is equivalent to t1 before t2).

+This constraint implements a temporal disjunction between two +interval vars t1 and t2. 'alt' indicates which alternative was +chosen (alt == 0 is equivalent to t1 before t2).

|

Overload 2: -This constraint implements a temporal disjunction between two interval vars.

+This constraint implements a temporal disjunction between two +interval vars.

@@ -13066,13 +16064,17 @@ This constraint implements a temporal disjunction between two interval vars.

View Source
    def DisjunctiveConstraint(self, intervals: "std::vector< operations_research::IntervalVar * > const &", name: "std::string const &") -> "operations_research::DisjunctiveConstraint *":
-        r""" This constraint forces all interval vars into an non-overlapping sequence. Intervals with zero duration can be scheduled anywhere."""
+        r"""
+        This constraint forces all interval vars into an non-overlapping
+        sequence. Intervals with zero duration can be scheduled anywhere.
+        """
         return _pywrapcp.Solver_DisjunctiveConstraint(self, intervals, name)
 
-

This constraint forces all interval vars into an non-overlapping sequence. Intervals with zero duration can be scheduled anywhere.

+

This constraint forces all interval vars into an non-overlapping +sequence. Intervals with zero duration can be scheduled anywhere.

@@ -13090,32 +16092,76 @@ This constraint implements a temporal disjunction between two interval vars.

    def Cumulative(self, *args) -> "operations_research::Constraint *":
         r"""
         *Overload 1:*
-        This constraint forces that, for any integer t, the sum of the demands corresponding to an interval containing t does not exceed the given capacity. Intervals and demands should be vectors of equal size. Demands should only contain non-negative values. Zero values are supported, and the corresponding intervals are filtered out, as they neither impact nor are impacted by this constraint.
+        This constraint forces that, for any integer t, the sum of the demands
+        corresponding to an interval containing t does not exceed the given
+        capacity.
+
+        Intervals and demands should be vectors of equal size.
+
+        Demands should only contain non-negative values. Zero values are
+        supported, and the corresponding intervals are filtered out, as they
+        neither impact nor are impacted by this constraint.
 
         |
 
         *Overload 2:*
-        This constraint forces that, for any integer t, the sum of the demands corresponding to an interval containing t does not exceed the given capacity. Intervals and demands should be vectors of equal size. Demands should only contain non-negative values. Zero values are supported, and the corresponding intervals are filtered out, as they neither impact nor are impacted by this constraint.
+        This constraint forces that, for any integer t, the sum of the demands
+        corresponding to an interval containing t does not exceed the given
+        capacity.
+
+        Intervals and demands should be vectors of equal size.
+
+        Demands should only contain non-negative values. Zero values are
+        supported, and the corresponding intervals are filtered out, as they
+        neither impact nor are impacted by this constraint.
 
         |
 
         *Overload 3:*
-        This constraint forces that, for any integer t, the sum of the demands corresponding to an interval containing t does not exceed the given capacity. Intervals and demands should be vectors of equal size. Demands should only contain non-negative values. Zero values are supported, and the corresponding intervals are filtered out, as they neither impact nor are impacted by this constraint.
+        This constraint forces that, for any integer t, the sum of the demands
+        corresponding to an interval containing t does not exceed the given
+        capacity.
+
+        Intervals and demands should be vectors of equal size.
+
+        Demands should only contain non-negative values. Zero values are
+        supported, and the corresponding intervals are filtered out, as they
+        neither impact nor are impacted by this constraint.
 
         |
 
         *Overload 4:*
-        This constraint enforces that, for any integer t, the sum of the demands corresponding to an interval containing t does not exceed the given capacity. Intervals and demands should be vectors of equal size. Demands should only contain non-negative values. Zero values are supported, and the corresponding intervals are filtered out, as they neither impact nor are impacted by this constraint.
+        This constraint enforces that, for any integer t, the sum of the demands
+        corresponding to an interval containing t does not exceed the given
+        capacity.
+
+        Intervals and demands should be vectors of equal size.
+
+        Demands should only contain non-negative values. Zero values are
+        supported, and the corresponding intervals are filtered out, as they
+        neither impact nor are impacted by this constraint.
 
         |
 
         *Overload 5:*
-        This constraint enforces that, for any integer t, the sum of demands corresponding to an interval containing t does not exceed the given capacity. Intervals and demands should be vectors of equal size. Demands should be positive.
+        This constraint enforces that, for any integer t, the sum of demands
+        corresponding to an interval containing t does not exceed the given
+        capacity.
+
+        Intervals and demands should be vectors of equal size.
+
+        Demands should be positive.
 
         |
 
         *Overload 6:*
-        This constraint enforces that, for any integer t, the sum of demands corresponding to an interval containing t does not exceed the given capacity. Intervals and demands should be vectors of equal size. Demands should be positive.
+        This constraint enforces that, for any integer t, the sum of demands
+        corresponding to an interval containing t does not exceed the given
+        capacity.
+
+        Intervals and demands should be vectors of equal size.
+
+        Demands should be positive.
         """
         return _pywrapcp.Solver_Cumulative(self, *args)
 
@@ -13123,32 +16169,76 @@ This constraint implements a temporal disjunction between two interval vars.

Overload 1: -This constraint forces that, for any integer t, the sum of the demands corresponding to an interval containing t does not exceed the given capacity. Intervals and demands should be vectors of equal size. Demands should only contain non-negative values. Zero values are supported, and the corresponding intervals are filtered out, as they neither impact nor are impacted by this constraint.

+This constraint forces that, for any integer t, the sum of the demands +corresponding to an interval containing t does not exceed the given +capacity.

+ +

Intervals and demands should be vectors of equal size.

+ +

Demands should only contain non-negative values. Zero values are +supported, and the corresponding intervals are filtered out, as they +neither impact nor are impacted by this constraint.

|

Overload 2: -This constraint forces that, for any integer t, the sum of the demands corresponding to an interval containing t does not exceed the given capacity. Intervals and demands should be vectors of equal size. Demands should only contain non-negative values. Zero values are supported, and the corresponding intervals are filtered out, as they neither impact nor are impacted by this constraint.

+This constraint forces that, for any integer t, the sum of the demands +corresponding to an interval containing t does not exceed the given +capacity.

+ +

Intervals and demands should be vectors of equal size.

+ +

Demands should only contain non-negative values. Zero values are +supported, and the corresponding intervals are filtered out, as they +neither impact nor are impacted by this constraint.

|

Overload 3: -This constraint forces that, for any integer t, the sum of the demands corresponding to an interval containing t does not exceed the given capacity. Intervals and demands should be vectors of equal size. Demands should only contain non-negative values. Zero values are supported, and the corresponding intervals are filtered out, as they neither impact nor are impacted by this constraint.

+This constraint forces that, for any integer t, the sum of the demands +corresponding to an interval containing t does not exceed the given +capacity.

+ +

Intervals and demands should be vectors of equal size.

+ +

Demands should only contain non-negative values. Zero values are +supported, and the corresponding intervals are filtered out, as they +neither impact nor are impacted by this constraint.

|

Overload 4: -This constraint enforces that, for any integer t, the sum of the demands corresponding to an interval containing t does not exceed the given capacity. Intervals and demands should be vectors of equal size. Demands should only contain non-negative values. Zero values are supported, and the corresponding intervals are filtered out, as they neither impact nor are impacted by this constraint.

+This constraint enforces that, for any integer t, the sum of the demands +corresponding to an interval containing t does not exceed the given +capacity.

+ +

Intervals and demands should be vectors of equal size.

+ +

Demands should only contain non-negative values. Zero values are +supported, and the corresponding intervals are filtered out, as they +neither impact nor are impacted by this constraint.

|

Overload 5: -This constraint enforces that, for any integer t, the sum of demands corresponding to an interval containing t does not exceed the given capacity. Intervals and demands should be vectors of equal size. Demands should be positive.

+This constraint enforces that, for any integer t, the sum of demands +corresponding to an interval containing t does not exceed the given +capacity.

+ +

Intervals and demands should be vectors of equal size.

+ +

Demands should be positive.

|

Overload 6: -This constraint enforces that, for any integer t, the sum of demands corresponding to an interval containing t does not exceed the given capacity. Intervals and demands should be vectors of equal size. Demands should be positive.

+This constraint enforces that, for any integer t, the sum of demands +corresponding to an interval containing t does not exceed the given +capacity.

+ +

Intervals and demands should be vectors of equal size.

+ +

Demands should be positive.

@@ -13168,13 +16258,23 @@ This constraint enforces that, for any integer t, the sum of demands correspondi
View Source
    def Cover(self, vars: "std::vector< operations_research::IntervalVar * > const &", target_var: "IntervalVar") -> "operations_research::Constraint *":
-        r""" This constraint states that the target_var is the convex hull of the intervals. If none of the interval variables is performed, then the target var is unperformed too. Also, if the target variable is unperformed, then all the intervals variables are unperformed too."""
+        r"""
+        This constraint states that the target_var is the convex hull of
+        the intervals. If none of the interval variables is performed,
+        then the target var is unperformed too. Also, if the target
+        variable is unperformed, then all the intervals variables are
+        unperformed too.
+        """
         return _pywrapcp.Solver_Cover(self, vars, target_var)
 
-

This constraint states that the target_var is the convex hull of the intervals. If none of the interval variables is performed, then the target var is unperformed too. Also, if the target variable is unperformed, then all the intervals variables are unperformed too.

+

This constraint states that the target_var is the convex hull of +the intervals. If none of the interval variables is performed, +then the target var is unperformed too. Also, if the target +variable is unperformed, then all the intervals variables are +unperformed too.

@@ -13233,7 +16333,8 @@ This method creates an assignment which is a copy of 'a'.

| *Overload 2:* - Collect the first solution of the search. The variables will need to be added later. + Collect the first solution of the search. The variables will need to + be added later. """ return _pywrapcp.Solver_FirstSolutionCollector(self, *args)
@@ -13246,7 +16347,8 @@ Collect the first solution of the search.

|

Overload 2: -Collect the first solution of the search. The variables will need to be added later.

+Collect the first solution of the search. The variables will need to +be added later.

@@ -13269,7 +16371,8 @@ Collect the first solution of the search. The variables will need to be added la | *Overload 2:* - Collect the last solution of the search. The variables will need to be added later. + Collect the last solution of the search. The variables will need to + be added later. """ return _pywrapcp.Solver_LastSolutionCollector(self, *args) @@ -13282,7 +16385,8 @@ Collect the last solution of the search.

|

Overload 2: -Collect the last solution of the search. The variables will need to be added later.

+Collect the last solution of the search. The variables will need to +be added later.

@@ -13300,12 +16404,19 @@ Collect the last solution of the search. The variables will need to be added lat
    def BestValueSolutionCollector(self, *args) -> "operations_research::SolutionCollector *":
         r"""
         *Overload 1:*
-        Collect the solution corresponding to the optimal value of the objective of 'assignment'; if 'assignment' does not have an objective no solution is collected. This collector only collects one solution corresponding to the best objective value (the first one found).
+        Collect the solution corresponding to the optimal value of the objective
+        of 'assignment'; if 'assignment' does not have an objective no solution is
+        collected. This collector only collects one solution corresponding to the
+        best objective value (the first one found).
 
         |
 
         *Overload 2:*
-        Collect the solution corresponding to the optimal value of the objective of 'assignment'; if 'assignment' does not have an objective no solution is collected. This collector only collects one solution corresponding to the best objective value (the first one found). The variables will need to be added later.
+        Collect the solution corresponding to the optimal value of the
+        objective of 'assignment'; if 'assignment' does not have an objective no
+        solution is collected. This collector only collects one solution
+        corresponding to the best objective value (the first one
+        found). The variables will need to be added later.
         """
         return _pywrapcp.Solver_BestValueSolutionCollector(self, *args)
 
@@ -13313,12 +16424,19 @@ Collect the last solution of the search. The variables will need to be added lat

Overload 1: -Collect the solution corresponding to the optimal value of the objective of 'assignment'; if 'assignment' does not have an objective no solution is collected. This collector only collects one solution corresponding to the best objective value (the first one found).

+Collect the solution corresponding to the optimal value of the objective +of 'assignment'; if 'assignment' does not have an objective no solution is +collected. This collector only collects one solution corresponding to the +best objective value (the first one found).

|

Overload 2: -Collect the solution corresponding to the optimal value of the objective of 'assignment'; if 'assignment' does not have an objective no solution is collected. This collector only collects one solution corresponding to the best objective value (the first one found). The variables will need to be added later.

+Collect the solution corresponding to the optimal value of the +objective of 'assignment'; if 'assignment' does not have an objective no +solution is collected. This collector only collects one solution +corresponding to the best objective value (the first one +found). The variables will need to be added later.

@@ -13341,7 +16459,8 @@ Collect the solution corresponding to the optimal value of the objective of 'ass | *Overload 2:* - Collect all solutions of the search. The variables will need to be added later. + Collect all solutions of the search. The variables will need to + be added later. """ return _pywrapcp.Solver_AllSolutionCollector(self, *args) @@ -13354,7 +16473,8 @@ Collect all solutions of the search.

|

Overload 2: -Collect all solutions of the search. The variables will need to be added later.

+Collect all solutions of the search. The variables will need to +be added later.

@@ -13451,12 +16571,14 @@ Collect all solutions of the search. The variables will need to be added later.<
    def WeightedMinimize(self, *args) -> "operations_research::OptimizeVar *":
         r"""
         *Overload 1:*
-        Creates a minimization weighted objective. The actual objective is scalar_prod(sub_objectives, weights).
+        Creates a minimization weighted objective. The actual objective is
+        scalar_prod(sub_objectives, weights).
 
         |
 
         *Overload 2:*
-        Creates a minimization weighted objective. The actual objective is scalar_prod(sub_objectives, weights).
+        Creates a minimization weighted objective. The actual objective is
+        scalar_prod(sub_objectives, weights).
         """
         return _pywrapcp.Solver_WeightedMinimize(self, *args)
 
@@ -13464,12 +16586,14 @@ Collect all solutions of the search. The variables will need to be added later.<

Overload 1: -Creates a minimization weighted objective. The actual objective is scalar_prod(sub_objectives, weights).

+Creates a minimization weighted objective. The actual objective is +scalar_prod(sub_objectives, weights).

|

Overload 2: -Creates a minimization weighted objective. The actual objective is scalar_prod(sub_objectives, weights).

+Creates a minimization weighted objective. The actual objective is +scalar_prod(sub_objectives, weights).

@@ -13566,13 +16690,48 @@ Creates a weighted objective with a given sense (true = maximization).

View Source
    def TabuSearch(self, maximize: "bool", v: "IntVar", step: "int64_t", vars: "std::vector< operations_research::IntVar * > const &", keep_tenure: "int64_t", forbid_tenure: "int64_t", tabu_factor: "double") -> "operations_research::SearchMonitor *":
-        r""" MetaHeuristics which try to get the search out of local optima. Creates a Tabu Search monitor. In the context of local search the behavior is similar to MakeOptimize(), creating an objective in a given sense. The behavior differs once a local optimum is reached: thereafter solutions which degrade the value of the objective are allowed if they are not "tabu". A solution is "tabu" if it doesn't respect the following rules: - improving the best solution found so far - variables in the "keep" list must keep their value, variables in the "forbid" list must not take the value they have in the list. Variables with new values enter the tabu lists after each new solution found and leave the lists after a given number of iterations (called tenure). Only the variables passed to the method can enter the lists. The tabu criterion is softened by the tabu factor which gives the number of "tabu" violations which is tolerated; a factor of 1 means no violations allowed; a factor of 0 means all violations are allowed."""
+        r"""
+        MetaHeuristics which try to get the search out of local optima.
+        Creates a Tabu Search monitor.
+        In the context of local search the behavior is similar to MakeOptimize(),
+        creating an objective in a given sense. The behavior differs once a local
+        optimum is reached: thereafter solutions which degrade the value of the
+        objective are allowed if they are not "tabu". A solution is "tabu" if it
+        doesn't respect the following rules:
+        - improving the best solution found so far
+        - variables in the "keep" list must keep their value, variables in the
+        "forbid" list must not take the value they have in the list.
+        Variables with new values enter the tabu lists after each new solution
+        found and leave the lists after a given number of iterations (called
+        tenure). Only the variables passed to the method can enter the lists.
+        The tabu criterion is softened by the tabu factor which gives the number
+        of "tabu" violations which is tolerated; a factor of 1 means no violations
+        allowed; a factor of 0 means all violations are allowed.
+        """
         return _pywrapcp.Solver_TabuSearch(self, maximize, v, step, vars, keep_tenure, forbid_tenure, tabu_factor)
 
-

MetaHeuristics which try to get the search out of local optima. Creates a Tabu Search monitor. In the context of local search the behavior is similar to MakeOptimize(), creating an objective in a given sense. The behavior differs once a local optimum is reached: thereafter solutions which degrade the value of the objective are allowed if they are not "tabu". A solution is "tabu" if it doesn't respect the following rules: - improving the best solution found so far - variables in the "keep" list must keep their value, variables in the "forbid" list must not take the value they have in the list. Variables with new values enter the tabu lists after each new solution found and leave the lists after a given number of iterations (called tenure). Only the variables passed to the method can enter the lists. The tabu criterion is softened by the tabu factor which gives the number of "tabu" violations which is tolerated; a factor of 1 means no violations allowed; a factor of 0 means all violations are allowed.

+

MetaHeuristics which try to get the search out of local optima. +Creates a Tabu Search monitor. +In the context of local search the behavior is similar to MakeOptimize(), +creating an objective in a given sense. The behavior differs once a local +optimum is reached: thereafter solutions which degrade the value of the +objective are allowed if they are not "tabu". A solution is "tabu" if it +doesn't respect the following rules:

+ +
    +
  • improving the best solution found so far
  • +
  • variables in the "keep" list must keep their value, variables in the +"forbid" list must not take the value they have in the list. +Variables with new values enter the tabu lists after each new solution +found and leave the lists after a given number of iterations (called +tenure). Only the variables passed to the method can enter the lists. +The tabu criterion is softened by the tabu factor which gives the number +of "tabu" violations which is tolerated; a factor of 1 means no violations +allowed; a factor of 0 means all violations are allowed.
  • +
@@ -13616,13 +16775,19 @@ Creates a weighted objective with a given sense (true = maximization).

View Source
    def LubyRestart(self, scale_factor: "int") -> "operations_research::SearchMonitor *":
-        r""" This search monitor will restart the search periodically. At the iteration n, it will restart after scale_factor * Luby(n) failures where Luby is the Luby Strategy (i.e. 1 1 2 1 1 2 4 1 1 2 1 1 2 4 8...)."""
+        r"""
+        This search monitor will restart the search periodically.
+        At the iteration n, it will restart after scale_factor * Luby(n) failures
+        where Luby is the Luby Strategy (i.e. 1 1 2 1 1 2 4 1 1 2 1 1 2 4 8...).
+        """
         return _pywrapcp.Solver_LubyRestart(self, scale_factor)
 
-

This search monitor will restart the search periodically. At the iteration n, it will restart after scale_factor * Luby(n) failures where Luby is the Luby Strategy (i.e. 1 1 2 1 1 2 4 1 1 2 1 1 2 4 8...).

+

This search monitor will restart the search periodically. +At the iteration n, it will restart after scale_factor * Luby(n) failures +where Luby is the Luby Strategy (i.e. 1 1 2 1 1 2 4 1 1 2 1 1 2 4 8...).

@@ -13638,13 +16803,17 @@ Creates a weighted objective with a given sense (true = maximization).

View Source
    def ConstantRestart(self, frequency: "int") -> "operations_research::SearchMonitor *":
-        r""" This search monitor will restart the search periodically after 'frequency' failures."""
+        r"""
+        This search monitor will restart the search periodically after 'frequency'
+        failures.
+        """
         return _pywrapcp.Solver_ConstantRestart(self, frequency)
 
-

This search monitor will restart the search periodically after 'frequency' failures.

+

This search monitor will restart the search periodically after 'frequency' +failures.

@@ -13679,13 +16848,17 @@ Creates a weighted objective with a given sense (true = maximization).

View Source
    def BranchesLimit(self, branches: "int64_t") -> "operations_research::RegularLimit *":
-        r""" Creates a search limit that constrains the number of branches explored in the search tree."""
+        r"""
+        Creates a search limit that constrains the number of branches
+        explored in the search tree.
+        """
         return _pywrapcp.Solver_BranchesLimit(self, branches)
 
-

Creates a search limit that constrains the number of branches explored in the search tree.

+

Creates a search limit that constrains the number of branches +explored in the search tree.

@@ -13701,13 +16874,17 @@ Creates a weighted objective with a given sense (true = maximization).

View Source
    def FailuresLimit(self, failures: "int64_t") -> "operations_research::RegularLimit *":
-        r""" Creates a search limit that constrains the number of failures that can happen when exploring the search tree."""
+        r"""
+        Creates a search limit that constrains the number of failures
+        that can happen when exploring the search tree.
+        """
         return _pywrapcp.Solver_FailuresLimit(self, failures)
 
-

Creates a search limit that constrains the number of failures that can happen when exploring the search tree.

+

Creates a search limit that constrains the number of failures +that can happen when exploring the search tree.

@@ -13723,13 +16900,17 @@ Creates a weighted objective with a given sense (true = maximization).

View Source
    def SolutionsLimit(self, solutions: "int64_t") -> "operations_research::RegularLimit *":
-        r""" Creates a search limit that constrains the number of solutions found during the search."""
+        r"""
+        Creates a search limit that constrains the number of solutions found
+        during the search.
+        """
         return _pywrapcp.Solver_SolutionsLimit(self, solutions)
 
-

Creates a search limit that constrains the number of solutions found during the search.

+

Creates a search limit that constrains the number of solutions found +during the search.

@@ -13747,7 +16928,8 @@ Creates a weighted objective with a given sense (true = maximization).

    def Limit(self, *args) -> "operations_research::SearchLimit *":
         r"""
         *Overload 1:*
-        Limits the search with the 'time', 'branches', 'failures' and 'solutions' limits. 'smart_time_check' reduces the calls to the wall
+        Limits the search with the 'time', 'branches', 'failures' and
+        'solutions' limits. 'smart_time_check' reduces the calls to the wall
 
         |
 
@@ -13757,7 +16939,9 @@ Creates a weighted objective with a given sense (true = maximization).

| *Overload 3:* - Creates a search limit that is reached when either of the underlying limit is reached. That is, the returned limit is more stringent than both argument limits. + Creates a search limit that is reached when either of the underlying limit + is reached. That is, the returned limit is more stringent than both + argument limits. """ return _pywrapcp.Solver_Limit(self, *args)
@@ -13765,7 +16949,8 @@ Creates a weighted objective with a given sense (true = maximization).

Overload 1: -Limits the search with the 'time', 'branches', 'failures' and 'solutions' limits. 'smart_time_check' reduces the calls to the wall

+Limits the search with the 'time', 'branches', 'failures' and +'solutions' limits. 'smart_time_check' reduces the calls to the wall

|

@@ -13775,7 +16960,9 @@ Creates a search limit from its protobuf description

|

Overload 3: -Creates a search limit that is reached when either of the underlying limit is reached. That is, the returned limit is more stringent than both argument limits.

+Creates a search limit that is reached when either of the underlying limit +is reached. That is, the returned limit is more stringent than both +argument limits.

@@ -13794,13 +16981,17 @@ Creates a search limit that is reached when either of the underlying limit is re
View Source
    def CustomLimit(self, limiter: "std::function< bool () >") -> "operations_research::SearchLimit *":
-        r""" Callback-based search limit. Search stops when limiter returns true; if this happens at a leaf the corresponding solution will be rejected."""
+        r"""
+        Callback-based search limit. Search stops when limiter returns true; if
+        this happens at a leaf the corresponding solution will be rejected.
+        """
         return _pywrapcp.Solver_CustomLimit(self, limiter)
 
-

Callback-based search limit. Search stops when limiter returns true; if this happens at a leaf the corresponding solution will be rejected.

+

Callback-based search limit. Search stops when limiter returns true; if +this happens at a leaf the corresponding solution will be rejected.

@@ -13838,13 +17029,17 @@ Creates a search limit that is reached when either of the underlying limit is re
View Source
    def SearchTrace(self, prefix: "std::string const &") -> "operations_research::SearchMonitor *":
-        r""" Creates a search monitor that will trace precisely the behavior of the search. Use this only for low level debugging."""
+        r"""
+        Creates a search monitor that will trace precisely the behavior of the
+        search. Use this only for low level debugging.
+        """
         return _pywrapcp.Solver_SearchTrace(self, prefix)
 
-

Creates a search monitor that will trace precisely the behavior of the search. Use this only for low level debugging.

+

Creates a search monitor that will trace precisely the behavior of the +search. Use this only for low level debugging.

@@ -14156,13 +17351,23 @@ Creates a search limit that is reached when either of the underlying limit is re
View Source
    def ScheduleOrPostpone(self, var: "IntervalVar", est: "int64_t", marker: "int64_t *const") -> "operations_research::Decision *":
-        r""" Returns a decision that tries to schedule a task at a given time. On the Apply branch, it will set that interval var as performed and set its start to 'est'. On the Refute branch, it will just update the 'marker' to 'est' + 1. This decision is used in the INTERVAL_SET_TIMES_FORWARD strategy."""
+        r"""
+        Returns a decision that tries to schedule a task at a given time.
+        On the Apply branch, it will set that interval var as performed and set
+        its start to 'est'. On the Refute branch, it will just update the
+        'marker' to 'est' + 1. This decision is used in the
+        INTERVAL_SET_TIMES_FORWARD strategy.
+        """
         return _pywrapcp.Solver_ScheduleOrPostpone(self, var, est, marker)
 
-

Returns a decision that tries to schedule a task at a given time. On the Apply branch, it will set that interval var as performed and set its start to 'est'. On the Refute branch, it will just update the 'marker' to 'est' + 1. This decision is used in the INTERVAL_SET_TIMES_FORWARD strategy.

+

Returns a decision that tries to schedule a task at a given time. +On the Apply branch, it will set that interval var as performed and set +its start to 'est'. On the Refute branch, it will just update the +'marker' to 'est' + 1. This decision is used in the +INTERVAL_SET_TIMES_FORWARD strategy.

@@ -14183,13 +17388,23 @@ Creates a search limit that is reached when either of the underlying limit is re
View Source
    def ScheduleOrExpedite(self, var: "IntervalVar", est: "int64_t", marker: "int64_t *const") -> "operations_research::Decision *":
-        r""" Returns a decision that tries to schedule a task at a given time. On the Apply branch, it will set that interval var as performed and set its end to 'est'. On the Refute branch, it will just update the 'marker' to 'est' - 1. This decision is used in the INTERVAL_SET_TIMES_BACKWARD strategy."""
+        r"""
+        Returns a decision that tries to schedule a task at a given time.
+        On the Apply branch, it will set that interval var as performed and set
+        its end to 'est'. On the Refute branch, it will just update the
+        'marker' to 'est' - 1. This decision is used in the
+        INTERVAL_SET_TIMES_BACKWARD strategy.
+        """
         return _pywrapcp.Solver_ScheduleOrExpedite(self, var, est, marker)
 
-

Returns a decision that tries to schedule a task at a given time. On the Apply branch, it will set that interval var as performed and set its end to 'est'. On the Refute branch, it will just update the 'marker' to 'est' - 1. This decision is used in the INTERVAL_SET_TIMES_BACKWARD strategy.

+

Returns a decision that tries to schedule a task at a given time. +On the Apply branch, it will set that interval var as performed and set +its end to 'est'. On the Refute branch, it will just update the +'marker' to 'est' - 1. This decision is used in the +INTERVAL_SET_TIMES_BACKWARD strategy.

@@ -14209,13 +17424,17 @@ Creates a search limit that is reached when either of the underlying limit is re
View Source
    def RankFirstInterval(self, sequence: "SequenceVar", index: "int") -> "operations_research::Decision *":
-        r""" Returns a decision that tries to rank first the ith interval var in the sequence variable."""
+        r"""
+        Returns a decision that tries to rank first the ith interval var
+        in the sequence variable.
+        """
         return _pywrapcp.Solver_RankFirstInterval(self, sequence, index)
 
-

Returns a decision that tries to rank first the ith interval var in the sequence variable.

+

Returns a decision that tries to rank first the ith interval var +in the sequence variable.

@@ -14235,13 +17454,17 @@ Creates a search limit that is reached when either of the underlying limit is re
View Source
    def RankLastInterval(self, sequence: "SequenceVar", index: "int") -> "operations_research::Decision *":
-        r""" Returns a decision that tries to rank last the ith interval var in the sequence variable."""
+        r"""
+        Returns a decision that tries to rank last the ith interval var
+        in the sequence variable.
+        """
         return _pywrapcp.Solver_RankLastInterval(self, sequence, index)
 
-

Returns a decision that tries to rank last the ith interval var in the sequence variable.

+

Returns a decision that tries to rank last the ith interval var +in the sequence variable.

@@ -14281,13 +17504,17 @@ Creates a search limit that is reached when either of the underlying limit is re
View Source
    def DecisionBuilderFromAssignment(self, assignment: "Assignment", db: "DecisionBuilder", vars: "std::vector< operations_research::IntVar * > const &") -> "operations_research::DecisionBuilder *":
-        r""" Returns a decision builder for which the left-most leaf corresponds to assignment, the rest of the tree being explored using 'db'."""
+        r"""
+        Returns a decision builder for which the left-most leaf corresponds
+        to assignment, the rest of the tree being explored using 'db'.
+        """
         return _pywrapcp.Solver_DecisionBuilderFromAssignment(self, assignment, db, vars)
 
-

Returns a decision builder for which the left-most leaf corresponds to assignment, the rest of the tree being explored using 'db'.

+

Returns a decision builder for which the left-most leaf corresponds +to assignment, the rest of the tree being explored using 'db'.

@@ -14306,13 +17533,17 @@ Creates a search limit that is reached when either of the underlying limit is re
View Source
    def ConstraintAdder(self, ct: "Constraint") -> "operations_research::DecisionBuilder *":
-        r""" Returns a decision builder that will add the given constraint to the model."""
+        r"""
+        Returns a decision builder that will add the given constraint to
+        the model.
+        """
         return _pywrapcp.Solver_ConstraintAdder(self, ct)
 
-

Returns a decision builder that will add the given constraint to the model.

+

Returns a decision builder that will add the given constraint to +the model.

@@ -14373,13 +17604,17 @@ Creates a search limit that is reached when either of the underlying limit is re
View Source
    def RestoreAssignment(self, assignment: "Assignment") -> "operations_research::DecisionBuilder *":
-        r""" Returns a DecisionBuilder which restores an Assignment (calls void Assignment::Restore())"""
+        r"""
+        Returns a DecisionBuilder which restores an Assignment
+        (calls void Assignment::Restore())
+        """
         return _pywrapcp.Solver_RestoreAssignment(self, assignment)
 
-

Returns a DecisionBuilder which restores an Assignment (calls void Assignment::Restore())

+

Returns a DecisionBuilder which restores an Assignment +(calls void Assignment::Restore())

@@ -14398,13 +17633,17 @@ Creates a search limit that is reached when either of the underlying limit is re
View Source
    def StoreAssignment(self, assignment: "Assignment") -> "operations_research::DecisionBuilder *":
-        r""" Returns a DecisionBuilder which stores an Assignment (calls void Assignment::Store())"""
+        r"""
+        Returns a DecisionBuilder which stores an Assignment
+        (calls void Assignment::Store())
+        """
         return _pywrapcp.Solver_StoreAssignment(self, assignment)
 
-

Returns a DecisionBuilder which stores an Assignment (calls void Assignment::Store())

+

Returns a DecisionBuilder which stores an Assignment +(calls void Assignment::Store())

@@ -14460,12 +17699,21 @@ Creates a search limit that is reached when either of the underlying limit is re
    def MoveTowardTargetOperator(self, *args) -> "operations_research::LocalSearchOperator *":
         r"""
         *Overload 1:*
-        Creates a local search operator that tries to move the assignment of some variables toward a target. The target is given as an Assignment. This operator generates neighbors in which the only difference compared to the current state is that one variable that belongs to the target assignment is set to its target value.
+        Creates a local search operator that tries to move the assignment of some
+        variables toward a target. The target is given as an Assignment. This
+        operator generates neighbors in which the only difference compared to the
+        current state is that one variable that belongs to the target assignment
+        is set to its target value.
 
         |
 
         *Overload 2:*
-        Creates a local search operator that tries to move the assignment of some variables toward a target. The target is given either as two vectors: a vector of variables and a vector of associated target values. The two vectors should be of the same length. This operator generates neighbors in which the only difference compared to the current state is that one variable that belongs to the given vector is set to its target value.
+        Creates a local search operator that tries to move the assignment of some
+        variables toward a target. The target is given either as two vectors: a
+        vector of variables and a vector of associated target values. The two
+        vectors should be of the same length. This operator generates neighbors in
+        which the only difference compared to the current state is that one
+        variable that belongs to the given vector is set to its target value.
         """
         return _pywrapcp.Solver_MoveTowardTargetOperator(self, *args)
 
@@ -14473,12 +17721,21 @@ Creates a search limit that is reached when either of the underlying limit is re

Overload 1: -Creates a local search operator that tries to move the assignment of some variables toward a target. The target is given as an Assignment. This operator generates neighbors in which the only difference compared to the current state is that one variable that belongs to the target assignment is set to its target value.

+Creates a local search operator that tries to move the assignment of some +variables toward a target. The target is given as an Assignment. This +operator generates neighbors in which the only difference compared to the +current state is that one variable that belongs to the target assignment +is set to its target value.

|

Overload 2: -Creates a local search operator that tries to move the assignment of some variables toward a target. The target is given either as two vectors: a vector of variables and a vector of associated target values. The two vectors should be of the same length. This operator generates neighbors in which the only difference compared to the current state is that one variable that belongs to the given vector is set to its target value.

+Creates a local search operator that tries to move the assignment of some +variables toward a target. The target is given either as two vectors: a +vector of variables and a vector of associated target values. The two +vectors should be of the same length. This operator generates neighbors in +which the only difference compared to the current state is that one +variable that belongs to the given vector is set to its target value.

@@ -14515,12 +17772,15 @@ Creates a local search operator that tries to move the assignment of some variab
    def RandomConcatenateOperators(self, *args) -> "operations_research::LocalSearchOperator *":
         r"""
         *Overload 1:*
-        Randomized version of local search concatenator; calls a random operator at each call to MakeNextNeighbor().
+        Randomized version of local search concatenator; calls a random operator
+        at each call to MakeNextNeighbor().
 
         |
 
         *Overload 2:*
-        Randomized version of local search concatenator; calls a random operator at each call to MakeNextNeighbor(). The provided seed is used to initialize the random number generator.
+        Randomized version of local search concatenator; calls a random operator
+        at each call to MakeNextNeighbor(). The provided seed is used to
+        initialize the random number generator.
         """
         return _pywrapcp.Solver_RandomConcatenateOperators(self, *args)
 
@@ -14528,12 +17788,15 @@ Creates a local search operator that tries to move the assignment of some variab

Overload 1: -Randomized version of local search concatenator; calls a random operator at each call to MakeNextNeighbor().

+Randomized version of local search concatenator; calls a random operator +at each call to MakeNextNeighbor().

|

Overload 2: -Randomized version of local search concatenator; calls a random operator at each call to MakeNextNeighbor(). The provided seed is used to initialize the random number generator.

+Randomized version of local search concatenator; calls a random operator +at each call to MakeNextNeighbor(). The provided seed is used to +initialize the random number generator.

@@ -14553,13 +17816,23 @@ Randomized version of local search concatenator; calls a random operator at each
View Source
    def NeighborhoodLimit(self, op: "LocalSearchOperator", limit: "int64_t") -> "operations_research::LocalSearchOperator *":
-        r""" Creates a local search operator that wraps another local search operator and limits the number of neighbors explored (i.e., calls to MakeNextNeighbor from the current solution (between two calls to Start()). When this limit is reached, MakeNextNeighbor() returns false. The counter is cleared when Start() is called."""
+        r"""
+        Creates a local search operator that wraps another local search
+        operator and limits the number of neighbors explored (i.e., calls
+        to MakeNextNeighbor from the current solution (between two calls
+        to Start()). When this limit is reached, MakeNextNeighbor()
+        returns false. The counter is cleared when Start() is called.
+        """
         return _pywrapcp.Solver_NeighborhoodLimit(self, op, limit)
 
-

Creates a local search operator that wraps another local search operator and limits the number of neighbors explored (i.e., calls to MakeNextNeighbor from the current solution (between two calls to Start()). When this limit is reached, MakeNextNeighbor() returns false. The counter is cleared when Start() is called.

+

Creates a local search operator that wraps another local search +operator and limits the number of neighbors explored (i.e., calls +to MakeNextNeighbor from the current solution (between two calls +to Start()). When this limit is reached, MakeNextNeighbor() +returns false. The counter is cleared when Start() is called.

@@ -14613,13 +17886,17 @@ Randomized version of local search concatenator; calls a random operator at each
View Source
    def SearchDepth(self) -> "int":
-        r""" Gets the search depth of the current active search. Returns -1 if there is no active search opened."""
+        r"""
+        Gets the search depth of the current active search. Returns -1 if
+        there is no active search opened.
+        """
         return _pywrapcp.Solver_SearchDepth(self)
 
-

Gets the search depth of the current active search. Returns -1 if there is no active search opened.

+

Gets the search depth of the current active search. Returns -1 if +there is no active search opened.

@@ -14635,13 +17912,17 @@ Randomized version of local search concatenator; calls a random operator at each
View Source
    def SearchLeftDepth(self) -> "int":
-        r""" Gets the search left depth of the current active search. Returns -1 if there is no active search opened."""
+        r"""
+        Gets the search left depth of the current active search. Returns -1 if
+        there is no active search opened.
+        """
         return _pywrapcp.Solver_SearchLeftDepth(self)
 
-

Gets the search left depth of the current active search. Returns -1 if there is no active search opened.

+

Gets the search left depth of the current active search. Returns -1 if +there is no active search opened.

@@ -14657,13 +17938,17 @@ Randomized version of local search concatenator; calls a random operator at each
View Source
    def SolveDepth(self) -> "int":
-        r""" Gets the number of nested searches. It returns 0 outside search, 1 during the top level search, 2 or more in case of nested searches."""
+        r"""
+        Gets the number of nested searches. It returns 0 outside search,
+        1 during the top level search, 2 or more in case of nested searches.
+        """
         return _pywrapcp.Solver_SolveDepth(self)
 
-

Gets the number of nested searches. It returns 0 outside search, 1 during the top level search, 2 or more in case of nested searches.

+

Gets the number of nested searches. It returns 0 outside search, +1 during the top level search, 2 or more in case of nested searches.

@@ -14767,13 +18052,17 @@ Randomized version of local search concatenator; calls a random operator at each
View Source
    def Constraints(self) -> "int":
-        r""" Counts the number of constraints that have been added to the solver before the search."""
+        r"""
+        Counts the number of constraints that have been added
+        to the solver before the search.
+        """
         return _pywrapcp.Solver_Constraints(self)
 
-

Counts the number of constraints that have been added to the solver before the search.

+

Counts the number of constraints that have been added +to the solver before the search.

@@ -14852,13 +18141,17 @@ Randomized version of local search concatenator; calls a random operator at each
View Source
    def ShouldFail(self) -> "void":
-        r""" These methods are only useful for the SWIG wrappers, which need a way to externally cause the Solver to fail."""
+        r"""
+        These methods are only useful for the SWIG wrappers, which need a way
+        to externally cause the Solver to fail.
+        """
         return _pywrapcp.Solver_ShouldFail(self)
 
-

These methods are only useful for the SWIG wrappers, which need a way to externally cause the Solver to fail.

+

These methods are only useful for the SWIG wrappers, which need a way +to externally cause the Solver to fail.

@@ -15225,7 +18518,11 @@ Randomized version of local search concatenator; calls a random operator at each
View Source
class BaseObject(object):
-    r""" A BaseObject is the root of all reversibly allocated objects. A DebugString method and the associated << operator are implemented as a convenience."""
+    r"""
+    A BaseObject is the root of all reversibly allocated objects.
+    A DebugString method and the associated << operator are implemented
+    as a convenience.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -15253,7 +18550,9 @@ Randomized version of local search concatenator; calls a random operator at each
 
         
-

A BaseObject is the root of all reversibly allocated objects. A DebugString method and the associated << operator are implemented as a convenience.

+

A BaseObject is the root of all reversibly allocated objects. +A DebugString method and the associated << operator are implemented +as a convenience.

@@ -15322,7 +18621,12 @@ Randomized version of local search concatenator; calls a random operator at each
View Source
class PropagationBaseObject(BaseObject):
-    r""" NOLINT The PropagationBaseObject is a subclass of BaseObject that is also friend to the Solver class. It allows accessing methods useful when writing new constraints or new expressions."""
+    r"""
+    NOLINT
+    The PropagationBaseObject is a subclass of BaseObject that is also
+    friend to the Solver class. It allows accessing methods useful when
+    writing new constraints or new expressions.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
@@ -15352,7 +18656,10 @@ Randomized version of local search concatenator; calls a random operator at each
 
         
-

NOLINT The PropagationBaseObject is a subclass of BaseObject that is also friend to the Solver class. It allows accessing methods useful when writing new constraints or new expressions.

+

NOLINT +The PropagationBaseObject is a subclass of BaseObject that is also +friend to the Solver class. It allows accessing methods useful when +writing new constraints or new expressions.

@@ -15462,7 +18769,10 @@ Randomized version of local search concatenator; calls a random operator at each
View Source
class Decision(BaseObject):
-    r""" A Decision represents a choice point in the search tree. The two main methods are Apply() to go left, or Refute() to go right."""
+    r"""
+    A Decision represents a choice point in the search tree. The two main
+    methods are Apply() to go left, or Refute() to go right.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -15498,7 +18808,8 @@ Randomized version of local search concatenator; calls a random operator at each
 
         
-

A Decision represents a choice point in the search tree. The two main methods are Apply() to go left, or Refute() to go right.

+

A Decision represents a choice point in the search tree. The two main +methods are Apply() to go left, or Refute() to go right.

@@ -15611,7 +18922,10 @@ Randomized version of local search concatenator; calls a random operator at each
View Source
class DecisionBuilder(BaseObject):
-    r""" A DecisionBuilder is responsible for creating the search tree. The important method is Next(), which returns the next decision to execute."""
+    r"""
+    A DecisionBuilder is responsible for creating the search tree. The
+    important method is Next(), which returns the next decision to execute.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -15624,7 +18938,12 @@ Randomized version of local search concatenator; calls a random operator at each
     __swig_destroy__ = _pywrapcp.delete_DecisionBuilder
 
     def NextWrapper(self, s: "Solver") -> "operations_research::Decision *":
-        r""" This is the main method of the decision builder class. It must return a decision (an instance of the class Decision). If it returns nullptr, this means that the decision builder has finished its work."""
+        r"""
+        This is the main method of the decision builder class. It must
+        return a decision (an instance of the class Decision). If it
+        returns nullptr, this means that the decision builder has finished
+        its work.
+        """
         return _pywrapcp.DecisionBuilder_NextWrapper(self, s)
 
     def DebugString(self) -> "std::string":
@@ -15643,7 +18962,8 @@ Randomized version of local search concatenator; calls a random operator at each
 
         
-

A DecisionBuilder is responsible for creating the search tree. The important method is Next(), which returns the next decision to execute.

+

A DecisionBuilder is responsible for creating the search tree. The +important method is Next(), which returns the next decision to execute.

@@ -15691,13 +19011,21 @@ Randomized version of local search concatenator; calls a random operator at each
View Source
    def NextWrapper(self, s: "Solver") -> "operations_research::Decision *":
-        r""" This is the main method of the decision builder class. It must return a decision (an instance of the class Decision). If it returns nullptr, this means that the decision builder has finished its work."""
+        r"""
+        This is the main method of the decision builder class. It must
+        return a decision (an instance of the class Decision). If it
+        returns nullptr, this means that the decision builder has finished
+        its work.
+        """
         return _pywrapcp.DecisionBuilder_NextWrapper(self, s)
 
-

This is the main method of the decision builder class. It must return a decision (an instance of the class Decision). If it returns nullptr, this means that the decision builder has finished its work.

+

This is the main method of the decision builder class. It must +return a decision (an instance of the class Decision). If it +returns nullptr, this means that the decision builder has finished +its work.

@@ -15734,13 +19062,26 @@ Randomized version of local search concatenator; calls a random operator at each
View Source
class Demon(BaseObject):
-    r""" A Demon is the base element of a propagation queue. It is the main   object responsible for implementing the actual propagation   of the constraint and pruning the inconsistent values in the domains   of the variables. The main concept is that demons are listeners that are   attached to the variables and listen to their modifications. There are two methods:  - Run() is the actual method called when the demon is processed.  - priority() returns its priority. Standard priorities are slow, normal    or fast. "immediate" is reserved for variables and is treated separately."""
+    r"""
+    A Demon is the base element of a propagation queue. It is the main
+      object responsible for implementing the actual propagation
+      of the constraint and pruning the inconsistent values in the domains
+      of the variables. The main concept is that demons are listeners that are
+      attached to the variables and listen to their modifications.
+    There are two methods:
+     - Run() is the actual method called when the demon is processed.
+     - priority() returns its priority. Standard priorities are slow, normal
+       or fast. "immediate" is reserved for variables and is treated separately.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
 
     def __init__(self):
-        r""" This indicates the priority of a demon. Immediate demons are treated separately and corresponds to variables."""
+        r"""
+        This indicates the priority of a demon. Immediate demons are treated
+        separately and corresponds to variables.
+        """
         if self.__class__ == Demon:
             _self = None
         else:
@@ -15753,14 +19094,21 @@ Randomized version of local search concatenator; calls a random operator at each
         return _pywrapcp.Demon_RunWrapper(self, s)
 
     def Priority(self) -> "operations_research::Solver::DemonPriority":
-        r""" This method returns the priority of the demon. Usually a demon is fast, slow or normal. Immediate demons are reserved for internal use to maintain variables."""
+        r"""
+        This method returns the priority of the demon. Usually a demon is
+        fast, slow or normal. Immediate demons are reserved for internal
+        use to maintain variables.
+        """
         return _pywrapcp.Demon_Priority(self)
 
     def DebugString(self) -> "std::string":
         return _pywrapcp.Demon_DebugString(self)
 
     def Inhibit(self, s: "Solver") -> "void":
-        r""" This method inhibits the demon in the search tree below the current position."""
+        r"""
+        This method inhibits the demon in the search tree below the
+        current position.
+        """
         return _pywrapcp.Demon_Inhibit(self, s)
 
     def Desinhibit(self, s: "Solver") -> "void":
@@ -15774,7 +19122,21 @@ Randomized version of local search concatenator; calls a random operator at each
 
         
-

A Demon is the base element of a propagation queue. It is the main object responsible for implementing the actual propagation of the constraint and pruning the inconsistent values in the domains of the variables. The main concept is that demons are listeners that are attached to the variables and listen to their modifications. There are two methods: - Run() is the actual method called when the demon is processed. - priority() returns its priority. Standard priorities are slow, normal or fast. "immediate" is reserved for variables and is treated separately.

+

A Demon is the base element of a propagation queue. It is the main + object responsible for implementing the actual propagation + of the constraint and pruning the inconsistent values in the domains + of the variables. The main concept is that demons are listeners that are + attached to the variables and listen to their modifications.

+ +
There are two methods
+ +
+
    +
  • Run() is the actual method called when the demon is processed.
  • +
  • priority() returns its priority. Standard priorities are slow, normal + or fast. "immediate" is reserved for variables and is treated separately.
  • +
+
@@ -15788,7 +19150,10 @@ Randomized version of local search concatenator; calls a random operator at each
View Source
    def __init__(self):
-        r""" This indicates the priority of a demon. Immediate demons are treated separately and corresponds to variables."""
+        r"""
+        This indicates the priority of a demon. Immediate demons are treated
+        separately and corresponds to variables.
+        """
         if self.__class__ == Demon:
             _self = None
         else:
@@ -15798,7 +19163,8 @@ Randomized version of local search concatenator; calls a random operator at each
 
         
-

This indicates the priority of a demon. Immediate demons are treated separately and corresponds to variables.

+

This indicates the priority of a demon. Immediate demons are treated +separately and corresponds to variables.

@@ -15847,13 +19213,19 @@ Randomized version of local search concatenator; calls a random operator at each
View Source
    def Priority(self) -> "operations_research::Solver::DemonPriority":
-        r""" This method returns the priority of the demon. Usually a demon is fast, slow or normal. Immediate demons are reserved for internal use to maintain variables."""
+        r"""
+        This method returns the priority of the demon. Usually a demon is
+        fast, slow or normal. Immediate demons are reserved for internal
+        use to maintain variables.
+        """
         return _pywrapcp.Demon_Priority(self)
 
-

This method returns the priority of the demon. Usually a demon is fast, slow or normal. Immediate demons are reserved for internal use to maintain variables.

+

This method returns the priority of the demon. Usually a demon is +fast, slow or normal. Immediate demons are reserved for internal +use to maintain variables.

@@ -15888,13 +19260,17 @@ Randomized version of local search concatenator; calls a random operator at each
View Source
    def Inhibit(self, s: "Solver") -> "void":
-        r""" This method inhibits the demon in the search tree below the current position."""
+        r"""
+        This method inhibits the demon in the search tree below the
+        current position.
+        """
         return _pywrapcp.Demon_Inhibit(self, s)
 
-

This method inhibits the demon in the search tree below the current position.

+

This method inhibits the demon in the search tree below the +current position.

@@ -15934,7 +19310,14 @@ Randomized version of local search concatenator; calls a random operator at each
View Source
class Constraint(PropagationBaseObject):
-    r""" A constraint is the main modeling object. It provides two methods:   - Post() is responsible for creating the demons and attaching them to     immediate demons().   - InitialPropagate() is called once just after Post and performs     the initial propagation. The subsequent propagations will be performed     by the demons Posted during the post() method."""
+    r"""
+    A constraint is the main modeling object. It provides two methods:
+      - Post() is responsible for creating the demons and attaching them to
+        immediate demons().
+      - InitialPropagate() is called once just after Post and performs
+        the initial propagation. The subsequent propagations will be performed
+        by the demons Posted during the post() method.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -15947,18 +19330,28 @@ Randomized version of local search concatenator; calls a random operator at each
     __swig_destroy__ = _pywrapcp.delete_Constraint
 
     def Post(self) -> "void":
-        r""" This method is called when the constraint is processed by the solver. Its main usage is to attach demons to variables."""
+        r"""
+        This method is called when the constraint is processed by the
+        solver. Its main usage is to attach demons to variables.
+        """
         return _pywrapcp.Constraint_Post(self)
 
     def InitialPropagateWrapper(self) -> "void":
-        r""" This method performs the initial propagation of the constraint. It is called just after the post."""
+        r"""
+        This method performs the initial propagation of the
+        constraint. It is called just after the post.
+        """
         return _pywrapcp.Constraint_InitialPropagateWrapper(self)
 
     def DebugString(self) -> "std::string":
         return _pywrapcp.Constraint_DebugString(self)
 
     def Var(self) -> "operations_research::IntVar *":
-        r""" Creates a Boolean variable representing the status of the constraint (false = constraint is violated, true = constraint is satisfied). It returns nullptr if the constraint does not support this API."""
+        r"""
+        Creates a Boolean variable representing the status of the constraint
+        (false = constraint is violated, true = constraint is satisfied). It
+        returns nullptr if the constraint does not support this API.
+        """
         return _pywrapcp.Constraint_Var(self)
 
     def __repr__(self) -> "std::string":
@@ -16028,7 +19421,15 @@ Randomized version of local search concatenator; calls a random operator at each
 
         
-

A constraint is the main modeling object. It provides two methods: - Post() is responsible for creating the demons and attaching them to immediate demons(). - InitialPropagate() is called once just after Post and performs the initial propagation. The subsequent propagations will be performed by the demons Posted during the post() method.

+

A constraint is the main modeling object. It provides two methods:

+ +
    +
  • Post() is responsible for creating the demons and attaching them to +immediate demons().
  • +
  • InitialPropagate() is called once just after Post and performs +the initial propagation. The subsequent propagations will be performed +by the demons Posted during the post() method.
  • +
@@ -16076,13 +19477,17 @@ Randomized version of local search concatenator; calls a random operator at each
View Source
    def Post(self) -> "void":
-        r""" This method is called when the constraint is processed by the solver. Its main usage is to attach demons to variables."""
+        r"""
+        This method is called when the constraint is processed by the
+        solver. Its main usage is to attach demons to variables.
+        """
         return _pywrapcp.Constraint_Post(self)
 
-

This method is called when the constraint is processed by the solver. Its main usage is to attach demons to variables.

+

This method is called when the constraint is processed by the +solver. Its main usage is to attach demons to variables.

@@ -16098,13 +19503,17 @@ Randomized version of local search concatenator; calls a random operator at each
View Source
    def InitialPropagateWrapper(self) -> "void":
-        r""" This method performs the initial propagation of the constraint. It is called just after the post."""
+        r"""
+        This method performs the initial propagation of the
+        constraint. It is called just after the post.
+        """
         return _pywrapcp.Constraint_InitialPropagateWrapper(self)
 
-

This method performs the initial propagation of the constraint. It is called just after the post.

+

This method performs the initial propagation of the +constraint. It is called just after the post.

@@ -16139,13 +19548,19 @@ Randomized version of local search concatenator; calls a random operator at each
View Source
    def Var(self) -> "operations_research::IntVar *":
-        r""" Creates a Boolean variable representing the status of the constraint (false = constraint is violated, true = constraint is satisfied). It returns nullptr if the constraint does not support this API."""
+        r"""
+        Creates a Boolean variable representing the status of the constraint
+        (false = constraint is violated, true = constraint is satisfied). It
+        returns nullptr if the constraint does not support this API.
+        """
         return _pywrapcp.Constraint_Var(self)
 
-

Creates a Boolean variable representing the status of the constraint (false = constraint is violated, true = constraint is satisfied). It returns nullptr if the constraint does not support this API.

+

Creates a Boolean variable representing the status of the constraint +(false = constraint is violated, true = constraint is satisfied). It +returns nullptr if the constraint does not support this API.

@@ -16274,7 +19689,10 @@ Randomized version of local search concatenator; calls a random operator at each return _pywrapcp.SearchMonitor_RefuteDecision(self, d) def AfterDecision(self, d: "Decision", apply: "bool") -> "void": - r""" Just after refuting or applying the decision, apply is true after Apply. This is called only if the Apply() or Refute() methods have not failed.""" + r""" + Just after refuting or applying the decision, apply is true after Apply. + This is called only if the Apply() or Refute() methods have not failed. + """ return _pywrapcp.SearchMonitor_AfterDecision(self, d, apply) def BeginFail(self) -> "void": @@ -16294,11 +19712,19 @@ Randomized version of local search concatenator; calls a random operator at each return _pywrapcp.SearchMonitor_EndInitialPropagation(self) def AcceptSolution(self) -> "bool": - r""" This method is called when a solution is found. It asserts whether the solution is valid. A value of false indicates that the solution should be discarded.""" + r""" + This method is called when a solution is found. It asserts whether the + solution is valid. A value of false indicates that the solution + should be discarded. + """ return _pywrapcp.SearchMonitor_AcceptSolution(self) def AtSolution(self) -> "bool": - r""" This method is called when a valid solution is found. If the return value is true, then search will resume after. If the result is false, then search will stop there.""" + r""" + This method is called when a valid solution is found. If the + return value is true, then search will resume after. If the result + is false, then search will stop there. + """ return _pywrapcp.SearchMonitor_AtSolution(self) def NoMoreSolutions(self) -> "void": @@ -16306,10 +19732,14 @@ Randomized version of local search concatenator; calls a random operator at each return _pywrapcp.SearchMonitor_NoMoreSolutions(self) def LocalOptimum(self) -> "bool": - r""" When a local optimum is reached. If 'true' is returned, the last solution is discarded and the search proceeds with the next one.""" + r""" + When a local optimum is reached. If 'true' is returned, the last solution + is discarded and the search proceeds with the next one. + """ return _pywrapcp.SearchMonitor_LocalOptimum(self) def AcceptDelta(self, delta: "Assignment", deltadelta: "Assignment") -> "bool": + return _pywrapcp.SearchMonitor_AcceptDelta(self, delta, deltadelta) def AcceptNeighbor(self) -> "void": @@ -16534,13 +19964,17 @@ Randomized version of local search concatenator; calls a random operator at each
View Source
    def AfterDecision(self, d: "Decision", apply: "bool") -> "void":
-        r""" Just after refuting or applying the decision, apply is true after Apply. This is called only if the Apply() or Refute() methods have not failed."""
+        r"""
+        Just after refuting or applying the decision, apply is true after Apply.
+        This is called only if the Apply() or Refute() methods have not failed.
+        """
         return _pywrapcp.SearchMonitor_AfterDecision(self, d, apply)
 
-

Just after refuting or applying the decision, apply is true after Apply. This is called only if the Apply() or Refute() methods have not failed.

+

Just after refuting or applying the decision, apply is true after Apply. +This is called only if the Apply() or Refute() methods have not failed.

@@ -16644,13 +20078,19 @@ Randomized version of local search concatenator; calls a random operator at each
View Source
    def AcceptSolution(self) -> "bool":
-        r""" This method is called when a solution is found. It asserts whether the solution is valid. A value of false indicates that the solution should be discarded."""
+        r"""
+        This method is called when a solution is found. It asserts whether the
+        solution is valid. A value of false indicates that the solution
+        should be discarded.
+        """
         return _pywrapcp.SearchMonitor_AcceptSolution(self)
 
-

This method is called when a solution is found. It asserts whether the solution is valid. A value of false indicates that the solution should be discarded.

+

This method is called when a solution is found. It asserts whether the +solution is valid. A value of false indicates that the solution +should be discarded.

@@ -16666,13 +20106,19 @@ Randomized version of local search concatenator; calls a random operator at each
View Source
    def AtSolution(self) -> "bool":
-        r""" This method is called when a valid solution is found. If the return value is true, then search will resume after. If the result is false, then search will stop there."""
+        r"""
+        This method is called when a valid solution is found. If the
+        return value is true, then search will resume after. If the result
+        is false, then search will stop there.
+        """
         return _pywrapcp.SearchMonitor_AtSolution(self)
 
-

This method is called when a valid solution is found. If the return value is true, then search will resume after. If the result is false, then search will stop there.

+

This method is called when a valid solution is found. If the +return value is true, then search will resume after. If the result +is false, then search will stop there.

@@ -16710,13 +20156,17 @@ Randomized version of local search concatenator; calls a random operator at each
View Source
    def LocalOptimum(self) -> "bool":
-        r""" When a local optimum is reached. If 'true' is returned, the last solution is discarded and the search proceeds with the next one."""
+        r"""
+        When a local optimum is reached. If 'true' is returned, the last solution
+        is discarded and the search proceeds with the next one.
+        """
         return _pywrapcp.SearchMonitor_LocalOptimum(self)
 
-

When a local optimum is reached. If 'true' is returned, the last solution is discarded and the search proceeds with the next one.

+

When a local optimum is reached. If 'true' is returned, the last solution +is discarded and the search proceeds with the next one.

@@ -16736,6 +20186,7 @@ Randomized version of local search concatenator; calls a random operator at each
View Source
    def AcceptDelta(self, delta: "Assignment", deltadelta: "Assignment") -> "bool":
+        
         return _pywrapcp.SearchMonitor_AcceptDelta(self, delta, deltadelta)
 
@@ -16807,7 +20258,15 @@ Randomized version of local search concatenator; calls a random operator at each
View Source
class IntExpr(PropagationBaseObject):
-    r""" The class IntExpr is the base of all integer expressions in constraint programming. It contains the basic protocol for an expression:   - setting and modifying its bound   - querying if it is bound   - listening to events modifying its bounds   - casting it into a variable (instance of IntVar)"""
+    r"""
+    The class IntExpr is the base of all integer expressions in
+    constraint programming.
+    It contains the basic protocol for an expression:
+      - setting and modifying its bound
+      - querying if it is bound
+      - listening to events modifying its bounds
+      - casting it into a variable (instance of IntVar)
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -16847,7 +20306,12 @@ Randomized version of local search concatenator; calls a random operator at each
         return _pywrapcp.IntExpr_Var(self)
 
     def VarWithName(self, name: "std::string const &") -> "operations_research::IntVar *":
-        r""" Creates a variable from the expression and set the name of the resulting var. If the expression is already a variable, then it will set the name of the expression, possibly overwriting it. This is just a shortcut to Var() followed by set_name()."""
+        r"""
+        Creates a variable from the expression and set the name of the
+        resulting var. If the expression is already a variable, then it
+        will set the name of the expression, possibly overwriting it.
+        This is just a shortcut to Var() followed by set_name().
+        """
         return _pywrapcp.IntExpr_VarWithName(self, name)
 
     def WhenRange(self, *args) -> "void":
@@ -16937,7 +20401,19 @@ Randomized version of local search concatenator; calls a random operator at each
 
         
-

The class IntExpr is the base of all integer expressions in constraint programming. It contains the basic protocol for an expression: - setting and modifying its bound - querying if it is bound - listening to events modifying its bounds - casting it into a variable (instance of IntVar)

+

The class IntExpr is the base of all integer expressions in +constraint programming.

+ +
It contains the basic protocol for an expression
+ +
+
    +
  • setting and modifying its bound
  • +
  • querying if it is bound
  • +
  • listening to events modifying its bounds
  • +
  • casting it into a variable (instance of IntVar)
  • +
+
@@ -17167,13 +20643,21 @@ Randomized version of local search concatenator; calls a random operator at each
View Source
    def VarWithName(self, name: "std::string const &") -> "operations_research::IntVar *":
-        r""" Creates a variable from the expression and set the name of the resulting var. If the expression is already a variable, then it will set the name of the expression, possibly overwriting it. This is just a shortcut to Var() followed by set_name()."""
+        r"""
+        Creates a variable from the expression and set the name of the
+        resulting var. If the expression is already a variable, then it
+        will set the name of the expression, possibly overwriting it.
+        This is just a shortcut to Var() followed by set_name().
+        """
         return _pywrapcp.IntExpr_VarWithName(self, name)
 
-

Creates a variable from the expression and set the name of the resulting var. If the expression is already a variable, then it will set the name of the expression, possibly overwriting it. This is just a shortcut to Var() followed by set_name().

+

Creates a variable from the expression and set the name of the +resulting var. If the expression is already a variable, then it +will set the name of the expression, possibly overwriting it. +This is just a shortcut to Var() followed by set_name().

@@ -17365,7 +20849,22 @@ Attach a demon that will watch the min or the max of the expression.

View Source
class IntVarIterator(BaseObject):
-    r""" The class Iterator has two direct subclasses. HoleIterators iterates over all holes, that is value removed between the current min and max of the variable since the last time the variable was processed in the queue. DomainIterators iterates over all elements of the variable domain. Both iterators are not robust to domain changes. Hole iterators can also report values outside the current min and max of the variable. HoleIterators should only be called from a demon attached to the variable that has created this iterator. IntVar* current_var; std::unique_ptr<IntVarIterator> it(current_var->MakeHoleIterator(false)); for (const int64_t hole : InitAndGetValues(it)) {   /// use the hole }"""
+    r"""
+     The class Iterator has two direct subclasses. HoleIterators
+     iterates over all holes, that is value removed between the
+     current min and max of the variable since the last time the
+     variable was processed in the queue. DomainIterators iterates
+     over all elements of the variable domain. Both iterators are not
+     robust to domain changes. Hole iterators can also report values outside
+     the current min and max of the variable.
+     HoleIterators should only be called from a demon attached to the
+     variable that has created this iterator.
+     IntVar* current_var;
+     std::unique_ptr<IntVarIterator> it(current_var->MakeHoleIterator(false));
+     for (const int64_t hole : InitAndGetValues(it)) {
+    use the hole
+     }
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -17411,7 +20910,20 @@ Attach a demon that will watch the min or the max of the expression.

-

The class Iterator has two direct subclasses. HoleIterators iterates over all holes, that is value removed between the current min and max of the variable since the last time the variable was processed in the queue. DomainIterators iterates over all elements of the variable domain. Both iterators are not robust to domain changes. Hole iterators can also report values outside the current min and max of the variable. HoleIterators should only be called from a demon attached to the variable that has created this iterator. IntVar* current_var; std::unique_ptr it(current_var->MakeHoleIterator(false)); for (const int64_t hole : InitAndGetValues(it)) { /// use the hole }

+

The class Iterator has two direct subclasses. HoleIterators + iterates over all holes, that is value removed between the + current min and max of the variable since the last time the + variable was processed in the queue. DomainIterators iterates + over all elements of the variable domain. Both iterators are not + robust to domain changes. Hole iterators can also report values outside + the current min and max of the variable. + HoleIterators should only be called from a demon attached to the + variable that has created this iterator. + IntVar* current_var; + std::unique_ptr it(current_var->MakeHoleIterator(false)); + for (const int64_t hole : InitAndGetValues(it)) { +use the hole + }

@@ -17591,7 +21103,11 @@ Attach a demon that will watch the min or the max of the expression.

View Source
class IntVar(IntExpr):
-    r""" The class IntVar is a subset of IntExpr. In addition to the IntExpr protocol, it offers persistence, removing values from the domains, and a finer model for events."""
+    r"""
+    The class IntVar is a subset of IntExpr. In addition to the
+    IntExpr protocol, it offers persistence, removing values from the domains,
+    and a finer model for events.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -17605,7 +21121,10 @@ Attach a demon that will watch the min or the max of the expression.

return _pywrapcp.IntVar_Var(self) def Value(self) -> "int64_t": - r""" This method returns the value of the variable. This method checks before that the variable is bound.""" + r""" + This method returns the value of the variable. This method checks + before that the variable is bound. + """ return _pywrapcp.IntVar_Value(self) def RemoveValue(self, v: "int64_t") -> "void": @@ -17613,7 +21132,10 @@ Attach a demon that will watch the min or the max of the expression.

return _pywrapcp.IntVar_RemoveValue(self, v) def RemoveInterval(self, l: "int64_t", u: "int64_t") -> "void": - r""" This method removes the interval 'l' .. 'u' from the domain of the variable. It assumes that 'l' <= 'u'.""" + r""" + This method removes the interval 'l' .. 'u' from the domain of + the variable. It assumes that 'l' <= 'u'. + """ return _pywrapcp.IntVar_RemoveInterval(self, l, u) def RemoveValues(self, values: "std::vector< int64_t > const &") -> "void": @@ -17627,24 +21149,28 @@ Attach a demon that will watch the min or the max of the expression.

def WhenBound(self, *args) -> "void": r""" *Overload 1:* - This method attaches a demon that will be awakened when the variable is bound. + This method attaches a demon that will be awakened when the + variable is bound. | *Overload 2:* - This method attaches a closure that will be awakened when the variable is bound. + This method attaches a closure that will be awakened when the + variable is bound. """ return _pywrapcp.IntVar_WhenBound(self, *args) def WhenDomain(self, *args) -> "void": r""" *Overload 1:* - This method attaches a demon that will watch any domain modification of the domain of the variable. + This method attaches a demon that will watch any domain + modification of the domain of the variable. | *Overload 2:* - This method attaches a closure that will watch any domain modification of the domain of the variable. + This method attaches a closure that will watch any domain + modification of the domain of the variable. """ return _pywrapcp.IntVar_WhenDomain(self, *args) @@ -17653,15 +21179,26 @@ Attach a demon that will watch the min or the max of the expression.

return _pywrapcp.IntVar_Size(self) def Contains(self, v: "int64_t") -> "bool": - r""" This method returns whether the value 'v' is in the domain of the variable.""" + r""" + This method returns whether the value 'v' is in the domain of the + variable. + """ return _pywrapcp.IntVar_Contains(self, v) def HoleIteratorAux(self, reversible: "bool") -> "operations_research::IntVarIterator *": - r""" Creates a hole iterator. When 'reversible' is false, the returned object is created on the normal C++ heap and the solver does NOT take ownership of the object.""" + r""" + Creates a hole iterator. When 'reversible' is false, the returned + object is created on the normal C++ heap and the solver does NOT + take ownership of the object. + """ return _pywrapcp.IntVar_HoleIteratorAux(self, reversible) def DomainIteratorAux(self, reversible: "bool") -> "operations_research::IntVarIterator *": - r""" Creates a domain iterator. When 'reversible' is false, the returned object is created on the normal C++ heap and the solver does NOT take ownership of the object.""" + r""" + Creates a domain iterator. When 'reversible' is false, the + returned object is created on the normal C++ heap and the solver + does NOT take ownership of the object. + """ return _pywrapcp.IntVar_DomainIteratorAux(self, reversible) def OldMin(self) -> "int64_t": @@ -17687,7 +21224,9 @@ Attach a demon that will watch the min or the max of the expression.

-

The class IntVar is a subset of IntExpr. In addition to the IntExpr protocol, it offers persistence, removing values from the domains, and a finer model for events.

+

The class IntVar is a subset of IntExpr. In addition to the +IntExpr protocol, it offers persistence, removing values from the domains, +and a finer model for events.

@@ -17773,13 +21312,17 @@ Attach a demon that will watch the min or the max of the expression.

View Source
    def Value(self) -> "int64_t":
-        r""" This method returns the value of the variable. This method checks before that the variable is bound."""
+        r"""
+        This method returns the value of the variable. This method checks
+        before that the variable is bound.
+        """
         return _pywrapcp.IntVar_Value(self)
 
-

This method returns the value of the variable. This method checks before that the variable is bound.

+

This method returns the value of the variable. This method checks +before that the variable is bound.

@@ -17817,13 +21360,17 @@ Attach a demon that will watch the min or the max of the expression.

View Source
    def RemoveInterval(self, l: "int64_t", u: "int64_t") -> "void":
-        r""" This method removes the interval 'l' .. 'u' from the domain of the variable. It assumes that 'l' <= 'u'."""
+        r"""
+        This method removes the interval 'l' .. 'u' from the domain of
+        the variable. It assumes that 'l' <= 'u'.
+        """
         return _pywrapcp.IntVar_RemoveInterval(self, l, u)
 
-

This method removes the interval 'l' .. 'u' from the domain of the variable. It assumes that 'l' <= 'u'.

+

This method removes the interval 'l' .. 'u' from the domain of +the variable. It assumes that 'l' <= 'u'.

@@ -17885,12 +21432,14 @@ Attach a demon that will watch the min or the max of the expression.

    def WhenBound(self, *args) -> "void":
         r"""
         *Overload 1:*
-        This method attaches a demon that will be awakened when the variable is bound.
+        This method attaches a demon that will be awakened when the
+        variable is bound.
 
         |
 
         *Overload 2:*
-        This method attaches a closure that will be awakened when the variable is bound.
+        This method attaches a closure that will be awakened when the
+        variable is bound.
         """
         return _pywrapcp.IntVar_WhenBound(self, *args)
 
@@ -17898,12 +21447,14 @@ Attach a demon that will watch the min or the max of the expression.

Overload 1: -This method attaches a demon that will be awakened when the variable is bound.

+This method attaches a demon that will be awakened when the +variable is bound.

|

Overload 2: -This method attaches a closure that will be awakened when the variable is bound.

+This method attaches a closure that will be awakened when the +variable is bound.

@@ -17921,12 +21472,14 @@ This method attaches a closure that will be awakened when the variable is bound.
    def WhenDomain(self, *args) -> "void":
         r"""
         *Overload 1:*
-        This method attaches a demon that will watch any domain modification of the domain of the variable.
+        This method attaches a demon that will watch any domain
+        modification of the domain of the variable.
 
         |
 
         *Overload 2:*
-        This method attaches a closure that will watch any domain modification of the domain of the variable.
+        This method attaches a closure that will watch any domain
+        modification of the domain of the variable.
         """
         return _pywrapcp.IntVar_WhenDomain(self, *args)
 
@@ -17934,12 +21487,14 @@ This method attaches a closure that will be awakened when the variable is bound.

Overload 1: -This method attaches a demon that will watch any domain modification of the domain of the variable.

+This method attaches a demon that will watch any domain +modification of the domain of the variable.

|

Overload 2: -This method attaches a closure that will watch any domain modification of the domain of the variable.

+This method attaches a closure that will watch any domain +modification of the domain of the variable.

@@ -17977,13 +21532,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def Contains(self, v: "int64_t") -> "bool":
-        r""" This method returns whether the value 'v' is in the domain of the variable."""
+        r"""
+        This method returns whether the value 'v' is in the domain of the
+        variable.
+        """
         return _pywrapcp.IntVar_Contains(self, v)
 
-

This method returns whether the value 'v' is in the domain of the variable.

+

This method returns whether the value 'v' is in the domain of the +variable.

@@ -17999,13 +21558,19 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def HoleIteratorAux(self, reversible: "bool") -> "operations_research::IntVarIterator *":
-        r""" Creates a hole iterator. When 'reversible' is false, the returned object is created on the normal C++ heap and the solver does NOT take ownership of the object."""
+        r"""
+        Creates a hole iterator. When 'reversible' is false, the returned
+        object is created on the normal C++ heap and the solver does NOT
+        take ownership of the object.
+        """
         return _pywrapcp.IntVar_HoleIteratorAux(self, reversible)
 
-

Creates a hole iterator. When 'reversible' is false, the returned object is created on the normal C++ heap and the solver does NOT take ownership of the object.

+

Creates a hole iterator. When 'reversible' is false, the returned +object is created on the normal C++ heap and the solver does NOT +take ownership of the object.

@@ -18021,13 +21586,19 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def DomainIteratorAux(self, reversible: "bool") -> "operations_research::IntVarIterator *":
-        r""" Creates a domain iterator. When 'reversible' is false, the returned object is created on the normal C++ heap and the solver does NOT take ownership of the object."""
+        r"""
+        Creates a domain iterator. When 'reversible' is false, the
+        returned object is created on the normal C++ heap and the solver
+        does NOT take ownership of the object.
+        """
         return _pywrapcp.IntVar_DomainIteratorAux(self, reversible)
 
-

Creates a domain iterator. When 'reversible' is false, the returned object is created on the normal C++ heap and the solver does NOT take ownership of the object.

+

Creates a domain iterator. When 'reversible' is false, the +returned object is created on the normal C++ heap and the solver +does NOT take ownership of the object.

@@ -18156,7 +21727,11 @@ This method attaches a closure that will watch any domain modification of the do
View Source
class SolutionCollector(SearchMonitor):
-    r""" This class is the root class of all solution collectors. It implements a basic query API to be used independently of the collector used."""
+    r"""
+    This class is the root class of all solution collectors.
+    It implements a basic query API to be used independently
+    of the collector used.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -18194,7 +21769,10 @@ This method attaches a closure that will watch any domain modification of the do
         return _pywrapcp.SolutionCollector_Branches(self, n)
 
     def Failures(self, n: "int") -> "int64_t":
-        r""" Returns the number of failures encountered at the time of the nth solution."""
+        r"""
+        Returns the number of failures encountered at the time of the nth
+        solution.
+        """
         return _pywrapcp.SolutionCollector_Failures(self, n)
 
     def ObjectiveValue(self, n: "int") -> "int64_t":
@@ -18222,21 +21800,34 @@ This method attaches a closure that will watch any domain modification of the do
         return _pywrapcp.SolutionCollector_PerformedValue(self, n, var)
 
     def ForwardSequence(self, n: "int", var: "SequenceVar") -> "std::vector< int > const &":
-        r""" This is a shortcut to get the ForwardSequence of 'var' in the nth solution. The forward sequence is the list of ranked interval variables starting from the start of the sequence."""
+        r"""
+        This is a shortcut to get the ForwardSequence of 'var' in the
+        nth solution. The forward sequence is the list of ranked interval
+        variables starting from the start of the sequence.
+        """
         return _pywrapcp.SolutionCollector_ForwardSequence(self, n, var)
 
     def BackwardSequence(self, n: "int", var: "SequenceVar") -> "std::vector< int > const &":
-        r""" This is a shortcut to get the BackwardSequence of 'var' in the nth solution. The backward sequence is the list of ranked interval variables starting from the end of the sequence."""
+        r"""
+        This is a shortcut to get the BackwardSequence of 'var' in the
+        nth solution. The backward sequence is the list of ranked interval
+        variables starting from the end of the sequence.
+        """
         return _pywrapcp.SolutionCollector_BackwardSequence(self, n, var)
 
     def Unperformed(self, n: "int", var: "SequenceVar") -> "std::vector< int > const &":
-        r""" This is a shortcut to get the list of unperformed of 'var' in the nth solution."""
+        r"""
+        This is a shortcut to get the list of unperformed of 'var' in the
+        nth solution.
+        """
         return _pywrapcp.SolutionCollector_Unperformed(self, n, var)
 
-

This class is the root class of all solution collectors. It implements a basic query API to be used independently of the collector used.

+

This class is the root class of all solution collectors. +It implements a basic query API to be used independently +of the collector used.

@@ -18447,13 +22038,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def Failures(self, n: "int") -> "int64_t":
-        r""" Returns the number of failures encountered at the time of the nth solution."""
+        r"""
+        Returns the number of failures encountered at the time of the nth
+        solution.
+        """
         return _pywrapcp.SolutionCollector_Failures(self, n)
 
-

Returns the number of failures encountered at the time of the nth solution.

+

Returns the number of failures encountered at the time of the nth +solution.

@@ -18605,13 +22200,19 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def ForwardSequence(self, n: "int", var: "SequenceVar") -> "std::vector< int > const &":
-        r""" This is a shortcut to get the ForwardSequence of 'var' in the nth solution. The forward sequence is the list of ranked interval variables starting from the start of the sequence."""
+        r"""
+        This is a shortcut to get the ForwardSequence of 'var' in the
+        nth solution. The forward sequence is the list of ranked interval
+        variables starting from the start of the sequence.
+        """
         return _pywrapcp.SolutionCollector_ForwardSequence(self, n, var)
 
-

This is a shortcut to get the ForwardSequence of 'var' in the nth solution. The forward sequence is the list of ranked interval variables starting from the start of the sequence.

+

This is a shortcut to get the ForwardSequence of 'var' in the +nth solution. The forward sequence is the list of ranked interval +variables starting from the start of the sequence.

@@ -18631,13 +22232,19 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def BackwardSequence(self, n: "int", var: "SequenceVar") -> "std::vector< int > const &":
-        r""" This is a shortcut to get the BackwardSequence of 'var' in the nth solution. The backward sequence is the list of ranked interval variables starting from the end of the sequence."""
+        r"""
+        This is a shortcut to get the BackwardSequence of 'var' in the
+        nth solution. The backward sequence is the list of ranked interval
+        variables starting from the end of the sequence.
+        """
         return _pywrapcp.SolutionCollector_BackwardSequence(self, n, var)
 
-

This is a shortcut to get the BackwardSequence of 'var' in the nth solution. The backward sequence is the list of ranked interval variables starting from the end of the sequence.

+

This is a shortcut to get the BackwardSequence of 'var' in the +nth solution. The backward sequence is the list of ranked interval +variables starting from the end of the sequence.

@@ -18657,13 +22264,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def Unperformed(self, n: "int", var: "SequenceVar") -> "std::vector< int > const &":
-        r""" This is a shortcut to get the list of unperformed of 'var' in the nth solution."""
+        r"""
+        This is a shortcut to get the list of unperformed of 'var' in the
+        nth solution.
+        """
         return _pywrapcp.SolutionCollector_Unperformed(self, n, var)
 
-

This is a shortcut to get the list of unperformed of 'var' in the nth solution.

+

This is a shortcut to get the list of unperformed of 'var' in the +nth solution.

@@ -18707,7 +22318,11 @@ This method attaches a closure that will watch any domain modification of the do
View Source
class OptimizeVar(SearchMonitor):
-    r""" This class encapsulates an objective. It requires the direction (minimize or maximize), the variable to optimize, and the improvement step."""
+    r"""
+    This class encapsulates an objective. It requires the direction
+    (minimize or maximize), the variable to optimize, and the
+    improvement step.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -18748,7 +22363,9 @@ This method attaches a closure that will watch any domain modification of the do
 
         
-

This class encapsulates an objective. It requires the direction (minimize or maximize), the variable to optimize, and the improvement step.

+

This class encapsulates an objective. It requires the direction +(minimize or maximize), the variable to optimize, and the +improvement step.

@@ -18930,7 +22547,9 @@ This method attaches a closure that will watch any domain modification of the do -

This method is called when a valid solution is found. If the return value is true, then search will resume after. If the result is false, then search will stop there.

+

This method is called when a valid solution is found. If the +return value is true, then search will resume after. If the result +is false, then search will stop there.

@@ -18951,7 +22570,9 @@ This method attaches a closure that will watch any domain modification of the do -

This method is called when a solution is found. It asserts whether the solution is valid. A value of false indicates that the solution should be discarded.

+

This method is called when a solution is found. It asserts whether the +solution is valid. A value of false indicates that the solution +should be discarded.

@@ -19023,7 +22644,12 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.SearchLimit_Crossed(self) def Check(self) -> "bool": - r""" This method is called to check the status of the limit. A return value of true indicates that we have indeed crossed the limit. In that case, this method will not be called again and the remaining search will be discarded.""" + r""" + This method is called to check the status of the limit. A return + value of true indicates that we have indeed crossed the limit. In + that case, this method will not be called again and the remaining + search will be discarded. + """ return _pywrapcp.SearchLimit_Check(self) def Init(self) -> "void": @@ -19112,13 +22738,21 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def Check(self) -> "bool":
-        r""" This method is called to check the status of the limit. A return value of true indicates that we have indeed crossed the limit. In that case, this method will not be called again and the remaining search will be discarded."""
+        r"""
+        This method is called to check the status of the limit. A return
+        value of true indicates that we have indeed crossed the limit. In
+        that case, this method will not be called again and the remaining
+        search will be discarded.
+        """
         return _pywrapcp.SearchLimit_Check(self)
 
-

This method is called to check the status of the limit. A return value of true indicates that we have indeed crossed the limit. In that case, this method will not be called again and the remaining search will be discarded.

+

This method is called to check the status of the limit. A return +value of true indicates that we have indeed crossed the limit. In +that case, this method will not be called again and the remaining +search will be discarded.

@@ -19265,7 +22899,18 @@ This method attaches a closure that will watch any domain modification of the do
View Source
class IntervalVar(PropagationBaseObject):
-    r""" Interval variables are often used in scheduling. The main characteristics of an IntervalVar are the start position, duration, and end date. All these characteristics can be queried and set, and demons can be posted on their modifications. An important aspect is optionality: an IntervalVar can be performed or not. If unperformed, then it simply does not exist, and its characteristics cannot be accessed any more. An interval var is automatically marked as unperformed when it is not consistent anymore (start greater than end, duration < 0...)"""
+    r"""
+    Interval variables are often used in scheduling. The main characteristics
+    of an IntervalVar are the start position, duration, and end
+    date. All these characteristics can be queried and set, and demons can
+    be posted on their modifications.
+
+    An important aspect is optionality: an IntervalVar can be performed or not.
+    If unperformed, then it simply does not exist, and its characteristics
+    cannot be accessed any more. An interval var is automatically marked
+    as unperformed when it is not consistent anymore (start greater
+    than end, duration < 0...)
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -19273,7 +22918,10 @@ This method attaches a closure that will watch any domain modification of the do
         raise AttributeError("No constructor defined - class is abstract")
 
     def StartMin(self) -> "int64_t":
-        r""" These methods query, set, and watch the start position of the interval var."""
+        r"""
+        These methods query, set, and watch the start position of the
+        interval var.
+        """
         return _pywrapcp.IntervalVar_StartMin(self)
 
     def StartMax(self) -> "int64_t":
@@ -19357,7 +23005,10 @@ This method attaches a closure that will watch any domain modification of the do
         return _pywrapcp.IntervalVar_WhenEndBound(self, *args)
 
     def MustBePerformed(self) -> "bool":
-        r""" These methods query, set, and watch the performed status of the interval var."""
+        r"""
+        These methods query, set, and watch the performed status of the
+        interval var.
+        """
         return _pywrapcp.IntervalVar_MustBePerformed(self)
 
     def MayBePerformed(self) -> "bool":
@@ -19391,7 +23042,11 @@ This method attaches a closure that will watch any domain modification of the do
         return _pywrapcp.IntervalVar_WhenAnything(self, *args)
 
     def StartExpr(self) -> "operations_research::IntExpr *":
-        r""" These methods create expressions encapsulating the start, end and duration of the interval var. Please note that these must not be used if the interval var is unperformed."""
+        r"""
+        These methods create expressions encapsulating the start, end
+        and duration of the interval var. Please note that these must not
+        be used if the interval var is unperformed.
+        """
         return _pywrapcp.IntervalVar_StartExpr(self)
 
     def DurationExpr(self) -> "operations_research::IntExpr *":
@@ -19404,7 +23059,11 @@ This method attaches a closure that will watch any domain modification of the do
         return _pywrapcp.IntervalVar_PerformedExpr(self)
 
     def SafeStartExpr(self, unperformed_value: "int64_t") -> "operations_research::IntExpr *":
-        r""" These methods create expressions encapsulating the start, end and duration of the interval var. If the interval var is unperformed, they will return the unperformed_value."""
+        r"""
+        These methods create expressions encapsulating the start, end
+        and duration of the interval var. If the interval var is
+        unperformed, they will return the unperformed_value.
+        """
         return _pywrapcp.IntervalVar_SafeStartExpr(self, unperformed_value)
 
     def SafeDurationExpr(self, unperformed_value: "int64_t") -> "operations_research::IntExpr *":
@@ -19500,7 +23159,16 @@ This method attaches a closure that will watch any domain modification of the do
 
         
-

Interval variables are often used in scheduling. The main characteristics of an IntervalVar are the start position, duration, and end date. All these characteristics can be queried and set, and demons can be posted on their modifications. An important aspect is optionality: an IntervalVar can be performed or not. If unperformed, then it simply does not exist, and its characteristics cannot be accessed any more. An interval var is automatically marked as unperformed when it is not consistent anymore (start greater than end, duration < 0...)

+

Interval variables are often used in scheduling. The main characteristics +of an IntervalVar are the start position, duration, and end +date. All these characteristics can be queried and set, and demons can +be posted on their modifications.

+ +

An important aspect is optionality: an IntervalVar can be performed or not. +If unperformed, then it simply does not exist, and its characteristics +cannot be accessed any more. An interval var is automatically marked +as unperformed when it is not consistent anymore (start greater +than end, duration < 0...)

@@ -19544,13 +23212,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def StartMin(self) -> "int64_t":
-        r""" These methods query, set, and watch the start position of the interval var."""
+        r"""
+        These methods query, set, and watch the start position of the
+        interval var.
+        """
         return _pywrapcp.IntervalVar_StartMin(self)
 
-

These methods query, set, and watch the start position of the interval var.

+

These methods query, set, and watch the start position of the +interval var.

@@ -20066,13 +23738,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def MustBePerformed(self) -> "bool":
-        r""" These methods query, set, and watch the performed status of the interval var."""
+        r"""
+        These methods query, set, and watch the performed status of the
+        interval var.
+        """
         return _pywrapcp.IntervalVar_MustBePerformed(self)
 
-

These methods query, set, and watch the performed status of the interval var.

+

These methods query, set, and watch the performed status of the +interval var.

@@ -20238,13 +23914,19 @@ Attaches a closure awakened when anything about this interval changes.

View Source
    def StartExpr(self) -> "operations_research::IntExpr *":
-        r""" These methods create expressions encapsulating the start, end and duration of the interval var. Please note that these must not be used if the interval var is unperformed."""
+        r"""
+        These methods create expressions encapsulating the start, end
+        and duration of the interval var. Please note that these must not
+        be used if the interval var is unperformed.
+        """
         return _pywrapcp.IntervalVar_StartExpr(self)
 
-

These methods create expressions encapsulating the start, end and duration of the interval var. Please note that these must not be used if the interval var is unperformed.

+

These methods create expressions encapsulating the start, end +and duration of the interval var. Please note that these must not +be used if the interval var is unperformed.

@@ -20320,13 +24002,19 @@ Attaches a closure awakened when anything about this interval changes.

View Source
    def SafeStartExpr(self, unperformed_value: "int64_t") -> "operations_research::IntExpr *":
-        r""" These methods create expressions encapsulating the start, end and duration of the interval var. If the interval var is unperformed, they will return the unperformed_value."""
+        r"""
+        These methods create expressions encapsulating the start, end
+        and duration of the interval var. If the interval var is
+        unperformed, they will return the unperformed_value.
+        """
         return _pywrapcp.IntervalVar_SafeStartExpr(self, unperformed_value)
 
-

These methods create expressions encapsulating the start, end and duration of the interval var. If the interval var is unperformed, they will return the unperformed_value.

+

These methods create expressions encapsulating the start, end +and duration of the interval var. If the interval var is +unperformed, they will return the unperformed_value.

@@ -20956,7 +24644,14 @@ Attaches a closure awakened when anything about this interval changes.

View Source
class SequenceVar(PropagationBaseObject):
-    r""" A sequence variable is a variable whose domain is a set of possible orderings of the interval variables. It allows ordering of tasks. It has two sets of methods: ComputePossibleFirstsAndLasts(), which returns the list of interval variables that can be ranked first or last; and RankFirst/RankNotFirst/RankLast/RankNotLast, which can be used to create the search decision."""
+    r"""
+    A sequence variable is a variable whose domain is a set of possible
+    orderings of the interval variables. It allows ordering of tasks. It
+    has two sets of methods: ComputePossibleFirstsAndLasts(), which
+    returns the list of interval variables that can be ranked first or
+    last; and RankFirst/RankNotFirst/RankLast/RankNotLast, which can be
+    used to create the search decision.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -20967,19 +24662,31 @@ Attaches a closure awakened when anything about this interval changes.

return _pywrapcp.SequenceVar_DebugString(self) def RankFirst(self, index: "int") -> "void": - r""" Ranks the index_th interval var first of all unranked interval vars. After that, it will no longer be considered ranked.""" + r""" + Ranks the index_th interval var first of all unranked interval + vars. After that, it will no longer be considered ranked. + """ return _pywrapcp.SequenceVar_RankFirst(self, index) def RankNotFirst(self, index: "int") -> "void": - r""" Indicates that the index_th interval var will not be ranked first of all currently unranked interval vars.""" + r""" + Indicates that the index_th interval var will not be ranked first + of all currently unranked interval vars. + """ return _pywrapcp.SequenceVar_RankNotFirst(self, index) def RankLast(self, index: "int") -> "void": - r""" Ranks the index_th interval var first of all unranked interval vars. After that, it will no longer be considered ranked.""" + r""" + Ranks the index_th interval var first of all unranked interval + vars. After that, it will no longer be considered ranked. + """ return _pywrapcp.SequenceVar_RankLast(self, index) def RankNotLast(self, index: "int") -> "void": - r""" Indicates that the index_th interval var will not be ranked first of all currently unranked interval vars.""" + r""" + Indicates that the index_th interval var will not be ranked first + of all currently unranked interval vars. + """ return _pywrapcp.SequenceVar_RankNotLast(self, index) def Interval(self, index: "int") -> "operations_research::IntervalVar *": @@ -21003,7 +24710,12 @@ Attaches a closure awakened when anything about this interval changes.

-

A sequence variable is a variable whose domain is a set of possible orderings of the interval variables. It allows ordering of tasks. It has two sets of methods: ComputePossibleFirstsAndLasts(), which returns the list of interval variables that can be ranked first or last; and RankFirst/RankNotFirst/RankLast/RankNotLast, which can be used to create the search decision.

+

A sequence variable is a variable whose domain is a set of possible +orderings of the interval variables. It allows ordering of tasks. It +has two sets of methods: ComputePossibleFirstsAndLasts(), which +returns the list of interval variables that can be ranked first or +last; and RankFirst/RankNotFirst/RankLast/RankNotLast, which can be +used to create the search decision.

@@ -21066,13 +24778,17 @@ Attaches a closure awakened when anything about this interval changes.

View Source
    def RankFirst(self, index: "int") -> "void":
-        r""" Ranks the index_th interval var first of all unranked interval vars. After that, it will no longer be considered ranked."""
+        r"""
+        Ranks the index_th interval var first of all unranked interval
+        vars. After that, it will no longer be considered ranked.
+        """
         return _pywrapcp.SequenceVar_RankFirst(self, index)
 
-

Ranks the index_th interval var first of all unranked interval vars. After that, it will no longer be considered ranked.

+

Ranks the index_th interval var first of all unranked interval +vars. After that, it will no longer be considered ranked.

@@ -21088,13 +24804,17 @@ Attaches a closure awakened when anything about this interval changes.

View Source
    def RankNotFirst(self, index: "int") -> "void":
-        r""" Indicates that the index_th interval var will not be ranked first of all currently unranked interval vars."""
+        r"""
+        Indicates that the index_th interval var will not be ranked first
+        of all currently unranked interval vars.
+        """
         return _pywrapcp.SequenceVar_RankNotFirst(self, index)
 
-

Indicates that the index_th interval var will not be ranked first of all currently unranked interval vars.

+

Indicates that the index_th interval var will not be ranked first +of all currently unranked interval vars.

@@ -21110,13 +24830,17 @@ Attaches a closure awakened when anything about this interval changes.

View Source
    def RankLast(self, index: "int") -> "void":
-        r""" Ranks the index_th interval var first of all unranked interval vars. After that, it will no longer be considered ranked."""
+        r"""
+        Ranks the index_th interval var first of all unranked interval
+        vars. After that, it will no longer be considered ranked.
+        """
         return _pywrapcp.SequenceVar_RankLast(self, index)
 
-

Ranks the index_th interval var first of all unranked interval vars. After that, it will no longer be considered ranked.

+

Ranks the index_th interval var first of all unranked interval +vars. After that, it will no longer be considered ranked.

@@ -21132,13 +24856,17 @@ Attaches a closure awakened when anything about this interval changes.

View Source
    def RankNotLast(self, index: "int") -> "void":
-        r""" Indicates that the index_th interval var will not be ranked first of all currently unranked interval vars."""
+        r"""
+        Indicates that the index_th interval var will not be ranked first
+        of all currently unranked interval vars.
+        """
         return _pywrapcp.SequenceVar_RankNotLast(self, index)
 
-

Indicates that the index_th interval var will not be ranked first of all currently unranked interval vars.

+

Indicates that the index_th interval var will not be ranked first +of all currently unranked interval vars.

@@ -22330,7 +26058,21 @@ Attaches a closure awakened when anything about this interval changes.

View Source
class SequenceVarElement(AssignmentElement):
-    r""" The SequenceVarElement stores a partial representation of ranked interval variables in the underlying sequence variable. This representation consists of three vectors:   - the forward sequence. That is the list of interval variables     ranked first in the sequence.  The first element of the backward     sequence is the first interval in the sequence variable.   - the backward sequence. That is the list of interval variables     ranked last in the sequence. The first element of the backward     sequence is the last interval in the sequence variable.   - The list of unperformed interval variables.  Furthermore, if all performed variables are ranked, then by  convention, the forward_sequence will contain all such variables  and the backward_sequence will be empty."""
+    r"""
+    The SequenceVarElement stores a partial representation of ranked
+    interval variables in the underlying sequence variable.
+    This representation consists of three vectors:
+      - the forward sequence. That is the list of interval variables
+        ranked first in the sequence.  The first element of the backward
+        sequence is the first interval in the sequence variable.
+      - the backward sequence. That is the list of interval variables
+        ranked last in the sequence. The first element of the backward
+        sequence is the last interval in the sequence variable.
+      - The list of unperformed interval variables.
+     Furthermore, if all performed variables are ranked, then by
+     convention, the forward_sequence will contain all such variables
+     and the backward_sequence will be empty.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -22372,7 +26114,25 @@ Attaches a closure awakened when anything about this interval changes.

-

The SequenceVarElement stores a partial representation of ranked interval variables in the underlying sequence variable. This representation consists of three vectors: - the forward sequence. That is the list of interval variables ranked first in the sequence. The first element of the backward sequence is the first interval in the sequence variable. - the backward sequence. That is the list of interval variables ranked last in the sequence. The first element of the backward sequence is the last interval in the sequence variable. - The list of unperformed interval variables. Furthermore, if all performed variables are ranked, then by convention, the forward_sequence will contain all such variables and the backward_sequence will be empty.

+

The SequenceVarElement stores a partial representation of ranked +interval variables in the underlying sequence variable.

+ +
This representation consists of three vectors
+ +
+
    +
  • the forward sequence. That is the list of interval variables + ranked first in the sequence. The first element of the backward + sequence is the first interval in the sequence variable.
  • +
  • the backward sequence. That is the list of interval variables + ranked last in the sequence. The first element of the backward + sequence is the last interval in the sequence variable.
  • +
  • The list of unperformed interval variables. + Furthermore, if all performed variables are ranked, then by + convention, the forward_sequence will contain all such variables + and the backward_sequence will be empty.
  • +
+
@@ -22586,7 +26346,10 @@ Attaches a closure awakened when anything about this interval changes.

View Source
class Assignment(PropagationBaseObject):
-    r""" An Assignment is a variable -> domains mapping, used to report solutions to the user."""
+    r"""
+    An Assignment is a variable -> domains mapping, used
+    to report solutions to the user.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -22828,7 +26591,8 @@ Attaches a closure awakened when anything about this interval changes.

-

An Assignment is a variable -> domains mapping, used to report solutions to the user.

+

An Assignment is a variable -> domains mapping, used +to report solutions to the user.

@@ -24356,46 +28120,80 @@ Attaches a closure awakened when anything about this interval changes.

def AddWeightedSumLessOrEqualConstantDimension(self, *args) -> "void": r""" *Overload 1:* - Dimensions are additional constraints than can restrict what is possible with the pack constraint. It can be used to set capacity limits, to count objects per bin, to compute unassigned penalties... This dimension imposes that for all bins b, the weighted sum (weights[i]) of all objects i assigned to 'b' is less or equal 'bounds[b]'. + Dimensions are additional constraints than can restrict what is + possible with the pack constraint. It can be used to set capacity + limits, to count objects per bin, to compute unassigned + penalties... + This dimension imposes that for all bins b, the weighted sum + (weights[i]) of all objects i assigned to 'b' is less or equal + 'bounds[b]'. | *Overload 2:* - This dimension imposes that for all bins b, the weighted sum (weights->Run(i)) of all objects i assigned to 'b' is less or equal to 'bounds[b]'. Ownership of the callback is transferred to the pack constraint. + This dimension imposes that for all bins b, the weighted sum + (weights->Run(i)) of all objects i assigned to 'b' is less or + equal to 'bounds[b]'. Ownership of the callback is transferred to + the pack constraint. | *Overload 3:* - This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b) of all objects i assigned to 'b' is less or equal to 'bounds[b]'. Ownership of the callback is transferred to the pack constraint. + This dimension imposes that for all bins b, the weighted sum + (weights->Run(i, b) of all objects i assigned to 'b' is less or + equal to 'bounds[b]'. Ownership of the callback is transferred to + the pack constraint. """ return _pywrapcp.Pack_AddWeightedSumLessOrEqualConstantDimension(self, *args) def AddWeightedSumEqualVarDimension(self, *args) -> "void": r""" *Overload 1:* - This dimension imposes that for all bins b, the weighted sum (weights[i]) of all objects i assigned to 'b' is equal to loads[b]. + This dimension imposes that for all bins b, the weighted sum + (weights[i]) of all objects i assigned to 'b' is equal to loads[b]. | *Overload 2:* - This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)) of all objects i assigned to 'b' is equal to loads[b]. + This dimension imposes that for all bins b, the weighted sum + (weights->Run(i, b)) of all objects i assigned to 'b' is equal to + loads[b]. """ return _pywrapcp.Pack_AddWeightedSumEqualVarDimension(self, *args) def AddSumVariableWeightsLessOrEqualConstantDimension(self, usage: "std::vector< operations_research::IntVar * > const &", capacity: "std::vector< int64_t > const &") -> "void": - r""" This dimension imposes: forall b in bins, sum (i in items: usage[i] * is_assigned(i, b)) <= capacity[b] where is_assigned(i, b) is true if and only if item i is assigned to the bin b. This can be used to model shapes of items by linking variables of the same item on parallel dimensions with an allowed assignment constraint.""" + r""" + This dimension imposes: + forall b in bins, + sum (i in items: usage[i] * is_assigned(i, b)) <= capacity[b] + where is_assigned(i, b) is true if and only if item i is assigned + to the bin b. + + This can be used to model shapes of items by linking variables of + the same item on parallel dimensions with an allowed assignment + constraint. + """ return _pywrapcp.Pack_AddSumVariableWeightsLessOrEqualConstantDimension(self, usage, capacity) def AddWeightedSumOfAssignedDimension(self, weights: "std::vector< int64_t > const &", cost_var: "IntVar") -> "void": - r""" This dimension enforces that cost_var == sum of weights[i] for all objects 'i' assigned to a bin.""" + r""" + This dimension enforces that cost_var == sum of weights[i] for + all objects 'i' assigned to a bin. + """ return _pywrapcp.Pack_AddWeightedSumOfAssignedDimension(self, weights, cost_var) def AddCountUsedBinDimension(self, count_var: "IntVar") -> "void": - r""" This dimension links 'count_var' to the actual number of bins used in the pack.""" + r""" + This dimension links 'count_var' to the actual number of bins used in the + pack. + """ return _pywrapcp.Pack_AddCountUsedBinDimension(self, count_var) def AddCountAssignedItemsDimension(self, count_var: "IntVar") -> "void": - r""" This dimension links 'count_var' to the actual number of items assigned to a bin in the pack.""" + r""" + This dimension links 'count_var' to the actual number of items + assigned to a bin in the pack. + """ return _pywrapcp.Pack_AddCountAssignedItemsDimension(self, count_var) def Post(self) -> "void": @@ -24410,7 +28208,15 @@ Attaches a closure awakened when anything about this interval changes.

-

A constraint is the main modeling object. It provides two methods: - Post() is responsible for creating the demons and attaching them to immediate demons(). - InitialPropagate() is called once just after Post and performs the initial propagation. The subsequent propagations will be performed by the demons Posted during the post() method.

+

A constraint is the main modeling object. It provides two methods:

+ +
    +
  • Post() is responsible for creating the demons and attaching them to +immediate demons().
  • +
  • InitialPropagate() is called once just after Post and performs +the initial propagation. The subsequent propagations will be performed +by the demons Posted during the post() method.
  • +
@@ -24456,17 +28262,29 @@ Attaches a closure awakened when anything about this interval changes.

    def AddWeightedSumLessOrEqualConstantDimension(self, *args) -> "void":
         r"""
         *Overload 1:*
-        Dimensions are additional constraints than can restrict what is possible with the pack constraint. It can be used to set capacity limits, to count objects per bin, to compute unassigned penalties... This dimension imposes that for all bins b, the weighted sum (weights[i]) of all objects i assigned to 'b' is less or equal 'bounds[b]'.
+        Dimensions are additional constraints than can restrict what is
+        possible with the pack constraint. It can be used to set capacity
+        limits, to count objects per bin, to compute unassigned
+        penalties...
+        This dimension imposes that for all bins b, the weighted sum
+        (weights[i]) of all objects i assigned to 'b' is less or equal
+        'bounds[b]'.
 
         |
 
         *Overload 2:*
-        This dimension imposes that for all bins b, the weighted sum (weights->Run(i)) of all objects i assigned to 'b' is less or equal to 'bounds[b]'. Ownership of the callback is transferred to the pack constraint.
+        This dimension imposes that for all bins b, the weighted sum
+        (weights->Run(i)) of all objects i assigned to 'b' is less or
+        equal to 'bounds[b]'. Ownership of the callback is transferred to
+        the pack constraint.
 
         |
 
         *Overload 3:*
-        This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b) of all objects i assigned to 'b' is less or equal to 'bounds[b]'. Ownership of the callback is transferred to the pack constraint.
+        This dimension imposes that for all bins b, the weighted sum
+        (weights->Run(i, b) of all objects i assigned to 'b' is less or
+        equal to 'bounds[b]'. Ownership of the callback is transferred to
+        the pack constraint.
         """
         return _pywrapcp.Pack_AddWeightedSumLessOrEqualConstantDimension(self, *args)
 
@@ -24474,17 +28292,29 @@ Attaches a closure awakened when anything about this interval changes.

Overload 1: -Dimensions are additional constraints than can restrict what is possible with the pack constraint. It can be used to set capacity limits, to count objects per bin, to compute unassigned penalties... This dimension imposes that for all bins b, the weighted sum (weights[i]) of all objects i assigned to 'b' is less or equal 'bounds[b]'.

+Dimensions are additional constraints than can restrict what is +possible with the pack constraint. It can be used to set capacity +limits, to count objects per bin, to compute unassigned +penalties... +This dimension imposes that for all bins b, the weighted sum +(weights[i]) of all objects i assigned to 'b' is less or equal +'bounds[b]'.

|

Overload 2: -This dimension imposes that for all bins b, the weighted sum (weights->Run(i)) of all objects i assigned to 'b' is less or equal to 'bounds[b]'. Ownership of the callback is transferred to the pack constraint.

+This dimension imposes that for all bins b, the weighted sum +(weights->Run(i)) of all objects i assigned to 'b' is less or +equal to 'bounds[b]'. Ownership of the callback is transferred to +the pack constraint.

|

Overload 3: -This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b) of all objects i assigned to 'b' is less or equal to 'bounds[b]'. Ownership of the callback is transferred to the pack constraint.

+This dimension imposes that for all bins b, the weighted sum +(weights->Run(i, b) of all objects i assigned to 'b' is less or +equal to 'bounds[b]'. Ownership of the callback is transferred to +the pack constraint.

@@ -24502,12 +28332,15 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
    def AddWeightedSumEqualVarDimension(self, *args) -> "void":
         r"""
         *Overload 1:*
-        This dimension imposes that for all bins b, the weighted sum (weights[i]) of all objects i assigned to 'b' is equal to loads[b].
+        This dimension imposes that for all bins b, the weighted sum
+        (weights[i]) of all objects i assigned to 'b' is equal to loads[b].
 
         |
 
         *Overload 2:*
-        This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)) of all objects i assigned to 'b' is equal to loads[b].
+        This dimension imposes that for all bins b, the weighted sum
+        (weights->Run(i, b)) of all objects i assigned to 'b' is equal to
+        loads[b].
         """
         return _pywrapcp.Pack_AddWeightedSumEqualVarDimension(self, *args)
 
@@ -24515,12 +28348,15 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)

Overload 1: -This dimension imposes that for all bins b, the weighted sum (weights[i]) of all objects i assigned to 'b' is equal to loads[b].

+This dimension imposes that for all bins b, the weighted sum +(weights[i]) of all objects i assigned to 'b' is equal to loads[b].

|

Overload 2: -This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)) of all objects i assigned to 'b' is equal to loads[b].

+This dimension imposes that for all bins b, the weighted sum +(weights->Run(i, b)) of all objects i assigned to 'b' is equal to +loads[b].

@@ -24540,13 +28376,31 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
View Source
    def AddSumVariableWeightsLessOrEqualConstantDimension(self, usage: "std::vector< operations_research::IntVar * > const &", capacity: "std::vector< int64_t > const &") -> "void":
-        r""" This dimension imposes: forall b in bins,    sum (i in items: usage[i] * is_assigned(i, b)) <= capacity[b] where is_assigned(i, b) is true if and only if item i is assigned to the bin b. This can be used to model shapes of items by linking variables of the same item on parallel dimensions with an allowed assignment constraint."""
+        r"""
+        This dimension imposes:
+        forall b in bins,
+           sum (i in items: usage[i] * is_assigned(i, b)) <= capacity[b]
+        where is_assigned(i, b) is true if and only if item i is assigned
+        to the bin b.
+
+        This can be used to model shapes of items by linking variables of
+        the same item on parallel dimensions with an allowed assignment
+        constraint.
+        """
         return _pywrapcp.Pack_AddSumVariableWeightsLessOrEqualConstantDimension(self, usage, capacity)
 
-

This dimension imposes: forall b in bins, sum (i in items: usage[i] * is_assigned(i, b)) <= capacity[b] where is_assigned(i, b) is true if and only if item i is assigned to the bin b. This can be used to model shapes of items by linking variables of the same item on parallel dimensions with an allowed assignment constraint.

+

This dimension imposes: +forall b in bins, + sum (i in items: usage[i] * is_assigned(i, b)) <= capacity[b] +where is_assigned(i, b) is true if and only if item i is assigned +to the bin b.

+ +

This can be used to model shapes of items by linking variables of +the same item on parallel dimensions with an allowed assignment +constraint.

@@ -24566,13 +28420,17 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
View Source
    def AddWeightedSumOfAssignedDimension(self, weights: "std::vector< int64_t > const &", cost_var: "IntVar") -> "void":
-        r""" This dimension enforces that cost_var == sum of weights[i] for all objects 'i' assigned to a bin."""
+        r"""
+        This dimension enforces that cost_var == sum of weights[i] for
+        all objects 'i' assigned to a bin.
+        """
         return _pywrapcp.Pack_AddWeightedSumOfAssignedDimension(self, weights, cost_var)
 
-

This dimension enforces that cost_var == sum of weights[i] for all objects 'i' assigned to a bin.

+

This dimension enforces that cost_var == sum of weights[i] for +all objects 'i' assigned to a bin.

@@ -24588,13 +28446,17 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
View Source
    def AddCountUsedBinDimension(self, count_var: "IntVar") -> "void":
-        r""" This dimension links 'count_var' to the actual number of bins used in the pack."""
+        r"""
+        This dimension links 'count_var' to the actual number of bins used in the
+        pack.
+        """
         return _pywrapcp.Pack_AddCountUsedBinDimension(self, count_var)
 
-

This dimension links 'count_var' to the actual number of bins used in the pack.

+

This dimension links 'count_var' to the actual number of bins used in the +pack.

@@ -24610,13 +28472,17 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
View Source
    def AddCountAssignedItemsDimension(self, count_var: "IntVar") -> "void":
-        r""" This dimension links 'count_var' to the actual number of items assigned to a bin in the pack."""
+        r"""
+        This dimension links 'count_var' to the actual number of items
+        assigned to a bin in the pack.
+        """
         return _pywrapcp.Pack_AddCountAssignedItemsDimension(self, count_var)
 
-

This dimension links 'count_var' to the actual number of items assigned to a bin in the pack.

+

This dimension links 'count_var' to the actual number of items +assigned to a bin in the pack.

@@ -24637,7 +28503,8 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b) -

This method is called when the constraint is processed by the solver. Its main usage is to attach demons to variables.

+

This method is called when the constraint is processed by the +solver. Its main usage is to attach demons to variables.

@@ -24658,7 +28525,8 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b) -

This method performs the initial propagation of the constraint. It is called just after the post.

+

This method performs the initial propagation of the +constraint. It is called just after the post.

@@ -24723,7 +28591,12 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b) return _pywrapcp.DisjunctiveConstraint_SequenceVar(self) def SetTransitionTime(self, transition_time: "operations_research::Solver::IndexEvaluator2") -> "void": - r""" Add a transition time between intervals. It forces the distance between the end of interval a and start of interval b that follows it to be at least transition_time(a, b). This function must always return a positive or null value.""" + r""" + Add a transition time between intervals. It forces the distance between + the end of interval a and start of interval b that follows it to be at + least transition_time(a, b). This function must always return + a positive or null value. + """ return _pywrapcp.DisjunctiveConstraint_SetTransitionTime(self, transition_time) def TransitionTime(self, before_index: "int", after_index: "int") -> "int64_t": @@ -24732,7 +28605,15 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b) -

A constraint is the main modeling object. It provides two methods: - Post() is responsible for creating the demons and attaching them to immediate demons(). - InitialPropagate() is called once just after Post and performs the initial propagation. The subsequent propagations will be performed by the demons Posted during the post() method.

+

A constraint is the main modeling object. It provides two methods:

+ +
    +
  • Post() is responsible for creating the demons and attaching them to +immediate demons().
  • +
  • InitialPropagate() is called once just after Post and performs +the initial propagation. The subsequent propagations will be performed +by the demons Posted during the post() method.
  • +
@@ -24801,13 +28682,21 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
View Source
    def SetTransitionTime(self, transition_time: "operations_research::Solver::IndexEvaluator2") -> "void":
-        r""" Add a transition time between intervals.  It forces the distance between the end of interval a and start of interval b that follows it to be at least transition_time(a, b). This function must always return a positive or null value."""
+        r"""
+        Add a transition time between intervals.  It forces the distance between
+        the end of interval a and start of interval b that follows it to be at
+        least transition_time(a, b). This function must always return
+        a positive or null value.
+        """
         return _pywrapcp.DisjunctiveConstraint_SetTransitionTime(self, transition_time)
 
-

Add a transition time between intervals. It forces the distance between the end of interval a and start of interval b that follows it to be at least transition_time(a, b). This function must always return a positive or null value.

+

Add a transition time between intervals. It forces the distance between +the end of interval a and start of interval b that follows it to be at +least transition_time(a, b). This function must always return +a positive or null value.

@@ -24864,25 +28753,35 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
View Source
class RevInteger(object):
-    r""" This class adds reversibility to a POD type. It contains the stamp optimization. i.e. the SaveValue call is done only once per node of the search tree.  Please note that actual stamps always starts at 1, thus an initial value of 0 will always trigger the first SaveValue."""
+    r"""
+    This class adds reversibility to a POD type.
+    It contains the stamp optimization. i.e. the SaveValue call is done
+    only once per node of the search tree.  Please note that actual
+    stamps always starts at 1, thus an initial value of 0 will always
+    trigger the first SaveValue.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
 
-    def __init__(self, val: "long const &"):
+    def __init__(self, val: "long long const &"):
         _pywrapcp.RevInteger_swiginit(self, _pywrapcp.new_RevInteger(val))
 
-    def Value(self) -> "long const &":
+    def Value(self) -> "long long const &":
         return _pywrapcp.RevInteger_Value(self)
 
-    def SetValue(self, s: "Solver", val: "long const &") -> "void":
+    def SetValue(self, s: "Solver", val: "long long const &") -> "void":
         return _pywrapcp.RevInteger_SetValue(self, s, val)
     __swig_destroy__ = _pywrapcp.delete_RevInteger
 
-

This class adds reversibility to a POD type. It contains the stamp optimization. i.e. the SaveValue call is done only once per node of the search tree. Please note that actual stamps always starts at 1, thus an initial value of 0 will always trigger the first SaveValue.

+

This class adds reversibility to a POD type. +It contains the stamp optimization. i.e. the SaveValue call is done +only once per node of the search tree. Please note that actual +stamps always starts at 1, thus an initial value of 0 will always +trigger the first SaveValue.

@@ -24890,12 +28789,12 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
#   - RevInteger(val: 'long const &') + RevInteger(val: 'long long const &')
View Source -
    def __init__(self, val: "long const &"):
+            
    def __init__(self, val: "long long const &"):
         _pywrapcp.RevInteger_swiginit(self, _pywrapcp.new_RevInteger(val))
 
@@ -24920,12 +28819,12 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b) def - Value(self) -> 'long const &': + Value(self) -> 'long long const &':
View Source -
    def Value(self) -> "long const &":
+            
    def Value(self) -> "long long const &":
         return _pywrapcp.RevInteger_Value(self)
 
@@ -24939,12 +28838,12 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b) def - SetValue(self, s: pywrapcp.Solver, val: 'long const &') -> 'void': + SetValue(self, s: pywrapcp.Solver, val: 'long long const &') -> 'void':
View Source -
    def SetValue(self, s: "Solver", val: "long const &") -> "void":
+            
    def SetValue(self, s: "Solver", val: "long long const &") -> "void":
         return _pywrapcp.RevInteger_SetValue(self, s, val)
 
@@ -24971,10 +28870,10 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b) thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr - def __init__(self, val: "long const &"): + def __init__(self, val: "long long const &"): _pywrapcp.NumericalRevInteger_swiginit(self, _pywrapcp.new_NumericalRevInteger(val)) - def Add(self, s: "Solver", to_add: "long const &") -> "void": + def Add(self, s: "Solver", to_add: "long long const &") -> "void": return _pywrapcp.NumericalRevInteger_Add(self, s, to_add) def Incr(self, s: "Solver") -> "void": @@ -24995,12 +28894,12 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
#   - NumericalRevInteger(val: 'long const &') + NumericalRevInteger(val: 'long long const &')
View Source -
    def __init__(self, val: "long const &"):
+            
    def __init__(self, val: "long long const &"):
         _pywrapcp.NumericalRevInteger_swiginit(self, _pywrapcp.new_NumericalRevInteger(val))
 
@@ -25025,12 +28924,12 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b) def - Add(self, s: pywrapcp.Solver, to_add: 'long const &') -> 'void': + Add(self, s: pywrapcp.Solver, to_add: 'long long const &') -> 'void':
View Source -
    def Add(self, s: "Solver", to_add: "long const &") -> "void":
+            
    def Add(self, s: "Solver", to_add: "long long const &") -> "void":
         return _pywrapcp.NumericalRevInteger_Add(self, s, to_add)
 
@@ -25100,7 +28999,13 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
View Source
class RevBool(object):
-    r""" This class adds reversibility to a POD type. It contains the stamp optimization. i.e. the SaveValue call is done only once per node of the search tree.  Please note that actual stamps always starts at 1, thus an initial value of 0 will always trigger the first SaveValue."""
+    r"""
+    This class adds reversibility to a POD type.
+    It contains the stamp optimization. i.e. the SaveValue call is done
+    only once per node of the search tree.  Please note that actual
+    stamps always starts at 1, thus an initial value of 0 will always
+    trigger the first SaveValue.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
@@ -25118,7 +29023,11 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
 
         
-

This class adds reversibility to a POD type. It contains the stamp optimization. i.e. the SaveValue call is done only once per node of the search tree. Please note that actual stamps always starts at 1, thus an initial value of 0 will always trigger the first SaveValue.

+

This class adds reversibility to a POD type. +It contains the stamp optimization. i.e. the SaveValue call is done +only once per node of the search tree. Please note that actual +stamps always starts at 1, thus an initial value of 0 will always +trigger the first SaveValue.

@@ -25224,7 +29133,11 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b) return _pywrapcp.IntVarContainer_Restore(self) def __eq__(self, container: "IntVarContainer") -> "bool": - r""" Returns true if this and 'container' both represent the same V* -> E map. Runs in linear time; requires that the == operator on the type E is well defined.""" + r""" + Returns true if this and 'container' both represent the same V* -> E map. + Runs in linear time; requires that the == operator on the type E is well + defined. + """ return _pywrapcp.IntVarContainer___eq__(self, container) def __ne__(self, container: "IntVarContainer") -> "bool": @@ -25395,7 +29308,11 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b) return _pywrapcp.IntervalVarContainer_Restore(self) def __eq__(self, container: "IntervalVarContainer") -> "bool": - r""" Returns true if this and 'container' both represent the same V* -> E map. Runs in linear time; requires that the == operator on the type E is well defined.""" + r""" + Returns true if this and 'container' both represent the same V* -> E map. + Runs in linear time; requires that the == operator on the type E is well + defined. + """ return _pywrapcp.IntervalVarContainer___eq__(self, container) def __ne__(self, container: "IntervalVarContainer") -> "bool": @@ -25566,7 +29483,11 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b) return _pywrapcp.SequenceVarContainer_Restore(self) def __eq__(self, container: "SequenceVarContainer") -> "bool": - r""" Returns true if this and 'container' both represent the same V* -> E map. Runs in linear time; requires that the == operator on the type E is well defined.""" + r""" + Returns true if this and 'container' both represent the same V* -> E map. + Runs in linear time; requires that the == operator on the type E is well + defined. + """ return _pywrapcp.SequenceVarContainer___eq__(self, container) def __ne__(self, container: "SequenceVarContainer") -> "bool": @@ -25715,7 +29636,32 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
View Source
class LocalSearchOperator(BaseObject):
-    r""" This class represent a reversible FIFO structure. The main difference w.r.t a standard FIFO structure is that a Solver is given as parameter to the modifiers such that the solver can store the backtrack information Iterator's traversing order should not be changed, as some algorithm depend on it to be consistent. It's main use is to store a list of demons in the various classes of variables. The base class for all local search operators. A local search operator is an object that defines the neighborhood of a solution. In other words, a neighborhood is the set of solutions which can be reached from a given solution using an operator. The behavior of the LocalSearchOperator class is similar to iterators. The operator is synchronized with an assignment (gives the current values of the variables); this is done in the Start() method. Then one can iterate over the neighbors using the MakeNextNeighbor method. This method returns an assignment which represents the incremental changes to the current solution. It also returns a second assignment representing the changes to the last solution defined by the neighborhood operator; this assignment is empty if the neighborhood operator cannot track this information."""
+    r"""
+    This class represent a reversible FIFO structure.
+    The main difference w.r.t a standard FIFO structure is that a Solver is
+    given as parameter to the modifiers such that the solver can store the
+    backtrack information
+    Iterator's traversing order should not be changed, as some algorithm
+    depend on it to be consistent.
+    It's main use is to store a list of demons in the various classes of
+    variables.
+    The base class for all local search operators.
+
+    A local search operator is an object that defines the neighborhood of a
+    solution. In other words, a neighborhood is the set of solutions which can
+    be reached from a given solution using an operator.
+
+    The behavior of the LocalSearchOperator class is similar to iterators.
+    The operator is synchronized with an assignment (gives the
+    current values of the variables); this is done in the Start() method.
+
+    Then one can iterate over the neighbors using the MakeNextNeighbor method.
+    This method returns an assignment which represents the incremental changes
+    to the current solution. It also returns a second assignment representing
+    the changes to the last solution defined by the neighborhood operator; this
+    assignment is empty if the neighborhood operator cannot track this
+    information.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -25736,7 +29682,30 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
 
         
-

This class represent a reversible FIFO structure. The main difference w.r.t a standard FIFO structure is that a Solver is given as parameter to the modifiers such that the solver can store the backtrack information Iterator's traversing order should not be changed, as some algorithm depend on it to be consistent. It's main use is to store a list of demons in the various classes of variables. The base class for all local search operators. A local search operator is an object that defines the neighborhood of a solution. In other words, a neighborhood is the set of solutions which can be reached from a given solution using an operator. The behavior of the LocalSearchOperator class is similar to iterators. The operator is synchronized with an assignment (gives the current values of the variables); this is done in the Start() method. Then one can iterate over the neighbors using the MakeNextNeighbor method. This method returns an assignment which represents the incremental changes to the current solution. It also returns a second assignment representing the changes to the last solution defined by the neighborhood operator; this assignment is empty if the neighborhood operator cannot track this information.

+

This class represent a reversible FIFO structure. +The main difference w.r.t a standard FIFO structure is that a Solver is +given as parameter to the modifiers such that the solver can store the +backtrack information +Iterator's traversing order should not be changed, as some algorithm +depend on it to be consistent. +It's main use is to store a list of demons in the various classes of +variables. +The base class for all local search operators.

+ +

A local search operator is an object that defines the neighborhood of a +solution. In other words, a neighborhood is the set of solutions which can +be reached from a given solution using an operator.

+ +

The behavior of the LocalSearchOperator class is similar to iterators. +The operator is synchronized with an assignment (gives the +current values of the variables); this is done in the Start() method.

+ +

Then one can iterate over the neighbors using the MakeNextNeighbor method. +This method returns an assignment which represents the incremental changes +to the current solution. It also returns a second assignment representing +the changes to the last solution defined by the neighborhood operator; this +assignment is empty if the neighborhood operator cannot track this +information.

@@ -25842,7 +29811,10 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b) __repr__ = _swig_repr def Start(self, assignment: "Assignment") -> "void": - r""" This method should not be overridden. Override OnStart() instead which is called before exiting this method.""" + r""" + This method should not be overridden. Override OnStart() instead which is + called before exiting this method. + """ return _pywrapcp.IntVarLocalSearchOperatorTemplate_Start(self, assignment) def IsIncremental(self) -> "bool": @@ -25851,18 +29823,25 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b) def Size(self) -> "int": return _pywrapcp.IntVarLocalSearchOperatorTemplate_Size(self) - def Value(self, index: "int64_t") -> "long const &": - r""" Returns the value in the current assignment of the variable of given index.""" + def Value(self, index: "int64_t") -> "long long const &": + r""" + Returns the value in the current assignment of the variable of given + index. + """ return _pywrapcp.IntVarLocalSearchOperatorTemplate_Value(self, index) - def OldValue(self, index: "int64_t") -> "long const &": + def OldValue(self, index: "int64_t") -> "long long const &": return _pywrapcp.IntVarLocalSearchOperatorTemplate_OldValue(self, index) - def SetValue(self, index: "int64_t", value: "long const &") -> "void": + def SetValue(self, index: "int64_t", value: "long long const &") -> "void": return _pywrapcp.IntVarLocalSearchOperatorTemplate_SetValue(self, index, value) def OnStart(self) -> "void": - r""" Called by Start() after synchronizing the operator with the current assignment. Should be overridden instead of Start() to avoid calling VarLocalSearchOperator::Start explicitly.""" + r""" + Called by Start() after synchronizing the operator with the current + assignment. Should be overridden instead of Start() to avoid calling + VarLocalSearchOperator::Start explicitly. + """ return _pywrapcp.IntVarLocalSearchOperatorTemplate_OnStart(self)
@@ -25912,13 +29891,17 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
View Source
    def Start(self, assignment: "Assignment") -> "void":
-        r""" This method should not be overridden. Override OnStart() instead which is called before exiting this method."""
+        r"""
+        This method should not be overridden. Override OnStart() instead which is
+        called before exiting this method.
+        """
         return _pywrapcp.IntVarLocalSearchOperatorTemplate_Start(self, assignment)
 
-

This method should not be overridden. Override OnStart() instead which is called before exiting this method.

+

This method should not be overridden. Override OnStart() instead which is +called before exiting this method.

@@ -25966,19 +29949,23 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b) def - Value(self, index: 'int64_t') -> 'long const &': + Value(self, index: 'int64_t') -> 'long long const &':
View Source -
    def Value(self, index: "int64_t") -> "long const &":
-        r""" Returns the value in the current assignment of the variable of given index."""
+            
    def Value(self, index: "int64_t") -> "long long const &":
+        r"""
+        Returns the value in the current assignment of the variable of given
+        index.
+        """
         return _pywrapcp.IntVarLocalSearchOperatorTemplate_Value(self, index)
 
-

Returns the value in the current assignment of the variable of given index.

+

Returns the value in the current assignment of the variable of given +index.

@@ -25988,12 +29975,12 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b) def - OldValue(self, index: 'int64_t') -> 'long const &': + OldValue(self, index: 'int64_t') -> 'long long const &':
View Source -
    def OldValue(self, index: "int64_t") -> "long const &":
+            
    def OldValue(self, index: "int64_t") -> "long long const &":
         return _pywrapcp.IntVarLocalSearchOperatorTemplate_OldValue(self, index)
 
@@ -26007,12 +29994,12 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b) def - SetValue(self, index: 'int64_t', value: 'long const &') -> 'void': + SetValue(self, index: 'int64_t', value: 'long long const &') -> 'void':
View Source -
    def SetValue(self, index: "int64_t", value: "long const &") -> "void":
+            
    def SetValue(self, index: "int64_t", value: "long long const &") -> "void":
         return _pywrapcp.IntVarLocalSearchOperatorTemplate_SetValue(self, index, value)
 
@@ -26032,13 +30019,19 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
View Source
    def OnStart(self) -> "void":
-        r""" Called by Start() after synchronizing the operator with the current assignment. Should be overridden instead of Start() to avoid calling VarLocalSearchOperator::Start explicitly."""
+        r"""
+        Called by Start() after synchronizing the operator with the current
+        assignment. Should be overridden instead of Start() to avoid calling
+        VarLocalSearchOperator::Start explicitly.
+        """
         return _pywrapcp.IntVarLocalSearchOperatorTemplate_OnStart(self)
 
-

Called by Start() after synchronizing the operator with the current assignment. Should be overridden instead of Start() to avoid calling VarLocalSearchOperator::Start explicitly.

+

Called by Start() after synchronizing the operator with the current +assignment. Should be overridden instead of Start() to avoid calling +VarLocalSearchOperator::Start explicitly.

@@ -26081,11 +30074,22 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b) __swig_destroy__ = _pywrapcp.delete_IntVarLocalSearchOperator def NextNeighbor(self, delta: "Assignment", deltadelta: "Assignment") -> "bool": - r""" Redefines MakeNextNeighbor to export a simpler interface. The calls to ApplyChanges() and RevertChanges() are factored in this method, hiding both delta and deltadelta from subclasses which only need to override MakeOneNeighbor(). Therefore this method should not be overridden. Override MakeOneNeighbor() instead.""" + r""" + Redefines MakeNextNeighbor to export a simpler interface. The calls to + ApplyChanges() and RevertChanges() are factored in this method, hiding + both delta and deltadelta from subclasses which only need to override + MakeOneNeighbor(). + Therefore this method should not be overridden. Override MakeOneNeighbor() + instead. + """ return _pywrapcp.IntVarLocalSearchOperator_NextNeighbor(self, delta, deltadelta) def OneNeighbor(self) -> "bool": - r""" Creates a new neighbor. It returns false when the neighborhood is completely explored. MakeNextNeighbor() in a subclass of IntVarLocalSearchOperator.""" + r""" + Creates a new neighbor. It returns false when the neighborhood is + completely explored. + MakeNextNeighbor() in a subclass of IntVarLocalSearchOperator. + """ return _pywrapcp.IntVarLocalSearchOperator_OneNeighbor(self) def __disown__(self): self.this.disown() @@ -26147,13 +30151,25 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
View Source
    def NextNeighbor(self, delta: "Assignment", deltadelta: "Assignment") -> "bool":
-        r""" Redefines MakeNextNeighbor to export a simpler interface. The calls to ApplyChanges() and RevertChanges() are factored in this method, hiding both delta and deltadelta from subclasses which only need to override MakeOneNeighbor(). Therefore this method should not be overridden. Override MakeOneNeighbor() instead."""
+        r"""
+        Redefines MakeNextNeighbor to export a simpler interface. The calls to
+        ApplyChanges() and RevertChanges() are factored in this method, hiding
+        both delta and deltadelta from subclasses which only need to override
+        MakeOneNeighbor().
+        Therefore this method should not be overridden. Override MakeOneNeighbor()
+        instead.
+        """
         return _pywrapcp.IntVarLocalSearchOperator_NextNeighbor(self, delta, deltadelta)
 
-

Redefines MakeNextNeighbor to export a simpler interface. The calls to ApplyChanges() and RevertChanges() are factored in this method, hiding both delta and deltadelta from subclasses which only need to override MakeOneNeighbor(). Therefore this method should not be overridden. Override MakeOneNeighbor() instead.

+

Redefines MakeNextNeighbor to export a simpler interface. The calls to +ApplyChanges() and RevertChanges() are factored in this method, hiding +both delta and deltadelta from subclasses which only need to override +MakeOneNeighbor(). +Therefore this method should not be overridden. Override MakeOneNeighbor() +instead.

@@ -26169,13 +30185,19 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
View Source
    def OneNeighbor(self) -> "bool":
-        r""" Creates a new neighbor. It returns false when the neighborhood is completely explored. MakeNextNeighbor() in a subclass of IntVarLocalSearchOperator."""
+        r"""
+        Creates a new neighbor. It returns false when the neighborhood is
+        completely explored.
+        MakeNextNeighbor() in a subclass of IntVarLocalSearchOperator.
+        """
         return _pywrapcp.IntVarLocalSearchOperator_OneNeighbor(self)
 
-

Creates a new neighbor. It returns false when the neighborhood is completely explored. MakeNextNeighbor() in a subclass of IntVarLocalSearchOperator.

+

Creates a new neighbor. It returns false when the neighborhood is +completely explored. +MakeNextNeighbor() in a subclass of IntVarLocalSearchOperator.

@@ -26221,7 +30243,10 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b) __repr__ = _swig_repr def Start(self, assignment: "Assignment") -> "void": - r""" This method should not be overridden. Override OnStart() instead which is called before exiting this method.""" + r""" + This method should not be overridden. Override OnStart() instead which is + called before exiting this method. + """ return _pywrapcp.SequenceVarLocalSearchOperatorTemplate_Start(self, assignment) def IsIncremental(self) -> "bool": @@ -26231,7 +30256,10 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b) return _pywrapcp.SequenceVarLocalSearchOperatorTemplate_Size(self) def Value(self, index: "int64_t") -> "std::vector< int > const &": - r""" Returns the value in the current assignment of the variable of given index.""" + r""" + Returns the value in the current assignment of the variable of given + index. + """ return _pywrapcp.SequenceVarLocalSearchOperatorTemplate_Value(self, index) def OldValue(self, index: "int64_t") -> "std::vector< int > const &": @@ -26241,7 +30269,11 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b) return _pywrapcp.SequenceVarLocalSearchOperatorTemplate_SetValue(self, index, value) def OnStart(self) -> "void": - r""" Called by Start() after synchronizing the operator with the current assignment. Should be overridden instead of Start() to avoid calling VarLocalSearchOperator::Start explicitly.""" + r""" + Called by Start() after synchronizing the operator with the current + assignment. Should be overridden instead of Start() to avoid calling + VarLocalSearchOperator::Start explicitly. + """ return _pywrapcp.SequenceVarLocalSearchOperatorTemplate_OnStart(self)
@@ -26291,13 +30323,17 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
View Source
    def Start(self, assignment: "Assignment") -> "void":
-        r""" This method should not be overridden. Override OnStart() instead which is called before exiting this method."""
+        r"""
+        This method should not be overridden. Override OnStart() instead which is
+        called before exiting this method.
+        """
         return _pywrapcp.SequenceVarLocalSearchOperatorTemplate_Start(self, assignment)
 
-

This method should not be overridden. Override OnStart() instead which is called before exiting this method.

+

This method should not be overridden. Override OnStart() instead which is +called before exiting this method.

@@ -26351,13 +30387,17 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
View Source
    def Value(self, index: "int64_t") -> "std::vector< int > const &":
-        r""" Returns the value in the current assignment of the variable of given index."""
+        r"""
+        Returns the value in the current assignment of the variable of given
+        index.
+        """
         return _pywrapcp.SequenceVarLocalSearchOperatorTemplate_Value(self, index)
 
-

Returns the value in the current assignment of the variable of given index.

+

Returns the value in the current assignment of the variable of given +index.

@@ -26415,13 +30455,19 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
View Source
    def OnStart(self) -> "void":
-        r""" Called by Start() after synchronizing the operator with the current assignment. Should be overridden instead of Start() to avoid calling VarLocalSearchOperator::Start explicitly."""
+        r"""
+        Called by Start() after synchronizing the operator with the current
+        assignment. Should be overridden instead of Start() to avoid calling
+        VarLocalSearchOperator::Start explicitly.
+        """
         return _pywrapcp.SequenceVarLocalSearchOperatorTemplate_OnStart(self)
 
-

Called by Start() after synchronizing the operator with the current assignment. Should be overridden instead of Start() to avoid calling VarLocalSearchOperator::Start explicitly.

+

Called by Start() after synchronizing the operator with the current +assignment. Should be overridden instead of Start() to avoid calling +VarLocalSearchOperator::Start explicitly.

@@ -26530,7 +30576,35 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
View Source
class BaseLns(IntVarLocalSearchOperator):
-    r""" This is the base class for building an Lns operator. An Lns fragment is a collection of variables which will be relaxed. Fragments are built with NextFragment(), which returns false if there are no more fragments to build. Optionally one can override InitFragments, which is called from LocalSearchOperator::Start to initialize fragment data. Here's a sample relaxing one variable at a time: class OneVarLns : public BaseLns {  public:   OneVarLns(const std::vector<IntVar*>& vars) : BaseLns(vars), index_(0) {}   virtual ~OneVarLns() {}   virtual void InitFragments() { index_ = 0; }   virtual bool NextFragment() {     const int size = Size();     if (index_ < size) {       AppendToFragment(index_);       ++index_;       return true;     } else {       return false;     }   }  private:   int index_; };"""
+    r"""
+    This is the base class for building an Lns operator. An Lns fragment is a
+    collection of variables which will be relaxed. Fragments are built with
+    NextFragment(), which returns false if there are no more fragments to build.
+    Optionally one can override InitFragments, which is called from
+    LocalSearchOperator::Start to initialize fragment data.
+
+    Here's a sample relaxing one variable at a time:
+
+    class OneVarLns : public BaseLns {
+     public:
+      OneVarLns(const std::vector<IntVar*>& vars) : BaseLns(vars), index_(0) {}
+      virtual ~OneVarLns() {}
+      virtual void InitFragments() { index_ = 0; }
+      virtual bool NextFragment() {
+        const int size = Size();
+        if (index_ < size) {
+          AppendToFragment(index_);
+          ++index_;
+          return true;
+        } else {
+          return false;
+        }
+      }
+
+     private:
+      int index_;
+    };
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
@@ -26568,7 +30642,33 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
 
         
-

This is the base class for building an Lns operator. An Lns fragment is a collection of variables which will be relaxed. Fragments are built with NextFragment(), which returns false if there are no more fragments to build. Optionally one can override InitFragments, which is called from LocalSearchOperator::Start to initialize fragment data. Here's a sample relaxing one variable at a time: class OneVarLns : public BaseLns { public: OneVarLns(const std::vector& vars) : BaseLns(vars), index_(0) {} virtual ~OneVarLns() {} virtual void InitFragments() { index_ = 0; } virtual bool NextFragment() { const int size = Size(); if (index_ < size) { AppendToFragment(index_); ++index_; return true; } else { return false; } } private: int index_; };

+

This is the base class for building an Lns operator. An Lns fragment is a +collection of variables which will be relaxed. Fragments are built with +NextFragment(), which returns false if there are no more fragments to build. +Optionally one can override InitFragments, which is called from +LocalSearchOperator::Start to initialize fragment data.

+ +

Here's a sample relaxing one variable at a time:

+ +

class OneVarLns : public BaseLns { + public: + OneVarLns(const std::vector& vars) : BaseLns(vars), index_(0) {} + virtual ~OneVarLns() {} + virtual void InitFragments() { index_ = 0; } + virtual bool NextFragment() { + const int size = Size(); + if (index_ < size) { + AppendToFragment(index_); + ++index_; + return true; + } else { + return false; + } + }

+ +

private: + int index_; +};

@@ -26718,7 +30818,12 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
View Source
class ChangeValue(IntVarLocalSearchOperator):
-    r""" Defines operators which change the value of variables; each neighbor corresponds to *one* modified variable. Sub-classes have to define ModifyValue which determines what the new variable value is going to be (given the current value and the variable)."""
+    r"""
+    Defines operators which change the value of variables;
+    each neighbor corresponds to *one* modified variable.
+    Sub-classes have to define ModifyValue which determines what the new
+    variable value is going to be (given the current value and the variable).
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
@@ -26745,7 +30850,10 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
 
         
-

Defines operators which change the value of variables; each neighbor corresponds to one modified variable. Sub-classes have to define ModifyValue which determines what the new variable value is going to be (given the current value and the variable).

+

Defines operators which change the value of variables; +each neighbor corresponds to one modified variable. +Sub-classes have to define ModifyValue which determines what the new +variable value is going to be (given the current value and the variable).

@@ -26859,7 +30967,21 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
View Source
class PathOperator(IntVarLocalSearchOperator):
-    r""" Base class of the local search operators dedicated to path modifications (a path is a set of nodes linked together by arcs). This family of neighborhoods supposes they are handling next variables representing the arcs (var[i] represents the node immediately after i on a path). Several services are provided: - arc manipulators (SetNext(), ReverseChain(), MoveChain()) - path inspectors (Next(), Prev(), IsPathEnd()) - path iterators: operators need a given number of nodes to define a   neighbor; this class provides the iteration on a given number of (base)   nodes which can be used to define a neighbor (through the BaseNode method) Subclasses only need to override MakeNeighbor to create neighbors using the services above (no direct manipulation of assignments)."""
+    r"""
+    Base class of the local search operators dedicated to path modifications
+    (a path is a set of nodes linked together by arcs).
+    This family of neighborhoods supposes they are handling next variables
+    representing the arcs (var[i] represents the node immediately after i on
+    a path).
+    Several services are provided:
+    - arc manipulators (SetNext(), ReverseChain(), MoveChain())
+    - path inspectors (Next(), Prev(), IsPathEnd())
+    - path iterators: operators need a given number of nodes to define a
+      neighbor; this class provides the iteration on a given number of (base)
+      nodes which can be used to define a neighbor (through the BaseNode method)
+    Subclasses only need to override MakeNeighbor to create neighbors using
+    the services above (no direct manipulation of assignments).
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -26873,7 +30995,22 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
 
         
-

Base class of the local search operators dedicated to path modifications (a path is a set of nodes linked together by arcs). This family of neighborhoods supposes they are handling next variables representing the arcs (var[i] represents the node immediately after i on a path). Several services are provided: - arc manipulators (SetNext(), ReverseChain(), MoveChain()) - path inspectors (Next(), Prev(), IsPathEnd()) - path iterators: operators need a given number of nodes to define a neighbor; this class provides the iteration on a given number of (base) nodes which can be used to define a neighbor (through the BaseNode method) Subclasses only need to override MakeNeighbor to create neighbors using the services above (no direct manipulation of assignments).

+

Base class of the local search operators dedicated to path modifications +(a path is a set of nodes linked together by arcs). +This family of neighborhoods supposes they are handling next variables +representing the arcs (var[i] represents the node immediately after i on +a path). +Several services are provided:

+ +
    +
  • arc manipulators (SetNext(), ReverseChain(), MoveChain())
  • +
  • path inspectors (Next(), Prev(), IsPathEnd())
  • +
  • path iterators: operators need a given number of nodes to define a +neighbor; this class provides the iteration on a given number of (base) +nodes which can be used to define a neighbor (through the BaseNode method) +Subclasses only need to override MakeNeighbor to create neighbors using +the services above (no direct manipulation of assignments).
  • +
@@ -26962,7 +31099,38 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
View Source
class LocalSearchFilter(BaseObject):
-    r""" Classes to which this template function can be applied to as of 04/2014. Usage: LocalSearchOperator* op = MakeLocalSearchOperator<Relocate>(...); class TwoOpt; class Relocate; class Exchange; class Cross; class MakeActiveOperator; class MakeInactiveOperator; class MakeChainInactiveOperator; class SwapActiveOperator; class ExtendedSwapActiveOperator; class MakeActiveAndRelocate; class RelocateAndMakeActiveOperator; class RelocateAndMakeInactiveOperator; Local Search Filters are used for fast neighbor pruning. Filtering a move is done in several phases: - in the Relax phase, filters determine which parts of their internals   will be changed by the candidate, and modify intermediary State - in the Accept phase, filters check that the candidate is feasible, - if the Accept phase succeeds, the solver may decide to trigger a   Synchronize phase that makes filters change their internal representation   to the last candidate, - otherwise (Accept fails or the solver does not want to synchronize),   a Revert phase makes filters erase any intermediary State generated by the   Relax and Accept phases. A given filter has phases called with the following pattern: (Relax.Accept.Synchronize | Relax.Accept.Revert | Relax.Revert)*. Filters's Revert() is always called in the reverse order their Accept() was called, to allow late filters to use state done/undone by early filters' Accept()/Revert()."""
+    r"""
+    Classes to which this template function can be applied to as of 04/2014.
+    Usage: LocalSearchOperator* op = MakeLocalSearchOperator<Relocate>(...);
+    class TwoOpt;
+    class Relocate;
+    class Exchange;
+    class Cross;
+    class MakeActiveOperator;
+    class MakeInactiveOperator;
+    class MakeChainInactiveOperator;
+    class SwapActiveOperator;
+    class ExtendedSwapActiveOperator;
+    class MakeActiveAndRelocate;
+    class RelocateAndMakeActiveOperator;
+    class RelocateAndMakeInactiveOperator;
+    Local Search Filters are used for fast neighbor pruning.
+    Filtering a move is done in several phases:
+    - in the Relax phase, filters determine which parts of their internals
+      will be changed by the candidate, and modify intermediary State
+    - in the Accept phase, filters check that the candidate is feasible,
+    - if the Accept phase succeeds, the solver may decide to trigger a
+      Synchronize phase that makes filters change their internal representation
+      to the last candidate,
+    - otherwise (Accept fails or the solver does not want to synchronize),
+      a Revert phase makes filters erase any intermediary State generated by the
+      Relax and Accept phases.
+    A given filter has phases called with the following pattern:
+    (Relax.Accept.Synchronize | Relax.Accept.Revert | Relax.Revert)*.
+    Filters's Revert() is always called in the reverse order their Accept() was
+    called, to allow late filters to use state done/undone by early filters'
+    Accept()/Revert().
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -26971,21 +31139,69 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
     __repr__ = _swig_repr
 
     def Accept(self, delta: "Assignment", deltadelta: "Assignment", objective_min: "int64_t", objective_max: "int64_t") -> "bool":
-        r""" Accepts a "delta" given the assignment with which the filter has been synchronized; the delta holds the variables which have been modified and their new value. If the filter represents a part of the global objective, its contribution must be between objective_min and objective_max. Sample: supposing one wants to maintain a[0,1] + b[0,1] <= 1, for the assignment (a,1), (b,0), the delta (b,1) will be rejected but the delta (a,0) will be accepted. TODO(user): Remove arguments when there are no more need for those."""
+        r"""
+        Accepts a "delta" given the assignment with which the filter has been
+        synchronized; the delta holds the variables which have been modified and
+        their new value.
+        If the filter represents a part of the global objective, its contribution
+        must be between objective_min and objective_max.
+        Sample: supposing one wants to maintain a[0,1] + b[0,1] <= 1,
+        for the assignment (a,1), (b,0), the delta (b,1) will be rejected
+        but the delta (a,0) will be accepted.
+        TODO(user): Remove arguments when there are no more need for those.
+        """
         return _pywrapcp.LocalSearchFilter_Accept(self, delta, deltadelta, objective_min, objective_max)
 
     def IsIncremental(self) -> "bool":
         return _pywrapcp.LocalSearchFilter_IsIncremental(self)
 
     def Synchronize(self, assignment: "Assignment", delta: "Assignment") -> "void":
-        r""" Synchronizes the filter with the current solution, delta being the difference with the solution passed to the previous call to Synchronize() or IncrementalSynchronize(). 'delta' can be used to incrementally synchronizing the filter with the new solution by only considering the changes in delta."""
+        r"""
+        Synchronizes the filter with the current solution, delta being the
+        difference with the solution passed to the previous call to Synchronize()
+        or IncrementalSynchronize(). 'delta' can be used to incrementally
+        synchronizing the filter with the new solution by only considering the
+        changes in delta.
+        """
         return _pywrapcp.LocalSearchFilter_Synchronize(self, assignment, delta)
     __swig_destroy__ = _pywrapcp.delete_LocalSearchFilter
 
-

Classes to which this template function can be applied to as of 04/2014. Usage: LocalSearchOperator* op = MakeLocalSearchOperator(...); class TwoOpt; class Relocate; class Exchange; class Cross; class MakeActiveOperator; class MakeInactiveOperator; class MakeChainInactiveOperator; class SwapActiveOperator; class ExtendedSwapActiveOperator; class MakeActiveAndRelocate; class RelocateAndMakeActiveOperator; class RelocateAndMakeInactiveOperator; Local Search Filters are used for fast neighbor pruning. Filtering a move is done in several phases: - in the Relax phase, filters determine which parts of their internals will be changed by the candidate, and modify intermediary State - in the Accept phase, filters check that the candidate is feasible, - if the Accept phase succeeds, the solver may decide to trigger a Synchronize phase that makes filters change their internal representation to the last candidate, - otherwise (Accept fails or the solver does not want to synchronize), a Revert phase makes filters erase any intermediary State generated by the Relax and Accept phases. A given filter has phases called with the following pattern: (Relax.Accept.Synchronize | Relax.Accept.Revert | Relax.Revert)*. Filters's Revert() is always called in the reverse order their Accept() was called, to allow late filters to use state done/undone by early filters' Accept()/Revert().

+

Classes to which this template function can be applied to as of 04/2014. +Usage: LocalSearchOperator* op = MakeLocalSearchOperator(...); +class TwoOpt; +class Relocate; +class Exchange; +class Cross; +class MakeActiveOperator; +class MakeInactiveOperator; +class MakeChainInactiveOperator; +class SwapActiveOperator; +class ExtendedSwapActiveOperator; +class MakeActiveAndRelocate; +class RelocateAndMakeActiveOperator; +class RelocateAndMakeInactiveOperator; +Local Search Filters are used for fast neighbor pruning. +Filtering a move is done in several phases:

+ +
    +
  • in the Relax phase, filters determine which parts of their internals +will be changed by the candidate, and modify intermediary State
  • +
  • in the Accept phase, filters check that the candidate is feasible,
  • +
  • if the Accept phase succeeds, the solver may decide to trigger a +Synchronize phase that makes filters change their internal representation +to the last candidate,
  • +
  • otherwise (Accept fails or the solver does not want to synchronize), +a Revert phase makes filters erase any intermediary State generated by the +Relax and Accept phases. +A given filter has phases called with the following pattern: +(Relax.Accept.Synchronize | Relax.Accept.Revert | Relax.Revert)*. +Filters's Revert() is always called in the reverse order their Accept() was +called, to allow late filters to use state done/undone by early filters' +Accept()/Revert().
  • +
@@ -27035,13 +31251,31 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
View Source
    def Accept(self, delta: "Assignment", deltadelta: "Assignment", objective_min: "int64_t", objective_max: "int64_t") -> "bool":
-        r""" Accepts a "delta" given the assignment with which the filter has been synchronized; the delta holds the variables which have been modified and their new value. If the filter represents a part of the global objective, its contribution must be between objective_min and objective_max. Sample: supposing one wants to maintain a[0,1] + b[0,1] <= 1, for the assignment (a,1), (b,0), the delta (b,1) will be rejected but the delta (a,0) will be accepted. TODO(user): Remove arguments when there are no more need for those."""
+        r"""
+        Accepts a "delta" given the assignment with which the filter has been
+        synchronized; the delta holds the variables which have been modified and
+        their new value.
+        If the filter represents a part of the global objective, its contribution
+        must be between objective_min and objective_max.
+        Sample: supposing one wants to maintain a[0,1] + b[0,1] <= 1,
+        for the assignment (a,1), (b,0), the delta (b,1) will be rejected
+        but the delta (a,0) will be accepted.
+        TODO(user): Remove arguments when there are no more need for those.
+        """
         return _pywrapcp.LocalSearchFilter_Accept(self, delta, deltadelta, objective_min, objective_max)
 
-

Accepts a "delta" given the assignment with which the filter has been synchronized; the delta holds the variables which have been modified and their new value. If the filter represents a part of the global objective, its contribution must be between objective_min and objective_max. Sample: supposing one wants to maintain a[0,1] + b[0,1] <= 1, for the assignment (a,1), (b,0), the delta (b,1) will be rejected but the delta (a,0) will be accepted. TODO(user): Remove arguments when there are no more need for those.

+

Accepts a "delta" given the assignment with which the filter has been +synchronized; the delta holds the variables which have been modified and +their new value. +If the filter represents a part of the global objective, its contribution +must be between objective_min and objective_max. +Sample: supposing one wants to maintain a[0,1] + b[0,1] <= 1, +for the assignment (a,1), (b,0), the delta (b,1) will be rejected +but the delta (a,0) will be accepted. +TODO(user): Remove arguments when there are no more need for those.

@@ -27080,13 +31314,23 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
View Source
    def Synchronize(self, assignment: "Assignment", delta: "Assignment") -> "void":
-        r""" Synchronizes the filter with the current solution, delta being the difference with the solution passed to the previous call to Synchronize() or IncrementalSynchronize(). 'delta' can be used to incrementally synchronizing the filter with the new solution by only considering the changes in delta."""
+        r"""
+        Synchronizes the filter with the current solution, delta being the
+        difference with the solution passed to the previous call to Synchronize()
+        or IncrementalSynchronize(). 'delta' can be used to incrementally
+        synchronizing the filter with the new solution by only considering the
+        changes in delta.
+        """
         return _pywrapcp.LocalSearchFilter_Synchronize(self, assignment, delta)
 
-

Synchronizes the filter with the current solution, delta being the difference with the solution passed to the previous call to Synchronize() or IncrementalSynchronize(). 'delta' can be used to incrementally synchronizing the filter with the new solution by only considering the changes in delta.

+

Synchronizes the filter with the current solution, delta being the +difference with the solution passed to the previous call to Synchronize() +or IncrementalSynchronize(). 'delta' can be used to incrementally +synchronizing the filter with the new solution by only considering the +changes in delta.

@@ -27113,7 +31357,11 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
View Source
class LocalSearchFilterManager(BaseObject):
-    r""" Filter manager: when a move is made, filters are executed to decide whether the solution is feasible and compute parts of the new cost. This class schedules filter execution and composes costs as a sum."""
+    r"""
+    Filter manager: when a move is made, filters are executed to decide whether
+    the solution is feasible and compute parts of the new cost. This class
+    schedules filter execution and composes costs as a sum.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
@@ -27125,7 +31373,11 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
         _pywrapcp.LocalSearchFilterManager_swiginit(self, _pywrapcp.new_LocalSearchFilterManager(*args))
 
     def Accept(self, monitor: "operations_research::LocalSearchMonitor *const", delta: "Assignment", deltadelta: "Assignment", objective_min: "int64_t", objective_max: "int64_t") -> "bool":
-        r""" Returns true iff all filters return true, and the sum of their accepted objectives is between objective_min and objective_max. The monitor has its Begin/EndFiltering events triggered."""
+        r"""
+        Returns true iff all filters return true, and the sum of their accepted
+        objectives is between objective_min and objective_max.
+        The monitor has its Begin/EndFiltering events triggered.
+        """
         return _pywrapcp.LocalSearchFilterManager_Accept(self, monitor, delta, deltadelta, objective_min, objective_max)
 
     def Synchronize(self, assignment: "Assignment", delta: "Assignment") -> "void":
@@ -27136,7 +31388,9 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
 
         
-

Filter manager: when a move is made, filters are executed to decide whether the solution is feasible and compute parts of the new cost. This class schedules filter execution and composes costs as a sum.

+

Filter manager: when a move is made, filters are executed to decide whether +the solution is feasible and compute parts of the new cost. This class +schedules filter execution and composes costs as a sum.

@@ -27206,13 +31460,19 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
View Source
    def Accept(self, monitor: "operations_research::LocalSearchMonitor *const", delta: "Assignment", deltadelta: "Assignment", objective_min: "int64_t", objective_max: "int64_t") -> "bool":
-        r""" Returns true iff all filters return true, and the sum of their accepted objectives is between objective_min and objective_max. The monitor has its Begin/EndFiltering events triggered."""
+        r"""
+        Returns true iff all filters return true, and the sum of their accepted
+        objectives is between objective_min and objective_max.
+        The monitor has its Begin/EndFiltering events triggered.
+        """
         return _pywrapcp.LocalSearchFilterManager_Accept(self, monitor, delta, deltadelta, objective_min, objective_max)
 
-

Returns true iff all filters return true, and the sum of their accepted objectives is between objective_min and objective_max. The monitor has its Begin/EndFiltering events triggered.

+

Returns true iff all filters return true, and the sum of their accepted +objectives is between objective_min and objective_max. +The monitor has its Begin/EndFiltering events triggered.

@@ -27268,7 +31528,10 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b) __swig_destroy__ = _pywrapcp.delete_IntVarLocalSearchFilter def Synchronize(self, assignment: "Assignment", delta: "Assignment") -> "void": - r""" This method should not be overridden. Override OnSynchronize() instead which is called before exiting this method.""" + r""" + This method should not be overridden. Override OnSynchronize() instead + which is called before exiting this method. + """ return _pywrapcp.IntVarLocalSearchFilter_Synchronize(self, assignment, delta) def Size(self) -> "int": @@ -27287,7 +31550,39 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
-

Classes to which this template function can be applied to as of 04/2014. Usage: LocalSearchOperator* op = MakeLocalSearchOperator(...); class TwoOpt; class Relocate; class Exchange; class Cross; class MakeActiveOperator; class MakeInactiveOperator; class MakeChainInactiveOperator; class SwapActiveOperator; class ExtendedSwapActiveOperator; class MakeActiveAndRelocate; class RelocateAndMakeActiveOperator; class RelocateAndMakeInactiveOperator; Local Search Filters are used for fast neighbor pruning. Filtering a move is done in several phases: - in the Relax phase, filters determine which parts of their internals will be changed by the candidate, and modify intermediary State - in the Accept phase, filters check that the candidate is feasible, - if the Accept phase succeeds, the solver may decide to trigger a Synchronize phase that makes filters change their internal representation to the last candidate, - otherwise (Accept fails or the solver does not want to synchronize), a Revert phase makes filters erase any intermediary State generated by the Relax and Accept phases. A given filter has phases called with the following pattern: (Relax.Accept.Synchronize | Relax.Accept.Revert | Relax.Revert)*. Filters's Revert() is always called in the reverse order their Accept() was called, to allow late filters to use state done/undone by early filters' Accept()/Revert().

+

Classes to which this template function can be applied to as of 04/2014. +Usage: LocalSearchOperator* op = MakeLocalSearchOperator(...); +class TwoOpt; +class Relocate; +class Exchange; +class Cross; +class MakeActiveOperator; +class MakeInactiveOperator; +class MakeChainInactiveOperator; +class SwapActiveOperator; +class ExtendedSwapActiveOperator; +class MakeActiveAndRelocate; +class RelocateAndMakeActiveOperator; +class RelocateAndMakeInactiveOperator; +Local Search Filters are used for fast neighbor pruning. +Filtering a move is done in several phases:

+ +
    +
  • in the Relax phase, filters determine which parts of their internals +will be changed by the candidate, and modify intermediary State
  • +
  • in the Accept phase, filters check that the candidate is feasible,
  • +
  • if the Accept phase succeeds, the solver may decide to trigger a +Synchronize phase that makes filters change their internal representation +to the last candidate,
  • +
  • otherwise (Accept fails or the solver does not want to synchronize), +a Revert phase makes filters erase any intermediary State generated by the +Relax and Accept phases. +A given filter has phases called with the following pattern: +(Relax.Accept.Synchronize | Relax.Accept.Revert | Relax.Revert)*. +Filters's Revert() is always called in the reverse order their Accept() was +called, to allow late filters to use state done/undone by early filters' +Accept()/Revert().
  • +
@@ -27339,13 +31634,17 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
View Source
    def Synchronize(self, assignment: "Assignment", delta: "Assignment") -> "void":
-        r""" This method should not be overridden. Override OnSynchronize() instead which is called before exiting this method."""
+        r"""
+        This method should not be overridden. Override OnSynchronize() instead
+        which is called before exiting this method.
+        """
         return _pywrapcp.IntVarLocalSearchFilter_Synchronize(self, assignment, delta)
 
-

This method should not be overridden. Override OnSynchronize() instead which is called before exiting this method.

+

This method should not be overridden. Override OnSynchronize() instead +which is called before exiting this method.

@@ -27494,7 +31793,9 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
-

The class IntVar is a subset of IntExpr. In addition to the IntExpr protocol, it offers persistence, removing values from the domains, and a finer model for events.

+

The class IntVar is a subset of IntExpr. In addition to the +IntExpr protocol, it offers persistence, removing values from the domains, +and a finer model for events.

@@ -27661,7 +31962,8 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
-

This method returns the value of the variable. This method checks before that the variable is bound.

+

This method returns the value of the variable. This method checks +before that the variable is bound.

@@ -27703,7 +32005,8 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)
-

This method removes the interval 'l' .. 'u' from the domain of the variable. It assumes that 'l' <= 'u'.

+

This method removes the interval 'l' .. 'u' from the domain of +the variable. It assumes that 'l' <= 'u'.

@@ -27725,12 +32028,14 @@ This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)

Overload 1: -This method attaches a demon that will be awakened when the variable is bound.

+This method attaches a demon that will be awakened when the +variable is bound.

|

Overload 2: -This method attaches a closure that will be awakened when the variable is bound.

+This method attaches a closure that will be awakened when the +variable is bound.

@@ -27779,12 +32084,14 @@ Attach a demon that will watch the min or the max of the expression.

Overload 1: -This method attaches a demon that will watch any domain modification of the domain of the variable.

+This method attaches a demon that will watch any domain +modification of the domain of the variable.

|

Overload 2: -This method attaches a closure that will watch any domain modification of the domain of the variable.

+This method attaches a closure that will watch any domain +modification of the domain of the variable.

@@ -27826,7 +32133,8 @@ This method attaches a closure that will watch any domain modification of the do
-

This method returns whether the value 'v' is in the domain of the variable.

+

This method returns whether the value 'v' is in the domain of the +variable.

@@ -27847,7 +32155,9 @@ This method attaches a closure that will watch any domain modification of the do -

Creates a hole iterator. When 'reversible' is false, the returned object is created on the normal C++ heap and the solver does NOT take ownership of the object.

+

Creates a hole iterator. When 'reversible' is false, the returned +object is created on the normal C++ heap and the solver does NOT +take ownership of the object.

@@ -27868,7 +32178,9 @@ This method attaches a closure that will watch any domain modification of the do -

Creates a domain iterator. When 'reversible' is false, the returned object is created on the normal C++ heap and the solver does NOT take ownership of the object.

+

Creates a domain iterator. When 'reversible' is false, the +returned object is created on the normal C++ heap and the solver +does NOT take ownership of the object.

@@ -27965,7 +32277,8 @@ This method attaches a closure that will watch any domain modification of the do -

A Decision represents a choice point in the search tree. The two main methods are Apply() to go left, or Refute() to go right.

+

A Decision represents a choice point in the search tree. The two main +methods are Apply() to go left, or Refute() to go right.

@@ -28101,7 +32414,8 @@ This method attaches a closure that will watch any domain modification of the do -

A DecisionBuilder is responsible for creating the search tree. The important method is Next(), which returns the next decision to execute.

+

A DecisionBuilder is responsible for creating the search tree. The +important method is Next(), which returns the next decision to execute.

@@ -28145,7 +32459,10 @@ This method attaches a closure that will watch any domain modification of the do -

This is the main method of the decision builder class. It must return a decision (an instance of the class Decision). If it returns nullptr, this means that the decision builder has finished its work.

+

This is the main method of the decision builder class. It must +return a decision (an instance of the class Decision). If it +returns nullptr, this means that the decision builder has finished +its work.

@@ -28207,7 +32524,21 @@ This method attaches a closure that will watch any domain modification of the do -

A Demon is the base element of a propagation queue. It is the main object responsible for implementing the actual propagation of the constraint and pruning the inconsistent values in the domains of the variables. The main concept is that demons are listeners that are attached to the variables and listen to their modifications. There are two methods: - Run() is the actual method called when the demon is processed. - priority() returns its priority. Standard priorities are slow, normal or fast. "immediate" is reserved for variables and is treated separately.

+

A Demon is the base element of a propagation queue. It is the main + object responsible for implementing the actual propagation + of the constraint and pruning the inconsistent values in the domains + of the variables. The main concept is that demons are listeners that are + attached to the variables and listen to their modifications.

+ +
There are two methods
+ +
+
    +
  • Run() is the actual method called when the demon is processed.
  • +
  • priority() returns its priority. Standard priorities are slow, normal + or fast. "immediate" is reserved for variables and is treated separately.
  • +
+
@@ -28303,7 +32634,21 @@ This method attaches a closure that will watch any domain modification of the do -

A Demon is the base element of a propagation queue. It is the main object responsible for implementing the actual propagation of the constraint and pruning the inconsistent values in the domains of the variables. The main concept is that demons are listeners that are attached to the variables and listen to their modifications. There are two methods: - Run() is the actual method called when the demon is processed. - priority() returns its priority. Standard priorities are slow, normal or fast. "immediate" is reserved for variables and is treated separately.

+

A Demon is the base element of a propagation queue. It is the main + object responsible for implementing the actual propagation + of the constraint and pruning the inconsistent values in the domains + of the variables. The main concept is that demons are listeners that are + attached to the variables and listen to their modifications.

+ +
There are two methods
+ +
+
    +
  • Run() is the actual method called when the demon is processed.
  • +
  • priority() returns its priority. Standard priorities are slow, normal + or fast. "immediate" is reserved for variables and is treated separately.
  • +
+
@@ -28326,7 +32671,8 @@ This method attaches a closure that will watch any domain modification of the do -

This indicates the priority of a demon. Immediate demons are treated separately and corresponds to variables.

+

This indicates the priority of a demon. Immediate demons are treated +separately and corresponds to variables.

@@ -28366,7 +32712,9 @@ This method attaches a closure that will watch any domain modification of the do -

This method returns the priority of the demon. Usually a demon is fast, slow or normal. Immediate demons are reserved for internal use to maintain variables.

+

This method returns the priority of the demon. Usually a demon is +fast, slow or normal. Immediate demons are reserved for internal +use to maintain variables.

@@ -28454,7 +32802,15 @@ This method attaches a closure that will watch any domain modification of the do -

A constraint is the main modeling object. It provides two methods: - Post() is responsible for creating the demons and attaching them to immediate demons(). - InitialPropagate() is called once just after Post and performs the initial propagation. The subsequent propagations will be performed by the demons Posted during the post() method.

+

A constraint is the main modeling object. It provides two methods:

+ +
    +
  • Post() is responsible for creating the demons and attaching them to +immediate demons().
  • +
  • InitialPropagate() is called once just after Post and performs +the initial propagation. The subsequent propagations will be performed +by the demons Posted during the post() method.
  • +
@@ -28579,7 +32935,8 @@ This method attaches a closure that will watch any domain modification of the do -

This method performs the initial propagation of the constraint. It is called just after the post.

+

This method performs the initial propagation of the +constraint. It is called just after the post.

@@ -28635,7 +32992,30 @@ This method attaches a closure that will watch any domain modification of the do
View Source
class RoutingIndexManager(object):
-    r""" Manager for any NodeIndex <-> variable index conversion. The routing solver uses variable indices internally and through its API. These variable indices are tricky to manage directly because one Node can correspond to a multitude of variables, depending on the number of times they appear in the model, and if they're used as start and/or end points. This class aims to simplify variable index usage, allowing users to use NodeIndex instead. Usage:   .cpp}   auto starts_ends = ...;  /// These are NodeIndex.   RoutingIndexManager manager(10, 4, starts_ends);  // 10 nodes, 4 vehicles.   RoutingModel model(manager);"""
+    r"""
+    Manager for any NodeIndex <-> variable index conversion. The routing solver
+    uses variable indices internally and through its API. These variable indices
+    are tricky to manage directly because one Node can correspond to a multitude
+    of variables, depending on the number of times they appear in the model, and
+    if they're used as start and/or end points. This class aims to simplify
+    variable index usage, allowing users to use NodeIndex instead.
+
+    Usage:
+
+      .. code-block:: c++
+
+          auto starts_ends = ...;  /// These are NodeIndex.
+          RoutingIndexManager manager(10, 4, starts_ends);  // 10 nodes, 4 vehicles.
+          RoutingModel model(manager);
+
+    Then, use 'manager.NodeToIndex(node)' whenever model requires a variable
+    index.
+
+    Note: the mapping between node indices and variables indices is subject to
+    change so no assumption should be made on it. The only guarantee is that
+    indices range between 0 and n-1, where n = number of vehicles * 2 (for start
+    and end nodes) + number of non-start or end nodes.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
@@ -28668,7 +33048,31 @@ This method attaches a closure that will watch any domain modification of the do
 
         
-

Manager for any NodeIndex <-> variable index conversion. The routing solver uses variable indices internally and through its API. These variable indices are tricky to manage directly because one Node can correspond to a multitude of variables, depending on the number of times they appear in the model, and if they're used as start and/or end points. This class aims to simplify variable index usage, allowing users to use NodeIndex instead. Usage: .cpp} auto starts_ends = ...; /// These are NodeIndex. RoutingIndexManager manager(10, 4, starts_ends); // 10 nodes, 4 vehicles. RoutingModel model(manager);

+

Manager for any NodeIndex <-> variable index conversion. The routing solver +uses variable indices internally and through its API. These variable indices +are tricky to manage directly because one Node can correspond to a multitude +of variables, depending on the number of times they appear in the model, and +if they're used as start and/or end points. This class aims to simplify +variable index usage, allowing users to use NodeIndex instead.

+ +
Usage
+ +
+

.. code-block:: c++

+ +
auto starts_ends = ...;  /// These are NodeIndex.
+RoutingIndexManager manager(10, 4, starts_ends);  // 10 nodes, 4 vehicles.
+RoutingModel model(manager);
+
+
+ +

Then, use 'manager.NodeToIndex(node)' whenever model requires a variable +index.

+ +

Note: the mapping between node indices and variables indices is subject to +change so no assumption should be made on it. The only guarantee is that +indices range between 0 and n-1, where n = number of vehicles * 2 (for start +and end nodes) + number of non-start or end nodes.

@@ -28892,13 +33296,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
def FindErrorInRoutingSearchParameters(search_parameters: "operations_research::RoutingSearchParameters const &") -> "std::string":
-    r""" Returns an empty std::string if the routing search parameters are valid, and a non-empty, human readable error description if they're not."""
+    r"""
+    Returns an empty std::string if the routing search parameters are valid, and
+    a non-empty, human readable error description if they're not.
+    """
     return _pywrapcp.FindErrorInRoutingSearchParameters(search_parameters)
 
-

Returns an empty std::string if the routing search parameters are valid, and a non-empty, human readable error description if they're not.

+

Returns an empty std::string if the routing search parameters are valid, and +a non-empty, human readable error description if they're not.

@@ -28964,7 +33372,28 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.RoutingModel_UnaryTransitCallbackOrNull(self, callback_index) def AddDimension(self, evaluator_index: "int", slack_max: "int64_t", capacity: "int64_t", fix_start_cumul_to_zero: "bool", name: "std::string const &") -> "bool": - r""" Model creation Methods to add dimensions to routes; dimensions represent quantities accumulated at nodes along the routes. They represent quantities such as weights or volumes carried along the route, or distance or times. Quantities at a node are represented by "cumul" variables and the increase or decrease of quantities between nodes are represented by "transit" variables. These variables are linked as follows: if j == next(i), cumul(j) = cumul(i) + transit(i) + slack(i) where slack is a positive slack variable (can represent waiting times for a time dimension). Setting the value of fix_start_cumul_to_zero to true will force the "cumul" variable of the start node of all vehicles to be equal to 0. Creates a dimension where the transit variable is constrained to be equal to evaluator(i, next(i)); 'slack_max' is the upper bound of the slack variable and 'capacity' is the upper bound of the cumul variables. 'name' is the name used to reference the dimension; this name is used to get cumul and transit variables from the routing model. Returns false if a dimension with the same name has already been created (and doesn't create the new dimension). Takes ownership of the callback 'evaluator'.""" + r""" + Model creation + Methods to add dimensions to routes; dimensions represent quantities + accumulated at nodes along the routes. They represent quantities such as + weights or volumes carried along the route, or distance or times. + Quantities at a node are represented by "cumul" variables and the increase + or decrease of quantities between nodes are represented by "transit" + variables. These variables are linked as follows: + if j == next(i), cumul(j) = cumul(i) + transit(i) + slack(i) + where slack is a positive slack variable (can represent waiting times for + a time dimension). + Setting the value of fix_start_cumul_to_zero to true will force the + "cumul" variable of the start node of all vehicles to be equal to 0. + Creates a dimension where the transit variable is constrained to be + equal to evaluator(i, next(i)); 'slack_max' is the upper bound of the + slack variable and 'capacity' is the upper bound of the cumul variables. + 'name' is the name used to reference the dimension; this name is used to + get cumul and transit variables from the routing model. + Returns false if a dimension with the same name has already been created + (and doesn't create the new dimension). + Takes ownership of the callback 'evaluator'. + """ return _pywrapcp.RoutingModel_AddDimension(self, evaluator_index, slack_max, capacity, fix_start_cumul_to_zero, name) def AddDimensionWithVehicleTransits(self, evaluator_indices: "std::vector< int > const &", slack_max: "int64_t", capacity: "int64_t", fix_start_cumul_to_zero: "bool", name: "std::string const &") -> "bool": @@ -28977,22 +33406,61 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.RoutingModel_AddDimensionWithVehicleTransitAndCapacity(self, evaluator_indices, slack_max, vehicle_capacities, fix_start_cumul_to_zero, name) def AddConstantDimensionWithSlack(self, value: "int64_t", capacity: "int64_t", slack_max: "int64_t", fix_start_cumul_to_zero: "bool", name: "std::string const &") -> "std::pair< int,bool >": - r""" Creates a dimension where the transit variable is constrained to be equal to 'value'; 'capacity' is the upper bound of the cumul variables. 'name' is the name used to reference the dimension; this name is used to get cumul and transit variables from the routing model. Returns a pair consisting of an index to the registered unary transit callback and a bool denoting whether the dimension has been created. It is false if a dimension with the same name has already been created (and doesn't create the new dimension but still register a new callback).""" + r""" + Creates a dimension where the transit variable is constrained to be + equal to 'value'; 'capacity' is the upper bound of the cumul variables. + 'name' is the name used to reference the dimension; this name is used to + get cumul and transit variables from the routing model. + Returns a pair consisting of an index to the registered unary transit + callback and a bool denoting whether the dimension has been created. + It is false if a dimension with the same name has already been created + (and doesn't create the new dimension but still register a new callback). + """ return _pywrapcp.RoutingModel_AddConstantDimensionWithSlack(self, value, capacity, slack_max, fix_start_cumul_to_zero, name) def AddConstantDimension(self, value: "int64_t", capacity: "int64_t", fix_start_cumul_to_zero: "bool", name: "std::string const &") -> "std::pair< int,bool >": return _pywrapcp.RoutingModel_AddConstantDimension(self, value, capacity, fix_start_cumul_to_zero, name) def AddVectorDimension(self, values: "std::vector< int64_t >", capacity: "int64_t", fix_start_cumul_to_zero: "bool", name: "std::string const &") -> "std::pair< int,bool >": - r""" Creates a dimension where the transit variable is constrained to be equal to 'values[i]' for node i; 'capacity' is the upper bound of the cumul variables. 'name' is the name used to reference the dimension; this name is used to get cumul and transit variables from the routing model. Returns a pair consisting of an index to the registered unary transit callback and a bool denoting whether the dimension has been created. It is false if a dimension with the same name has already been created (and doesn't create the new dimension but still register a new callback).""" + r""" + Creates a dimension where the transit variable is constrained to be + equal to 'values[i]' for node i; 'capacity' is the upper bound of + the cumul variables. 'name' is the name used to reference the dimension; + this name is used to get cumul and transit variables from the routing + model. + Returns a pair consisting of an index to the registered unary transit + callback and a bool denoting whether the dimension has been created. + It is false if a dimension with the same name has already been created + (and doesn't create the new dimension but still register a new callback). + """ return _pywrapcp.RoutingModel_AddVectorDimension(self, values, capacity, fix_start_cumul_to_zero, name) def AddMatrixDimension(self, values: "std::vector< std::vector< int64_t > >", capacity: "int64_t", fix_start_cumul_to_zero: "bool", name: "std::string const &") -> "std::pair< int,bool >": - r""" Creates a dimension where the transit variable is constrained to be equal to 'values[i][next(i)]' for node i; 'capacity' is the upper bound of the cumul variables. 'name' is the name used to reference the dimension; this name is used to get cumul and transit variables from the routing model. Returns a pair consisting of an index to the registered transit callback and a bool denoting whether the dimension has been created. It is false if a dimension with the same name has already been created (and doesn't create the new dimension but still register a new callback).""" + r""" + Creates a dimension where the transit variable is constrained to be + equal to 'values[i][next(i)]' for node i; 'capacity' is the upper bound of + the cumul variables. 'name' is the name used to reference the dimension; + this name is used to get cumul and transit variables from the routing + model. + Returns a pair consisting of an index to the registered transit callback + and a bool denoting whether the dimension has been created. + It is false if a dimension with the same name has already been created + (and doesn't create the new dimension but still register a new callback). + """ return _pywrapcp.RoutingModel_AddMatrixDimension(self, values, capacity, fix_start_cumul_to_zero, name) def MakePathSpansAndTotalSlacks(self, dimension: "RoutingDimension", spans: "std::vector< operations_research::IntVar * >", total_slacks: "std::vector< operations_research::IntVar * >") -> "operations_research::Constraint *": - r""" For every vehicle of the routing model: - if total_slacks[vehicle] is not nullptr, constrains it to be the sum of slacks on that vehicle, that is, dimension->CumulVar(end) - dimension->CumulVar(start) - sum_{node in path of vehicle} dimension->FixedTransitVar(node). - if spans[vehicle] is not nullptr, constrains it to be dimension->CumulVar(end) - dimension->CumulVar(start) This does stronger propagation than a decomposition, and takes breaks into account.""" + r""" + For every vehicle of the routing model: + - if total_slacks[vehicle] is not nullptr, constrains it to be the sum of + slacks on that vehicle, that is, + dimension->CumulVar(end) - dimension->CumulVar(start) - + sum_{node in path of vehicle} dimension->FixedTransitVar(node). + - if spans[vehicle] is not nullptr, constrains it to be + dimension->CumulVar(end) - dimension->CumulVar(start) + This does stronger propagation than a decomposition, and takes breaks into + account. + """ return _pywrapcp.RoutingModel_MakePathSpansAndTotalSlacks(self, dimension, spans, total_slacks) def GetAllDimensionNames(self) -> "std::vector< std::string >": @@ -29008,7 +33476,10 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.RoutingModel_GetDimensionsWithSoftOrSpanCosts(self) def GetGlobalDimensionCumulOptimizers(self) -> "std::vector< std::unique_ptr< operations_research::GlobalDimensionCumulOptimizer > > const &": - r""" Returns [global|local]_dimension_optimizers_, which are empty if the model has not been closed.""" + r""" + Returns [global|local]_dimension_optimizers_, which are empty if the model + has not been closed. + """ return _pywrapcp.RoutingModel_GetGlobalDimensionCumulOptimizers(self) def GetGlobalDimensionCumulMPOptimizers(self) -> "std::vector< std::unique_ptr< operations_research::GlobalDimensionCumulOptimizer > > const &": @@ -29021,7 +33492,10 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.RoutingModel_GetLocalDimensionCumulMPOptimizers(self) def GetMutableGlobalCumulOptimizer(self, dimension: "RoutingDimension") -> "operations_research::GlobalDimensionCumulOptimizer *": - r""" Returns the global/local dimension cumul optimizer for a given dimension, or nullptr if there is none.""" + r""" + Returns the global/local dimension cumul optimizer for a given dimension, + or nullptr if there is none. + """ return _pywrapcp.RoutingModel_GetMutableGlobalCumulOptimizer(self, dimension) def GetMutableGlobalCumulMPOptimizer(self, dimension: "RoutingDimension") -> "operations_research::GlobalDimensionCumulOptimizer *": @@ -29042,11 +33516,19 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.RoutingModel_GetDimensionOrDie(self, dimension_name) def GetMutableDimension(self, dimension_name: "std::string const &") -> "operations_research::RoutingDimension *": - r""" Returns a dimension from its name. Returns nullptr if the dimension does not exist.""" + r""" + Returns a dimension from its name. Returns nullptr if the dimension does + not exist. + """ return _pywrapcp.RoutingModel_GetMutableDimension(self, dimension_name) def SetPrimaryConstrainedDimension(self, dimension_name: "std::string const &") -> "void": - r""" Set the given dimension as "primary constrained". As of August 2013, this is only used by ArcIsMoreConstrainedThanArc(). "dimension" must be the name of an existing dimension, or be empty, in which case there will not be a primary dimension after this call.""" + r""" + Set the given dimension as "primary constrained". As of August 2013, this + is only used by ArcIsMoreConstrainedThanArc(). + "dimension" must be the name of an existing dimension, or be empty, in + which case there will not be a primary dimension after this call. + """ return _pywrapcp.RoutingModel_SetPrimaryConstrainedDimension(self, dimension_name) def GetPrimaryConstrainedDimension(self) -> "std::string const &": @@ -29054,11 +33536,31 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.RoutingModel_GetPrimaryConstrainedDimension(self) def GetDimensionResourceGroupIndices(self, dimension: "RoutingDimension") -> "std::vector< int > const &": - r""" Returns the indices of resource groups for this dimension. This method can only be called after the model has been closed.""" + r""" + Returns the indices of resource groups for this dimension. This method can + only be called after the model has been closed. + """ return _pywrapcp.RoutingModel_GetDimensionResourceGroupIndices(self, dimension) def AddDisjunction(self, *args) -> "operations_research::RoutingModel::DisjunctionIndex": - r""" Adds a disjunction constraint on the indices: exactly 'max_cardinality' of the indices are active. Start and end indices of any vehicle cannot be part of a disjunction. If a penalty is given, at most 'max_cardinality' of the indices can be active, and if less are active, 'penalty' is payed per inactive index. This is equivalent to adding the constraint: p + Sum(i)active[i] == max_cardinality where p is an integer variable, and the following cost to the cost function: p * penalty. 'penalty' must be positive to make the disjunction optional; a negative penalty will force 'max_cardinality' indices of the disjunction to be performed, and therefore p == 0. Note: passing a vector with a single index will model an optional index with a penalty cost if it is not visited.""" + r""" + Adds a disjunction constraint on the indices: exactly 'max_cardinality' of + the indices are active. Start and end indices of any vehicle cannot be + part of a disjunction. + + If a penalty is given, at most 'max_cardinality' of the indices can be + active, and if less are active, 'penalty' is payed per inactive index. + This is equivalent to adding the constraint: + p + Sum(i)active[i] == max_cardinality + where p is an integer variable, and the following cost to the cost + function: + p * penalty. + 'penalty' must be positive to make the disjunction optional; a negative + penalty will force 'max_cardinality' indices of the disjunction to be + performed, and therefore p == 0. + Note: passing a vector with a single index will model an optional index + with a penalty cost if it is not visited. + """ return _pywrapcp.RoutingModel_AddDisjunction(self, *args) def GetDisjunctionIndices(self, index: "int64_t") -> "std::vector< operations_research::RoutingModel::DisjunctionIndex > const &": @@ -29070,7 +33572,10 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.RoutingModel_GetDisjunctionPenalty(self, index) def GetDisjunctionMaxCardinality(self, index: "operations_research::RoutingModel::DisjunctionIndex") -> "int64_t": - r""" Returns the maximum number of possible active nodes of the node disjunction of index 'index'.""" + r""" + Returns the maximum number of possible active nodes of the node + disjunction of index 'index'. + """ return _pywrapcp.RoutingModel_GetDisjunctionMaxCardinality(self, index) def GetNumberOfDisjunctions(self) -> "int": @@ -29078,19 +33583,39 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.RoutingModel_GetNumberOfDisjunctions(self) def GetPerfectBinaryDisjunctions(self) -> "std::vector< std::pair< int64_t,int64_t > >": - r""" Returns the list of all perfect binary disjunctions, as pairs of variable indices: a disjunction is "perfect" when its variables do not appear in any other disjunction. Each pair is sorted (lowest variable index first), and the output vector is also sorted (lowest pairs first).""" + r""" + Returns the list of all perfect binary disjunctions, as pairs of variable + indices: a disjunction is "perfect" when its variables do not appear in + any other disjunction. Each pair is sorted (lowest variable index first), + and the output vector is also sorted (lowest pairs first). + """ return _pywrapcp.RoutingModel_GetPerfectBinaryDisjunctions(self) def IgnoreDisjunctionsAlreadyForcedToZero(self) -> "void": - r""" SPECIAL: Makes the solver ignore all the disjunctions whose active variables are all trivially zero (i.e. Max() == 0), by setting their max_cardinality to 0. This can be useful when using the BaseBinaryDisjunctionNeighborhood operators, in the context of arc-based routing.""" + r""" + SPECIAL: Makes the solver ignore all the disjunctions whose active + variables are all trivially zero (i.e. Max() == 0), by setting their + max_cardinality to 0. + This can be useful when using the BaseBinaryDisjunctionNeighborhood + operators, in the context of arc-based routing. + """ return _pywrapcp.RoutingModel_IgnoreDisjunctionsAlreadyForcedToZero(self) def AddSoftSameVehicleConstraint(self, indices: "std::vector< int64_t > const &", cost: "int64_t") -> "void": - r""" Adds a soft constraint to force a set of variable indices to be on the same vehicle. If all nodes are not on the same vehicle, each extra vehicle used adds 'cost' to the cost function.""" + r""" + Adds a soft constraint to force a set of variable indices to be on the + same vehicle. If all nodes are not on the same vehicle, each extra vehicle + used adds 'cost' to the cost function. + """ return _pywrapcp.RoutingModel_AddSoftSameVehicleConstraint(self, indices, cost) def SetAllowedVehiclesForIndex(self, vehicles: "std::vector< int > const &", index: "int64_t") -> "void": - r""" Sets the vehicles which can visit a given node. If the node is in a disjunction, this will not prevent it from being unperformed. Specifying an empty vector of vehicles has no effect (all vehicles will be allowed to visit the node).""" + r""" + Sets the vehicles which can visit a given node. If the node is in a + disjunction, this will not prevent it from being unperformed. + Specifying an empty vector of vehicles has no effect (all vehicles + will be allowed to visit the node). + """ return _pywrapcp.RoutingModel_SetAllowedVehiclesForIndex(self, vehicles, index) def IsVehicleAllowedForIndex(self, vehicle: "int", index: "int64_t") -> "bool": @@ -29098,15 +33623,37 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.RoutingModel_IsVehicleAllowedForIndex(self, vehicle, index) def AddPickupAndDelivery(self, pickup: "int64_t", delivery: "int64_t") -> "void": - r""" Notifies that index1 and index2 form a pair of nodes which should belong to the same route. This methods helps the search find better solutions, especially in the local search phase. It should be called each time you have an equality constraint linking the vehicle variables of two node (including for instance pickup and delivery problems): Solver* const solver = routing.solver(); int64_t index1 = manager.NodeToIndex(node1); int64_t index2 = manager.NodeToIndex(node2); solver->AddConstraint(solver->MakeEquality( routing.VehicleVar(index1), routing.VehicleVar(index2))); routing.AddPickupAndDelivery(index1, index2);""" + r""" + Notifies that index1 and index2 form a pair of nodes which should belong + to the same route. This methods helps the search find better solutions, + especially in the local search phase. + It should be called each time you have an equality constraint linking + the vehicle variables of two node (including for instance pickup and + delivery problems): + Solver* const solver = routing.solver(); + int64_t index1 = manager.NodeToIndex(node1); + int64_t index2 = manager.NodeToIndex(node2); + solver->AddConstraint(solver->MakeEquality( + routing.VehicleVar(index1), + routing.VehicleVar(index2))); + routing.AddPickupAndDelivery(index1, index2); + """ return _pywrapcp.RoutingModel_AddPickupAndDelivery(self, pickup, delivery) def AddPickupAndDeliverySets(self, pickup_disjunction: "operations_research::RoutingModel::DisjunctionIndex", delivery_disjunction: "operations_research::RoutingModel::DisjunctionIndex") -> "void": - r""" Same as AddPickupAndDelivery but notifying that the performed node from the disjunction of index 'pickup_disjunction' is on the same route as the performed node from the disjunction of index 'delivery_disjunction'.""" + r""" + Same as AddPickupAndDelivery but notifying that the performed node from + the disjunction of index 'pickup_disjunction' is on the same route as the + performed node from the disjunction of index 'delivery_disjunction'. + """ return _pywrapcp.RoutingModel_AddPickupAndDeliverySets(self, pickup_disjunction, delivery_disjunction) def GetPickupIndexPairs(self, node_index: "int64_t") -> "std::vector< std::pair< int,int > > const &": - r""" Returns pairs for which the node is a pickup; the first element of each pair is the index in the pickup and delivery pairs list in which the pickup appears, the second element is its index in the pickups list.""" + r""" + Returns pairs for which the node is a pickup; the first element of each + pair is the index in the pickup and delivery pairs list in which the + pickup appears, the second element is its index in the pickups list. + """ return _pywrapcp.RoutingModel_GetPickupIndexPairs(self, node_index) def GetDeliveryIndexPairs(self, node_index: "int64_t") -> "std::vector< std::pair< int,int > > const &": @@ -29114,7 +33661,10 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.RoutingModel_GetDeliveryIndexPairs(self, node_index) def SetPickupAndDeliveryPolicyOfAllVehicles(self, policy: "operations_research::RoutingModel::PickupAndDeliveryPolicy") -> "void": - r""" Sets the Pickup and delivery policy of all vehicles. It is equivalent to calling SetPickupAndDeliveryPolicyOfVehicle on all vehicles.""" + r""" + Sets the Pickup and delivery policy of all vehicles. It is equivalent to + calling SetPickupAndDeliveryPolicyOfVehicle on all vehicles. + """ return _pywrapcp.RoutingModel_SetPickupAndDeliveryPolicyOfAllVehicles(self, policy) def SetPickupAndDeliveryPolicyOfVehicle(self, policy: "operations_research::RoutingModel::PickupAndDeliveryPolicy", vehicle: "int") -> "void": @@ -29124,16 +33674,32 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.RoutingModel_GetPickupAndDeliveryPolicyOfVehicle(self, vehicle) def GetNumOfSingletonNodes(self) -> "int": - r""" Returns the number of non-start/end nodes which do not appear in a pickup/delivery pair.""" + r""" + Returns the number of non-start/end nodes which do not appear in a + pickup/delivery pair. + """ return _pywrapcp.RoutingModel_GetNumOfSingletonNodes(self) TYPE_ADDED_TO_VEHICLE = _pywrapcp.RoutingModel_TYPE_ADDED_TO_VEHICLE r""" When visited, the number of types 'T' on the vehicle increases by one.""" ADDED_TYPE_REMOVED_FROM_VEHICLE = _pywrapcp.RoutingModel_ADDED_TYPE_REMOVED_FROM_VEHICLE - r""" When visited, one instance of type 'T' previously added to the route (TYPE_ADDED_TO_VEHICLE), if any, is removed from the vehicle. If the type was not previously added to the route or all added instances have already been removed, this visit has no effect on the types.""" + r""" + When visited, one instance of type 'T' previously added to the route + (TYPE_ADDED_TO_VEHICLE), if any, is removed from the vehicle. + If the type was not previously added to the route or all added instances + have already been removed, this visit has no effect on the types. + """ TYPE_ON_VEHICLE_UP_TO_VISIT = _pywrapcp.RoutingModel_TYPE_ON_VEHICLE_UP_TO_VISIT - r""" With the following policy, the visit enforces that type 'T' is considered on the route from its start until this node is visited.""" + r""" + With the following policy, the visit enforces that type 'T' is + considered on the route from its start until this node is visited. + """ TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED = _pywrapcp.RoutingModel_TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED - r""" The visit doesn't have an impact on the number of types 'T' on the route, as it's (virtually) added and removed directly. This policy can be used for visits which are part of an incompatibility or requirement set without affecting the type count on the route.""" + r""" + The visit doesn't have an impact on the number of types 'T' on the + route, as it's (virtually) added and removed directly. + This policy can be used for visits which are part of an incompatibility + or requirement set without affecting the type count on the route. + """ def SetVisitType(self, index: "int64_t", type: "int", type_policy: "operations_research::RoutingModel::VisitTypePolicy") -> "void": return _pywrapcp.RoutingModel_SetVisitType(self, index, type, type_policy) @@ -29151,14 +33717,23 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.RoutingModel_GetVisitTypePolicy(self, index) def CloseVisitTypes(self) -> "void": - r""" This function should be called once all node visit types have been set and prior to adding any incompatibilities/requirements. "close" types.""" + r""" + This function should be called once all node visit types have been set and + prior to adding any incompatibilities/requirements. + "close" types. + """ return _pywrapcp.RoutingModel_CloseVisitTypes(self) def GetNumberOfVisitTypes(self) -> "int": return _pywrapcp.RoutingModel_GetNumberOfVisitTypes(self) def AddHardTypeIncompatibility(self, type1: "int", type2: "int") -> "void": - r""" Incompatibilities: Two nodes with "hard" incompatible types cannot share the same route at all, while with a "temporal" incompatibility they can't be on the same route at the same time.""" + r""" + Incompatibilities: + Two nodes with "hard" incompatible types cannot share the same route at + all, while with a "temporal" incompatibility they can't be on the same + route at the same time. + """ return _pywrapcp.RoutingModel_AddHardTypeIncompatibility(self, type1, type2) def AddTemporalTypeIncompatibility(self, type1: "int", type2: "int") -> "void": @@ -29172,26 +33747,54 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.RoutingModel_GetTemporalTypeIncompatibilitiesOfType(self, type) def HasHardTypeIncompatibilities(self) -> "bool": - r""" Returns true iff any hard (resp. temporal) type incompatibilities have been added to the model.""" + r""" + Returns true iff any hard (resp. temporal) type incompatibilities have + been added to the model. + """ return _pywrapcp.RoutingModel_HasHardTypeIncompatibilities(self) def HasTemporalTypeIncompatibilities(self) -> "bool": return _pywrapcp.RoutingModel_HasTemporalTypeIncompatibilities(self) def AddSameVehicleRequiredTypeAlternatives(self, dependent_type: "int", required_type_alternatives: "absl::flat_hash_set< int >") -> "void": - r""" Requirements: NOTE: As of 2019-04, cycles in the requirement graph are not supported, and lead to the dependent nodes being skipped if possible (otherwise the model is considered infeasible). The following functions specify that "dependent_type" requires at least one of the types in "required_type_alternatives". For same-vehicle requirements, a node of dependent type type_D requires at least one node of type type_R among the required alternatives on the same route.""" + r""" + Requirements: + NOTE: As of 2019-04, cycles in the requirement graph are not supported, + and lead to the dependent nodes being skipped if possible (otherwise + the model is considered infeasible). + The following functions specify that "dependent_type" requires at least + one of the types in "required_type_alternatives". + + For same-vehicle requirements, a node of dependent type type_D requires at + least one node of type type_R among the required alternatives on the same + route. + """ return _pywrapcp.RoutingModel_AddSameVehicleRequiredTypeAlternatives(self, dependent_type, required_type_alternatives) def AddRequiredTypeAlternativesWhenAddingType(self, dependent_type: "int", required_type_alternatives: "absl::flat_hash_set< int >") -> "void": - r""" If type_D depends on type_R when adding type_D, any node_D of type_D and VisitTypePolicy TYPE_ADDED_TO_VEHICLE or TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED requires at least one type_R on its vehicle at the time node_D is visited.""" + r""" + If type_D depends on type_R when adding type_D, any node_D of type_D and + VisitTypePolicy TYPE_ADDED_TO_VEHICLE or + TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED requires at least one type_R on its + vehicle at the time node_D is visited. + """ return _pywrapcp.RoutingModel_AddRequiredTypeAlternativesWhenAddingType(self, dependent_type, required_type_alternatives) def AddRequiredTypeAlternativesWhenRemovingType(self, dependent_type: "int", required_type_alternatives: "absl::flat_hash_set< int >") -> "void": - r""" The following requirements apply when visiting dependent nodes that remove their type from the route, i.e. type_R must be on the vehicle when type_D of VisitTypePolicy ADDED_TYPE_REMOVED_FROM_VEHICLE, TYPE_ON_VEHICLE_UP_TO_VISIT or TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED is visited.""" + r""" + The following requirements apply when visiting dependent nodes that remove + their type from the route, i.e. type_R must be on the vehicle when type_D + of VisitTypePolicy ADDED_TYPE_REMOVED_FROM_VEHICLE, + TYPE_ON_VEHICLE_UP_TO_VISIT or TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED is + visited. + """ return _pywrapcp.RoutingModel_AddRequiredTypeAlternativesWhenRemovingType(self, dependent_type, required_type_alternatives) def GetSameVehicleRequiredTypeAlternativesOfType(self, type: "int") -> "std::vector< absl::flat_hash_set< int > > const &": - r""" Returns the set of same-vehicle requirement alternatives for the given type.""" + r""" + Returns the set of same-vehicle requirement alternatives for the given + type. + """ return _pywrapcp.RoutingModel_GetSameVehicleRequiredTypeAlternativesOfType(self, type) def GetRequiredTypeAlternativesWhenAddingType(self, type: "int") -> "std::vector< absl::flat_hash_set< int > > const &": @@ -29203,30 +33806,54 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.RoutingModel_GetRequiredTypeAlternativesWhenRemovingType(self, type) def HasSameVehicleTypeRequirements(self) -> "bool": - r""" Returns true iff any same-route (resp. temporal) type requirements have been added to the model.""" + r""" + Returns true iff any same-route (resp. temporal) type requirements have + been added to the model. + """ return _pywrapcp.RoutingModel_HasSameVehicleTypeRequirements(self) def HasTemporalTypeRequirements(self) -> "bool": return _pywrapcp.RoutingModel_HasTemporalTypeRequirements(self) def HasTypeRegulations(self) -> "bool": - r""" Returns true iff the model has any incompatibilities or requirements set on node types.""" + r""" + Returns true iff the model has any incompatibilities or requirements set + on node types. + """ return _pywrapcp.RoutingModel_HasTypeRegulations(self) def UnperformedPenalty(self, var_index: "int64_t") -> "int64_t": - r""" Get the "unperformed" penalty of a node. This is only well defined if the node is only part of a single Disjunction, and that disjunction has a penalty. For forced active nodes returns max int64_t. In all other cases, this returns 0.""" + r""" + Get the "unperformed" penalty of a node. This is only well defined if the + node is only part of a single Disjunction, and that disjunction has a + penalty. For forced active nodes returns max int64_t. In all other cases, + this returns 0. + """ return _pywrapcp.RoutingModel_UnperformedPenalty(self, var_index) def UnperformedPenaltyOrValue(self, default_value: "int64_t", var_index: "int64_t") -> "int64_t": - r""" Same as above except that it returns default_value instead of 0 when penalty is not well defined (default value is passed as first argument to simplify the usage of the method in a callback).""" + r""" + Same as above except that it returns default_value instead of 0 when + penalty is not well defined (default value is passed as first argument to + simplify the usage of the method in a callback). + """ return _pywrapcp.RoutingModel_UnperformedPenaltyOrValue(self, default_value, var_index) def GetDepot(self) -> "int64_t": - r""" Returns the variable index of the first starting or ending node of all routes. If all routes start and end at the same node (single depot), this is the node returned.""" + r""" + Returns the variable index of the first starting or ending node of all + routes. If all routes start and end at the same node (single depot), this + is the node returned. + """ return _pywrapcp.RoutingModel_GetDepot(self) def SetMaximumNumberOfActiveVehicles(self, max_active_vehicles: "int") -> "void": - r""" Constrains the maximum number of active vehicles, aka the number of vehicles which do not have an empty route. For instance, this can be used to limit the number of routes in the case where there are fewer drivers than vehicles and that the fleet of vehicle is heterogeneous.""" + r""" + Constrains the maximum number of active vehicles, aka the number of + vehicles which do not have an empty route. For instance, this can be used + to limit the number of routes in the case where there are fewer drivers + than vehicles and that the fleet of vehicle is heterogeneous. + """ return _pywrapcp.RoutingModel_SetMaximumNumberOfActiveVehicles(self, max_active_vehicles) def GetMaximumNumberOfActiveVehicles(self) -> "int": @@ -29234,7 +33861,11 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.RoutingModel_GetMaximumNumberOfActiveVehicles(self) def SetArcCostEvaluatorOfAllVehicles(self, evaluator_index: "int") -> "void": - r""" Sets the cost function of the model such that the cost of a segment of a route between node 'from' and 'to' is evaluator(from, to), whatever the route or vehicle performing the route.""" + r""" + Sets the cost function of the model such that the cost of a segment of a + route between node 'from' and 'to' is evaluator(from, to), whatever the + route or vehicle performing the route. + """ return _pywrapcp.RoutingModel_SetArcCostEvaluatorOfAllVehicles(self, evaluator_index) def SetArcCostEvaluatorOfVehicle(self, evaluator_index: "int", vehicle: "int") -> "void": @@ -29242,7 +33873,10 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.RoutingModel_SetArcCostEvaluatorOfVehicle(self, evaluator_index, vehicle) def SetFixedCostOfAllVehicles(self, cost: "int64_t") -> "void": - r""" Sets the fixed cost of all vehicle routes. It is equivalent to calling SetFixedCostOfVehicle on all vehicle routes.""" + r""" + Sets the fixed cost of all vehicle routes. It is equivalent to calling + SetFixedCostOfVehicle on all vehicle routes. + """ return _pywrapcp.RoutingModel_SetFixedCostOfAllVehicles(self, cost) def SetFixedCostOfVehicle(self, cost: "int64_t", vehicle: "int") -> "void": @@ -29250,11 +33884,31 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.RoutingModel_SetFixedCostOfVehicle(self, cost, vehicle) def GetFixedCostOfVehicle(self, vehicle: "int") -> "int64_t": - r""" Returns the route fixed cost taken into account if the route of the vehicle is not empty, aka there's at least one node on the route other than the first and last nodes.""" + r""" + Returns the route fixed cost taken into account if the route of the + vehicle is not empty, aka there's at least one node on the route other + than the first and last nodes. + """ return _pywrapcp.RoutingModel_GetFixedCostOfVehicle(self, vehicle) def SetAmortizedCostFactorsOfAllVehicles(self, linear_cost_factor: "int64_t", quadratic_cost_factor: "int64_t") -> "void": - r""" The following methods set the linear and quadratic cost factors of vehicles (must be positive values). The default value of these parameters is zero for all vehicles. When set, the cost_ of the model will contain terms aiming at reducing the number of vehicles used in the model, by adding the following to the objective for every vehicle v: INDICATOR(v used in the model) * [linear_cost_factor_of_vehicle_[v] - quadratic_cost_factor_of_vehicle_[v]*(square of length of route v)] i.e. for every used vehicle, we add the linear factor as fixed cost, and subtract the square of the route length multiplied by the quadratic factor. This second term aims at making the routes as dense as possible. Sets the linear and quadratic cost factor of all vehicles.""" + r""" + The following methods set the linear and quadratic cost factors of + vehicles (must be positive values). The default value of these parameters + is zero for all vehicles. + + When set, the cost_ of the model will contain terms aiming at reducing the + number of vehicles used in the model, by adding the following to the + objective for every vehicle v: + INDICATOR(v used in the model) * + [linear_cost_factor_of_vehicle_[v] + - quadratic_cost_factor_of_vehicle_[v]*(square of length of route v)] + i.e. for every used vehicle, we add the linear factor as fixed cost, and + subtract the square of the route length multiplied by the quadratic + factor. This second term aims at making the routes as dense as possible. + + Sets the linear and quadratic cost factor of all vehicles. + """ return _pywrapcp.RoutingModel_SetAmortizedCostFactorsOfAllVehicles(self, linear_cost_factor, quadratic_cost_factor) def SetAmortizedCostFactorsOfVehicle(self, linear_cost_factor: "int64_t", quadratic_cost_factor: "int64_t", vehicle: "int") -> "void": @@ -29274,11 +33928,18 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.RoutingModel_AreEmptyRouteCostsConsideredForVehicle(self, vehicle) def SetFirstSolutionEvaluator(self, evaluator: "operations_research::Solver::IndexEvaluator2") -> "void": - r""" Gets/sets the evaluator used during the search. Only relevant when RoutingSearchParameters.first_solution_strategy = EVALUATOR_STRATEGY. Takes ownership of evaluator.""" + r""" + Gets/sets the evaluator used during the search. Only relevant when + RoutingSearchParameters.first_solution_strategy = EVALUATOR_STRATEGY. + Takes ownership of evaluator. + """ return _pywrapcp.RoutingModel_SetFirstSolutionEvaluator(self, evaluator) def AddLocalSearchOperator(self, ls_operator: "LocalSearchOperator") -> "void": - r""" Adds a local search operator to the set of operators used to solve the vehicle routing problem.""" + r""" + Adds a local search operator to the set of operators used to solve the + vehicle routing problem. + """ return _pywrapcp.RoutingModel_AddLocalSearchOperator(self, ls_operator) def AddSearchMonitor(self, monitor: "SearchMonitor") -> "void": @@ -29286,55 +33947,116 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.RoutingModel_AddSearchMonitor(self, monitor) def AddAtSolutionCallback(self, callback: "std::function< void () >") -> "void": - r""" Adds a callback called each time a solution is found during the search. This is a shortcut to creating a monitor to call the callback on AtSolution() and adding it with AddSearchMonitor.""" + r""" + Adds a callback called each time a solution is found during the search. + This is a shortcut to creating a monitor to call the callback on + AtSolution() and adding it with AddSearchMonitor. + """ return _pywrapcp.RoutingModel_AddAtSolutionCallback(self, callback) def AddVariableMinimizedByFinalizer(self, var: "IntVar") -> "void": - r""" Adds a variable to minimize in the solution finalizer. The solution finalizer is called each time a solution is found during the search and allows to instantiate secondary variables (such as dimension cumul variables).""" + r""" + Adds a variable to minimize in the solution finalizer. The solution + finalizer is called each time a solution is found during the search and + allows to instantiate secondary variables (such as dimension cumul + variables). + """ return _pywrapcp.RoutingModel_AddVariableMinimizedByFinalizer(self, var) def AddVariableMaximizedByFinalizer(self, var: "IntVar") -> "void": - r""" Adds a variable to maximize in the solution finalizer (see above for information on the solution finalizer).""" + r""" + Adds a variable to maximize in the solution finalizer (see above for + information on the solution finalizer). + """ return _pywrapcp.RoutingModel_AddVariableMaximizedByFinalizer(self, var) def AddWeightedVariableMinimizedByFinalizer(self, var: "IntVar", cost: "int64_t") -> "void": - r""" Adds a variable to minimize in the solution finalizer, with a weighted priority: the higher the more priority it has.""" + r""" + Adds a variable to minimize in the solution finalizer, with a weighted + priority: the higher the more priority it has. + """ return _pywrapcp.RoutingModel_AddWeightedVariableMinimizedByFinalizer(self, var, cost) def AddVariableTargetToFinalizer(self, var: "IntVar", target: "int64_t") -> "void": - r""" Add a variable to set the closest possible to the target value in the solution finalizer.""" + r""" + Add a variable to set the closest possible to the target value in the + solution finalizer. + """ return _pywrapcp.RoutingModel_AddVariableTargetToFinalizer(self, var, target) def CloseModel(self) -> "void": - r""" Closes the current routing model; after this method is called, no modification to the model can be done, but RoutesToAssignment becomes available. Note that CloseModel() is automatically called by Solve() and other methods that produce solution. This is equivalent to calling CloseModelWithParameters(DefaultRoutingSearchParameters()).""" + r""" + Closes the current routing model; after this method is called, no + modification to the model can be done, but RoutesToAssignment becomes + available. Note that CloseModel() is automatically called by Solve() and + other methods that produce solution. + This is equivalent to calling + CloseModelWithParameters(DefaultRoutingSearchParameters()). + """ return _pywrapcp.RoutingModel_CloseModel(self) def CloseModelWithParameters(self, search_parameters: "operations_research::RoutingSearchParameters const &") -> "void": - r""" Same as above taking search parameters (as of 10/2015 some the parameters have to be set when closing the model).""" + r""" + Same as above taking search parameters (as of 10/2015 some the parameters + have to be set when closing the model). + """ return _pywrapcp.RoutingModel_CloseModelWithParameters(self, search_parameters) def Solve(self, assignment: "Assignment"=None) -> "operations_research::Assignment const *": - r""" Solves the current routing model; closes the current model. This is equivalent to calling SolveWithParameters(DefaultRoutingSearchParameters()) or SolveFromAssignmentWithParameters(assignment, DefaultRoutingSearchParameters()).""" + r""" + Solves the current routing model; closes the current model. + This is equivalent to calling + SolveWithParameters(DefaultRoutingSearchParameters()) + or + SolveFromAssignmentWithParameters(assignment, + DefaultRoutingSearchParameters()). + """ return _pywrapcp.RoutingModel_Solve(self, assignment) def SolveWithParameters(self, search_parameters: "operations_research::RoutingSearchParameters const &", solutions: "std::vector< operations_research::Assignment const * > *"=None) -> "operations_research::Assignment const *": - r""" Solves the current routing model with the given parameters. If 'solutions' is specified, it will contain the k best solutions found during the search (from worst to best, including the one returned by this method), where k corresponds to the 'number_of_solutions_to_collect' in 'search_parameters'. Note that the Assignment returned by the method and the ones in solutions are owned by the underlying solver and should not be deleted.""" + r""" + Solves the current routing model with the given parameters. If 'solutions' + is specified, it will contain the k best solutions found during the search + (from worst to best, including the one returned by this method), where k + corresponds to the 'number_of_solutions_to_collect' in + 'search_parameters'. Note that the Assignment returned by the method and + the ones in solutions are owned by the underlying solver and should not be + deleted. + """ return _pywrapcp.RoutingModel_SolveWithParameters(self, search_parameters, solutions) def SolveFromAssignmentWithParameters(self, assignment: "Assignment", search_parameters: "operations_research::RoutingSearchParameters const &", solutions: "std::vector< operations_research::Assignment const * > *"=None) -> "operations_research::Assignment const *": - r""" Same as above, except that if assignment is not null, it will be used as the initial solution.""" + r""" + Same as above, except that if assignment is not null, it will be used as + the initial solution. + """ return _pywrapcp.RoutingModel_SolveFromAssignmentWithParameters(self, assignment, search_parameters, solutions) def SolveFromAssignmentsWithParameters(self, assignments: "std::vector< operations_research::Assignment const * > const &", search_parameters: "operations_research::RoutingSearchParameters const &", solutions: "std::vector< operations_research::Assignment const * > *"=None) -> "operations_research::Assignment const *": - r""" Same as above but will try all assignments in order as first solutions until one succeeds.""" + r""" + Same as above but will try all assignments in order as first solutions + until one succeeds. + """ return _pywrapcp.RoutingModel_SolveFromAssignmentsWithParameters(self, assignments, search_parameters, solutions) def SetAssignmentFromOtherModelAssignment(self, target_assignment: "Assignment", source_model: "RoutingModel", source_assignment: "Assignment") -> "void": - r""" Given a "source_model" and its "source_assignment", resets "target_assignment" with the IntVar variables (nexts_, and vehicle_vars_ if costs aren't homogeneous across vehicles) of "this" model, with the values set according to those in "other_assignment". The objective_element of target_assignment is set to this->cost_.""" + r""" + Given a "source_model" and its "source_assignment", resets + "target_assignment" with the IntVar variables (nexts_, and vehicle_vars_ + if costs aren't homogeneous across vehicles) of "this" model, with the + values set according to those in "other_assignment". + The objective_element of target_assignment is set to this->cost_. + """ return _pywrapcp.RoutingModel_SetAssignmentFromOtherModelAssignment(self, target_assignment, source_model, source_assignment) def ComputeLowerBound(self) -> "int64_t": - r""" Computes a lower bound to the routing problem solving a linear assignment problem. The routing model must be closed before calling this method. Note that problems with node disjunction constraints (including optional nodes) and non-homogenous costs are not supported (the method returns 0 in these cases).""" + r""" + Computes a lower bound to the routing problem solving a linear assignment + problem. The routing model must be closed before calling this method. + Note that problems with node disjunction constraints (including optional + nodes) and non-homogenous costs are not supported (the method returns 0 in + these cases). + """ return _pywrapcp.RoutingModel_ComputeLowerBound(self) def status(self) -> "operations_research::RoutingModel::Status": @@ -29342,50 +34064,137 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.RoutingModel_status(self) def ApplyLocks(self, locks: "std::vector< int64_t > const &") -> "operations_research::IntVar *": - r""" Applies a lock chain to the next search. 'locks' represents an ordered vector of nodes representing a partial route which will be fixed during the next search; it will constrain next variables such that: next[locks[i]] == locks[i+1]. Returns the next variable at the end of the locked chain; this variable is not locked. An assignment containing the locks can be obtained by calling PreAssignment().""" + r""" + Applies a lock chain to the next search. 'locks' represents an ordered + vector of nodes representing a partial route which will be fixed during + the next search; it will constrain next variables such that: + next[locks[i]] == locks[i+1]. + + Returns the next variable at the end of the locked chain; this variable is + not locked. An assignment containing the locks can be obtained by calling + PreAssignment(). + """ return _pywrapcp.RoutingModel_ApplyLocks(self, locks) def ApplyLocksToAllVehicles(self, locks: "std::vector< std::vector< int64_t > > const &", close_routes: "bool") -> "bool": - r""" Applies lock chains to all vehicles to the next search, such that locks[p] is the lock chain for route p. Returns false if the locks do not contain valid routes; expects that the routes do not contain the depots, i.e. there are empty vectors in place of empty routes. If close_routes is set to true, adds the end nodes to the route of each vehicle and deactivates other nodes. An assignment containing the locks can be obtained by calling PreAssignment().""" + r""" + Applies lock chains to all vehicles to the next search, such that locks[p] + is the lock chain for route p. Returns false if the locks do not contain + valid routes; expects that the routes do not contain the depots, + i.e. there are empty vectors in place of empty routes. + If close_routes is set to true, adds the end nodes to the route of each + vehicle and deactivates other nodes. + An assignment containing the locks can be obtained by calling + PreAssignment(). + """ return _pywrapcp.RoutingModel_ApplyLocksToAllVehicles(self, locks, close_routes) def PreAssignment(self) -> "operations_research::Assignment const *const": - r""" Returns an assignment used to fix some of the variables of the problem. In practice, this assignment locks partial routes of the problem. This can be used in the context of locking the parts of the routes which have already been driven in online routing problems.""" + r""" + Returns an assignment used to fix some of the variables of the problem. + In practice, this assignment locks partial routes of the problem. This + can be used in the context of locking the parts of the routes which have + already been driven in online routing problems. + """ return _pywrapcp.RoutingModel_PreAssignment(self) def MutablePreAssignment(self) -> "operations_research::Assignment *": return _pywrapcp.RoutingModel_MutablePreAssignment(self) def WriteAssignment(self, file_name: "std::string const &") -> "bool": - r""" Writes the current solution to a file containing an AssignmentProto. Returns false if the file cannot be opened or if there is no current solution.""" + r""" + Writes the current solution to a file containing an AssignmentProto. + Returns false if the file cannot be opened or if there is no current + solution. + """ return _pywrapcp.RoutingModel_WriteAssignment(self, file_name) def ReadAssignment(self, file_name: "std::string const &") -> "operations_research::Assignment *": - r""" Reads an assignment from a file and returns the current solution. Returns nullptr if the file cannot be opened or if the assignment is not valid.""" + r""" + Reads an assignment from a file and returns the current solution. + Returns nullptr if the file cannot be opened or if the assignment is not + valid. + """ return _pywrapcp.RoutingModel_ReadAssignment(self, file_name) def RestoreAssignment(self, solution: "Assignment") -> "operations_research::Assignment *": - r""" Restores an assignment as a solution in the routing model and returns the new solution. Returns nullptr if the assignment is not valid.""" + r""" + Restores an assignment as a solution in the routing model and returns the + new solution. Returns nullptr if the assignment is not valid. + """ return _pywrapcp.RoutingModel_RestoreAssignment(self, solution) def ReadAssignmentFromRoutes(self, routes: "std::vector< std::vector< int64_t > > const &", ignore_inactive_indices: "bool") -> "operations_research::Assignment *": - r""" Restores the routes as the current solution. Returns nullptr if the solution cannot be restored (routes do not contain a valid solution). Note that calling this method will run the solver to assign values to the dimension variables; this may take considerable amount of time, especially when using dimensions with slack.""" + r""" + Restores the routes as the current solution. Returns nullptr if the + solution cannot be restored (routes do not contain a valid solution). Note + that calling this method will run the solver to assign values to the + dimension variables; this may take considerable amount of time, especially + when using dimensions with slack. + """ return _pywrapcp.RoutingModel_ReadAssignmentFromRoutes(self, routes, ignore_inactive_indices) def RoutesToAssignment(self, routes: "std::vector< std::vector< int64_t > > const &", ignore_inactive_indices: "bool", close_routes: "bool", assignment: "Assignment") -> "bool": - r""" Fills an assignment from a specification of the routes of the vehicles. The routes are specified as lists of variable indices that appear on the routes of the vehicles. The indices of the outer vector in 'routes' correspond to vehicles IDs, the inner vector contains the variable indices on the routes for the given vehicle. The inner vectors must not contain the start and end indices, as these are determined by the routing model. Sets the value of NextVars in the assignment, adding the variables to the assignment if necessary. The method does not touch other variables in the assignment. The method can only be called after the model is closed. With ignore_inactive_indices set to false, this method will fail (return nullptr) in case some of the route contain indices that are deactivated in the model; when set to true, these indices will be skipped. Returns true if routes were successfully loaded. However, such assignment still might not be a valid solution to the routing problem due to more complex constraints; it is advisible to call solver()->CheckSolution() afterwards.""" + r""" + Fills an assignment from a specification of the routes of the + vehicles. The routes are specified as lists of variable indices that + appear on the routes of the vehicles. The indices of the outer vector in + 'routes' correspond to vehicles IDs, the inner vector contains the + variable indices on the routes for the given vehicle. The inner vectors + must not contain the start and end indices, as these are determined by the + routing model. Sets the value of NextVars in the assignment, adding the + variables to the assignment if necessary. The method does not touch other + variables in the assignment. The method can only be called after the model + is closed. With ignore_inactive_indices set to false, this method will + fail (return nullptr) in case some of the route contain indices that are + deactivated in the model; when set to true, these indices will be + skipped. Returns true if routes were successfully + loaded. However, such assignment still might not be a valid + solution to the routing problem due to more complex constraints; + it is advisible to call solver()->CheckSolution() afterwards. + """ return _pywrapcp.RoutingModel_RoutesToAssignment(self, routes, ignore_inactive_indices, close_routes, assignment) def AssignmentToRoutes(self, assignment: "Assignment", routes: "std::vector< std::vector< int64_t > > *const") -> "void": - r""" Converts the solution in the given assignment to routes for all vehicles. Expects that assignment contains a valid solution (i.e. routes for all vehicles end with an end index for that vehicle).""" + r""" + Converts the solution in the given assignment to routes for all vehicles. + Expects that assignment contains a valid solution (i.e. routes for all + vehicles end with an end index for that vehicle). + """ return _pywrapcp.RoutingModel_AssignmentToRoutes(self, assignment, routes) def CompactAssignment(self, assignment: "Assignment") -> "operations_research::Assignment *": - r""" Converts the solution in the given assignment to routes for all vehicles. If the returned vector is route_indices, route_indices[i][j] is the index for jth location visited on route i. Note that contrary to AssignmentToRoutes, the vectors do include start and end locations. Returns a compacted version of the given assignment, in which all vehicles with id lower or equal to some N have non-empty routes, and all vehicles with id greater than N have empty routes. Does not take ownership of the returned object. If found, the cost of the compact assignment is the same as in the original assignment and it preserves the values of 'active' variables. Returns nullptr if a compact assignment was not found. This method only works in homogenous mode, and it only swaps equivalent vehicles (vehicles with the same start and end nodes). When creating the compact assignment, the empty plan is replaced by the route assigned to the compatible vehicle with the highest id. Note that with more complex constraints on vehicle variables, this method might fail even if a compact solution exists. This method changes the vehicle and dimension variables as necessary. While compacting the solution, only basic checks on vehicle variables are performed; if one of these checks fails no attempts to repair it are made (instead, the method returns nullptr).""" + r""" + Converts the solution in the given assignment to routes for all vehicles. + If the returned vector is route_indices, route_indices[i][j] is the index + for jth location visited on route i. Note that contrary to + AssignmentToRoutes, the vectors do include start and end locations. + Returns a compacted version of the given assignment, in which all vehicles + with id lower or equal to some N have non-empty routes, and all vehicles + with id greater than N have empty routes. Does not take ownership of the + returned object. + If found, the cost of the compact assignment is the same as in the + original assignment and it preserves the values of 'active' variables. + Returns nullptr if a compact assignment was not found. + This method only works in homogenous mode, and it only swaps equivalent + vehicles (vehicles with the same start and end nodes). When creating the + compact assignment, the empty plan is replaced by the route assigned to + the compatible vehicle with the highest id. Note that with more complex + constraints on vehicle variables, this method might fail even if a compact + solution exists. + This method changes the vehicle and dimension variables as necessary. + While compacting the solution, only basic checks on vehicle variables are + performed; if one of these checks fails no attempts to repair it are made + (instead, the method returns nullptr). + """ return _pywrapcp.RoutingModel_CompactAssignment(self, assignment) def CompactAndCheckAssignment(self, assignment: "Assignment") -> "operations_research::Assignment *": - r""" Same as CompactAssignment() but also checks the validity of the final compact solution; if it is not valid, no attempts to repair it are made (instead, the method returns nullptr).""" + r""" + Same as CompactAssignment() but also checks the validity of the final + compact solution; if it is not valid, no attempts to repair it are made + (instead, the method returns nullptr). + """ return _pywrapcp.RoutingModel_CompactAndCheckAssignment(self, assignment) def AddToAssignment(self, var: "IntVar") -> "void": @@ -29396,15 +34205,35 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.RoutingModel_AddIntervalToAssignment(self, interval) def PackCumulsOfOptimizerDimensionsFromAssignment(self, original_assignment: "Assignment", duration_limit: "absl::Duration") -> "operations_research::Assignment const *": - r""" For every dimension in the model with an optimizer in local/global_dimension_optimizers_, this method tries to pack the cumul values of the dimension, such that: - The cumul costs (span costs, soft lower and upper bound costs, etc) are minimized. - The cumuls of the ends of the routes are minimized for this given minimal cumul cost. - Given these minimal end cumuls, the route start cumuls are maximized. Returns the assignment resulting from allocating these packed cumuls with the solver, and nullptr if these cumuls could not be set by the solver.""" + r""" + For every dimension in the model with an optimizer in + local/global_dimension_optimizers_, this method tries to pack the cumul + values of the dimension, such that: + - The cumul costs (span costs, soft lower and upper bound costs, etc) are + minimized. + - The cumuls of the ends of the routes are minimized for this given + minimal cumul cost. + - Given these minimal end cumuls, the route start cumuls are maximized. + Returns the assignment resulting from allocating these packed cumuls with + the solver, and nullptr if these cumuls could not be set by the solver. + """ return _pywrapcp.RoutingModel_PackCumulsOfOptimizerDimensionsFromAssignment(self, original_assignment, duration_limit) def AddLocalSearchFilter(self, filter: "LocalSearchFilter") -> "void": - r""" Adds a custom local search filter to the list of filters used to speed up local search by pruning unfeasible variable assignments. Calling this method after the routing model has been closed (CloseModel() or Solve() has been called) has no effect. The routing model does not take ownership of the filter.""" + r""" + Adds a custom local search filter to the list of filters used to speed up + local search by pruning unfeasible variable assignments. + Calling this method after the routing model has been closed (CloseModel() + or Solve() has been called) has no effect. + The routing model does not take ownership of the filter. + """ return _pywrapcp.RoutingModel_AddLocalSearchFilter(self, filter) def Start(self, vehicle: "int") -> "int64_t": - r""" Model inspection. Returns the variable index of the starting node of a vehicle route.""" + r""" + Model inspection. + Returns the variable index of the starting node of a vehicle route. + """ return _pywrapcp.RoutingModel_Start(self, vehicle) def End(self, vehicle: "int") -> "int64_t": @@ -29420,11 +34249,18 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.RoutingModel_IsEnd(self, index) def VehicleIndex(self, index: "int64_t") -> "int": - r""" Returns the vehicle of the given start/end index, and -1 if the given index is not a vehicle start/end.""" + r""" + Returns the vehicle of the given start/end index, and -1 if the given + index is not a vehicle start/end. + """ return _pywrapcp.RoutingModel_VehicleIndex(self, index) def Next(self, assignment: "Assignment", index: "int64_t") -> "int64_t": - r""" Assignment inspection Returns the variable index of the node directly after the node corresponding to 'index' in 'assignment'.""" + r""" + Assignment inspection + Returns the variable index of the node directly after the node + corresponding to 'index' in 'assignment'. + """ return _pywrapcp.RoutingModel_Next(self, assignment, index) def IsVehicleUsed(self, assignment: "Assignment", vehicle: "int") -> "bool": @@ -29432,7 +34268,10 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.RoutingModel_IsVehicleUsed(self, assignment, vehicle) def NextVar(self, index: "int64_t") -> "operations_research::IntVar *": - r""" Returns the next variable of the node corresponding to index. Note that NextVar(index) == index is equivalent to ActiveVar(index) == 0.""" + r""" + Returns the next variable of the node corresponding to index. Note that + NextVar(index) == index is equivalent to ActiveVar(index) == 0. + """ return _pywrapcp.RoutingModel_NextVar(self, index) def ActiveVar(self, index: "int64_t") -> "operations_research::IntVar *": @@ -29440,15 +34279,24 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.RoutingModel_ActiveVar(self, index) def ActiveVehicleVar(self, vehicle: "int") -> "operations_research::IntVar *": - r""" Returns the active variable of the vehicle. It will be equal to 1 iff the route of the vehicle is not empty, 0 otherwise.""" + r""" + Returns the active variable of the vehicle. It will be equal to 1 iff the + route of the vehicle is not empty, 0 otherwise. + """ return _pywrapcp.RoutingModel_ActiveVehicleVar(self, vehicle) def VehicleCostsConsideredVar(self, vehicle: "int") -> "operations_research::IntVar *": - r""" Returns the variable specifying whether or not costs are considered for vehicle.""" + r""" + Returns the variable specifying whether or not costs are considered for + vehicle. + """ return _pywrapcp.RoutingModel_VehicleCostsConsideredVar(self, vehicle) def VehicleVar(self, index: "int64_t") -> "operations_research::IntVar *": - r""" Returns the vehicle variable of the node corresponding to index. Note that VehicleVar(index) == -1 is equivalent to ActiveVar(index) == 0.""" + r""" + Returns the vehicle variable of the node corresponding to index. Note that + VehicleVar(index) == -1 is equivalent to ActiveVar(index) == 0. + """ return _pywrapcp.RoutingModel_VehicleVar(self, index) def CostVar(self) -> "operations_research::IntVar *": @@ -29456,7 +34304,10 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.RoutingModel_CostVar(self) def GetArcCostForVehicle(self, from_index: "int64_t", to_index: "int64_t", vehicle: "int64_t") -> "int64_t": - r""" Returns the cost of the transit arc between two nodes for a given vehicle. Input are variable indices of node. This returns 0 if vehicle < 0.""" + r""" + Returns the cost of the transit arc between two nodes for a given vehicle. + Input are variable indices of node. This returns 0 if vehicle < 0. + """ return _pywrapcp.RoutingModel_GetArcCostForVehicle(self, from_index, to_index, vehicle) def CostsAreHomogeneousAcrossVehicles(self) -> "bool": @@ -29464,15 +34315,28 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.RoutingModel_CostsAreHomogeneousAcrossVehicles(self) def GetHomogeneousCost(self, from_index: "int64_t", to_index: "int64_t") -> "int64_t": - r""" Returns the cost of the segment between two nodes supposing all vehicle costs are the same (returns the cost for the first vehicle otherwise).""" + r""" + Returns the cost of the segment between two nodes supposing all vehicle + costs are the same (returns the cost for the first vehicle otherwise). + """ return _pywrapcp.RoutingModel_GetHomogeneousCost(self, from_index, to_index) def GetArcCostForFirstSolution(self, from_index: "int64_t", to_index: "int64_t") -> "int64_t": - r""" Returns the cost of the arc in the context of the first solution strategy. This is typically a simplification of the actual cost; see the .cc.""" + r""" + Returns the cost of the arc in the context of the first solution strategy. + This is typically a simplification of the actual cost; see the .cc. + """ return _pywrapcp.RoutingModel_GetArcCostForFirstSolution(self, from_index, to_index) def GetArcCostForClass(self, from_index: "int64_t", to_index: "int64_t", cost_class_index: "int64_t") -> "int64_t": - r""" Returns the cost of the segment between two nodes for a given cost class. Input are variable indices of nodes and the cost class. Unlike GetArcCostForVehicle(), if cost_class is kNoCost, then the returned cost won't necessarily be zero: only some of the components of the cost that depend on the cost class will be omited. See the code for details.""" + r""" + Returns the cost of the segment between two nodes for a given cost + class. Input are variable indices of nodes and the cost class. + Unlike GetArcCostForVehicle(), if cost_class is kNoCost, then the + returned cost won't necessarily be zero: only some of the components + of the cost that depend on the cost class will be omited. See the code + for details. + """ return _pywrapcp.RoutingModel_GetArcCostForClass(self, from_index, to_index, cost_class_index) def GetCostClassIndexOfVehicle(self, vehicle: "int64_t") -> "operations_research::RoutingModel::CostClassIndex": @@ -29480,7 +34344,10 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.RoutingModel_GetCostClassIndexOfVehicle(self, vehicle) def HasVehicleWithCostClassIndex(self, cost_class_index: "operations_research::RoutingModel::CostClassIndex") -> "bool": - r""" Returns true iff the model contains a vehicle with the given cost_class_index.""" + r""" + Returns true iff the model contains a vehicle with the given + cost_class_index. + """ return _pywrapcp.RoutingModel_HasVehicleWithCostClassIndex(self, cost_class_index) def GetCostClassesCount(self) -> "int": @@ -29495,7 +34362,10 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.RoutingModel_GetVehicleClassIndexOfVehicle(self, vehicle) def GetVehicleOfClass(self, vehicle_class: "operations_research::RoutingModel::VehicleClassIndex") -> "int": - r""" Returns a vehicle of the given vehicle class, and -1 if there are no vehicles for this class.""" + r""" + Returns a vehicle of the given vehicle class, and -1 if there are no + vehicles for this class. + """ return _pywrapcp.RoutingModel_GetVehicleOfClass(self, vehicle_class) def GetVehicleClassesCount(self) -> "int": @@ -29510,15 +34380,47 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.RoutingModel_GetVehicleTypeContainer(self) def ArcIsMoreConstrainedThanArc(self, _from: "int64_t", to1: "int64_t", to2: "int64_t") -> "bool": - r""" Returns whether the arc from->to1 is more constrained than from->to2, taking into account, in order: - whether the destination node isn't an end node - whether the destination node is mandatory - whether the destination node is bound to the same vehicle as the source - the "primary constrained" dimension (see SetPrimaryConstrainedDimension) It then breaks ties using, in order: - the arc cost (taking unperformed penalties into account) - the size of the vehicle vars of "to1" and "to2" (lowest size wins) - the value: the lowest value of the indices to1 and to2 wins. See the .cc for details. The more constrained arc is typically preferable when building a first solution. This method is intended to be used as a callback for the BestValueByComparisonSelector value selector. Args: from: the variable index of the source node to1: the variable index of the first candidate destination node. to2: the variable index of the second candidate destination node.""" + r""" + Returns whether the arc from->to1 is more constrained than from->to2, + taking into account, in order: + - whether the destination node isn't an end node + - whether the destination node is mandatory + - whether the destination node is bound to the same vehicle as the source + - the "primary constrained" dimension (see SetPrimaryConstrainedDimension) + It then breaks ties using, in order: + - the arc cost (taking unperformed penalties into account) + - the size of the vehicle vars of "to1" and "to2" (lowest size wins) + - the value: the lowest value of the indices to1 and to2 wins. + See the .cc for details. + The more constrained arc is typically preferable when building a + first solution. This method is intended to be used as a callback for the + BestValueByComparisonSelector value selector. + Args: + from: the variable index of the source node + to1: the variable index of the first candidate destination node. + to2: the variable index of the second candidate destination node. + """ return _pywrapcp.RoutingModel_ArcIsMoreConstrainedThanArc(self, _from, to1, to2) def DebugOutputAssignment(self, solution_assignment: "Assignment", dimension_to_print: "std::string const &") -> "std::string": - r""" Print some debugging information about an assignment, including the feasible intervals of the CumulVar for dimension "dimension_to_print" at each step of the routes. If "dimension_to_print" is omitted, all dimensions will be printed.""" + r""" + Print some debugging information about an assignment, including the + feasible intervals of the CumulVar for dimension "dimension_to_print" + at each step of the routes. + If "dimension_to_print" is omitted, all dimensions will be printed. + """ return _pywrapcp.RoutingModel_DebugOutputAssignment(self, solution_assignment, dimension_to_print) def solver(self) -> "operations_research::Solver *": - r""" Returns a vector cumul_bounds, for which cumul_bounds[i][j] is a pair containing the minimum and maximum of the CumulVar of the jth node on route i. - cumul_bounds[i][j].first is the minimum. - cumul_bounds[i][j].second is the maximum. Returns the underlying constraint solver. Can be used to add extra constraints and/or modify search algorithms.""" + r""" + Returns a vector cumul_bounds, for which cumul_bounds[i][j] is a pair + containing the minimum and maximum of the CumulVar of the jth node on + route i. + - cumul_bounds[i][j].first is the minimum. + - cumul_bounds[i][j].second is the maximum. + Returns the underlying constraint solver. Can be used to add extra + constraints and/or modify search algorithms. + """ return _pywrapcp.RoutingModel_solver(self) def CheckLimit(self) -> "bool": @@ -29530,7 +34432,10 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.RoutingModel_RemainingTime(self) def nodes(self) -> "int": - r""" Sizes and indices Returns the number of nodes in the model.""" + r""" + Sizes and indices + Returns the number of nodes in the model. + """ return _pywrapcp.RoutingModel_nodes(self) def vehicles(self) -> "int": @@ -29542,7 +34447,10 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.RoutingModel_Size(self) def GetNumberOfDecisionsInFirstSolution(self, search_parameters: "operations_research::RoutingSearchParameters const &") -> "int64_t": - r""" Returns statistics on first solution search, number of decisions sent to filters, number of decisions rejected by filters.""" + r""" + Returns statistics on first solution search, number of decisions sent to + filters, number of decisions rejected by filters. + """ return _pywrapcp.RoutingModel_GetNumberOfDecisionsInFirstSolution(self, search_parameters) def GetNumberOfRejectsInFirstSolution(self, search_parameters: "operations_research::RoutingSearchParameters const &") -> "int64_t": @@ -29557,11 +34465,38 @@ This method attaches a closure that will watch any domain modification of the do return _pywrapcp.RoutingModel_IsMatchingModel(self) def MakeGuidedSlackFinalizer(self, dimension: "RoutingDimension", initializer: "std::function< int64_t (int64_t) >") -> "operations_research::DecisionBuilder *": - r""" The next few members are in the public section only for testing purposes. MakeGuidedSlackFinalizer creates a DecisionBuilder for the slacks of a dimension using a callback to choose which values to start with. The finalizer works only when all next variables in the model have been fixed. It has the following two characteristics: 1. It follows the routes defined by the nexts variables when choosing a variable to make a decision on. 2. When it comes to choose a value for the slack of node i, the decision builder first calls the callback with argument i, and supposingly the returned value is x it creates decisions slack[i] = x, slack[i] = x + 1, slack[i] = x - 1, slack[i] = x + 2, etc.""" + r""" + The next few members are in the public section only for testing purposes. + + MakeGuidedSlackFinalizer creates a DecisionBuilder for the slacks of a + dimension using a callback to choose which values to start with. + The finalizer works only when all next variables in the model have + been fixed. It has the following two characteristics: + 1. It follows the routes defined by the nexts variables when choosing a + variable to make a decision on. + 2. When it comes to choose a value for the slack of node i, the decision + builder first calls the callback with argument i, and supposingly the + returned value is x it creates decisions slack[i] = x, slack[i] = x + + 1, slack[i] = x - 1, slack[i] = x + 2, etc. + """ return _pywrapcp.RoutingModel_MakeGuidedSlackFinalizer(self, dimension, initializer) def MakeSelfDependentDimensionFinalizer(self, dimension: "RoutingDimension") -> "operations_research::DecisionBuilder *": - r""" MakeSelfDependentDimensionFinalizer is a finalizer for the slacks of a self-dependent dimension. It makes an extensive use of the caches of the state dependent transits. In detail, MakeSelfDependentDimensionFinalizer returns a composition of a local search decision builder with a greedy descent operator for the cumul of the start of each route and a guided slack finalizer. Provided there are no time windows and the maximum slacks are large enough, once the cumul of the start of route is fixed, the guided finalizer can find optimal values of the slacks for the rest of the route in time proportional to the length of the route. Therefore the composed finalizer generally works in time O(log(t)*n*m), where t is the latest possible departute time, n is the number of nodes in the network and m is the number of vehicles.""" + r""" + MakeSelfDependentDimensionFinalizer is a finalizer for the slacks of a + self-dependent dimension. It makes an extensive use of the caches of the + state dependent transits. + In detail, MakeSelfDependentDimensionFinalizer returns a composition of a + local search decision builder with a greedy descent operator for the cumul + of the start of each route and a guided slack finalizer. Provided there + are no time windows and the maximum slacks are large enough, once the + cumul of the start of route is fixed, the guided finalizer can find + optimal values of the slacks for the rest of the route in time + proportional to the length of the route. Therefore the composed finalizer + generally works in time O(log(t)*n*m), where t is the latest possible + departute time, n is the number of nodes in the network and m is the + number of vehicles. + """ return _pywrapcp.RoutingModel_MakeSelfDependentDimensionFinalizer(self, dimension)
@@ -29877,13 +34812,53 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def AddDimension(self, evaluator_index: "int", slack_max: "int64_t", capacity: "int64_t", fix_start_cumul_to_zero: "bool", name: "std::string const &") -> "bool":
-        r""" Model creation Methods to add dimensions to routes; dimensions represent quantities accumulated at nodes along the routes. They represent quantities such as weights or volumes carried along the route, or distance or times. Quantities at a node are represented by "cumul" variables and the increase or decrease of quantities between nodes are represented by "transit" variables. These variables are linked as follows: if j == next(i), cumul(j) = cumul(i) + transit(i) + slack(i) where slack is a positive slack variable (can represent waiting times for a time dimension). Setting the value of fix_start_cumul_to_zero to true will force the "cumul" variable of the start node of all vehicles to be equal to 0. Creates a dimension where the transit variable is constrained to be equal to evaluator(i, next(i)); 'slack_max' is the upper bound of the slack variable and 'capacity' is the upper bound of the cumul variables. 'name' is the name used to reference the dimension; this name is used to get cumul and transit variables from the routing model. Returns false if a dimension with the same name has already been created (and doesn't create the new dimension). Takes ownership of the callback 'evaluator'."""
+        r"""
+        Model creation
+        Methods to add dimensions to routes; dimensions represent quantities
+        accumulated at nodes along the routes. They represent quantities such as
+        weights or volumes carried along the route, or distance or times.
+        Quantities at a node are represented by "cumul" variables and the increase
+        or decrease of quantities between nodes are represented by "transit"
+        variables. These variables are linked as follows:
+        if j == next(i), cumul(j) = cumul(i) + transit(i) + slack(i)
+        where slack is a positive slack variable (can represent waiting times for
+        a time dimension).
+        Setting the value of fix_start_cumul_to_zero to true will force the
+        "cumul" variable of the start node of all vehicles to be equal to 0.
+        Creates a dimension where the transit variable is constrained to be
+        equal to evaluator(i, next(i)); 'slack_max' is the upper bound of the
+        slack variable and 'capacity' is the upper bound of the cumul variables.
+        'name' is the name used to reference the dimension; this name is used to
+        get cumul and transit variables from the routing model.
+        Returns false if a dimension with the same name has already been created
+        (and doesn't create the new dimension).
+        Takes ownership of the callback 'evaluator'.
+        """
         return _pywrapcp.RoutingModel_AddDimension(self, evaluator_index, slack_max, capacity, fix_start_cumul_to_zero, name)
 
-

Model creation Methods to add dimensions to routes; dimensions represent quantities accumulated at nodes along the routes. They represent quantities such as weights or volumes carried along the route, or distance or times. Quantities at a node are represented by "cumul" variables and the increase or decrease of quantities between nodes are represented by "transit" variables. These variables are linked as follows: if j == next(i), cumul(j) = cumul(i) + transit(i) + slack(i) where slack is a positive slack variable (can represent waiting times for a time dimension). Setting the value of fix_start_cumul_to_zero to true will force the "cumul" variable of the start node of all vehicles to be equal to 0. Creates a dimension where the transit variable is constrained to be equal to evaluator(i, next(i)); 'slack_max' is the upper bound of the slack variable and 'capacity' is the upper bound of the cumul variables. 'name' is the name used to reference the dimension; this name is used to get cumul and transit variables from the routing model. Returns false if a dimension with the same name has already been created (and doesn't create the new dimension). Takes ownership of the callback 'evaluator'.

+

Model creation +Methods to add dimensions to routes; dimensions represent quantities +accumulated at nodes along the routes. They represent quantities such as +weights or volumes carried along the route, or distance or times. +Quantities at a node are represented by "cumul" variables and the increase +or decrease of quantities between nodes are represented by "transit" +variables. These variables are linked as follows: +if j == next(i), cumul(j) = cumul(i) + transit(i) + slack(i) +where slack is a positive slack variable (can represent waiting times for +a time dimension). +Setting the value of fix_start_cumul_to_zero to true will force the +"cumul" variable of the start node of all vehicles to be equal to 0. +Creates a dimension where the transit variable is constrained to be +equal to evaluator(i, next(i)); 'slack_max' is the upper bound of the +slack variable and 'capacity' is the upper bound of the cumul variables. +'name' is the name used to reference the dimension; this name is used to +get cumul and transit variables from the routing model. +Returns false if a dimension with the same name has already been created +(and doesn't create the new dimension). +Takes ownership of the callback 'evaluator'.

@@ -29984,13 +34959,29 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def AddConstantDimensionWithSlack(self, value: "int64_t", capacity: "int64_t", slack_max: "int64_t", fix_start_cumul_to_zero: "bool", name: "std::string const &") -> "std::pair< int,bool >":
-        r""" Creates a dimension where the transit variable is constrained to be equal to 'value'; 'capacity' is the upper bound of the cumul variables. 'name' is the name used to reference the dimension; this name is used to get cumul and transit variables from the routing model. Returns a pair consisting of an index to the registered unary transit callback and a bool denoting whether the dimension has been created. It is false if a dimension with the same name has already been created (and doesn't create the new dimension but still register a new callback)."""
+        r"""
+        Creates a dimension where the transit variable is constrained to be
+        equal to 'value'; 'capacity' is the upper bound of the cumul variables.
+        'name' is the name used to reference the dimension; this name is used to
+        get cumul and transit variables from the routing model.
+        Returns a pair consisting of an index to the registered unary transit
+        callback and a bool denoting whether the dimension has been created.
+        It is false if a dimension with the same name has already been created
+        (and doesn't create the new dimension but still register a new callback).
+        """
         return _pywrapcp.RoutingModel_AddConstantDimensionWithSlack(self, value, capacity, slack_max, fix_start_cumul_to_zero, name)
 
-

Creates a dimension where the transit variable is constrained to be equal to 'value'; 'capacity' is the upper bound of the cumul variables. 'name' is the name used to reference the dimension; this name is used to get cumul and transit variables from the routing model. Returns a pair consisting of an index to the registered unary transit callback and a bool denoting whether the dimension has been created. It is false if a dimension with the same name has already been created (and doesn't create the new dimension but still register a new callback).

+

Creates a dimension where the transit variable is constrained to be +equal to 'value'; 'capacity' is the upper bound of the cumul variables. +'name' is the name used to reference the dimension; this name is used to +get cumul and transit variables from the routing model. +Returns a pair consisting of an index to the registered unary transit +callback and a bool denoting whether the dimension has been created. +It is false if a dimension with the same name has already been created +(and doesn't create the new dimension but still register a new callback).

@@ -30037,13 +35028,31 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def AddVectorDimension(self, values: "std::vector< int64_t >", capacity: "int64_t", fix_start_cumul_to_zero: "bool", name: "std::string const &") -> "std::pair< int,bool >":
-        r""" Creates a dimension where the transit variable is constrained to be equal to 'values[i]' for node i; 'capacity' is the upper bound of the cumul variables. 'name' is the name used to reference the dimension; this name is used to get cumul and transit variables from the routing model. Returns a pair consisting of an index to the registered unary transit callback and a bool denoting whether the dimension has been created. It is false if a dimension with the same name has already been created (and doesn't create the new dimension but still register a new callback)."""
+        r"""
+        Creates a dimension where the transit variable is constrained to be
+        equal to 'values[i]' for node i; 'capacity' is the upper bound of
+        the cumul variables. 'name' is the name used to reference the dimension;
+        this name is used to get cumul and transit variables from the routing
+        model.
+        Returns a pair consisting of an index to the registered unary transit
+        callback and a bool denoting whether the dimension has been created.
+        It is false if a dimension with the same name has already been created
+        (and doesn't create the new dimension but still register a new callback).
+        """
         return _pywrapcp.RoutingModel_AddVectorDimension(self, values, capacity, fix_start_cumul_to_zero, name)
 
-

Creates a dimension where the transit variable is constrained to be equal to 'values[i]' for node i; 'capacity' is the upper bound of the cumul variables. 'name' is the name used to reference the dimension; this name is used to get cumul and transit variables from the routing model. Returns a pair consisting of an index to the registered unary transit callback and a bool denoting whether the dimension has been created. It is false if a dimension with the same name has already been created (and doesn't create the new dimension but still register a new callback).

+

Creates a dimension where the transit variable is constrained to be +equal to 'values[i]' for node i; 'capacity' is the upper bound of +the cumul variables. 'name' is the name used to reference the dimension; +this name is used to get cumul and transit variables from the routing +model. +Returns a pair consisting of an index to the registered unary transit +callback and a bool denoting whether the dimension has been created. +It is false if a dimension with the same name has already been created +(and doesn't create the new dimension but still register a new callback).

@@ -30065,13 +35074,31 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def AddMatrixDimension(self, values: "std::vector< std::vector< int64_t > >", capacity: "int64_t", fix_start_cumul_to_zero: "bool", name: "std::string const &") -> "std::pair< int,bool >":
-        r""" Creates a dimension where the transit variable is constrained to be equal to 'values[i][next(i)]' for node i; 'capacity' is the upper bound of the cumul variables. 'name' is the name used to reference the dimension; this name is used to get cumul and transit variables from the routing model. Returns a pair consisting of an index to the registered transit callback and a bool denoting whether the dimension has been created. It is false if a dimension with the same name has already been created (and doesn't create the new dimension but still register a new callback)."""
+        r"""
+        Creates a dimension where the transit variable is constrained to be
+        equal to 'values[i][next(i)]' for node i; 'capacity' is the upper bound of
+        the cumul variables. 'name' is the name used to reference the dimension;
+        this name is used to get cumul and transit variables from the routing
+        model.
+        Returns a pair consisting of an index to the registered transit callback
+        and a bool denoting whether the dimension has been created.
+        It is false if a dimension with the same name has already been created
+        (and doesn't create the new dimension but still register a new callback).
+        """
         return _pywrapcp.RoutingModel_AddMatrixDimension(self, values, capacity, fix_start_cumul_to_zero, name)
 
-

Creates a dimension where the transit variable is constrained to be equal to 'values[i][next(i)]' for node i; 'capacity' is the upper bound of the cumul variables. 'name' is the name used to reference the dimension; this name is used to get cumul and transit variables from the routing model. Returns a pair consisting of an index to the registered transit callback and a bool denoting whether the dimension has been created. It is false if a dimension with the same name has already been created (and doesn't create the new dimension but still register a new callback).

+

Creates a dimension where the transit variable is constrained to be +equal to 'values[i][next(i)]' for node i; 'capacity' is the upper bound of +the cumul variables. 'name' is the name used to reference the dimension; +this name is used to get cumul and transit variables from the routing +model. +Returns a pair consisting of an index to the registered transit callback +and a bool denoting whether the dimension has been created. +It is false if a dimension with the same name has already been created +(and doesn't create the new dimension but still register a new callback).

@@ -30092,13 +35119,34 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def MakePathSpansAndTotalSlacks(self, dimension: "RoutingDimension", spans: "std::vector< operations_research::IntVar * >", total_slacks: "std::vector< operations_research::IntVar * >") -> "operations_research::Constraint *":
-        r""" For every vehicle of the routing model: - if total_slacks[vehicle] is not nullptr, constrains it to be the sum of   slacks on that vehicle, that is,   dimension->CumulVar(end) - dimension->CumulVar(start) -   sum_{node in path of vehicle} dimension->FixedTransitVar(node). - if spans[vehicle] is not nullptr, constrains it to be   dimension->CumulVar(end) - dimension->CumulVar(start) This does stronger propagation than a decomposition, and takes breaks into account."""
+        r"""
+        For every vehicle of the routing model:
+        - if total_slacks[vehicle] is not nullptr, constrains it to be the sum of
+          slacks on that vehicle, that is,
+          dimension->CumulVar(end) - dimension->CumulVar(start) -
+          sum_{node in path of vehicle} dimension->FixedTransitVar(node).
+        - if spans[vehicle] is not nullptr, constrains it to be
+          dimension->CumulVar(end) - dimension->CumulVar(start)
+        This does stronger propagation than a decomposition, and takes breaks into
+        account.
+        """
         return _pywrapcp.RoutingModel_MakePathSpansAndTotalSlacks(self, dimension, spans, total_slacks)
 
-

For every vehicle of the routing model: - if total_slacks[vehicle] is not nullptr, constrains it to be the sum of slacks on that vehicle, that is, dimension->CumulVar(end) - dimension->CumulVar(start) - sum_{node in path of vehicle} dimension->FixedTransitVar(node). - if spans[vehicle] is not nullptr, constrains it to be dimension->CumulVar(end) - dimension->CumulVar(start) This does stronger propagation than a decomposition, and takes breaks into account.

+

For every vehicle of the routing model:

+ +
    +
  • if total_slacks[vehicle] is not nullptr, constrains it to be the sum of +slacks on that vehicle, that is, +dimension->CumulVar(end) - dimension->CumulVar(start) - +sum_{node in path of vehicle} dimension->FixedTransitVar(node).
  • +
  • if spans[vehicle] is not nullptr, constrains it to be +dimension->CumulVar(end) - dimension->CumulVar(start) +This does stronger propagation than a decomposition, and takes breaks into +account.
  • +
@@ -30184,13 +35232,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def GetGlobalDimensionCumulOptimizers(self) -> "std::vector< std::unique_ptr< operations_research::GlobalDimensionCumulOptimizer > > const &":
-        r""" Returns [global|local]_dimension_optimizers_, which are empty if the model has not been closed."""
+        r"""
+        Returns [global|local]_dimension_optimizers_, which are empty if the model
+        has not been closed.
+        """
         return _pywrapcp.RoutingModel_GetGlobalDimensionCumulOptimizers(self)
 
-

Returns [global|local]_dimension_optimizers_, which are empty if the model has not been closed.

+

Returns [global|local]_dimension_optimizers_, which are empty if the model +has not been closed.

@@ -30272,13 +35324,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def GetMutableGlobalCumulOptimizer(self, dimension: "RoutingDimension") -> "operations_research::GlobalDimensionCumulOptimizer *":
-        r""" Returns the global/local dimension cumul optimizer for a given dimension, or nullptr if there is none."""
+        r"""
+        Returns the global/local dimension cumul optimizer for a given dimension,
+        or nullptr if there is none.
+        """
         return _pywrapcp.RoutingModel_GetMutableGlobalCumulOptimizer(self, dimension)
 
-

Returns the global/local dimension cumul optimizer for a given dimension, or nullptr if there is none.

+

Returns the global/local dimension cumul optimizer for a given dimension, +or nullptr if there is none.

@@ -30410,13 +35466,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def GetMutableDimension(self, dimension_name: "std::string const &") -> "operations_research::RoutingDimension *":
-        r""" Returns a dimension from its name. Returns nullptr if the dimension does not exist."""
+        r"""
+        Returns a dimension from its name. Returns nullptr if the dimension does
+        not exist.
+        """
         return _pywrapcp.RoutingModel_GetMutableDimension(self, dimension_name)
 
-

Returns a dimension from its name. Returns nullptr if the dimension does not exist.

+

Returns a dimension from its name. Returns nullptr if the dimension does +not exist.

@@ -30432,13 +35492,21 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def SetPrimaryConstrainedDimension(self, dimension_name: "std::string const &") -> "void":
-        r""" Set the given dimension as "primary constrained". As of August 2013, this is only used by ArcIsMoreConstrainedThanArc(). "dimension" must be the name of an existing dimension, or be empty, in which case there will not be a primary dimension after this call."""
+        r"""
+        Set the given dimension as "primary constrained". As of August 2013, this
+        is only used by ArcIsMoreConstrainedThanArc().
+        "dimension" must be the name of an existing dimension, or be empty, in
+        which case there will not be a primary dimension after this call.
+        """
         return _pywrapcp.RoutingModel_SetPrimaryConstrainedDimension(self, dimension_name)
 
-

Set the given dimension as "primary constrained". As of August 2013, this is only used by ArcIsMoreConstrainedThanArc(). "dimension" must be the name of an existing dimension, or be empty, in which case there will not be a primary dimension after this call.

+

Set the given dimension as "primary constrained". As of August 2013, this +is only used by ArcIsMoreConstrainedThanArc(). +"dimension" must be the name of an existing dimension, or be empty, in +which case there will not be a primary dimension after this call.

@@ -30479,13 +35547,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def GetDimensionResourceGroupIndices(self, dimension: "RoutingDimension") -> "std::vector< int > const &":
-        r""" Returns the indices of resource groups for this dimension. This method can only be called after the model has been closed."""
+        r"""
+        Returns the indices of resource groups for this dimension. This method can
+        only be called after the model has been closed.
+        """
         return _pywrapcp.RoutingModel_GetDimensionResourceGroupIndices(self, dimension)
 
-

Returns the indices of resource groups for this dimension. This method can only be called after the model has been closed.

+

Returns the indices of resource groups for this dimension. This method can +only be called after the model has been closed.

@@ -30501,13 +35573,50 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def AddDisjunction(self, *args) -> "operations_research::RoutingModel::DisjunctionIndex":
-        r""" Adds a disjunction constraint on the indices: exactly 'max_cardinality' of the indices are active. Start and end indices of any vehicle cannot be part of a disjunction. If a penalty is given, at most 'max_cardinality' of the indices can be active, and if less are active, 'penalty' is payed per inactive index. This is equivalent to adding the constraint:     p + Sum(i)active[i] == max_cardinality where p is an integer variable, and the following cost to the cost function:     p * penalty. 'penalty' must be positive to make the disjunction optional; a negative penalty will force 'max_cardinality' indices of the disjunction to be performed, and therefore p == 0. Note: passing a vector with a single index will model an optional index with a penalty cost if it is not visited."""
+        r"""
+        Adds a disjunction constraint on the indices: exactly 'max_cardinality' of
+        the indices are active. Start and end indices of any vehicle cannot be
+        part of a disjunction.
+
+        If a penalty is given, at most 'max_cardinality' of the indices can be
+        active, and if less are active, 'penalty' is payed per inactive index.
+        This is equivalent to adding the constraint:
+            p + Sum(i)active[i] == max_cardinality
+        where p is an integer variable, and the following cost to the cost
+        function:
+            p * penalty.
+        'penalty' must be positive to make the disjunction optional; a negative
+        penalty will force 'max_cardinality' indices of the disjunction to be
+        performed, and therefore p == 0.
+        Note: passing a vector with a single index will model an optional index
+        with a penalty cost if it is not visited.
+        """
         return _pywrapcp.RoutingModel_AddDisjunction(self, *args)
 
-

Adds a disjunction constraint on the indices: exactly 'max_cardinality' of the indices are active. Start and end indices of any vehicle cannot be part of a disjunction. If a penalty is given, at most 'max_cardinality' of the indices can be active, and if less are active, 'penalty' is payed per inactive index. This is equivalent to adding the constraint: p + Sum(i)active[i] == max_cardinality where p is an integer variable, and the following cost to the cost function: p * penalty. 'penalty' must be positive to make the disjunction optional; a negative penalty will force 'max_cardinality' indices of the disjunction to be performed, and therefore p == 0. Note: passing a vector with a single index will model an optional index with a penalty cost if it is not visited.

+

Adds a disjunction constraint on the indices: exactly 'max_cardinality' of +the indices are active. Start and end indices of any vehicle cannot be +part of a disjunction.

+ +

If a penalty is given, at most 'max_cardinality' of the indices can be +active, and if less are active, 'penalty' is payed per inactive index.

+ +
This is equivalent to adding the constraint
+ +
+

p + Sum(i)active[i] == max_cardinality

+
+ +

where p is an integer variable, and the following cost to the cost +function: + p * penalty. +'penalty' must be positive to make the disjunction optional; a negative +penalty will force 'max_cardinality' indices of the disjunction to be +performed, and therefore p == 0. +Note: passing a vector with a single index will model an optional index +with a penalty cost if it is not visited.

@@ -30576,13 +35685,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def GetDisjunctionMaxCardinality(self, index: "operations_research::RoutingModel::DisjunctionIndex") -> "int64_t":
-        r""" Returns the maximum number of possible active nodes of the node disjunction of index 'index'."""
+        r"""
+        Returns the maximum number of possible active nodes of the node
+        disjunction of index 'index'.
+        """
         return _pywrapcp.RoutingModel_GetDisjunctionMaxCardinality(self, index)
 
-

Returns the maximum number of possible active nodes of the node disjunction of index 'index'.

+

Returns the maximum number of possible active nodes of the node +disjunction of index 'index'.

@@ -30620,13 +35733,21 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def GetPerfectBinaryDisjunctions(self) -> "std::vector< std::pair< int64_t,int64_t > >":
-        r""" Returns the list of all perfect binary disjunctions, as pairs of variable indices: a disjunction is "perfect" when its variables do not appear in any other disjunction. Each pair is sorted (lowest variable index first), and the output vector is also sorted (lowest pairs first)."""
+        r"""
+        Returns the list of all perfect binary disjunctions, as pairs of variable
+        indices: a disjunction is "perfect" when its variables do not appear in
+        any other disjunction. Each pair is sorted (lowest variable index first),
+        and the output vector is also sorted (lowest pairs first).
+        """
         return _pywrapcp.RoutingModel_GetPerfectBinaryDisjunctions(self)
 
-

Returns the list of all perfect binary disjunctions, as pairs of variable indices: a disjunction is "perfect" when its variables do not appear in any other disjunction. Each pair is sorted (lowest variable index first), and the output vector is also sorted (lowest pairs first).

+

Returns the list of all perfect binary disjunctions, as pairs of variable +indices: a disjunction is "perfect" when its variables do not appear in +any other disjunction. Each pair is sorted (lowest variable index first), +and the output vector is also sorted (lowest pairs first).

@@ -30642,13 +35763,23 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def IgnoreDisjunctionsAlreadyForcedToZero(self) -> "void":
-        r""" SPECIAL: Makes the solver ignore all the disjunctions whose active variables are all trivially zero (i.e. Max() == 0), by setting their max_cardinality to 0. This can be useful when using the BaseBinaryDisjunctionNeighborhood operators, in the context of arc-based routing."""
+        r"""
+        SPECIAL: Makes the solver ignore all the disjunctions whose active
+        variables are all trivially zero (i.e. Max() == 0), by setting their
+        max_cardinality to 0.
+        This can be useful when using the BaseBinaryDisjunctionNeighborhood
+        operators, in the context of arc-based routing.
+        """
         return _pywrapcp.RoutingModel_IgnoreDisjunctionsAlreadyForcedToZero(self)
 
-

SPECIAL: Makes the solver ignore all the disjunctions whose active variables are all trivially zero (i.e. Max() == 0), by setting their max_cardinality to 0. This can be useful when using the BaseBinaryDisjunctionNeighborhood operators, in the context of arc-based routing.

+

SPECIAL: Makes the solver ignore all the disjunctions whose active +variables are all trivially zero (i.e. Max() == 0), by setting their +max_cardinality to 0. +This can be useful when using the BaseBinaryDisjunctionNeighborhood +operators, in the context of arc-based routing.

@@ -30668,13 +35799,19 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def AddSoftSameVehicleConstraint(self, indices: "std::vector< int64_t > const &", cost: "int64_t") -> "void":
-        r""" Adds a soft constraint to force a set of variable indices to be on the same vehicle. If all nodes are not on the same vehicle, each extra vehicle used adds 'cost' to the cost function."""
+        r"""
+        Adds a soft constraint to force a set of variable indices to be on the
+        same vehicle. If all nodes are not on the same vehicle, each extra vehicle
+        used adds 'cost' to the cost function.
+        """
         return _pywrapcp.RoutingModel_AddSoftSameVehicleConstraint(self, indices, cost)
 
-

Adds a soft constraint to force a set of variable indices to be on the same vehicle. If all nodes are not on the same vehicle, each extra vehicle used adds 'cost' to the cost function.

+

Adds a soft constraint to force a set of variable indices to be on the +same vehicle. If all nodes are not on the same vehicle, each extra vehicle +used adds 'cost' to the cost function.

@@ -30694,13 +35831,21 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def SetAllowedVehiclesForIndex(self, vehicles: "std::vector< int > const &", index: "int64_t") -> "void":
-        r""" Sets the vehicles which can visit a given node. If the node is in a disjunction, this will not prevent it from being unperformed. Specifying an empty vector of vehicles has no effect (all vehicles will be allowed to visit the node)."""
+        r"""
+        Sets the vehicles which can visit a given node. If the node is in a
+        disjunction, this will not prevent it from being unperformed.
+        Specifying an empty vector of vehicles has no effect (all vehicles
+        will be allowed to visit the node).
+        """
         return _pywrapcp.RoutingModel_SetAllowedVehiclesForIndex(self, vehicles, index)
 
-

Sets the vehicles which can visit a given node. If the node is in a disjunction, this will not prevent it from being unperformed. Specifying an empty vector of vehicles has no effect (all vehicles will be allowed to visit the node).

+

Sets the vehicles which can visit a given node. If the node is in a +disjunction, this will not prevent it from being unperformed. +Specifying an empty vector of vehicles has no effect (all vehicles +will be allowed to visit the node).

@@ -30738,13 +35883,39 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def AddPickupAndDelivery(self, pickup: "int64_t", delivery: "int64_t") -> "void":
-        r""" Notifies that index1 and index2 form a pair of nodes which should belong to the same route. This methods helps the search find better solutions, especially in the local search phase. It should be called each time you have an equality constraint linking the vehicle variables of two node (including for instance pickup and delivery problems):     Solver* const solver = routing.solver();     int64_t index1 = manager.NodeToIndex(node1);     int64_t index2 = manager.NodeToIndex(node2);     solver->AddConstraint(solver->MakeEquality(         routing.VehicleVar(index1),         routing.VehicleVar(index2)));     routing.AddPickupAndDelivery(index1, index2);"""
+        r"""
+        Notifies that index1 and index2 form a pair of nodes which should belong
+        to the same route. This methods helps the search find better solutions,
+        especially in the local search phase.
+        It should be called each time you have an equality constraint linking
+        the vehicle variables of two node (including for instance pickup and
+        delivery problems):
+            Solver* const solver = routing.solver();
+            int64_t index1 = manager.NodeToIndex(node1);
+            int64_t index2 = manager.NodeToIndex(node2);
+            solver->AddConstraint(solver->MakeEquality(
+                routing.VehicleVar(index1),
+                routing.VehicleVar(index2)));
+            routing.AddPickupAndDelivery(index1, index2);
+        """
         return _pywrapcp.RoutingModel_AddPickupAndDelivery(self, pickup, delivery)
 
-

Notifies that index1 and index2 form a pair of nodes which should belong to the same route. This methods helps the search find better solutions, especially in the local search phase. It should be called each time you have an equality constraint linking the vehicle variables of two node (including for instance pickup and delivery problems): Solver* const solver = routing.solver(); int64_t index1 = manager.NodeToIndex(node1); int64_t index2 = manager.NodeToIndex(node2); solver->AddConstraint(solver->MakeEquality( routing.VehicleVar(index1), routing.VehicleVar(index2))); routing.AddPickupAndDelivery(index1, index2);

+

Notifies that index1 and index2 form a pair of nodes which should belong +to the same route. This methods helps the search find better solutions, +especially in the local search phase. +It should be called each time you have an equality constraint linking +the vehicle variables of two node (including for instance pickup and +delivery problems): + Solver* const solver = routing.solver(); + int64_t index1 = manager.NodeToIndex(node1); + int64_t index2 = manager.NodeToIndex(node2); + solver->AddConstraint(solver->MakeEquality( + routing.VehicleVar(index1), + routing.VehicleVar(index2))); + routing.AddPickupAndDelivery(index1, index2);

@@ -30764,13 +35935,19 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def AddPickupAndDeliverySets(self, pickup_disjunction: "operations_research::RoutingModel::DisjunctionIndex", delivery_disjunction: "operations_research::RoutingModel::DisjunctionIndex") -> "void":
-        r""" Same as AddPickupAndDelivery but notifying that the performed node from the disjunction of index 'pickup_disjunction' is on the same route as the performed node from the disjunction of index 'delivery_disjunction'."""
+        r"""
+        Same as AddPickupAndDelivery but notifying that the performed node from
+        the disjunction of index 'pickup_disjunction' is on the same route as the
+        performed node from the disjunction of index 'delivery_disjunction'.
+        """
         return _pywrapcp.RoutingModel_AddPickupAndDeliverySets(self, pickup_disjunction, delivery_disjunction)
 
-

Same as AddPickupAndDelivery but notifying that the performed node from the disjunction of index 'pickup_disjunction' is on the same route as the performed node from the disjunction of index 'delivery_disjunction'.

+

Same as AddPickupAndDelivery but notifying that the performed node from +the disjunction of index 'pickup_disjunction' is on the same route as the +performed node from the disjunction of index 'delivery_disjunction'.

@@ -30789,13 +35966,19 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def GetPickupIndexPairs(self, node_index: "int64_t") -> "std::vector< std::pair< int,int > > const &":
-        r""" Returns pairs for which the node is a pickup; the first element of each pair is the index in the pickup and delivery pairs list in which the pickup appears, the second element is its index in the pickups list."""
+        r"""
+        Returns pairs for which the node is a pickup; the first element of each
+        pair is the index in the pickup and delivery pairs list in which the
+        pickup appears, the second element is its index in the pickups list.
+        """
         return _pywrapcp.RoutingModel_GetPickupIndexPairs(self, node_index)
 
-

Returns pairs for which the node is a pickup; the first element of each pair is the index in the pickup and delivery pairs list in which the pickup appears, the second element is its index in the pickups list.

+

Returns pairs for which the node is a pickup; the first element of each +pair is the index in the pickup and delivery pairs list in which the +pickup appears, the second element is its index in the pickups list.

@@ -30839,13 +36022,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def SetPickupAndDeliveryPolicyOfAllVehicles(self, policy: "operations_research::RoutingModel::PickupAndDeliveryPolicy") -> "void":
-        r""" Sets the Pickup and delivery policy of all vehicles. It is equivalent to calling SetPickupAndDeliveryPolicyOfVehicle on all vehicles."""
+        r"""
+        Sets the Pickup and delivery policy of all vehicles. It is equivalent to
+        calling SetPickupAndDeliveryPolicyOfVehicle on all vehicles.
+        """
         return _pywrapcp.RoutingModel_SetPickupAndDeliveryPolicyOfAllVehicles(self, policy)
 
-

Sets the Pickup and delivery policy of all vehicles. It is equivalent to calling SetPickupAndDeliveryPolicyOfVehicle on all vehicles.

+

Sets the Pickup and delivery policy of all vehicles. It is equivalent to +calling SetPickupAndDeliveryPolicyOfVehicle on all vehicles.

@@ -30906,13 +36093,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def GetNumOfSingletonNodes(self) -> "int":
-        r""" Returns the number of non-start/end nodes which do not appear in a pickup/delivery pair."""
+        r"""
+        Returns the number of non-start/end nodes which do not appear in a
+        pickup/delivery pair.
+        """
         return _pywrapcp.RoutingModel_GetNumOfSingletonNodes(self)
 
-

Returns the number of non-start/end nodes which do not appear in a pickup/delivery pair.

+

Returns the number of non-start/end nodes which do not appear in a +pickup/delivery pair.

@@ -30934,7 +36125,10 @@ This method attaches a closure that will watch any domain modification of the do ADDED_TYPE_REMOVED_FROM_VEHICLE = 1
-

When visited, one instance of type 'T' previously added to the route (TYPE_ADDED_TO_VEHICLE), if any, is removed from the vehicle. If the type was not previously added to the route or all added instances have already been removed, this visit has no effect on the types.

+

When visited, one instance of type 'T' previously added to the route +(TYPE_ADDED_TO_VEHICLE), if any, is removed from the vehicle. +If the type was not previously added to the route or all added instances +have already been removed, this visit has no effect on the types.

@@ -30945,7 +36139,8 @@ This method attaches a closure that will watch any domain modification of the do TYPE_ON_VEHICLE_UP_TO_VISIT = 2
-

With the following policy, the visit enforces that type 'T' is considered on the route from its start until this node is visited.

+

With the following policy, the visit enforces that type 'T' is +considered on the route from its start until this node is visited.

@@ -30956,7 +36151,10 @@ This method attaches a closure that will watch any domain modification of the do TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED = 3
-

The visit doesn't have an impact on the number of types 'T' on the route, as it's (virtually) added and removed directly. This policy can be used for visits which are part of an incompatibility or requirement set without affecting the type count on the route.

+

The visit doesn't have an impact on the number of types 'T' on the +route, as it's (virtually) added and removed directly. +This policy can be used for visits which are part of an incompatibility +or requirement set without affecting the type count on the route.

@@ -31075,13 +36273,19 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def CloseVisitTypes(self) -> "void":
-        r""" This function should be called once all node visit types have been set and prior to adding any incompatibilities/requirements. "close" types."""
+        r"""
+        This function should be called once all node visit types have been set and
+        prior to adding any incompatibilities/requirements.
+        "close" types.
+        """
         return _pywrapcp.RoutingModel_CloseVisitTypes(self)
 
-

This function should be called once all node visit types have been set and prior to adding any incompatibilities/requirements. "close" types.

+

This function should be called once all node visit types have been set and +prior to adding any incompatibilities/requirements. +"close" types.

@@ -31116,13 +36320,21 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def AddHardTypeIncompatibility(self, type1: "int", type2: "int") -> "void":
-        r""" Incompatibilities: Two nodes with "hard" incompatible types cannot share the same route at all, while with a "temporal" incompatibility they can't be on the same route at the same time."""
+        r"""
+        Incompatibilities:
+        Two nodes with "hard" incompatible types cannot share the same route at
+        all, while with a "temporal" incompatibility they can't be on the same
+        route at the same time.
+        """
         return _pywrapcp.RoutingModel_AddHardTypeIncompatibility(self, type1, type2)
 
-

Incompatibilities: Two nodes with "hard" incompatible types cannot share the same route at all, while with a "temporal" incompatibility they can't be on the same route at the same time.

+

Incompatibilities: +Two nodes with "hard" incompatible types cannot share the same route at +all, while with a "temporal" incompatibility they can't be on the same +route at the same time.

@@ -31198,13 +36410,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def HasHardTypeIncompatibilities(self) -> "bool":
-        r""" Returns true iff any hard (resp. temporal) type incompatibilities have been added to the model."""
+        r"""
+        Returns true iff any hard (resp. temporal) type incompatibilities have
+        been added to the model.
+        """
         return _pywrapcp.RoutingModel_HasHardTypeIncompatibilities(self)
 
-

Returns true iff any hard (resp. temporal) type incompatibilities have been added to the model.

+

Returns true iff any hard (resp. temporal) type incompatibilities have +been added to the model.

@@ -31243,13 +36459,33 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def AddSameVehicleRequiredTypeAlternatives(self, dependent_type: "int", required_type_alternatives: "absl::flat_hash_set< int >") -> "void":
-        r""" Requirements: NOTE: As of 2019-04, cycles in the requirement graph are not supported, and lead to the dependent nodes being skipped if possible (otherwise the model is considered infeasible). The following functions specify that "dependent_type" requires at least one of the types in "required_type_alternatives". For same-vehicle requirements, a node of dependent type type_D requires at least one node of type type_R among the required alternatives on the same route."""
+        r"""
+        Requirements:
+        NOTE: As of 2019-04, cycles in the requirement graph are not supported,
+        and lead to the dependent nodes being skipped if possible (otherwise
+        the model is considered infeasible).
+        The following functions specify that "dependent_type" requires at least
+        one of the types in "required_type_alternatives".
+
+        For same-vehicle requirements, a node of dependent type type_D requires at
+        least one node of type type_R among the required alternatives on the same
+        route.
+        """
         return _pywrapcp.RoutingModel_AddSameVehicleRequiredTypeAlternatives(self, dependent_type, required_type_alternatives)
 
-

Requirements: NOTE: As of 2019-04, cycles in the requirement graph are not supported, and lead to the dependent nodes being skipped if possible (otherwise the model is considered infeasible). The following functions specify that "dependent_type" requires at least one of the types in "required_type_alternatives". For same-vehicle requirements, a node of dependent type type_D requires at least one node of type type_R among the required alternatives on the same route.

+

Requirements: +NOTE: As of 2019-04, cycles in the requirement graph are not supported, +and lead to the dependent nodes being skipped if possible (otherwise +the model is considered infeasible). +The following functions specify that "dependent_type" requires at least +one of the types in "required_type_alternatives".

+ +

For same-vehicle requirements, a node of dependent type type_D requires at +least one node of type type_R among the required alternatives on the same +route.

@@ -31269,13 +36505,21 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def AddRequiredTypeAlternativesWhenAddingType(self, dependent_type: "int", required_type_alternatives: "absl::flat_hash_set< int >") -> "void":
-        r""" If type_D depends on type_R when adding type_D, any node_D of type_D and VisitTypePolicy TYPE_ADDED_TO_VEHICLE or TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED requires at least one type_R on its vehicle at the time node_D is visited."""
+        r"""
+        If type_D depends on type_R when adding type_D, any node_D of type_D and
+        VisitTypePolicy TYPE_ADDED_TO_VEHICLE or
+        TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED requires at least one type_R on its
+        vehicle at the time node_D is visited.
+        """
         return _pywrapcp.RoutingModel_AddRequiredTypeAlternativesWhenAddingType(self, dependent_type, required_type_alternatives)
 
-

If type_D depends on type_R when adding type_D, any node_D of type_D and VisitTypePolicy TYPE_ADDED_TO_VEHICLE or TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED requires at least one type_R on its vehicle at the time node_D is visited.

+

If type_D depends on type_R when adding type_D, any node_D of type_D and +VisitTypePolicy TYPE_ADDED_TO_VEHICLE or +TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED requires at least one type_R on its +vehicle at the time node_D is visited.

@@ -31295,13 +36539,23 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def AddRequiredTypeAlternativesWhenRemovingType(self, dependent_type: "int", required_type_alternatives: "absl::flat_hash_set< int >") -> "void":
-        r""" The following requirements apply when visiting dependent nodes that remove their type from the route, i.e. type_R must be on the vehicle when type_D of VisitTypePolicy ADDED_TYPE_REMOVED_FROM_VEHICLE, TYPE_ON_VEHICLE_UP_TO_VISIT or TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED is visited."""
+        r"""
+        The following requirements apply when visiting dependent nodes that remove
+        their type from the route, i.e. type_R must be on the vehicle when type_D
+        of VisitTypePolicy ADDED_TYPE_REMOVED_FROM_VEHICLE,
+        TYPE_ON_VEHICLE_UP_TO_VISIT or TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED is
+        visited.
+        """
         return _pywrapcp.RoutingModel_AddRequiredTypeAlternativesWhenRemovingType(self, dependent_type, required_type_alternatives)
 
-

The following requirements apply when visiting dependent nodes that remove their type from the route, i.e. type_R must be on the vehicle when type_D of VisitTypePolicy ADDED_TYPE_REMOVED_FROM_VEHICLE, TYPE_ON_VEHICLE_UP_TO_VISIT or TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED is visited.

+

The following requirements apply when visiting dependent nodes that remove +their type from the route, i.e. type_R must be on the vehicle when type_D +of VisitTypePolicy ADDED_TYPE_REMOVED_FROM_VEHICLE, +TYPE_ON_VEHICLE_UP_TO_VISIT or TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED is +visited.

@@ -31320,13 +36574,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def GetSameVehicleRequiredTypeAlternativesOfType(self, type: "int") -> "std::vector< absl::flat_hash_set< int > > const &":
-        r""" Returns the set of same-vehicle requirement alternatives for the given type."""
+        r"""
+        Returns the set of same-vehicle requirement alternatives for the given
+        type.
+        """
         return _pywrapcp.RoutingModel_GetSameVehicleRequiredTypeAlternativesOfType(self, type)
 
-

Returns the set of same-vehicle requirement alternatives for the given type.

+

Returns the set of same-vehicle requirement alternatives for the given +type.

@@ -31392,13 +36650,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def HasSameVehicleTypeRequirements(self) -> "bool":
-        r""" Returns true iff any same-route (resp. temporal) type requirements have been added to the model."""
+        r"""
+        Returns true iff any same-route (resp. temporal) type requirements have
+        been added to the model.
+        """
         return _pywrapcp.RoutingModel_HasSameVehicleTypeRequirements(self)
 
-

Returns true iff any same-route (resp. temporal) type requirements have been added to the model.

+

Returns true iff any same-route (resp. temporal) type requirements have +been added to the model.

@@ -31433,13 +36695,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def HasTypeRegulations(self) -> "bool":
-        r""" Returns true iff the model has any incompatibilities or requirements set on node types."""
+        r"""
+        Returns true iff the model has any incompatibilities or requirements set
+        on node types.
+        """
         return _pywrapcp.RoutingModel_HasTypeRegulations(self)
 
-

Returns true iff the model has any incompatibilities or requirements set on node types.

+

Returns true iff the model has any incompatibilities or requirements set +on node types.

@@ -31455,13 +36721,21 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def UnperformedPenalty(self, var_index: "int64_t") -> "int64_t":
-        r""" Get the "unperformed" penalty of a node. This is only well defined if the node is only part of a single Disjunction, and that disjunction has a penalty. For forced active nodes returns max int64_t. In all other cases, this returns 0."""
+        r"""
+        Get the "unperformed" penalty of a node. This is only well defined if the
+        node is only part of a single Disjunction, and that disjunction has a
+        penalty. For forced active nodes returns max int64_t. In all other cases,
+        this returns 0.
+        """
         return _pywrapcp.RoutingModel_UnperformedPenalty(self, var_index)
 
-

Get the "unperformed" penalty of a node. This is only well defined if the node is only part of a single Disjunction, and that disjunction has a penalty. For forced active nodes returns max int64_t. In all other cases, this returns 0.

+

Get the "unperformed" penalty of a node. This is only well defined if the +node is only part of a single Disjunction, and that disjunction has a +penalty. For forced active nodes returns max int64_t. In all other cases, +this returns 0.

@@ -31477,13 +36751,19 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def UnperformedPenaltyOrValue(self, default_value: "int64_t", var_index: "int64_t") -> "int64_t":
-        r""" Same as above except that it returns default_value instead of 0 when penalty is not well defined (default value is passed as first argument to simplify the usage of the method in a callback)."""
+        r"""
+        Same as above except that it returns default_value instead of 0 when
+        penalty is not well defined (default value is passed as first argument to
+        simplify the usage of the method in a callback).
+        """
         return _pywrapcp.RoutingModel_UnperformedPenaltyOrValue(self, default_value, var_index)
 
-

Same as above except that it returns default_value instead of 0 when penalty is not well defined (default value is passed as first argument to simplify the usage of the method in a callback).

+

Same as above except that it returns default_value instead of 0 when +penalty is not well defined (default value is passed as first argument to +simplify the usage of the method in a callback).

@@ -31499,13 +36779,19 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def GetDepot(self) -> "int64_t":
-        r""" Returns the variable index of the first starting or ending node of all routes. If all routes start  and end at the same node (single depot), this is the node returned."""
+        r"""
+        Returns the variable index of the first starting or ending node of all
+        routes. If all routes start  and end at the same node (single depot), this
+        is the node returned.
+        """
         return _pywrapcp.RoutingModel_GetDepot(self)
 
-

Returns the variable index of the first starting or ending node of all routes. If all routes start and end at the same node (single depot), this is the node returned.

+

Returns the variable index of the first starting or ending node of all +routes. If all routes start and end at the same node (single depot), this +is the node returned.

@@ -31521,13 +36807,21 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def SetMaximumNumberOfActiveVehicles(self, max_active_vehicles: "int") -> "void":
-        r""" Constrains the maximum number of active vehicles, aka the number of vehicles which do not have an empty route. For instance, this can be used to limit the number of routes in the case where there are fewer drivers than vehicles and that the fleet of vehicle is heterogeneous."""
+        r"""
+        Constrains the maximum number of active vehicles, aka the number of
+        vehicles which do not have an empty route. For instance, this can be used
+        to limit the number of routes in the case where there are fewer drivers
+        than vehicles and that the fleet of vehicle is heterogeneous.
+        """
         return _pywrapcp.RoutingModel_SetMaximumNumberOfActiveVehicles(self, max_active_vehicles)
 
-

Constrains the maximum number of active vehicles, aka the number of vehicles which do not have an empty route. For instance, this can be used to limit the number of routes in the case where there are fewer drivers than vehicles and that the fleet of vehicle is heterogeneous.

+

Constrains the maximum number of active vehicles, aka the number of +vehicles which do not have an empty route. For instance, this can be used +to limit the number of routes in the case where there are fewer drivers +than vehicles and that the fleet of vehicle is heterogeneous.

@@ -31565,13 +36859,19 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def SetArcCostEvaluatorOfAllVehicles(self, evaluator_index: "int") -> "void":
-        r""" Sets the cost function of the model such that the cost of a segment of a route between node 'from' and 'to' is evaluator(from, to), whatever the route or vehicle performing the route."""
+        r"""
+        Sets the cost function of the model such that the cost of a segment of a
+        route between node 'from' and 'to' is evaluator(from, to), whatever the
+        route or vehicle performing the route.
+        """
         return _pywrapcp.RoutingModel_SetArcCostEvaluatorOfAllVehicles(self, evaluator_index)
 
-

Sets the cost function of the model such that the cost of a segment of a route between node 'from' and 'to' is evaluator(from, to), whatever the route or vehicle performing the route.

+

Sets the cost function of the model such that the cost of a segment of a +route between node 'from' and 'to' is evaluator(from, to), whatever the +route or vehicle performing the route.

@@ -31609,13 +36909,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def SetFixedCostOfAllVehicles(self, cost: "int64_t") -> "void":
-        r""" Sets the fixed cost of all vehicle routes. It is equivalent to calling SetFixedCostOfVehicle on all vehicle routes."""
+        r"""
+        Sets the fixed cost of all vehicle routes. It is equivalent to calling
+        SetFixedCostOfVehicle on all vehicle routes.
+        """
         return _pywrapcp.RoutingModel_SetFixedCostOfAllVehicles(self, cost)
 
-

Sets the fixed cost of all vehicle routes. It is equivalent to calling SetFixedCostOfVehicle on all vehicle routes.

+

Sets the fixed cost of all vehicle routes. It is equivalent to calling +SetFixedCostOfVehicle on all vehicle routes.

@@ -31653,13 +36957,19 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def GetFixedCostOfVehicle(self, vehicle: "int") -> "int64_t":
-        r""" Returns the route fixed cost taken into account if the route of the vehicle is not empty, aka there's at least one node on the route other than the first and last nodes."""
+        r"""
+        Returns the route fixed cost taken into account if the route of the
+        vehicle is not empty, aka there's at least one node on the route other
+        than the first and last nodes.
+        """
         return _pywrapcp.RoutingModel_GetFixedCostOfVehicle(self, vehicle)
 
-

Returns the route fixed cost taken into account if the route of the vehicle is not empty, aka there's at least one node on the route other than the first and last nodes.

+

Returns the route fixed cost taken into account if the route of the +vehicle is not empty, aka there's at least one node on the route other +than the first and last nodes.

@@ -31679,13 +36989,46 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def SetAmortizedCostFactorsOfAllVehicles(self, linear_cost_factor: "int64_t", quadratic_cost_factor: "int64_t") -> "void":
-        r""" The following methods set the linear and quadratic cost factors of vehicles (must be positive values). The default value of these parameters is zero for all vehicles. When set, the cost_ of the model will contain terms aiming at reducing the number of vehicles used in the model, by adding the following to the objective for every vehicle v: INDICATOR(v used in the model) *   [linear_cost_factor_of_vehicle_[v]    - quadratic_cost_factor_of_vehicle_[v]*(square of length of route v)] i.e. for every used vehicle, we add the linear factor as fixed cost, and subtract the square of the route length multiplied by the quadratic factor. This second term aims at making the routes as dense as possible. Sets the linear and quadratic cost factor of all vehicles."""
+        r"""
+        The following methods set the linear and quadratic cost factors of
+        vehicles (must be positive values). The default value of these parameters
+        is zero for all vehicles.
+
+        When set, the cost_ of the model will contain terms aiming at reducing the
+        number of vehicles used in the model, by adding the following to the
+        objective for every vehicle v:
+        INDICATOR(v used in the model) *
+          [linear_cost_factor_of_vehicle_[v]
+           - quadratic_cost_factor_of_vehicle_[v]*(square of length of route v)]
+        i.e. for every used vehicle, we add the linear factor as fixed cost, and
+        subtract the square of the route length multiplied by the quadratic
+        factor. This second term aims at making the routes as dense as possible.
+
+        Sets the linear and quadratic cost factor of all vehicles.
+        """
         return _pywrapcp.RoutingModel_SetAmortizedCostFactorsOfAllVehicles(self, linear_cost_factor, quadratic_cost_factor)
 
-

The following methods set the linear and quadratic cost factors of vehicles (must be positive values). The default value of these parameters is zero for all vehicles. When set, the cost_ of the model will contain terms aiming at reducing the number of vehicles used in the model, by adding the following to the objective for every vehicle v: INDICATOR(v used in the model) * [linear_cost_factor_of_vehicle_[v] - quadratic_cost_factor_of_vehicle_[v]*(square of length of route v)] i.e. for every used vehicle, we add the linear factor as fixed cost, and subtract the square of the route length multiplied by the quadratic factor. This second term aims at making the routes as dense as possible. Sets the linear and quadratic cost factor of all vehicles.

+

The following methods set the linear and quadratic cost factors of +vehicles (must be positive values). The default value of these parameters +is zero for all vehicles.

+ +

When set, the cost_ of the model will contain terms aiming at reducing the +number of vehicles used in the model, by adding the following to the +objective for every vehicle v: +INDICATOR(v used in the model) * + [linear_cost_factor_of_vehicle_[v]

+ +
    +
  • quadratic_cost_factor_of_vehicle_[v]*(square of length of route v)] +i.e. for every used vehicle, we add the linear factor as fixed cost, and +subtract the square of the route length multiplied by the quadratic +factor. This second term aims at making the routes as dense as possible.
  • +
+ +

Sets the linear and quadratic cost factor of all vehicles.

@@ -31807,13 +37150,19 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def SetFirstSolutionEvaluator(self, evaluator: "operations_research::Solver::IndexEvaluator2") -> "void":
-        r""" Gets/sets the evaluator used during the search. Only relevant when RoutingSearchParameters.first_solution_strategy = EVALUATOR_STRATEGY. Takes ownership of evaluator."""
+        r"""
+        Gets/sets the evaluator used during the search. Only relevant when
+        RoutingSearchParameters.first_solution_strategy = EVALUATOR_STRATEGY.
+        Takes ownership of evaluator.
+        """
         return _pywrapcp.RoutingModel_SetFirstSolutionEvaluator(self, evaluator)
 
-

Gets/sets the evaluator used during the search. Only relevant when RoutingSearchParameters.first_solution_strategy = EVALUATOR_STRATEGY. Takes ownership of evaluator.

+

Gets/sets the evaluator used during the search. Only relevant when +RoutingSearchParameters.first_solution_strategy = EVALUATOR_STRATEGY. +Takes ownership of evaluator.

@@ -31829,13 +37178,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def AddLocalSearchOperator(self, ls_operator: "LocalSearchOperator") -> "void":
-        r""" Adds a local search operator to the set of operators used to solve the vehicle routing problem."""
+        r"""
+        Adds a local search operator to the set of operators used to solve the
+        vehicle routing problem.
+        """
         return _pywrapcp.RoutingModel_AddLocalSearchOperator(self, ls_operator)
 
-

Adds a local search operator to the set of operators used to solve the vehicle routing problem.

+

Adds a local search operator to the set of operators used to solve the +vehicle routing problem.

@@ -31873,13 +37226,19 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def AddAtSolutionCallback(self, callback: "std::function< void () >") -> "void":
-        r""" Adds a callback called each time a solution is found during the search. This is a shortcut to creating a monitor to call the callback on AtSolution() and adding it with AddSearchMonitor."""
+        r"""
+        Adds a callback called each time a solution is found during the search.
+        This is a shortcut to creating a monitor to call the callback on
+        AtSolution() and adding it with AddSearchMonitor.
+        """
         return _pywrapcp.RoutingModel_AddAtSolutionCallback(self, callback)
 
-

Adds a callback called each time a solution is found during the search. This is a shortcut to creating a monitor to call the callback on AtSolution() and adding it with AddSearchMonitor.

+

Adds a callback called each time a solution is found during the search. +This is a shortcut to creating a monitor to call the callback on +AtSolution() and adding it with AddSearchMonitor.

@@ -31895,13 +37254,21 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def AddVariableMinimizedByFinalizer(self, var: "IntVar") -> "void":
-        r""" Adds a variable to minimize in the solution finalizer. The solution finalizer is called each time a solution is found during the search and allows to instantiate secondary variables (such as dimension cumul variables)."""
+        r"""
+        Adds a variable to minimize in the solution finalizer. The solution
+        finalizer is called each time a solution is found during the search and
+        allows to instantiate secondary variables (such as dimension cumul
+        variables).
+        """
         return _pywrapcp.RoutingModel_AddVariableMinimizedByFinalizer(self, var)
 
-

Adds a variable to minimize in the solution finalizer. The solution finalizer is called each time a solution is found during the search and allows to instantiate secondary variables (such as dimension cumul variables).

+

Adds a variable to minimize in the solution finalizer. The solution +finalizer is called each time a solution is found during the search and +allows to instantiate secondary variables (such as dimension cumul +variables).

@@ -31917,13 +37284,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def AddVariableMaximizedByFinalizer(self, var: "IntVar") -> "void":
-        r""" Adds a variable to maximize in the solution finalizer (see above for information on the solution finalizer)."""
+        r"""
+        Adds a variable to maximize in the solution finalizer (see above for
+        information on the solution finalizer).
+        """
         return _pywrapcp.RoutingModel_AddVariableMaximizedByFinalizer(self, var)
 
-

Adds a variable to maximize in the solution finalizer (see above for information on the solution finalizer).

+

Adds a variable to maximize in the solution finalizer (see above for +information on the solution finalizer).

@@ -31939,13 +37310,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def AddWeightedVariableMinimizedByFinalizer(self, var: "IntVar", cost: "int64_t") -> "void":
-        r""" Adds a variable to minimize in the solution finalizer, with a weighted priority: the higher the more priority it has."""
+        r"""
+        Adds a variable to minimize in the solution finalizer, with a weighted
+        priority: the higher the more priority it has.
+        """
         return _pywrapcp.RoutingModel_AddWeightedVariableMinimizedByFinalizer(self, var, cost)
 
-

Adds a variable to minimize in the solution finalizer, with a weighted priority: the higher the more priority it has.

+

Adds a variable to minimize in the solution finalizer, with a weighted +priority: the higher the more priority it has.

@@ -31961,13 +37336,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def AddVariableTargetToFinalizer(self, var: "IntVar", target: "int64_t") -> "void":
-        r""" Add a variable to set the closest possible to the target value in the solution finalizer."""
+        r"""
+        Add a variable to set the closest possible to the target value in the
+        solution finalizer.
+        """
         return _pywrapcp.RoutingModel_AddVariableTargetToFinalizer(self, var, target)
 
-

Add a variable to set the closest possible to the target value in the solution finalizer.

+

Add a variable to set the closest possible to the target value in the +solution finalizer.

@@ -31983,13 +37362,25 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def CloseModel(self) -> "void":
-        r""" Closes the current routing model; after this method is called, no modification to the model can be done, but RoutesToAssignment becomes available. Note that CloseModel() is automatically called by Solve() and other methods that produce solution. This is equivalent to calling CloseModelWithParameters(DefaultRoutingSearchParameters())."""
+        r"""
+        Closes the current routing model; after this method is called, no
+        modification to the model can be done, but RoutesToAssignment becomes
+        available. Note that CloseModel() is automatically called by Solve() and
+        other methods that produce solution.
+        This is equivalent to calling
+        CloseModelWithParameters(DefaultRoutingSearchParameters()).
+        """
         return _pywrapcp.RoutingModel_CloseModel(self)
 
-

Closes the current routing model; after this method is called, no modification to the model can be done, but RoutesToAssignment becomes available. Note that CloseModel() is automatically called by Solve() and other methods that produce solution. This is equivalent to calling CloseModelWithParameters(DefaultRoutingSearchParameters()).

+

Closes the current routing model; after this method is called, no +modification to the model can be done, but RoutesToAssignment becomes +available. Note that CloseModel() is automatically called by Solve() and +other methods that produce solution. +This is equivalent to calling +CloseModelWithParameters(DefaultRoutingSearchParameters()).

@@ -32008,13 +37399,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def CloseModelWithParameters(self, search_parameters: "operations_research::RoutingSearchParameters const &") -> "void":
-        r""" Same as above taking search parameters (as of 10/2015 some the parameters have to be set when closing the model)."""
+        r"""
+        Same as above taking search parameters (as of 10/2015 some the parameters
+        have to be set when closing the model).
+        """
         return _pywrapcp.RoutingModel_CloseModelWithParameters(self, search_parameters)
 
-

Same as above taking search parameters (as of 10/2015 some the parameters have to be set when closing the model).

+

Same as above taking search parameters (as of 10/2015 some the parameters +have to be set when closing the model).

@@ -32033,13 +37428,25 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def Solve(self, assignment: "Assignment"=None) -> "operations_research::Assignment const *":
-        r""" Solves the current routing model; closes the current model. This is equivalent to calling SolveWithParameters(DefaultRoutingSearchParameters()) or SolveFromAssignmentWithParameters(assignment,                                   DefaultRoutingSearchParameters())."""
+        r"""
+        Solves the current routing model; closes the current model.
+        This is equivalent to calling
+        SolveWithParameters(DefaultRoutingSearchParameters())
+        or
+        SolveFromAssignmentWithParameters(assignment,
+                                          DefaultRoutingSearchParameters()).
+        """
         return _pywrapcp.RoutingModel_Solve(self, assignment)
 
-

Solves the current routing model; closes the current model. This is equivalent to calling SolveWithParameters(DefaultRoutingSearchParameters()) or SolveFromAssignmentWithParameters(assignment, DefaultRoutingSearchParameters()).

+

Solves the current routing model; closes the current model. +This is equivalent to calling +SolveWithParameters(DefaultRoutingSearchParameters()) +or +SolveFromAssignmentWithParameters(assignment, + DefaultRoutingSearchParameters()).

@@ -32059,13 +37466,27 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def SolveWithParameters(self, search_parameters: "operations_research::RoutingSearchParameters const &", solutions: "std::vector< operations_research::Assignment const * > *"=None) -> "operations_research::Assignment const *":
-        r""" Solves the current routing model with the given parameters. If 'solutions' is specified, it will contain the k best solutions found during the search (from worst to best, including the one returned by this method), where k corresponds to the 'number_of_solutions_to_collect' in 'search_parameters'. Note that the Assignment returned by the method and the ones in solutions are owned by the underlying solver and should not be deleted."""
+        r"""
+        Solves the current routing model with the given parameters. If 'solutions'
+        is specified, it will contain the k best solutions found during the search
+        (from worst to best, including the one returned by this method), where k
+        corresponds to the 'number_of_solutions_to_collect' in
+        'search_parameters'. Note that the Assignment returned by the method and
+        the ones in solutions are owned by the underlying solver and should not be
+        deleted.
+        """
         return _pywrapcp.RoutingModel_SolveWithParameters(self, search_parameters, solutions)
 
-

Solves the current routing model with the given parameters. If 'solutions' is specified, it will contain the k best solutions found during the search (from worst to best, including the one returned by this method), where k corresponds to the 'number_of_solutions_to_collect' in 'search_parameters'. Note that the Assignment returned by the method and the ones in solutions are owned by the underlying solver and should not be deleted.

+

Solves the current routing model with the given parameters. If 'solutions' +is specified, it will contain the k best solutions found during the search +(from worst to best, including the one returned by this method), where k +corresponds to the 'number_of_solutions_to_collect' in +'search_parameters'. Note that the Assignment returned by the method and +the ones in solutions are owned by the underlying solver and should not be +deleted.

@@ -32086,13 +37507,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def SolveFromAssignmentWithParameters(self, assignment: "Assignment", search_parameters: "operations_research::RoutingSearchParameters const &", solutions: "std::vector< operations_research::Assignment const * > *"=None) -> "operations_research::Assignment const *":
-        r""" Same as above, except that if assignment is not null, it will be used as the initial solution."""
+        r"""
+        Same as above, except that if assignment is not null, it will be used as
+        the initial solution.
+        """
         return _pywrapcp.RoutingModel_SolveFromAssignmentWithParameters(self, assignment, search_parameters, solutions)
 
-

Same as above, except that if assignment is not null, it will be used as the initial solution.

+

Same as above, except that if assignment is not null, it will be used as +the initial solution.

@@ -32113,13 +37538,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def SolveFromAssignmentsWithParameters(self, assignments: "std::vector< operations_research::Assignment const * > const &", search_parameters: "operations_research::RoutingSearchParameters const &", solutions: "std::vector< operations_research::Assignment const * > *"=None) -> "operations_research::Assignment const *":
-        r""" Same as above but will try all assignments in order as first solutions until one succeeds."""
+        r"""
+        Same as above but will try all assignments in order as first solutions
+        until one succeeds.
+        """
         return _pywrapcp.RoutingModel_SolveFromAssignmentsWithParameters(self, assignments, search_parameters, solutions)
 
-

Same as above but will try all assignments in order as first solutions until one succeeds.

+

Same as above but will try all assignments in order as first solutions +until one succeeds.

@@ -32140,13 +37569,23 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def SetAssignmentFromOtherModelAssignment(self, target_assignment: "Assignment", source_model: "RoutingModel", source_assignment: "Assignment") -> "void":
-        r""" Given a "source_model" and its "source_assignment", resets "target_assignment" with the IntVar variables (nexts_, and vehicle_vars_ if costs aren't homogeneous across vehicles) of "this" model, with the values set according to those in "other_assignment". The objective_element of target_assignment is set to this->cost_."""
+        r"""
+        Given a "source_model" and its "source_assignment", resets
+        "target_assignment" with the IntVar variables (nexts_, and vehicle_vars_
+        if costs aren't homogeneous across vehicles) of "this" model, with the
+        values set according to those in "other_assignment".
+        The objective_element of target_assignment is set to this->cost_.
+        """
         return _pywrapcp.RoutingModel_SetAssignmentFromOtherModelAssignment(self, target_assignment, source_model, source_assignment)
 
-

Given a "source_model" and its "source_assignment", resets "target_assignment" with the IntVar variables (nexts_, and vehicle_vars_ if costs aren't homogeneous across vehicles) of "this" model, with the values set according to those in "other_assignment". The objective_element of target_assignment is set to this->cost_.

+

Given a "source_model" and its "source_assignment", resets +"target_assignment" with the IntVar variables (nexts_, and vehicle_vars_ +if costs aren't homogeneous across vehicles) of "this" model, with the +values set according to those in "other_assignment". +The objective_element of target_assignment is set to this->cost_.

@@ -32162,13 +37601,23 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def ComputeLowerBound(self) -> "int64_t":
-        r""" Computes a lower bound to the routing problem solving a linear assignment problem. The routing model must be closed before calling this method. Note that problems with node disjunction constraints (including optional nodes) and non-homogenous costs are not supported (the method returns 0 in these cases)."""
+        r"""
+        Computes a lower bound to the routing problem solving a linear assignment
+        problem. The routing model must be closed before calling this method.
+        Note that problems with node disjunction constraints (including optional
+        nodes) and non-homogenous costs are not supported (the method returns 0 in
+        these cases).
+        """
         return _pywrapcp.RoutingModel_ComputeLowerBound(self)
 
-

Computes a lower bound to the routing problem solving a linear assignment problem. The routing model must be closed before calling this method. Note that problems with node disjunction constraints (including optional nodes) and non-homogenous costs are not supported (the method returns 0 in these cases).

+

Computes a lower bound to the routing problem solving a linear assignment +problem. The routing model must be closed before calling this method. +Note that problems with node disjunction constraints (including optional +nodes) and non-homogenous costs are not supported (the method returns 0 in +these cases).

@@ -32209,13 +37658,29 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def ApplyLocks(self, locks: "std::vector< int64_t > const &") -> "operations_research::IntVar *":
-        r""" Applies a lock chain to the next search. 'locks' represents an ordered vector of nodes representing a partial route which will be fixed during the next search; it will constrain next variables such that: next[locks[i]] == locks[i+1]. Returns the next variable at the end of the locked chain; this variable is not locked. An assignment containing the locks can be obtained by calling PreAssignment()."""
+        r"""
+        Applies a lock chain to the next search. 'locks' represents an ordered
+        vector of nodes representing a partial route which will be fixed during
+        the next search; it will constrain next variables such that:
+        next[locks[i]] == locks[i+1].
+
+        Returns the next variable at the end of the locked chain; this variable is
+        not locked. An assignment containing the locks can be obtained by calling
+        PreAssignment().
+        """
         return _pywrapcp.RoutingModel_ApplyLocks(self, locks)
 
-

Applies a lock chain to the next search. 'locks' represents an ordered vector of nodes representing a partial route which will be fixed during the next search; it will constrain next variables such that: next[locks[i]] == locks[i+1]. Returns the next variable at the end of the locked chain; this variable is not locked. An assignment containing the locks can be obtained by calling PreAssignment().

+

Applies a lock chain to the next search. 'locks' represents an ordered +vector of nodes representing a partial route which will be fixed during +the next search; it will constrain next variables such that: +next[locks[i]] == locks[i+1].

+ +

Returns the next variable at the end of the locked chain; this variable is +not locked. An assignment containing the locks can be obtained by calling +PreAssignment().

@@ -32235,13 +37700,29 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def ApplyLocksToAllVehicles(self, locks: "std::vector< std::vector< int64_t > > const &", close_routes: "bool") -> "bool":
-        r""" Applies lock chains to all vehicles to the next search, such that locks[p] is the lock chain for route p. Returns false if the locks do not contain valid routes; expects that the routes do not contain the depots, i.e. there are empty vectors in place of empty routes. If close_routes is set to true, adds the end nodes to the route of each vehicle and deactivates other nodes. An assignment containing the locks can be obtained by calling PreAssignment()."""
+        r"""
+        Applies lock chains to all vehicles to the next search, such that locks[p]
+        is the lock chain for route p. Returns false if the locks do not contain
+        valid routes; expects that the routes do not contain the depots,
+        i.e. there are empty vectors in place of empty routes.
+        If close_routes is set to true, adds the end nodes to the route of each
+        vehicle and deactivates other nodes.
+        An assignment containing the locks can be obtained by calling
+        PreAssignment().
+        """
         return _pywrapcp.RoutingModel_ApplyLocksToAllVehicles(self, locks, close_routes)
 
-

Applies lock chains to all vehicles to the next search, such that locks[p] is the lock chain for route p. Returns false if the locks do not contain valid routes; expects that the routes do not contain the depots, i.e. there are empty vectors in place of empty routes. If close_routes is set to true, adds the end nodes to the route of each vehicle and deactivates other nodes. An assignment containing the locks can be obtained by calling PreAssignment().

+

Applies lock chains to all vehicles to the next search, such that locks[p] +is the lock chain for route p. Returns false if the locks do not contain +valid routes; expects that the routes do not contain the depots, +i.e. there are empty vectors in place of empty routes. +If close_routes is set to true, adds the end nodes to the route of each +vehicle and deactivates other nodes. +An assignment containing the locks can be obtained by calling +PreAssignment().

@@ -32257,13 +37738,21 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def PreAssignment(self) -> "operations_research::Assignment const *const":
-        r""" Returns an assignment used to fix some of the variables of the problem. In practice, this assignment locks partial routes of the problem. This can be used in the context of locking the parts of the routes which have already been driven in online routing problems."""
+        r"""
+        Returns an assignment used to fix some of the variables of the problem.
+        In practice, this assignment locks partial routes of the problem. This
+        can be used in the context of locking the parts of the routes which have
+        already been driven in online routing problems.
+        """
         return _pywrapcp.RoutingModel_PreAssignment(self)
 
-

Returns an assignment used to fix some of the variables of the problem. In practice, this assignment locks partial routes of the problem. This can be used in the context of locking the parts of the routes which have already been driven in online routing problems.

+

Returns an assignment used to fix some of the variables of the problem. +In practice, this assignment locks partial routes of the problem. This +can be used in the context of locking the parts of the routes which have +already been driven in online routing problems.

@@ -32298,13 +37787,19 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def WriteAssignment(self, file_name: "std::string const &") -> "bool":
-        r""" Writes the current solution to a file containing an AssignmentProto. Returns false if the file cannot be opened or if there is no current solution."""
+        r"""
+        Writes the current solution to a file containing an AssignmentProto.
+        Returns false if the file cannot be opened or if there is no current
+        solution.
+        """
         return _pywrapcp.RoutingModel_WriteAssignment(self, file_name)
 
-

Writes the current solution to a file containing an AssignmentProto. Returns false if the file cannot be opened or if there is no current solution.

+

Writes the current solution to a file containing an AssignmentProto. +Returns false if the file cannot be opened or if there is no current +solution.

@@ -32323,13 +37818,19 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def ReadAssignment(self, file_name: "std::string const &") -> "operations_research::Assignment *":
-        r""" Reads an assignment from a file and returns the current solution. Returns nullptr if the file cannot be opened or if the assignment is not valid."""
+        r"""
+        Reads an assignment from a file and returns the current solution.
+        Returns nullptr if the file cannot be opened or if the assignment is not
+        valid.
+        """
         return _pywrapcp.RoutingModel_ReadAssignment(self, file_name)
 
-

Reads an assignment from a file and returns the current solution. Returns nullptr if the file cannot be opened or if the assignment is not valid.

+

Reads an assignment from a file and returns the current solution. +Returns nullptr if the file cannot be opened or if the assignment is not +valid.

@@ -32348,13 +37849,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def RestoreAssignment(self, solution: "Assignment") -> "operations_research::Assignment *":
-        r""" Restores an assignment as a solution in the routing model and returns the new solution. Returns nullptr if the assignment is not valid."""
+        r"""
+        Restores an assignment as a solution in the routing model and returns the
+        new solution. Returns nullptr if the assignment is not valid.
+        """
         return _pywrapcp.RoutingModel_RestoreAssignment(self, solution)
 
-

Restores an assignment as a solution in the routing model and returns the new solution. Returns nullptr if the assignment is not valid.

+

Restores an assignment as a solution in the routing model and returns the +new solution. Returns nullptr if the assignment is not valid.

@@ -32374,13 +37879,23 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def ReadAssignmentFromRoutes(self, routes: "std::vector< std::vector< int64_t > > const &", ignore_inactive_indices: "bool") -> "operations_research::Assignment *":
-        r""" Restores the routes as the current solution. Returns nullptr if the solution cannot be restored (routes do not contain a valid solution). Note that calling this method will run the solver to assign values to the dimension variables; this may take considerable amount of time, especially when using dimensions with slack."""
+        r"""
+        Restores the routes as the current solution. Returns nullptr if the
+        solution cannot be restored (routes do not contain a valid solution). Note
+        that calling this method will run the solver to assign values to the
+        dimension variables; this may take considerable amount of time, especially
+        when using dimensions with slack.
+        """
         return _pywrapcp.RoutingModel_ReadAssignmentFromRoutes(self, routes, ignore_inactive_indices)
 
-

Restores the routes as the current solution. Returns nullptr if the solution cannot be restored (routes do not contain a valid solution). Note that calling this method will run the solver to assign values to the dimension variables; this may take considerable amount of time, especially when using dimensions with slack.

+

Restores the routes as the current solution. Returns nullptr if the +solution cannot be restored (routes do not contain a valid solution). Note +that calling this method will run the solver to assign values to the +dimension variables; this may take considerable amount of time, especially +when using dimensions with slack.

@@ -32402,13 +37917,45 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def RoutesToAssignment(self, routes: "std::vector< std::vector< int64_t > > const &", ignore_inactive_indices: "bool", close_routes: "bool", assignment: "Assignment") -> "bool":
-        r""" Fills an assignment from a specification of the routes of the vehicles. The routes are specified as lists of variable indices that appear on the routes of the vehicles. The indices of the outer vector in 'routes' correspond to vehicles IDs, the inner vector contains the variable indices on the routes for the given vehicle. The inner vectors must not contain the start and end indices, as these are determined by the routing model.  Sets the value of NextVars in the assignment, adding the variables to the assignment if necessary. The method does not touch other variables in the assignment. The method can only be called after the model is closed.  With ignore_inactive_indices set to false, this method will fail (return nullptr) in case some of the route contain indices that are deactivated in the model; when set to true, these indices will be skipped.  Returns true if routes were successfully loaded. However, such assignment still might not be a valid solution to the routing problem due to more complex constraints; it is advisible to call solver()->CheckSolution() afterwards."""
+        r"""
+        Fills an assignment from a specification of the routes of the
+        vehicles. The routes are specified as lists of variable indices that
+        appear on the routes of the vehicles. The indices of the outer vector in
+        'routes' correspond to vehicles IDs, the inner vector contains the
+        variable indices on the routes for the given vehicle. The inner vectors
+        must not contain the start and end indices, as these are determined by the
+        routing model.  Sets the value of NextVars in the assignment, adding the
+        variables to the assignment if necessary. The method does not touch other
+        variables in the assignment. The method can only be called after the model
+        is closed.  With ignore_inactive_indices set to false, this method will
+        fail (return nullptr) in case some of the route contain indices that are
+        deactivated in the model; when set to true, these indices will be
+        skipped.  Returns true if routes were successfully
+        loaded. However, such assignment still might not be a valid
+        solution to the routing problem due to more complex constraints;
+        it is advisible to call solver()->CheckSolution() afterwards.
+        """
         return _pywrapcp.RoutingModel_RoutesToAssignment(self, routes, ignore_inactive_indices, close_routes, assignment)
 
-

Fills an assignment from a specification of the routes of the vehicles. The routes are specified as lists of variable indices that appear on the routes of the vehicles. The indices of the outer vector in 'routes' correspond to vehicles IDs, the inner vector contains the variable indices on the routes for the given vehicle. The inner vectors must not contain the start and end indices, as these are determined by the routing model. Sets the value of NextVars in the assignment, adding the variables to the assignment if necessary. The method does not touch other variables in the assignment. The method can only be called after the model is closed. With ignore_inactive_indices set to false, this method will fail (return nullptr) in case some of the route contain indices that are deactivated in the model; when set to true, these indices will be skipped. Returns true if routes were successfully loaded. However, such assignment still might not be a valid solution to the routing problem due to more complex constraints; it is advisible to call solver()->CheckSolution() afterwards.

+

Fills an assignment from a specification of the routes of the +vehicles. The routes are specified as lists of variable indices that +appear on the routes of the vehicles. The indices of the outer vector in +'routes' correspond to vehicles IDs, the inner vector contains the +variable indices on the routes for the given vehicle. The inner vectors +must not contain the start and end indices, as these are determined by the +routing model. Sets the value of NextVars in the assignment, adding the +variables to the assignment if necessary. The method does not touch other +variables in the assignment. The method can only be called after the model +is closed. With ignore_inactive_indices set to false, this method will +fail (return nullptr) in case some of the route contain indices that are +deactivated in the model; when set to true, these indices will be +skipped. Returns true if routes were successfully +loaded. However, such assignment still might not be a valid +solution to the routing problem due to more complex constraints; +it is advisible to call solver()->CheckSolution() afterwards.

@@ -32428,13 +37975,19 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def AssignmentToRoutes(self, assignment: "Assignment", routes: "std::vector< std::vector< int64_t > > *const") -> "void":
-        r""" Converts the solution in the given assignment to routes for all vehicles. Expects that assignment contains a valid solution (i.e. routes for all vehicles end with an end index for that vehicle)."""
+        r"""
+        Converts the solution in the given assignment to routes for all vehicles.
+        Expects that assignment contains a valid solution (i.e. routes for all
+        vehicles end with an end index for that vehicle).
+        """
         return _pywrapcp.RoutingModel_AssignmentToRoutes(self, assignment, routes)
 
-

Converts the solution in the given assignment to routes for all vehicles. Expects that assignment contains a valid solution (i.e. routes for all vehicles end with an end index for that vehicle).

+

Converts the solution in the given assignment to routes for all vehicles. +Expects that assignment contains a valid solution (i.e. routes for all +vehicles end with an end index for that vehicle).

@@ -32453,13 +38006,55 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def CompactAssignment(self, assignment: "Assignment") -> "operations_research::Assignment *":
-        r""" Converts the solution in the given assignment to routes for all vehicles. If the returned vector is route_indices, route_indices[i][j] is the index for jth location visited on route i. Note that contrary to AssignmentToRoutes, the vectors do include start and end locations. Returns a compacted version of the given assignment, in which all vehicles with id lower or equal to some N have non-empty routes, and all vehicles with id greater than N have empty routes. Does not take ownership of the returned object. If found, the cost of the compact assignment is the same as in the original assignment and it preserves the values of 'active' variables. Returns nullptr if a compact assignment was not found. This method only works in homogenous mode, and it only swaps equivalent vehicles (vehicles with the same start and end nodes). When creating the compact assignment, the empty plan is replaced by the route assigned to the compatible vehicle with the highest id. Note that with more complex constraints on vehicle variables, this method might fail even if a compact solution exists. This method changes the vehicle and dimension variables as necessary. While compacting the solution, only basic checks on vehicle variables are performed; if one of these checks fails no attempts to repair it are made (instead, the method returns nullptr)."""
+        r"""
+        Converts the solution in the given assignment to routes for all vehicles.
+        If the returned vector is route_indices, route_indices[i][j] is the index
+        for jth location visited on route i. Note that contrary to
+        AssignmentToRoutes, the vectors do include start and end locations.
+        Returns a compacted version of the given assignment, in which all vehicles
+        with id lower or equal to some N have non-empty routes, and all vehicles
+        with id greater than N have empty routes. Does not take ownership of the
+        returned object.
+        If found, the cost of the compact assignment is the same as in the
+        original assignment and it preserves the values of 'active' variables.
+        Returns nullptr if a compact assignment was not found.
+        This method only works in homogenous mode, and it only swaps equivalent
+        vehicles (vehicles with the same start and end nodes). When creating the
+        compact assignment, the empty plan is replaced by the route assigned to
+        the compatible vehicle with the highest id. Note that with more complex
+        constraints on vehicle variables, this method might fail even if a compact
+        solution exists.
+        This method changes the vehicle and dimension variables as necessary.
+        While compacting the solution, only basic checks on vehicle variables are
+        performed; if one of these checks fails no attempts to repair it are made
+        (instead, the method returns nullptr).
+        """
         return _pywrapcp.RoutingModel_CompactAssignment(self, assignment)
 
-

Converts the solution in the given assignment to routes for all vehicles. If the returned vector is route_indices, route_indices[i][j] is the index for jth location visited on route i. Note that contrary to AssignmentToRoutes, the vectors do include start and end locations. Returns a compacted version of the given assignment, in which all vehicles with id lower or equal to some N have non-empty routes, and all vehicles with id greater than N have empty routes. Does not take ownership of the returned object. If found, the cost of the compact assignment is the same as in the original assignment and it preserves the values of 'active' variables. Returns nullptr if a compact assignment was not found. This method only works in homogenous mode, and it only swaps equivalent vehicles (vehicles with the same start and end nodes). When creating the compact assignment, the empty plan is replaced by the route assigned to the compatible vehicle with the highest id. Note that with more complex constraints on vehicle variables, this method might fail even if a compact solution exists. This method changes the vehicle and dimension variables as necessary. While compacting the solution, only basic checks on vehicle variables are performed; if one of these checks fails no attempts to repair it are made (instead, the method returns nullptr).

+

Converts the solution in the given assignment to routes for all vehicles. +If the returned vector is route_indices, route_indices[i][j] is the index +for jth location visited on route i. Note that contrary to +AssignmentToRoutes, the vectors do include start and end locations. +Returns a compacted version of the given assignment, in which all vehicles +with id lower or equal to some N have non-empty routes, and all vehicles +with id greater than N have empty routes. Does not take ownership of the +returned object. +If found, the cost of the compact assignment is the same as in the +original assignment and it preserves the values of 'active' variables. +Returns nullptr if a compact assignment was not found. +This method only works in homogenous mode, and it only swaps equivalent +vehicles (vehicles with the same start and end nodes). When creating the +compact assignment, the empty plan is replaced by the route assigned to +the compatible vehicle with the highest id. Note that with more complex +constraints on vehicle variables, this method might fail even if a compact +solution exists. +This method changes the vehicle and dimension variables as necessary. +While compacting the solution, only basic checks on vehicle variables are +performed; if one of these checks fails no attempts to repair it are made +(instead, the method returns nullptr).

@@ -32478,13 +38073,19 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def CompactAndCheckAssignment(self, assignment: "Assignment") -> "operations_research::Assignment *":
-        r""" Same as CompactAssignment() but also checks the validity of the final compact solution; if it is not valid, no attempts to repair it are made (instead, the method returns nullptr)."""
+        r"""
+        Same as CompactAssignment() but also checks the validity of the final
+        compact solution; if it is not valid, no attempts to repair it are made
+        (instead, the method returns nullptr).
+        """
         return _pywrapcp.RoutingModel_CompactAndCheckAssignment(self, assignment)
 
-

Same as CompactAssignment() but also checks the validity of the final compact solution; if it is not valid, no attempts to repair it are made (instead, the method returns nullptr).

+

Same as CompactAssignment() but also checks the validity of the final +compact solution; if it is not valid, no attempts to repair it are made +(instead, the method returns nullptr).

@@ -32545,13 +38146,36 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def PackCumulsOfOptimizerDimensionsFromAssignment(self, original_assignment: "Assignment", duration_limit: "absl::Duration") -> "operations_research::Assignment const *":
-        r""" For every dimension in the model with an optimizer in local/global_dimension_optimizers_, this method tries to pack the cumul values of the dimension, such that: - The cumul costs (span costs, soft lower and upper bound costs, etc) are   minimized. - The cumuls of the ends of the routes are minimized for this given   minimal cumul cost. - Given these minimal end cumuls, the route start cumuls are maximized. Returns the assignment resulting from allocating these packed cumuls with the solver, and nullptr if these cumuls could not be set by the solver."""
+        r"""
+        For every dimension in the model with an optimizer in
+        local/global_dimension_optimizers_, this method tries to pack the cumul
+        values of the dimension, such that:
+        - The cumul costs (span costs, soft lower and upper bound costs, etc) are
+          minimized.
+        - The cumuls of the ends of the routes are minimized for this given
+          minimal cumul cost.
+        - Given these minimal end cumuls, the route start cumuls are maximized.
+        Returns the assignment resulting from allocating these packed cumuls with
+        the solver, and nullptr if these cumuls could not be set by the solver.
+        """
         return _pywrapcp.RoutingModel_PackCumulsOfOptimizerDimensionsFromAssignment(self, original_assignment, duration_limit)
 
-

For every dimension in the model with an optimizer in local/global_dimension_optimizers_, this method tries to pack the cumul values of the dimension, such that: - The cumul costs (span costs, soft lower and upper bound costs, etc) are minimized. - The cumuls of the ends of the routes are minimized for this given minimal cumul cost. - Given these minimal end cumuls, the route start cumuls are maximized. Returns the assignment resulting from allocating these packed cumuls with the solver, and nullptr if these cumuls could not be set by the solver.

+

For every dimension in the model with an optimizer in +local/global_dimension_optimizers_, this method tries to pack the cumul +values of the dimension, such that:

+ +
    +
  • The cumul costs (span costs, soft lower and upper bound costs, etc) are +minimized.
  • +
  • The cumuls of the ends of the routes are minimized for this given +minimal cumul cost.
  • +
  • Given these minimal end cumuls, the route start cumuls are maximized. +Returns the assignment resulting from allocating these packed cumuls with +the solver, and nullptr if these cumuls could not be set by the solver.
  • +
@@ -32567,13 +38191,23 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def AddLocalSearchFilter(self, filter: "LocalSearchFilter") -> "void":
-        r""" Adds a custom local search filter to the list of filters used to speed up local search by pruning unfeasible variable assignments. Calling this method after the routing model has been closed (CloseModel() or Solve() has been called) has no effect. The routing model does not take ownership of the filter."""
+        r"""
+        Adds a custom local search filter to the list of filters used to speed up
+        local search by pruning unfeasible variable assignments.
+        Calling this method after the routing model has been closed (CloseModel()
+        or Solve() has been called) has no effect.
+        The routing model does not take ownership of the filter.
+        """
         return _pywrapcp.RoutingModel_AddLocalSearchFilter(self, filter)
 
-

Adds a custom local search filter to the list of filters used to speed up local search by pruning unfeasible variable assignments. Calling this method after the routing model has been closed (CloseModel() or Solve() has been called) has no effect. The routing model does not take ownership of the filter.

+

Adds a custom local search filter to the list of filters used to speed up +local search by pruning unfeasible variable assignments. +Calling this method after the routing model has been closed (CloseModel() +or Solve() has been called) has no effect. +The routing model does not take ownership of the filter.

@@ -32589,13 +38223,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def Start(self, vehicle: "int") -> "int64_t":
-        r""" Model inspection. Returns the variable index of the starting node of a vehicle route."""
+        r"""
+        Model inspection.
+        Returns the variable index of the starting node of a vehicle route.
+        """
         return _pywrapcp.RoutingModel_Start(self, vehicle)
 
-

Model inspection. Returns the variable index of the starting node of a vehicle route.

+

Model inspection. +Returns the variable index of the starting node of a vehicle route.

@@ -32677,13 +38315,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def VehicleIndex(self, index: "int64_t") -> "int":
-        r""" Returns the vehicle of the given start/end index, and -1 if the given index is not a vehicle start/end."""
+        r"""
+        Returns the vehicle of the given start/end index, and -1 if the given
+        index is not a vehicle start/end.
+        """
         return _pywrapcp.RoutingModel_VehicleIndex(self, index)
 
-

Returns the vehicle of the given start/end index, and -1 if the given index is not a vehicle start/end.

+

Returns the vehicle of the given start/end index, and -1 if the given +index is not a vehicle start/end.

@@ -32699,13 +38341,19 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def Next(self, assignment: "Assignment", index: "int64_t") -> "int64_t":
-        r""" Assignment inspection Returns the variable index of the node directly after the node corresponding to 'index' in 'assignment'."""
+        r"""
+        Assignment inspection
+        Returns the variable index of the node directly after the node
+        corresponding to 'index' in 'assignment'.
+        """
         return _pywrapcp.RoutingModel_Next(self, assignment, index)
 
-

Assignment inspection Returns the variable index of the node directly after the node corresponding to 'index' in 'assignment'.

+

Assignment inspection +Returns the variable index of the node directly after the node +corresponding to 'index' in 'assignment'.

@@ -32743,13 +38391,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def NextVar(self, index: "int64_t") -> "operations_research::IntVar *":
-        r""" Returns the next variable of the node corresponding to index. Note that NextVar(index) == index is equivalent to ActiveVar(index) == 0."""
+        r"""
+        Returns the next variable of the node corresponding to index. Note that
+        NextVar(index) == index is equivalent to ActiveVar(index) == 0.
+        """
         return _pywrapcp.RoutingModel_NextVar(self, index)
 
-

Returns the next variable of the node corresponding to index. Note that NextVar(index) == index is equivalent to ActiveVar(index) == 0.

+

Returns the next variable of the node corresponding to index. Note that +NextVar(index) == index is equivalent to ActiveVar(index) == 0.

@@ -32787,13 +38439,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def ActiveVehicleVar(self, vehicle: "int") -> "operations_research::IntVar *":
-        r""" Returns the active variable of the vehicle. It will be equal to 1 iff the route of the vehicle is not empty, 0 otherwise."""
+        r"""
+        Returns the active variable of the vehicle. It will be equal to 1 iff the
+        route of the vehicle is not empty, 0 otherwise.
+        """
         return _pywrapcp.RoutingModel_ActiveVehicleVar(self, vehicle)
 
-

Returns the active variable of the vehicle. It will be equal to 1 iff the route of the vehicle is not empty, 0 otherwise.

+

Returns the active variable of the vehicle. It will be equal to 1 iff the +route of the vehicle is not empty, 0 otherwise.

@@ -32809,13 +38465,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def VehicleCostsConsideredVar(self, vehicle: "int") -> "operations_research::IntVar *":
-        r""" Returns the variable specifying whether or not costs are considered for vehicle."""
+        r"""
+        Returns the variable specifying whether or not costs are considered for
+        vehicle.
+        """
         return _pywrapcp.RoutingModel_VehicleCostsConsideredVar(self, vehicle)
 
-

Returns the variable specifying whether or not costs are considered for vehicle.

+

Returns the variable specifying whether or not costs are considered for +vehicle.

@@ -32831,13 +38491,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def VehicleVar(self, index: "int64_t") -> "operations_research::IntVar *":
-        r""" Returns the vehicle variable of the node corresponding to index. Note that VehicleVar(index) == -1 is equivalent to ActiveVar(index) == 0."""
+        r"""
+        Returns the vehicle variable of the node corresponding to index. Note that
+        VehicleVar(index) == -1 is equivalent to ActiveVar(index) == 0.
+        """
         return _pywrapcp.RoutingModel_VehicleVar(self, index)
 
-

Returns the vehicle variable of the node corresponding to index. Note that VehicleVar(index) == -1 is equivalent to ActiveVar(index) == 0.

+

Returns the vehicle variable of the node corresponding to index. Note that +VehicleVar(index) == -1 is equivalent to ActiveVar(index) == 0.

@@ -32880,13 +38544,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def GetArcCostForVehicle(self, from_index: "int64_t", to_index: "int64_t", vehicle: "int64_t") -> "int64_t":
-        r""" Returns the cost of the transit arc between two nodes for a given vehicle. Input are variable indices of node. This returns 0 if vehicle < 0."""
+        r"""
+        Returns the cost of the transit arc between two nodes for a given vehicle.
+        Input are variable indices of node. This returns 0 if vehicle < 0.
+        """
         return _pywrapcp.RoutingModel_GetArcCostForVehicle(self, from_index, to_index, vehicle)
 
-

Returns the cost of the transit arc between two nodes for a given vehicle. Input are variable indices of node. This returns 0 if vehicle < 0.

+

Returns the cost of the transit arc between two nodes for a given vehicle. +Input are variable indices of node. This returns 0 if vehicle < 0.

@@ -32924,13 +38592,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def GetHomogeneousCost(self, from_index: "int64_t", to_index: "int64_t") -> "int64_t":
-        r""" Returns the cost of the segment between two nodes supposing all vehicle costs are the same (returns the cost for the first vehicle otherwise)."""
+        r"""
+        Returns the cost of the segment between two nodes supposing all vehicle
+        costs are the same (returns the cost for the first vehicle otherwise).
+        """
         return _pywrapcp.RoutingModel_GetHomogeneousCost(self, from_index, to_index)
 
-

Returns the cost of the segment between two nodes supposing all vehicle costs are the same (returns the cost for the first vehicle otherwise).

+

Returns the cost of the segment between two nodes supposing all vehicle +costs are the same (returns the cost for the first vehicle otherwise).

@@ -32946,13 +38618,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def GetArcCostForFirstSolution(self, from_index: "int64_t", to_index: "int64_t") -> "int64_t":
-        r""" Returns the cost of the arc in the context of the first solution strategy. This is typically a simplification of the actual cost; see the .cc."""
+        r"""
+        Returns the cost of the arc in the context of the first solution strategy.
+        This is typically a simplification of the actual cost; see the .cc.
+        """
         return _pywrapcp.RoutingModel_GetArcCostForFirstSolution(self, from_index, to_index)
 
-

Returns the cost of the arc in the context of the first solution strategy. This is typically a simplification of the actual cost; see the .cc.

+

Returns the cost of the arc in the context of the first solution strategy. +This is typically a simplification of the actual cost; see the .cc.

@@ -32973,13 +38649,25 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def GetArcCostForClass(self, from_index: "int64_t", to_index: "int64_t", cost_class_index: "int64_t") -> "int64_t":
-        r""" Returns the cost of the segment between two nodes for a given cost class. Input are variable indices of nodes and the cost class. Unlike GetArcCostForVehicle(), if cost_class is kNoCost, then the returned cost won't necessarily be zero: only some of the components of the cost that depend on the cost class will be omited. See the code for details."""
+        r"""
+        Returns the cost of the segment between two nodes for a given cost
+        class. Input are variable indices of nodes and the cost class.
+        Unlike GetArcCostForVehicle(), if cost_class is kNoCost, then the
+        returned cost won't necessarily be zero: only some of the components
+        of the cost that depend on the cost class will be omited. See the code
+        for details.
+        """
         return _pywrapcp.RoutingModel_GetArcCostForClass(self, from_index, to_index, cost_class_index)
 
-

Returns the cost of the segment between two nodes for a given cost class. Input are variable indices of nodes and the cost class. Unlike GetArcCostForVehicle(), if cost_class is kNoCost, then the returned cost won't necessarily be zero: only some of the components of the cost that depend on the cost class will be omited. See the code for details.

+

Returns the cost of the segment between two nodes for a given cost +class. Input are variable indices of nodes and the cost class. +Unlike GetArcCostForVehicle(), if cost_class is kNoCost, then the +returned cost won't necessarily be zero: only some of the components +of the cost that depend on the cost class will be omited. See the code +for details.

@@ -33023,13 +38711,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def HasVehicleWithCostClassIndex(self, cost_class_index: "operations_research::RoutingModel::CostClassIndex") -> "bool":
-        r""" Returns true iff the model contains a vehicle with the given cost_class_index."""
+        r"""
+        Returns true iff the model contains a vehicle with the given
+        cost_class_index.
+        """
         return _pywrapcp.RoutingModel_HasVehicleWithCostClassIndex(self, cost_class_index)
 
-

Returns true iff the model contains a vehicle with the given cost_class_index.

+

Returns true iff the model contains a vehicle with the given +cost_class_index.

@@ -33114,13 +38806,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def GetVehicleOfClass(self, vehicle_class: "operations_research::RoutingModel::VehicleClassIndex") -> "int":
-        r""" Returns a vehicle of the given vehicle class, and -1 if there are no vehicles for this class."""
+        r"""
+        Returns a vehicle of the given vehicle class, and -1 if there are no
+        vehicles for this class.
+        """
         return _pywrapcp.RoutingModel_GetVehicleOfClass(self, vehicle_class)
 
-

Returns a vehicle of the given vehicle class, and -1 if there are no vehicles for this class.

+

Returns a vehicle of the given vehicle class, and -1 if there are no +vehicles for this class.

@@ -33201,13 +38897,56 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def ArcIsMoreConstrainedThanArc(self, _from: "int64_t", to1: "int64_t", to2: "int64_t") -> "bool":
-        r""" Returns whether the arc from->to1 is more constrained than from->to2, taking into account, in order: - whether the destination node isn't an end node - whether the destination node is mandatory - whether the destination node is bound to the same vehicle as the source - the "primary constrained" dimension (see SetPrimaryConstrainedDimension) It then breaks ties using, in order: - the arc cost (taking unperformed penalties into account) - the size of the vehicle vars of "to1" and "to2" (lowest size wins) - the value: the lowest value of the indices to1 and to2 wins. See the .cc for details. The more constrained arc is typically preferable when building a first solution. This method is intended to be used as a callback for the BestValueByComparisonSelector value selector. Args:   from: the variable index of the source node   to1: the variable index of the first candidate destination node.   to2: the variable index of the second candidate destination node."""
+        r"""
+        Returns whether the arc from->to1 is more constrained than from->to2,
+        taking into account, in order:
+        - whether the destination node isn't an end node
+        - whether the destination node is mandatory
+        - whether the destination node is bound to the same vehicle as the source
+        - the "primary constrained" dimension (see SetPrimaryConstrainedDimension)
+        It then breaks ties using, in order:
+        - the arc cost (taking unperformed penalties into account)
+        - the size of the vehicle vars of "to1" and "to2" (lowest size wins)
+        - the value: the lowest value of the indices to1 and to2 wins.
+        See the .cc for details.
+        The more constrained arc is typically preferable when building a
+        first solution. This method is intended to be used as a callback for the
+        BestValueByComparisonSelector value selector.
+        Args:
+          from: the variable index of the source node
+          to1: the variable index of the first candidate destination node.
+          to2: the variable index of the second candidate destination node.
+        """
         return _pywrapcp.RoutingModel_ArcIsMoreConstrainedThanArc(self, _from, to1, to2)
 
-

Returns whether the arc from->to1 is more constrained than from->to2, taking into account, in order: - whether the destination node isn't an end node - whether the destination node is mandatory - whether the destination node is bound to the same vehicle as the source - the "primary constrained" dimension (see SetPrimaryConstrainedDimension) It then breaks ties using, in order: - the arc cost (taking unperformed penalties into account) - the size of the vehicle vars of "to1" and "to2" (lowest size wins) - the value: the lowest value of the indices to1 and to2 wins. See the .cc for details. The more constrained arc is typically preferable when building a first solution. This method is intended to be used as a callback for the BestValueByComparisonSelector value selector. Args: from: the variable index of the source node to1: the variable index of the first candidate destination node. to2: the variable index of the second candidate destination node.

+

Returns whether the arc from->to1 is more constrained than from->to2, +taking into account, in order:

+ +
    +
  • whether the destination node isn't an end node
  • +
  • whether the destination node is mandatory
  • +
  • whether the destination node is bound to the same vehicle as the source
  • +
  • the "primary constrained" dimension (see SetPrimaryConstrainedDimension) +It then breaks ties using, in order:
  • +
  • the arc cost (taking unperformed penalties into account)
  • +
  • the size of the vehicle vars of "to1" and "to2" (lowest size wins)
  • +
  • the value: the lowest value of the indices to1 and to2 wins. +See the .cc for details. +The more constrained arc is typically preferable when building a +first solution. This method is intended to be used as a callback for the +BestValueByComparisonSelector value selector.
  • +
+ +
Args
+ +
    +
  • from: the variable index of the source node
  • +
  • to1: the variable index of the first candidate destination node.
  • +
  • to2: the variable index of the second candidate destination node.
  • +
@@ -33227,13 +38966,21 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def DebugOutputAssignment(self, solution_assignment: "Assignment", dimension_to_print: "std::string const &") -> "std::string":
-        r""" Print some debugging information about an assignment, including the feasible intervals of the CumulVar for dimension "dimension_to_print" at each step of the routes. If "dimension_to_print" is omitted, all dimensions will be printed."""
+        r"""
+        Print some debugging information about an assignment, including the
+        feasible intervals of the CumulVar for dimension "dimension_to_print"
+        at each step of the routes.
+        If "dimension_to_print" is omitted, all dimensions will be printed.
+        """
         return _pywrapcp.RoutingModel_DebugOutputAssignment(self, solution_assignment, dimension_to_print)
 
-

Print some debugging information about an assignment, including the feasible intervals of the CumulVar for dimension "dimension_to_print" at each step of the routes. If "dimension_to_print" is omitted, all dimensions will be printed.

+

Print some debugging information about an assignment, including the +feasible intervals of the CumulVar for dimension "dimension_to_print" +at each step of the routes. +If "dimension_to_print" is omitted, all dimensions will be printed.

@@ -33249,13 +38996,30 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def solver(self) -> "operations_research::Solver *":
-        r""" Returns a vector cumul_bounds, for which cumul_bounds[i][j] is a pair containing the minimum and maximum of the CumulVar of the jth node on route i. - cumul_bounds[i][j].first is the minimum. - cumul_bounds[i][j].second is the maximum. Returns the underlying constraint solver. Can be used to add extra constraints and/or modify search algorithms."""
+        r"""
+        Returns a vector cumul_bounds, for which cumul_bounds[i][j] is a pair
+        containing the minimum and maximum of the CumulVar of the jth node on
+        route i.
+        - cumul_bounds[i][j].first is the minimum.
+        - cumul_bounds[i][j].second is the maximum.
+        Returns the underlying constraint solver. Can be used to add extra
+        constraints and/or modify search algorithms.
+        """
         return _pywrapcp.RoutingModel_solver(self)
 
-

Returns a vector cumul_bounds, for which cumul_bounds[i][j] is a pair containing the minimum and maximum of the CumulVar of the jth node on route i. - cumul_bounds[i][j].first is the minimum. - cumul_bounds[i][j].second is the maximum. Returns the underlying constraint solver. Can be used to add extra constraints and/or modify search algorithms.

+

Returns a vector cumul_bounds, for which cumul_bounds[i][j] is a pair +containing the minimum and maximum of the CumulVar of the jth node on +route i.

+ +
    +
  • cumul_bounds[i][j].first is the minimum.
  • +
  • cumul_bounds[i][j].second is the maximum. +Returns the underlying constraint solver. Can be used to add extra +constraints and/or modify search algorithms.
  • +
@@ -33315,13 +39079,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def nodes(self) -> "int":
-        r""" Sizes and indices Returns the number of nodes in the model."""
+        r"""
+        Sizes and indices
+        Returns the number of nodes in the model.
+        """
         return _pywrapcp.RoutingModel_nodes(self)
 
-

Sizes and indices Returns the number of nodes in the model.

+

Sizes and indices +Returns the number of nodes in the model.

@@ -33384,13 +39152,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def GetNumberOfDecisionsInFirstSolution(self, search_parameters: "operations_research::RoutingSearchParameters const &") -> "int64_t":
-        r""" Returns statistics on first solution search, number of decisions sent to filters, number of decisions rejected by filters."""
+        r"""
+        Returns statistics on first solution search, number of decisions sent to
+        filters, number of decisions rejected by filters.
+        """
         return _pywrapcp.RoutingModel_GetNumberOfDecisionsInFirstSolution(self, search_parameters)
 
-

Returns statistics on first solution search, number of decisions sent to filters, number of decisions rejected by filters.

+

Returns statistics on first solution search, number of decisions sent to +filters, number of decisions rejected by filters.

@@ -33476,13 +39248,40 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def MakeGuidedSlackFinalizer(self, dimension: "RoutingDimension", initializer: "std::function< int64_t (int64_t) >") -> "operations_research::DecisionBuilder *":
-        r""" The next few members are in the public section only for testing purposes. MakeGuidedSlackFinalizer creates a DecisionBuilder for the slacks of a dimension using a callback to choose which values to start with. The finalizer works only when all next variables in the model have been fixed. It has the following two characteristics: 1. It follows the routes defined by the nexts variables when choosing a    variable to make a decision on. 2. When it comes to choose a value for the slack of node i, the decision    builder first calls the callback with argument i, and supposingly the    returned value is x it creates decisions slack[i] = x, slack[i] = x +    1, slack[i] = x - 1, slack[i] = x + 2, etc."""
+        r"""
+        The next few members are in the public section only for testing purposes.
+
+        MakeGuidedSlackFinalizer creates a DecisionBuilder for the slacks of a
+        dimension using a callback to choose which values to start with.
+        The finalizer works only when all next variables in the model have
+        been fixed. It has the following two characteristics:
+        1. It follows the routes defined by the nexts variables when choosing a
+           variable to make a decision on.
+        2. When it comes to choose a value for the slack of node i, the decision
+           builder first calls the callback with argument i, and supposingly the
+           returned value is x it creates decisions slack[i] = x, slack[i] = x +
+           1, slack[i] = x - 1, slack[i] = x + 2, etc.
+        """
         return _pywrapcp.RoutingModel_MakeGuidedSlackFinalizer(self, dimension, initializer)
 
-

The next few members are in the public section only for testing purposes. MakeGuidedSlackFinalizer creates a DecisionBuilder for the slacks of a dimension using a callback to choose which values to start with. The finalizer works only when all next variables in the model have been fixed. It has the following two characteristics: 1. It follows the routes defined by the nexts variables when choosing a variable to make a decision on. 2. When it comes to choose a value for the slack of node i, the decision builder first calls the callback with argument i, and supposingly the returned value is x it creates decisions slack[i] = x, slack[i] = x + 1, slack[i] = x - 1, slack[i] = x + 2, etc.

+

The next few members are in the public section only for testing purposes.

+ +

MakeGuidedSlackFinalizer creates a DecisionBuilder for the slacks of a +dimension using a callback to choose which values to start with. +The finalizer works only when all next variables in the model have +been fixed. It has the following two characteristics:

+ +
    +
  1. It follows the routes defined by the nexts variables when choosing a +variable to make a decision on.
  2. +
  3. When it comes to choose a value for the slack of node i, the decision +builder first calls the callback with argument i, and supposingly the +returned value is x it creates decisions slack[i] = x, slack[i] = x + +1, slack[i] = x - 1, slack[i] = x + 2, etc.
  4. +
@@ -33501,13 +39300,39 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def MakeSelfDependentDimensionFinalizer(self, dimension: "RoutingDimension") -> "operations_research::DecisionBuilder *":
-        r""" MakeSelfDependentDimensionFinalizer is a finalizer for the slacks of a self-dependent dimension. It makes an extensive use of the caches of the state dependent transits. In detail, MakeSelfDependentDimensionFinalizer returns a composition of a local search decision builder with a greedy descent operator for the cumul of the start of each route and a guided slack finalizer. Provided there are no time windows and the maximum slacks are large enough, once the cumul of the start of route is fixed, the guided finalizer can find optimal values of the slacks for the rest of the route in time proportional to the length of the route. Therefore the composed finalizer generally works in time O(log(t)*n*m), where t is the latest possible departute time, n is the number of nodes in the network and m is the number of vehicles."""
+        r"""
+        MakeSelfDependentDimensionFinalizer is a finalizer for the slacks of a
+        self-dependent dimension. It makes an extensive use of the caches of the
+        state dependent transits.
+        In detail, MakeSelfDependentDimensionFinalizer returns a composition of a
+        local search decision builder with a greedy descent operator for the cumul
+        of the start of each route and a guided slack finalizer. Provided there
+        are no time windows and the maximum slacks are large enough, once the
+        cumul of the start of route is fixed, the guided finalizer can find
+        optimal values of the slacks for the rest of the route in time
+        proportional to the length of the route. Therefore the composed finalizer
+        generally works in time O(log(t)*n*m), where t is the latest possible
+        departute time, n is the number of nodes in the network and m is the
+        number of vehicles.
+        """
         return _pywrapcp.RoutingModel_MakeSelfDependentDimensionFinalizer(self, dimension)
 
-

MakeSelfDependentDimensionFinalizer is a finalizer for the slacks of a self-dependent dimension. It makes an extensive use of the caches of the state dependent transits. In detail, MakeSelfDependentDimensionFinalizer returns a composition of a local search decision builder with a greedy descent operator for the cumul of the start of each route and a guided slack finalizer. Provided there are no time windows and the maximum slacks are large enough, once the cumul of the start of route is fixed, the guided finalizer can find optimal values of the slacks for the rest of the route in time proportional to the length of the route. Therefore the composed finalizer generally works in time O(log(t)nm), where t is the latest possible departute time, n is the number of nodes in the network and m is the number of vehicles.

+

MakeSelfDependentDimensionFinalizer is a finalizer for the slacks of a +self-dependent dimension. It makes an extensive use of the caches of the +state dependent transits. +In detail, MakeSelfDependentDimensionFinalizer returns a composition of a +local search decision builder with a greedy descent operator for the cumul +of the start of each route and a guided slack finalizer. Provided there +are no time windows and the maximum slacks are large enough, once the +cumul of the start of route is fixed, the guided finalizer can find +optimal values of the slacks for the rest of the route in time +proportional to the length of the route. Therefore the composed finalizer +generally works in time O(log(t)nm), where t is the latest possible +departute time, n is the number of nodes in the network and m is the +number of vehicles.

@@ -33646,7 +39471,18 @@ This method attaches a closure that will watch any domain modification of the do
View Source
class GlobalVehicleBreaksConstraint(Constraint):
-    r""" GlobalVehicleBreaksConstraint ensures breaks constraints are enforced on all vehicles in the dimension passed to its constructor. It is intended to be used for dimensions representing time. A break constraint ensures break intervals fit on the route of a vehicle. For a given vehicle, it forces break intervals to be disjoint from visit intervals, where visit intervals start at CumulVar(node) and last for node_visit_transit[node]. Moreover, it ensures that there is enough time between two consecutive nodes of a route to do transit and vehicle breaks, i.e. if Next(nodeA) = nodeB, CumulVar(nodeA) = tA and CumulVar(nodeB) = tB, then SlackVar(nodeA) >= sum_{breaks [tA, tB)} duration(break)."""
+    r"""
+    GlobalVehicleBreaksConstraint ensures breaks constraints are enforced on
+    all vehicles in the dimension passed to its constructor.
+    It is intended to be used for dimensions representing time.
+    A break constraint ensures break intervals fit on the route of a vehicle.
+    For a given vehicle, it forces break intervals to be disjoint from visit
+    intervals, where visit intervals start at CumulVar(node) and last for
+    node_visit_transit[node]. Moreover, it ensures that there is enough time
+    between two consecutive nodes of a route to do transit and vehicle breaks,
+    i.e. if Next(nodeA) = nodeB, CumulVar(nodeA) = tA and CumulVar(nodeB) = tB,
+    then SlackVar(nodeA) >= sum_{breaks [tA, tB)} duration(break).
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
@@ -33667,7 +39503,16 @@ This method attaches a closure that will watch any domain modification of the do
 
         
-

GlobalVehicleBreaksConstraint ensures breaks constraints are enforced on all vehicles in the dimension passed to its constructor. It is intended to be used for dimensions representing time. A break constraint ensures break intervals fit on the route of a vehicle. For a given vehicle, it forces break intervals to be disjoint from visit intervals, where visit intervals start at CumulVar(node) and last for node_visit_transit[node]. Moreover, it ensures that there is enough time between two consecutive nodes of a route to do transit and vehicle breaks, i.e. if Next(nodeA) = nodeB, CumulVar(nodeA) = tA and CumulVar(nodeB) = tB, then SlackVar(nodeA) >= sum_{breaks [tA, tB)} duration(break).

+

GlobalVehicleBreaksConstraint ensures breaks constraints are enforced on +all vehicles in the dimension passed to its constructor. +It is intended to be used for dimensions representing time. +A break constraint ensures break intervals fit on the route of a vehicle. +For a given vehicle, it forces break intervals to be disjoint from visit +intervals, where visit intervals start at CumulVar(node) and last for +node_visit_transit[node]. Moreover, it ensures that there is enough time +between two consecutive nodes of a route to do transit and vehicle breaks, +i.e. if Next(nodeA) = nodeB, CumulVar(nodeA) = tA and CumulVar(nodeB) = tB, +then SlackVar(nodeA) >= sum_{breaks [tA, tB)} duration(break).

@@ -33735,7 +39580,8 @@ This method attaches a closure that will watch any domain modification of the do -

This method is called when the constraint is processed by the solver. Its main usage is to attach demons to variables.

+

This method is called when the constraint is processed by the +solver. Its main usage is to attach demons to variables.

@@ -33756,7 +39602,8 @@ This method attaches a closure that will watch any domain modification of the do -

This method performs the initial propagation of the constraint. It is called just after the post.

+

This method performs the initial propagation of the +constraint. It is called just after the post.

@@ -34005,7 +39852,48 @@ This method attaches a closure that will watch any domain modification of the do
View Source
class TypeRegulationsConstraint(Constraint):
-    r""" The following constraint ensures that incompatibilities and requirements between types are respected. It verifies both "hard" and "temporal" incompatibilities. Two nodes with hard incompatible types cannot be served by the same vehicle at all, while with a temporal incompatibility they can't be on the same route at the same time. The VisitTypePolicy of a node determines how visiting it impacts the type count on the route. For example, for - three temporally incompatible types T1 T2 and T3 - 2 pairs of nodes a1/r1 and a2/r2 of type T1 and T2 respectively, with     - a1 and a2 of VisitTypePolicy TYPE_ADDED_TO_VEHICLE     - r1 and r2 of policy ADDED_TYPE_REMOVED_FROM_VEHICLE - 3 nodes A, UV and AR of type T3, respectively with type policies   TYPE_ADDED_TO_VEHICLE, TYPE_ON_VEHICLE_UP_TO_VISIT and   TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED the configurations UV --> a1 --> r1 --> a2 --> r2,   a1 --> r1 --> a2 --> r2 --> A and a1 --> r1 --> AR --> a2 --> r2 are acceptable, whereas the configurations a1 --> a2 --> r1 --> ..., or A --> a1 --> r1 --> ..., or a1 --> r1 --> UV --> ... are not feasible. It also verifies same-vehicle and temporal type requirements. A node of type T_d with a same-vehicle requirement for type T_r needs to be served by the same vehicle as a node of type T_r. Temporal requirements, on the other hand, can take effect either when the dependent type is being added to the route or when it's removed from it, which is determined by the dependent node's VisitTypePolicy. In the above example: - If T3 is required on the same vehicle as T1, A, AR or UV must be on the   same vehicle as a1. - If T2 is required when adding T1, a2 must be visited *before* a1, and if   r2 is also visited on the route, it must be *after* a1, i.e. T2 must be on   the vehicle when a1 is visited:   ... --> a2 --> ... --> a1 --> ... --> r2 --> ... - If T3 is required when removing T1, T3 needs to be on the vehicle when   r1 is visited:   ... --> A --> ... --> r1 --> ...   OR   ... --> r1 --> ... --> UV --> ..."""
+    r"""
+    The following constraint ensures that incompatibilities and requirements
+    between types are respected.
+
+    It verifies both "hard" and "temporal" incompatibilities.
+    Two nodes with hard incompatible types cannot be served by the same vehicle
+    at all, while with a temporal incompatibility they can't be on the same
+    route at the same time.
+    The VisitTypePolicy of a node determines how visiting it impacts the type
+    count on the route.
+
+    For example, for
+    - three temporally incompatible types T1 T2 and T3
+    - 2 pairs of nodes a1/r1 and a2/r2 of type T1 and T2 respectively, with
+        - a1 and a2 of VisitTypePolicy TYPE_ADDED_TO_VEHICLE
+        - r1 and r2 of policy ADDED_TYPE_REMOVED_FROM_VEHICLE
+    - 3 nodes A, UV and AR of type T3, respectively with type policies
+      TYPE_ADDED_TO_VEHICLE, TYPE_ON_VEHICLE_UP_TO_VISIT and
+      TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED
+    the configurations
+    UV --> a1 --> r1 --> a2 --> r2,   a1 --> r1 --> a2 --> r2 --> A and
+    a1 --> r1 --> AR --> a2 --> r2 are acceptable, whereas the configurations
+    a1 --> a2 --> r1 --> ..., or A --> a1 --> r1 --> ..., or
+    a1 --> r1 --> UV --> ... are not feasible.
+
+    It also verifies same-vehicle and temporal type requirements.
+    A node of type T_d with a same-vehicle requirement for type T_r needs to be
+    served by the same vehicle as a node of type T_r.
+    Temporal requirements, on the other hand, can take effect either when the
+    dependent type is being added to the route or when it's removed from it,
+    which is determined by the dependent node's VisitTypePolicy.
+    In the above example:
+    - If T3 is required on the same vehicle as T1, A, AR or UV must be on the
+      same vehicle as a1.
+    - If T2 is required when adding T1, a2 must be visited *before* a1, and if
+      r2 is also visited on the route, it must be *after* a1, i.e. T2 must be on
+      the vehicle when a1 is visited:
+      ... --> a2 --> ... --> a1 --> ... --> r2 --> ...
+    - If T3 is required when removing T1, T3 needs to be on the vehicle when
+      r1 is visited:
+      ... --> A --> ... --> r1 --> ...   OR   ... --> r1 --> ... --> UV --> ...
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
@@ -34023,7 +39911,54 @@ This method attaches a closure that will watch any domain modification of the do
 
         
-

The following constraint ensures that incompatibilities and requirements between types are respected. It verifies both "hard" and "temporal" incompatibilities. Two nodes with hard incompatible types cannot be served by the same vehicle at all, while with a temporal incompatibility they can't be on the same route at the same time. The VisitTypePolicy of a node determines how visiting it impacts the type count on the route. For example, for - three temporally incompatible types T1 T2 and T3 - 2 pairs of nodes a1/r1 and a2/r2 of type T1 and T2 respectively, with - a1 and a2 of VisitTypePolicy TYPE_ADDED_TO_VEHICLE - r1 and r2 of policy ADDED_TYPE_REMOVED_FROM_VEHICLE - 3 nodes A, UV and AR of type T3, respectively with type policies TYPE_ADDED_TO_VEHICLE, TYPE_ON_VEHICLE_UP_TO_VISIT and TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED the configurations UV --> a1 --> r1 --> a2 --> r2, a1 --> r1 --> a2 --> r2 --> A and a1 --> r1 --> AR --> a2 --> r2 are acceptable, whereas the configurations a1 --> a2 --> r1 --> ..., or A --> a1 --> r1 --> ..., or a1 --> r1 --> UV --> ... are not feasible. It also verifies same-vehicle and temporal type requirements. A node of type T_d with a same-vehicle requirement for type T_r needs to be served by the same vehicle as a node of type T_r. Temporal requirements, on the other hand, can take effect either when the dependent type is being added to the route or when it's removed from it, which is determined by the dependent node's VisitTypePolicy. In the above example: - If T3 is required on the same vehicle as T1, A, AR or UV must be on the same vehicle as a1. - If T2 is required when adding T1, a2 must be visited before a1, and if r2 is also visited on the route, it must be after a1, i.e. T2 must be on the vehicle when a1 is visited: ... --> a2 --> ... --> a1 --> ... --> r2 --> ... - If T3 is required when removing T1, T3 needs to be on the vehicle when r1 is visited: ... --> A --> ... --> r1 --> ... OR ... --> r1 --> ... --> UV --> ...

+

The following constraint ensures that incompatibilities and requirements +between types are respected.

+ +

It verifies both "hard" and "temporal" incompatibilities. +Two nodes with hard incompatible types cannot be served by the same vehicle +at all, while with a temporal incompatibility they can't be on the same +route at the same time. +The VisitTypePolicy of a node determines how visiting it impacts the type +count on the route.

+ +

For example, for

+ +
    +
  • three temporally incompatible types T1 T2 and T3
  • +
  • 2 pairs of nodes a1/r1 and a2/r2 of type T1 and T2 respectively, with +
      +
    • a1 and a2 of VisitTypePolicy TYPE_ADDED_TO_VEHICLE
    • +
    • r1 and r2 of policy ADDED_TYPE_REMOVED_FROM_VEHICLE
    • +
  • +
  • 3 nodes A, UV and AR of type T3, respectively with type policies +TYPE_ADDED_TO_VEHICLE, TYPE_ON_VEHICLE_UP_TO_VISIT and +TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED +the configurations +UV --> a1 --> r1 --> a2 --> r2, a1 --> r1 --> a2 --> r2 --> A and +a1 --> r1 --> AR --> a2 --> r2 are acceptable, whereas the configurations +a1 --> a2 --> r1 --> ..., or A --> a1 --> r1 --> ..., or +a1 --> r1 --> UV --> ... are not feasible.
  • +
+ +

It also verifies same-vehicle and temporal type requirements. +A node of type T_d with a same-vehicle requirement for type T_r needs to be +served by the same vehicle as a node of type T_r. +Temporal requirements, on the other hand, can take effect either when the +dependent type is being added to the route or when it's removed from it, +which is determined by the dependent node's VisitTypePolicy. +In the above example:

+ +
    +
  • If T3 is required on the same vehicle as T1, A, AR or UV must be on the +same vehicle as a1.
  • +
  • If T2 is required when adding T1, a2 must be visited before a1, and if +r2 is also visited on the route, it must be after a1, i.e. T2 must be on +the vehicle when a1 is visited: +... --> a2 --> ... --> a1 --> ... --> r2 --> ...
  • +
  • If T3 is required when removing T1, T3 needs to be on the vehicle when +r1 is visited: +... --> A --> ... --> r1 --> ... OR ... --> r1 --> ... --> UV --> ...
  • +
@@ -34072,7 +40007,8 @@ This method attaches a closure that will watch any domain modification of the do -

This method is called when the constraint is processed by the solver. Its main usage is to attach demons to variables.

+

This method is called when the constraint is processed by the +solver. Its main usage is to attach demons to variables.

@@ -34093,7 +40029,8 @@ This method attaches a closure that will watch any domain modification of the do -

This method performs the initial propagation of the constraint. It is called just after the post.

+

This method performs the initial propagation of the +constraint. It is called just after the post.

@@ -34129,7 +40066,27 @@ This method attaches a closure that will watch any domain modification of the do
View Source
class RoutingDimension(object):
-    r""" Dimensions represent quantities accumulated at nodes along the routes. They represent quantities such as weights or volumes carried along the route, or distance or times. Quantities at a node are represented by "cumul" variables and the increase or decrease of quantities between nodes are represented by "transit" variables. These variables are linked as follows: if j == next(i), cumuls(j) = cumuls(i) + transits(i) + slacks(i) +             state_dependent_transits(i) where slack is a positive slack variable (can represent waiting times for a time dimension), and state_dependent_transits is a non-purely functional version of transits_. Favour transits over state_dependent_transits when possible, because purely functional callbacks allow more optimisations and make the model faster and easier to solve. for a given vehicle, it is passed as an external vector, it would be better to have this information here."""
+    r"""
+    Dimensions represent quantities accumulated at nodes along the routes. They
+    represent quantities such as weights or volumes carried along the route, or
+    distance or times.
+
+    Quantities at a node are represented by "cumul" variables and the increase
+    or decrease of quantities between nodes are represented by "transit"
+    variables. These variables are linked as follows:
+
+    if j == next(i),
+    cumuls(j) = cumuls(i) + transits(i) + slacks(i) +
+                state_dependent_transits(i)
+
+    where slack is a positive slack variable (can represent waiting times for
+    a time dimension), and state_dependent_transits is a non-purely functional
+    version of transits_. Favour transits over state_dependent_transits when
+    possible, because purely functional callbacks allow more optimisations and
+    make the model faster and easier to solve.
+    for a given vehicle, it is passed as an external vector, it would be better
+    to have this information here.
+    """
 
     thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
@@ -34143,15 +40100,25 @@ This method attaches a closure that will watch any domain modification of the do
         return _pywrapcp.RoutingDimension_model(self)
 
     def GetTransitValue(self, from_index: "int64_t", to_index: "int64_t", vehicle: "int64_t") -> "int64_t":
-        r""" Returns the transition value for a given pair of nodes (as var index); this value is the one taken by the corresponding transit variable when the 'next' variable for 'from_index' is bound to 'to_index'."""
+        r"""
+        Returns the transition value for a given pair of nodes (as var index);
+        this value is the one taken by the corresponding transit variable when
+        the 'next' variable for 'from_index' is bound to 'to_index'.
+        """
         return _pywrapcp.RoutingDimension_GetTransitValue(self, from_index, to_index, vehicle)
 
     def GetTransitValueFromClass(self, from_index: "int64_t", to_index: "int64_t", vehicle_class: "int64_t") -> "int64_t":
-        r""" Same as above but taking a vehicle class of the dimension instead of a vehicle (the class of a vehicle can be obtained with vehicle_to_class())."""
+        r"""
+        Same as above but taking a vehicle class of the dimension instead of a
+        vehicle (the class of a vehicle can be obtained with vehicle_to_class()).
+        """
         return _pywrapcp.RoutingDimension_GetTransitValueFromClass(self, from_index, to_index, vehicle_class)
 
     def CumulVar(self, index: "int64_t") -> "operations_research::IntVar *":
-        r""" Get the cumul, transit and slack variables for the given node (given as int64_t var index)."""
+        r"""
+        Get the cumul, transit and slack variables for the given node (given as
+        int64_t var index).
+        """
         return _pywrapcp.RoutingDimension_CumulVar(self, index)
 
     def TransitVar(self, index: "int64_t") -> "operations_research::IntVar *":
@@ -34164,62 +40131,146 @@ This method attaches a closure that will watch any domain modification of the do
         return _pywrapcp.RoutingDimension_SlackVar(self, index)
 
     def SetSpanUpperBoundForVehicle(self, upper_bound: "int64_t", vehicle: "int") -> "void":
-        r""" Sets an upper bound on the dimension span on a given vehicle. This is the preferred way to limit the "length" of the route of a vehicle according to a dimension."""
+        r"""
+        Sets an upper bound on the dimension span on a given vehicle. This is the
+        preferred way to limit the "length" of the route of a vehicle according to
+        a dimension.
+        """
         return _pywrapcp.RoutingDimension_SetSpanUpperBoundForVehicle(self, upper_bound, vehicle)
 
     def SetSpanCostCoefficientForVehicle(self, coefficient: "int64_t", vehicle: "int") -> "void":
-        r""" Sets a cost proportional to the dimension span on a given vehicle, or on all vehicles at once. "coefficient" must be nonnegative. This is handy to model costs proportional to idle time when the dimension represents time. The cost for a vehicle is   span_cost = coefficient * (dimension end value - dimension start value)."""
+        r"""
+        Sets a cost proportional to the dimension span on a given vehicle,
+        or on all vehicles at once. "coefficient" must be nonnegative.
+        This is handy to model costs proportional to idle time when the dimension
+        represents time.
+        The cost for a vehicle is
+          span_cost = coefficient * (dimension end value - dimension start value).
+        """
         return _pywrapcp.RoutingDimension_SetSpanCostCoefficientForVehicle(self, coefficient, vehicle)
 
     def SetSpanCostCoefficientForAllVehicles(self, coefficient: "int64_t") -> "void":
         return _pywrapcp.RoutingDimension_SetSpanCostCoefficientForAllVehicles(self, coefficient)
 
     def SetGlobalSpanCostCoefficient(self, coefficient: "int64_t") -> "void":
-        r""" Sets a cost proportional to the *global* dimension span, that is the difference between the largest value of route end cumul variables and the smallest value of route start cumul variables. In other words: global_span_cost =   coefficient * (Max(dimension end value) - Min(dimension start value))."""
+        r"""
+        Sets a cost proportional to the *global* dimension span, that is the
+        difference between the largest value of route end cumul variables and
+        the smallest value of route start cumul variables.
+        In other words:
+        global_span_cost =
+          coefficient * (Max(dimension end value) - Min(dimension start value)).
+        """
         return _pywrapcp.RoutingDimension_SetGlobalSpanCostCoefficient(self, coefficient)
 
     def SetCumulVarSoftUpperBound(self, index: "int64_t", upper_bound: "int64_t", coefficient: "int64_t") -> "void":
-        r""" Sets a soft upper bound to the cumul variable of a given variable index. If the value of the cumul variable is greater than the bound, a cost proportional to the difference between this value and the bound is added to the cost function of the model:   cumulVar <= upper_bound -> cost = 0    cumulVar > upper_bound -> cost = coefficient * (cumulVar - upper_bound) This is also handy to model tardiness costs when the dimension represents time."""
+        r"""
+        Sets a soft upper bound to the cumul variable of a given variable index.
+        If the value of the cumul variable is greater than the bound, a cost
+        proportional to the difference between this value and the bound is added
+        to the cost function of the model:
+          cumulVar <= upper_bound -> cost = 0
+           cumulVar > upper_bound -> cost = coefficient * (cumulVar - upper_bound)
+        This is also handy to model tardiness costs when the dimension represents
+        time.
+        """
         return _pywrapcp.RoutingDimension_SetCumulVarSoftUpperBound(self, index, upper_bound, coefficient)
 
     def HasCumulVarSoftUpperBound(self, index: "int64_t") -> "bool":
-        r""" Returns true if a soft upper bound has been set for a given variable index."""
+        r"""
+        Returns true if a soft upper bound has been set for a given variable
+        index.
+        """
         return _pywrapcp.RoutingDimension_HasCumulVarSoftUpperBound(self, index)
 
     def GetCumulVarSoftUpperBound(self, index: "int64_t") -> "int64_t":
-        r""" Returns the soft upper bound of a cumul variable for a given variable index. The "hard" upper bound of the variable is returned if no soft upper bound has been set."""
+        r"""
+        Returns the soft upper bound of a cumul variable for a given variable
+        index. The "hard" upper bound of the variable is returned if no soft upper
+        bound has been set.
+        """
         return _pywrapcp.RoutingDimension_GetCumulVarSoftUpperBound(self, index)
 
     def GetCumulVarSoftUpperBoundCoefficient(self, index: "int64_t") -> "int64_t":
-        r""" Returns the cost coefficient of the soft upper bound of a cumul variable for a given variable index. If no soft upper bound has been set, 0 is returned."""
+        r"""
+        Returns the cost coefficient of the soft upper bound of a cumul variable
+        for a given variable index. If no soft upper bound has been set, 0 is
+        returned.
+        """
         return _pywrapcp.RoutingDimension_GetCumulVarSoftUpperBoundCoefficient(self, index)
 
     def SetCumulVarSoftLowerBound(self, index: "int64_t", lower_bound: "int64_t", coefficient: "int64_t") -> "void":
-        r""" Sets a soft lower bound to the cumul variable of a given variable index. If the value of the cumul variable is less than the bound, a cost proportional to the difference between this value and the bound is added to the cost function of the model:   cumulVar > lower_bound -> cost = 0   cumulVar <= lower_bound -> cost = coefficient * (lower_bound -               cumulVar). This is also handy to model earliness costs when the dimension represents time."""
+        r"""
+        Sets a soft lower bound to the cumul variable of a given variable index.
+        If the value of the cumul variable is less than the bound, a cost
+        proportional to the difference between this value and the bound is added
+        to the cost function of the model:
+          cumulVar > lower_bound -> cost = 0
+          cumulVar <= lower_bound -> cost = coefficient * (lower_bound -
+                      cumulVar).
+        This is also handy to model earliness costs when the dimension represents
+        time.
+        """
         return _pywrapcp.RoutingDimension_SetCumulVarSoftLowerBound(self, index, lower_bound, coefficient)
 
     def HasCumulVarSoftLowerBound(self, index: "int64_t") -> "bool":
-        r""" Returns true if a soft lower bound has been set for a given variable index."""
+        r"""
+        Returns true if a soft lower bound has been set for a given variable
+        index.
+        """
         return _pywrapcp.RoutingDimension_HasCumulVarSoftLowerBound(self, index)
 
     def GetCumulVarSoftLowerBound(self, index: "int64_t") -> "int64_t":
-        r""" Returns the soft lower bound of a cumul variable for a given variable index. The "hard" lower bound of the variable is returned if no soft lower bound has been set."""
+        r"""
+        Returns the soft lower bound of a cumul variable for a given variable
+        index. The "hard" lower bound of the variable is returned if no soft lower
+        bound has been set.
+        """
         return _pywrapcp.RoutingDimension_GetCumulVarSoftLowerBound(self, index)
 
     def GetCumulVarSoftLowerBoundCoefficient(self, index: "int64_t") -> "int64_t":
-        r""" Returns the cost coefficient of the soft lower bound of a cumul variable for a given variable index. If no soft lower bound has been set, 0 is returned."""
+        r"""
+        Returns the cost coefficient of the soft lower bound of a cumul variable
+        for a given variable index. If no soft lower bound has been set, 0 is
+        returned.
+        """
         return _pywrapcp.RoutingDimension_GetCumulVarSoftLowerBoundCoefficient(self, index)
 
     def SetBreakIntervalsOfVehicle(self, breaks: "std::vector< operations_research::IntervalVar * >", vehicle: "int", node_visit_transits: "std::vector< int64_t >") -> "void":
-        r""" Sets the breaks for a given vehicle. Breaks are represented by IntervalVars. They may interrupt transits between nodes and increase the value of corresponding slack variables. A break may take place before the start of a vehicle, after the end of a vehicle, or during a travel i -> j. In that case, the interval [break.Start(), break.End()) must be a subset of [CumulVar(i) + pre_travel(i, j), CumulVar(j) - post_travel(i, j)). In other words, a break may not overlap any node n's visit, given by [CumulVar(n) - post_travel(_, n), CumulVar(n) + pre_travel(n, _)). This formula considers post_travel(_, start) and pre_travel(end, _) to be 0; pre_travel will never be called on any (_, start) and post_travel will never we called on any (end, _). If pre_travel_evaluator or post_travel_evaluator is -1, it will be taken as a function that always returns 0. Deprecated, sets pre_travel(i, j) = node_visit_transit[i]."""
+        r"""
+        Sets the breaks for a given vehicle. Breaks are represented by
+        IntervalVars. They may interrupt transits between nodes and increase
+        the value of corresponding slack variables.
+        A break may take place before the start of a vehicle, after the end of
+        a vehicle, or during a travel i -> j.
+
+        In that case, the interval [break.Start(), break.End()) must be a subset
+        of [CumulVar(i) + pre_travel(i, j), CumulVar(j) - post_travel(i, j)). In
+        other words, a break may not overlap any node n's visit, given by
+        [CumulVar(n) - post_travel(_, n), CumulVar(n) + pre_travel(n, _)).
+        This formula considers post_travel(_, start) and pre_travel(end, _) to be
+        0; pre_travel will never be called on any (_, start) and post_travel will
+        never we called on any (end, _). If pre_travel_evaluator or
+        post_travel_evaluator is -1, it will be taken as a function that always
+        returns 0.
+        Deprecated, sets pre_travel(i, j) = node_visit_transit[i].
+        """
         return _pywrapcp.RoutingDimension_SetBreakIntervalsOfVehicle(self, breaks, vehicle, node_visit_transits)
 
     def SetBreakDistanceDurationOfVehicle(self, distance: "int64_t", duration: "int64_t", vehicle: "int") -> "void":
-        r""" With breaks supposed to be consecutive, this forces the distance between breaks of size at least minimum_break_duration to be at most distance. This supposes that the time until route start and after route end are infinite breaks."""
+        r"""
+        With breaks supposed to be consecutive, this forces the distance between
+        breaks of size at least minimum_break_duration to be at most distance.
+        This supposes that the time until route start and after route end are
+        infinite breaks.
+        """
         return _pywrapcp.RoutingDimension_SetBreakDistanceDurationOfVehicle(self, distance, duration, vehicle)
 
     def InitializeBreaks(self) -> "void":
-        r""" Sets up vehicle_break_intervals_, vehicle_break_distance_duration_, pre_travel_evaluators and post_travel_evaluators."""
+        r"""
+        Sets up vehicle_break_intervals_, vehicle_break_distance_duration_,
+        pre_travel_evaluators and post_travel_evaluators.
+        """
         return _pywrapcp.RoutingDimension_InitializeBreaks(self)
 
     def HasBreakConstraints(self) -> "bool":
@@ -34237,7 +40288,15 @@ This method attaches a closure that will watch any domain modification of the do
         return _pywrapcp.RoutingDimension_base_dimension(self)
 
     def ShortestTransitionSlack(self, node: "int64_t") -> "int64_t":
-        r""" It makes sense to use the function only for self-dependent dimension. For such dimensions the value of the slack of a node determines the transition cost of the next transit. Provided that   1. cumul[node] is fixed,   2. next[node] and next[next[node]] (if exists) are fixed, the value of slack[node] for which cumul[next[node]] + transit[next[node]] is minimized can be found in O(1) using this function."""
+        r"""
+        It makes sense to use the function only for self-dependent dimension.
+        For such dimensions the value of the slack of a node determines the
+        transition cost of the next transit. Provided that
+          1. cumul[node] is fixed,
+          2. next[node] and next[next[node]] (if exists) are fixed,
+        the value of slack[node] for which cumul[next[node]] + transit[next[node]]
+        is minimized can be found in O(1) using this function.
+        """
         return _pywrapcp.RoutingDimension_ShortestTransitionSlack(self, node)
 
     def name(self) -> "std::string const &":
@@ -34271,7 +40330,25 @@ This method attaches a closure that will watch any domain modification of the do
 
         
-

Dimensions represent quantities accumulated at nodes along the routes. They represent quantities such as weights or volumes carried along the route, or distance or times. Quantities at a node are represented by "cumul" variables and the increase or decrease of quantities between nodes are represented by "transit" variables. These variables are linked as follows: if j == next(i), cumuls(j) = cumuls(i) + transits(i) + slacks(i) + state_dependent_transits(i) where slack is a positive slack variable (can represent waiting times for a time dimension), and state_dependent_transits is a non-purely functional version of transits_. Favour transits over state_dependent_transits when possible, because purely functional callbacks allow more optimisations and make the model faster and easier to solve. for a given vehicle, it is passed as an external vector, it would be better to have this information here.

+

Dimensions represent quantities accumulated at nodes along the routes. They +represent quantities such as weights or volumes carried along the route, or +distance or times.

+ +

Quantities at a node are represented by "cumul" variables and the increase +or decrease of quantities between nodes are represented by "transit" +variables. These variables are linked as follows:

+ +

if j == next(i), +cumuls(j) = cumuls(i) + transits(i) + slacks(i) + + state_dependent_transits(i)

+ +

where slack is a positive slack variable (can represent waiting times for +a time dimension), and state_dependent_transits is a non-purely functional +version of transits_. Favour transits over state_dependent_transits when +possible, because purely functional callbacks allow more optimisations and +make the model faster and easier to solve. +for a given vehicle, it is passed as an external vector, it would be better +to have this information here.

@@ -34342,13 +40419,19 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def GetTransitValue(self, from_index: "int64_t", to_index: "int64_t", vehicle: "int64_t") -> "int64_t":
-        r""" Returns the transition value for a given pair of nodes (as var index); this value is the one taken by the corresponding transit variable when the 'next' variable for 'from_index' is bound to 'to_index'."""
+        r"""
+        Returns the transition value for a given pair of nodes (as var index);
+        this value is the one taken by the corresponding transit variable when
+        the 'next' variable for 'from_index' is bound to 'to_index'.
+        """
         return _pywrapcp.RoutingDimension_GetTransitValue(self, from_index, to_index, vehicle)
 
-

Returns the transition value for a given pair of nodes (as var index); this value is the one taken by the corresponding transit variable when the 'next' variable for 'from_index' is bound to 'to_index'.

+

Returns the transition value for a given pair of nodes (as var index); +this value is the one taken by the corresponding transit variable when +the 'next' variable for 'from_index' is bound to 'to_index'.

@@ -34369,13 +40452,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def GetTransitValueFromClass(self, from_index: "int64_t", to_index: "int64_t", vehicle_class: "int64_t") -> "int64_t":
-        r""" Same as above but taking a vehicle class of the dimension instead of a vehicle (the class of a vehicle can be obtained with vehicle_to_class())."""
+        r"""
+        Same as above but taking a vehicle class of the dimension instead of a
+        vehicle (the class of a vehicle can be obtained with vehicle_to_class()).
+        """
         return _pywrapcp.RoutingDimension_GetTransitValueFromClass(self, from_index, to_index, vehicle_class)
 
-

Same as above but taking a vehicle class of the dimension instead of a vehicle (the class of a vehicle can be obtained with vehicle_to_class()).

+

Same as above but taking a vehicle class of the dimension instead of a +vehicle (the class of a vehicle can be obtained with vehicle_to_class()).

@@ -34391,13 +40478,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def CumulVar(self, index: "int64_t") -> "operations_research::IntVar *":
-        r""" Get the cumul, transit and slack variables for the given node (given as int64_t var index)."""
+        r"""
+        Get the cumul, transit and slack variables for the given node (given as
+        int64_t var index).
+        """
         return _pywrapcp.RoutingDimension_CumulVar(self, index)
 
-

Get the cumul, transit and slack variables for the given node (given as int64_t var index).

+

Get the cumul, transit and slack variables for the given node (given as +int64_t var index).

@@ -34470,13 +40561,19 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def SetSpanUpperBoundForVehicle(self, upper_bound: "int64_t", vehicle: "int") -> "void":
-        r""" Sets an upper bound on the dimension span on a given vehicle. This is the preferred way to limit the "length" of the route of a vehicle according to a dimension."""
+        r"""
+        Sets an upper bound on the dimension span on a given vehicle. This is the
+        preferred way to limit the "length" of the route of a vehicle according to
+        a dimension.
+        """
         return _pywrapcp.RoutingDimension_SetSpanUpperBoundForVehicle(self, upper_bound, vehicle)
 
-

Sets an upper bound on the dimension span on a given vehicle. This is the preferred way to limit the "length" of the route of a vehicle according to a dimension.

+

Sets an upper bound on the dimension span on a given vehicle. This is the +preferred way to limit the "length" of the route of a vehicle according to +a dimension.

@@ -34492,13 +40589,25 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def SetSpanCostCoefficientForVehicle(self, coefficient: "int64_t", vehicle: "int") -> "void":
-        r""" Sets a cost proportional to the dimension span on a given vehicle, or on all vehicles at once. "coefficient" must be nonnegative. This is handy to model costs proportional to idle time when the dimension represents time. The cost for a vehicle is   span_cost = coefficient * (dimension end value - dimension start value)."""
+        r"""
+        Sets a cost proportional to the dimension span on a given vehicle,
+        or on all vehicles at once. "coefficient" must be nonnegative.
+        This is handy to model costs proportional to idle time when the dimension
+        represents time.
+        The cost for a vehicle is
+          span_cost = coefficient * (dimension end value - dimension start value).
+        """
         return _pywrapcp.RoutingDimension_SetSpanCostCoefficientForVehicle(self, coefficient, vehicle)
 
-

Sets a cost proportional to the dimension span on a given vehicle, or on all vehicles at once. "coefficient" must be nonnegative. This is handy to model costs proportional to idle time when the dimension represents time. The cost for a vehicle is span_cost = coefficient * (dimension end value - dimension start value).

+

Sets a cost proportional to the dimension span on a given vehicle, +or on all vehicles at once. "coefficient" must be nonnegative. +This is handy to model costs proportional to idle time when the dimension +represents time. +The cost for a vehicle is + span_cost = coefficient * (dimension end value - dimension start value).

@@ -34533,13 +40642,25 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def SetGlobalSpanCostCoefficient(self, coefficient: "int64_t") -> "void":
-        r""" Sets a cost proportional to the *global* dimension span, that is the difference between the largest value of route end cumul variables and the smallest value of route start cumul variables. In other words: global_span_cost =   coefficient * (Max(dimension end value) - Min(dimension start value))."""
+        r"""
+        Sets a cost proportional to the *global* dimension span, that is the
+        difference between the largest value of route end cumul variables and
+        the smallest value of route start cumul variables.
+        In other words:
+        global_span_cost =
+          coefficient * (Max(dimension end value) - Min(dimension start value)).
+        """
         return _pywrapcp.RoutingDimension_SetGlobalSpanCostCoefficient(self, coefficient)
 
-

Sets a cost proportional to the global dimension span, that is the difference between the largest value of route end cumul variables and the smallest value of route start cumul variables. In other words: global_span_cost = coefficient * (Max(dimension end value) - Min(dimension start value)).

+

Sets a cost proportional to the global dimension span, that is the +difference between the largest value of route end cumul variables and +the smallest value of route start cumul variables. +In other words: +global_span_cost = + coefficient * (Max(dimension end value) - Min(dimension start value)).

@@ -34560,13 +40681,29 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def SetCumulVarSoftUpperBound(self, index: "int64_t", upper_bound: "int64_t", coefficient: "int64_t") -> "void":
-        r""" Sets a soft upper bound to the cumul variable of a given variable index. If the value of the cumul variable is greater than the bound, a cost proportional to the difference between this value and the bound is added to the cost function of the model:   cumulVar <= upper_bound -> cost = 0    cumulVar > upper_bound -> cost = coefficient * (cumulVar - upper_bound) This is also handy to model tardiness costs when the dimension represents time."""
+        r"""
+        Sets a soft upper bound to the cumul variable of a given variable index.
+        If the value of the cumul variable is greater than the bound, a cost
+        proportional to the difference between this value and the bound is added
+        to the cost function of the model:
+          cumulVar <= upper_bound -> cost = 0
+           cumulVar > upper_bound -> cost = coefficient * (cumulVar - upper_bound)
+        This is also handy to model tardiness costs when the dimension represents
+        time.
+        """
         return _pywrapcp.RoutingDimension_SetCumulVarSoftUpperBound(self, index, upper_bound, coefficient)
 
-

Sets a soft upper bound to the cumul variable of a given variable index. If the value of the cumul variable is greater than the bound, a cost proportional to the difference between this value and the bound is added to the cost function of the model: cumulVar <= upper_bound -> cost = 0 cumulVar > upper_bound -> cost = coefficient * (cumulVar - upper_bound) This is also handy to model tardiness costs when the dimension represents time.

+

Sets a soft upper bound to the cumul variable of a given variable index. +If the value of the cumul variable is greater than the bound, a cost +proportional to the difference between this value and the bound is added +to the cost function of the model: + cumulVar <= upper_bound -> cost = 0 + cumulVar > upper_bound -> cost = coefficient * (cumulVar - upper_bound) +This is also handy to model tardiness costs when the dimension represents +time.

@@ -34582,13 +40719,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def HasCumulVarSoftUpperBound(self, index: "int64_t") -> "bool":
-        r""" Returns true if a soft upper bound has been set for a given variable index."""
+        r"""
+        Returns true if a soft upper bound has been set for a given variable
+        index.
+        """
         return _pywrapcp.RoutingDimension_HasCumulVarSoftUpperBound(self, index)
 
-

Returns true if a soft upper bound has been set for a given variable index.

+

Returns true if a soft upper bound has been set for a given variable +index.

@@ -34604,13 +40745,19 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def GetCumulVarSoftUpperBound(self, index: "int64_t") -> "int64_t":
-        r""" Returns the soft upper bound of a cumul variable for a given variable index. The "hard" upper bound of the variable is returned if no soft upper bound has been set."""
+        r"""
+        Returns the soft upper bound of a cumul variable for a given variable
+        index. The "hard" upper bound of the variable is returned if no soft upper
+        bound has been set.
+        """
         return _pywrapcp.RoutingDimension_GetCumulVarSoftUpperBound(self, index)
 
-

Returns the soft upper bound of a cumul variable for a given variable index. The "hard" upper bound of the variable is returned if no soft upper bound has been set.

+

Returns the soft upper bound of a cumul variable for a given variable +index. The "hard" upper bound of the variable is returned if no soft upper +bound has been set.

@@ -34626,13 +40773,19 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def GetCumulVarSoftUpperBoundCoefficient(self, index: "int64_t") -> "int64_t":
-        r""" Returns the cost coefficient of the soft upper bound of a cumul variable for a given variable index. If no soft upper bound has been set, 0 is returned."""
+        r"""
+        Returns the cost coefficient of the soft upper bound of a cumul variable
+        for a given variable index. If no soft upper bound has been set, 0 is
+        returned.
+        """
         return _pywrapcp.RoutingDimension_GetCumulVarSoftUpperBoundCoefficient(self, index)
 
-

Returns the cost coefficient of the soft upper bound of a cumul variable for a given variable index. If no soft upper bound has been set, 0 is returned.

+

Returns the cost coefficient of the soft upper bound of a cumul variable +for a given variable index. If no soft upper bound has been set, 0 is +returned.

@@ -34653,13 +40806,31 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def SetCumulVarSoftLowerBound(self, index: "int64_t", lower_bound: "int64_t", coefficient: "int64_t") -> "void":
-        r""" Sets a soft lower bound to the cumul variable of a given variable index. If the value of the cumul variable is less than the bound, a cost proportional to the difference between this value and the bound is added to the cost function of the model:   cumulVar > lower_bound -> cost = 0   cumulVar <= lower_bound -> cost = coefficient * (lower_bound -               cumulVar). This is also handy to model earliness costs when the dimension represents time."""
+        r"""
+        Sets a soft lower bound to the cumul variable of a given variable index.
+        If the value of the cumul variable is less than the bound, a cost
+        proportional to the difference between this value and the bound is added
+        to the cost function of the model:
+          cumulVar > lower_bound -> cost = 0
+          cumulVar <= lower_bound -> cost = coefficient * (lower_bound -
+                      cumulVar).
+        This is also handy to model earliness costs when the dimension represents
+        time.
+        """
         return _pywrapcp.RoutingDimension_SetCumulVarSoftLowerBound(self, index, lower_bound, coefficient)
 
-

Sets a soft lower bound to the cumul variable of a given variable index. If the value of the cumul variable is less than the bound, a cost proportional to the difference between this value and the bound is added to the cost function of the model: cumulVar > lower_bound -> cost = 0 cumulVar <= lower_bound -> cost = coefficient * (lower_bound - cumulVar). This is also handy to model earliness costs when the dimension represents time.

+

Sets a soft lower bound to the cumul variable of a given variable index. +If the value of the cumul variable is less than the bound, a cost +proportional to the difference between this value and the bound is added +to the cost function of the model: + cumulVar > lower_bound -> cost = 0 + cumulVar <= lower_bound -> cost = coefficient * (lower_bound - + cumulVar). +This is also handy to model earliness costs when the dimension represents +time.

@@ -34675,13 +40846,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def HasCumulVarSoftLowerBound(self, index: "int64_t") -> "bool":
-        r""" Returns true if a soft lower bound has been set for a given variable index."""
+        r"""
+        Returns true if a soft lower bound has been set for a given variable
+        index.
+        """
         return _pywrapcp.RoutingDimension_HasCumulVarSoftLowerBound(self, index)
 
-

Returns true if a soft lower bound has been set for a given variable index.

+

Returns true if a soft lower bound has been set for a given variable +index.

@@ -34697,13 +40872,19 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def GetCumulVarSoftLowerBound(self, index: "int64_t") -> "int64_t":
-        r""" Returns the soft lower bound of a cumul variable for a given variable index. The "hard" lower bound of the variable is returned if no soft lower bound has been set."""
+        r"""
+        Returns the soft lower bound of a cumul variable for a given variable
+        index. The "hard" lower bound of the variable is returned if no soft lower
+        bound has been set.
+        """
         return _pywrapcp.RoutingDimension_GetCumulVarSoftLowerBound(self, index)
 
-

Returns the soft lower bound of a cumul variable for a given variable index. The "hard" lower bound of the variable is returned if no soft lower bound has been set.

+

Returns the soft lower bound of a cumul variable for a given variable +index. The "hard" lower bound of the variable is returned if no soft lower +bound has been set.

@@ -34719,13 +40900,19 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def GetCumulVarSoftLowerBoundCoefficient(self, index: "int64_t") -> "int64_t":
-        r""" Returns the cost coefficient of the soft lower bound of a cumul variable for a given variable index. If no soft lower bound has been set, 0 is returned."""
+        r"""
+        Returns the cost coefficient of the soft lower bound of a cumul variable
+        for a given variable index. If no soft lower bound has been set, 0 is
+        returned.
+        """
         return _pywrapcp.RoutingDimension_GetCumulVarSoftLowerBoundCoefficient(self, index)
 
-

Returns the cost coefficient of the soft lower bound of a cumul variable for a given variable index. If no soft lower bound has been set, 0 is returned.

+

Returns the cost coefficient of the soft lower bound of a cumul variable +for a given variable index. If no soft lower bound has been set, 0 is +returned.

@@ -34746,13 +40933,45 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def SetBreakIntervalsOfVehicle(self, breaks: "std::vector< operations_research::IntervalVar * >", vehicle: "int", node_visit_transits: "std::vector< int64_t >") -> "void":
-        r""" Sets the breaks for a given vehicle. Breaks are represented by IntervalVars. They may interrupt transits between nodes and increase the value of corresponding slack variables. A break may take place before the start of a vehicle, after the end of a vehicle, or during a travel i -> j. In that case, the interval [break.Start(), break.End()) must be a subset of [CumulVar(i) + pre_travel(i, j), CumulVar(j) - post_travel(i, j)). In other words, a break may not overlap any node n's visit, given by [CumulVar(n) - post_travel(_, n), CumulVar(n) + pre_travel(n, _)). This formula considers post_travel(_, start) and pre_travel(end, _) to be 0; pre_travel will never be called on any (_, start) and post_travel will never we called on any (end, _). If pre_travel_evaluator or post_travel_evaluator is -1, it will be taken as a function that always returns 0. Deprecated, sets pre_travel(i, j) = node_visit_transit[i]."""
+        r"""
+        Sets the breaks for a given vehicle. Breaks are represented by
+        IntervalVars. They may interrupt transits between nodes and increase
+        the value of corresponding slack variables.
+        A break may take place before the start of a vehicle, after the end of
+        a vehicle, or during a travel i -> j.
+
+        In that case, the interval [break.Start(), break.End()) must be a subset
+        of [CumulVar(i) + pre_travel(i, j), CumulVar(j) - post_travel(i, j)). In
+        other words, a break may not overlap any node n's visit, given by
+        [CumulVar(n) - post_travel(_, n), CumulVar(n) + pre_travel(n, _)).
+        This formula considers post_travel(_, start) and pre_travel(end, _) to be
+        0; pre_travel will never be called on any (_, start) and post_travel will
+        never we called on any (end, _). If pre_travel_evaluator or
+        post_travel_evaluator is -1, it will be taken as a function that always
+        returns 0.
+        Deprecated, sets pre_travel(i, j) = node_visit_transit[i].
+        """
         return _pywrapcp.RoutingDimension_SetBreakIntervalsOfVehicle(self, breaks, vehicle, node_visit_transits)
 
-

Sets the breaks for a given vehicle. Breaks are represented by IntervalVars. They may interrupt transits between nodes and increase the value of corresponding slack variables. A break may take place before the start of a vehicle, after the end of a vehicle, or during a travel i -> j. In that case, the interval [break.Start(), break.End()) must be a subset of [CumulVar(i) + pre_travel(i, j), CumulVar(j) - post_travel(i, j)). In other words, a break may not overlap any node n's visit, given by [CumulVar(n) - post_travel(_, n), CumulVar(n) + pre_travel(n, _)). This formula considers post_travel(_, start) and pre_travel(end, _) to be 0; pre_travel will never be called on any (_, start) and post_travel will never we called on any (end, _). If pre_travel_evaluator or post_travel_evaluator is -1, it will be taken as a function that always returns 0. Deprecated, sets pre_travel(i, j) = node_visit_transit[i].

+

Sets the breaks for a given vehicle. Breaks are represented by +IntervalVars. They may interrupt transits between nodes and increase +the value of corresponding slack variables. +A break may take place before the start of a vehicle, after the end of +a vehicle, or during a travel i -> j.

+ +

In that case, the interval [break.Start(), break.End()) must be a subset +of [CumulVar(i) + pre_travel(i, j), CumulVar(j) - post_travel(i, j)). In +other words, a break may not overlap any node n's visit, given by +[CumulVar(n) - post_travel(_, n), CumulVar(n) + pre_travel(n, _)). +This formula considers post_travel(_, start) and pre_travel(end, _) to be +0; pre_travel will never be called on any (_, start) and post_travel will +never we called on any (end, _). If pre_travel_evaluator or +post_travel_evaluator is -1, it will be taken as a function that always +returns 0. +Deprecated, sets pre_travel(i, j) = node_visit_transit[i].

@@ -34773,13 +40992,21 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def SetBreakDistanceDurationOfVehicle(self, distance: "int64_t", duration: "int64_t", vehicle: "int") -> "void":
-        r""" With breaks supposed to be consecutive, this forces the distance between breaks of size at least minimum_break_duration to be at most distance. This supposes that the time until route start and after route end are infinite breaks."""
+        r"""
+        With breaks supposed to be consecutive, this forces the distance between
+        breaks of size at least minimum_break_duration to be at most distance.
+        This supposes that the time until route start and after route end are
+        infinite breaks.
+        """
         return _pywrapcp.RoutingDimension_SetBreakDistanceDurationOfVehicle(self, distance, duration, vehicle)
 
-

With breaks supposed to be consecutive, this forces the distance between breaks of size at least minimum_break_duration to be at most distance. This supposes that the time until route start and after route end are infinite breaks.

+

With breaks supposed to be consecutive, this forces the distance between +breaks of size at least minimum_break_duration to be at most distance. +This supposes that the time until route start and after route end are +infinite breaks.

@@ -34795,13 +41022,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def InitializeBreaks(self) -> "void":
-        r""" Sets up vehicle_break_intervals_, vehicle_break_distance_duration_, pre_travel_evaluators and post_travel_evaluators."""
+        r"""
+        Sets up vehicle_break_intervals_, vehicle_break_distance_duration_,
+        pre_travel_evaluators and post_travel_evaluators.
+        """
         return _pywrapcp.RoutingDimension_InitializeBreaks(self)
 
-

Sets up vehicle_break_intervals_, vehicle_break_distance_duration_, pre_travel_evaluators and post_travel_evaluators.

+

Sets up vehicle_break_intervals_, vehicle_break_distance_duration_, +pre_travel_evaluators and post_travel_evaluators.

@@ -34899,13 +41130,30 @@ This method attaches a closure that will watch any domain modification of the do
View Source
    def ShortestTransitionSlack(self, node: "int64_t") -> "int64_t":
-        r""" It makes sense to use the function only for self-dependent dimension. For such dimensions the value of the slack of a node determines the transition cost of the next transit. Provided that   1. cumul[node] is fixed,   2. next[node] and next[next[node]] (if exists) are fixed, the value of slack[node] for which cumul[next[node]] + transit[next[node]] is minimized can be found in O(1) using this function."""
+        r"""
+        It makes sense to use the function only for self-dependent dimension.
+        For such dimensions the value of the slack of a node determines the
+        transition cost of the next transit. Provided that
+          1. cumul[node] is fixed,
+          2. next[node] and next[next[node]] (if exists) are fixed,
+        the value of slack[node] for which cumul[next[node]] + transit[next[node]]
+        is minimized can be found in O(1) using this function.
+        """
         return _pywrapcp.RoutingDimension_ShortestTransitionSlack(self, node)
 
-

It makes sense to use the function only for self-dependent dimension. For such dimensions the value of the slack of a node determines the transition cost of the next transit. Provided that 1. cumul[node] is fixed, 2. next[node] and next[next[node]] (if exists) are fixed, the value of slack[node] for which cumul[next[node]] + transit[next[node]] is minimized can be found in O(1) using this function.

+

It makes sense to use the function only for self-dependent dimension. +For such dimensions the value of the slack of a node determines the +transition cost of the next transit. Provided that

+ +
    +
  1. cumul[node] is fixed,
  2. +
  3. next[node] and next[next[node]] (if exists) are fixed, +the value of slack[node] for which cumul[next[node]] + transit[next[node]] +is minimized can be found in O(1) using this function.
  4. +
@@ -35109,13 +41357,17 @@ This method attaches a closure that will watch any domain modification of the do
View Source
def MakeSetValuesFromTargets(solver: "Solver", variables: "std::vector< operations_research::IntVar * >", targets: "std::vector< int64_t >") -> "operations_research::DecisionBuilder *":
-    r""" A decision builder which tries to assign values to variables as close as possible to target values first."""
+    r"""
+    A decision builder which tries to assign values to variables as close as
+    possible to target values first.
+    """
     return _pywrapcp.MakeSetValuesFromTargets(solver, variables, targets)
 
-

A decision builder which tries to assign values to variables as close as possible to target values first.

+

A decision builder which tries to assign values to variables as close as +possible to target values first.

@@ -35136,13 +41388,21 @@ This method attaches a closure that will watch any domain modification of the do
View Source
def SolveModelWithSat(model: "RoutingModel", search_parameters: "operations_research::RoutingSearchParameters const &", initial_solution: "Assignment", solution: "Assignment") -> "bool":
-    r""" Attempts to solve the model using the cp-sat solver. As of 5/2019, will solve the TSP corresponding to the model if it has a single vehicle. Therefore the resulting solution might not actually be feasible. Will return false if a solution could not be found."""
+    r"""
+    Attempts to solve the model using the cp-sat solver. As of 5/2019, will
+    solve the TSP corresponding to the model if it has a single vehicle.
+    Therefore the resulting solution might not actually be feasible. Will return
+    false if a solution could not be found.
+    """
     return _pywrapcp.SolveModelWithSat(model, search_parameters, initial_solution, solution)
 
-

Attempts to solve the model using the cp-sat solver. As of 5/2019, will solve the TSP corresponding to the model if it has a single vehicle. Therefore the resulting solution might not actually be feasible. Will return false if a solution could not be found.

+

Attempts to solve the model using the cp-sat solver. As of 5/2019, will +solve the TSP corresponding to the model if it has a single vehicle. +Therefore the resulting solution might not actually be feasible. Will return +false if a solution could not be found.

diff --git a/docs/python/ortools/graph/pywrapgraph.html b/docs/python/ortools/graph/pywrapgraph.html index 36b9c721b9..f91d445a0b 100644 --- a/docs/python/ortools/graph/pywrapgraph.html +++ b/docs/python/ortools/graph/pywrapgraph.html @@ -252,7 +252,7 @@ pywrapgraph
View Source
# This file was automatically generated by SWIG (http://www.swig.org).
-# Version 4.0.1
+# Version 4.0.2
 #
 # Do not make changes to this file unless you know what you are doing--modify
 # the SWIG interface file instead.
diff --git a/docs/python/ortools/linear_solver/pywraplp.html b/docs/python/ortools/linear_solver/pywraplp.html
index 64f7202c0b..1798e2b735 100644
--- a/docs/python/ortools/linear_solver/pywraplp.html
+++ b/docs/python/ortools/linear_solver/pywraplp.html
@@ -585,7 +585,7 @@ pywraplp    
                         
View Source
# This file was automatically generated by SWIG (http://www.swig.org).
-# Version 4.0.1
+# Version 4.0.2
 #
 # Do not make changes to this file unless you know what you are doing--modify
 # the SWIG interface file instead.
@@ -1039,7 +1039,19 @@ pywraplp    
         return _pywraplp.Solver_ExportModelAsMpsFormat(self, fixed_format, obfuscated)
 
     def SetHint(self, variables: "std::vector< operations_research::MPVariable * > const &", values: "std::vector< double > const &") -> "void":
-        r""" Set a hint for solution. If a feasible or almost-feasible solution to the problem is already known, it may be helpful to pass it to the solver so that it can be used. A solver that supports this feature will try to use this information to create its initial feasible solution. Note that it may not always be faster to give a hint like this to the solver. There is also no guarantee that the solver will use this hint or try to return a solution "close" to this assignment in case of multiple optimal solutions."""
+        r"""
+        Set a hint for solution.
+
+        If a feasible or almost-feasible solution to the problem is already known,
+        it may be helpful to pass it to the solver so that it can be used. A
+        solver that supports this feature will try to use this information to
+        create its initial feasible solution.
+
+        Note that it may not always be faster to give a hint like this to the
+        solver. There is also no guarantee that the solver will use this hint or
+        try to return a solution "close" to this assignment in case of multiple
+        optimal solutions.
+        """
         return _pywraplp.Solver_SetHint(self, variables, values)
 
     def SetNumThreads(self, num_theads: "int") -> "bool":
@@ -2012,7 +2024,19 @@ pywraplp    
         return _pywraplp.Solver_ExportModelAsMpsFormat(self, fixed_format, obfuscated)
 
     def SetHint(self, variables: "std::vector< operations_research::MPVariable * > const &", values: "std::vector< double > const &") -> "void":
-        r""" Set a hint for solution. If a feasible or almost-feasible solution to the problem is already known, it may be helpful to pass it to the solver so that it can be used. A solver that supports this feature will try to use this information to create its initial feasible solution. Note that it may not always be faster to give a hint like this to the solver. There is also no guarantee that the solver will use this hint or try to return a solution "close" to this assignment in case of multiple optimal solutions."""
+        r"""
+        Set a hint for solution.
+
+        If a feasible or almost-feasible solution to the problem is already known,
+        it may be helpful to pass it to the solver so that it can be used. A
+        solver that supports this feature will try to use this information to
+        create its initial feasible solution.
+
+        Note that it may not always be faster to give a hint like this to the
+        solver. There is also no guarantee that the solver will use this hint or
+        try to return a solution "close" to this assignment in case of multiple
+        optimal solutions.
+        """
         return _pywraplp.Solver_SetHint(self, variables, values)
 
     def SetNumThreads(self, num_theads: "int") -> "bool":
@@ -3574,13 +3598,35 @@ solvers for multiple solutions. Other solvers return false unconditionally.

View Source
    def SetHint(self, variables: "std::vector< operations_research::MPVariable * > const &", values: "std::vector< double > const &") -> "void":
-        r""" Set a hint for solution. If a feasible or almost-feasible solution to the problem is already known, it may be helpful to pass it to the solver so that it can be used. A solver that supports this feature will try to use this information to create its initial feasible solution. Note that it may not always be faster to give a hint like this to the solver. There is also no guarantee that the solver will use this hint or try to return a solution "close" to this assignment in case of multiple optimal solutions."""
+        r"""
+        Set a hint for solution.
+
+        If a feasible or almost-feasible solution to the problem is already known,
+        it may be helpful to pass it to the solver so that it can be used. A
+        solver that supports this feature will try to use this information to
+        create its initial feasible solution.
+
+        Note that it may not always be faster to give a hint like this to the
+        solver. There is also no guarantee that the solver will use this hint or
+        try to return a solution "close" to this assignment in case of multiple
+        optimal solutions.
+        """
         return _pywraplp.Solver_SetHint(self, variables, values)
 
-

Set a hint for solution. If a feasible or almost-feasible solution to the problem is already known, it may be helpful to pass it to the solver so that it can be used. A solver that supports this feature will try to use this information to create its initial feasible solution. Note that it may not always be faster to give a hint like this to the solver. There is also no guarantee that the solver will use this hint or try to return a solution "close" to this assignment in case of multiple optimal solutions.

+

Set a hint for solution.

+ +

If a feasible or almost-feasible solution to the problem is already known, +it may be helpful to pass it to the solver so that it can be used. A +solver that supports this feature will try to use this information to +create its initial feasible solution.

+ +

Note that it may not always be faster to give a hint like this to the +solver. There is also no guarantee that the solver will use this hint or +try to return a solution "close" to this assignment in case of multiple +optimal solutions.

diff --git a/docs/python/ortools/sat/python/cp_model.html b/docs/python/ortools/sat/python/cp_model.html index 1110ce42a4..c56a04e2f9 100644 --- a/docs/python/ortools/sat/python/cp_model.html +++ b/docs/python/ortools/sat/python/cp_model.html @@ -669,24 +669,32 @@ rather than for solving specific optimization problems.

"""Holds an integer linear expression. A linear expression is built from integer constants and variables. - For example, x + 2 * (y - z + 1). + For example, `x + 2 * (y - z + 1)`. - Linear expressions are used in CP-SAT models in two ways: + Linear expressions are used in CP-SAT models in constraints and in the + objective: - * To define constraints. For example + * You can define linear constraints as in: - model.Add(x + 2 * y <= 5) - model.Add(sum(array_of_vars) == 5) + ``` + model.Add(x + 2 * y <= 5) + model.Add(sum(array_of_vars) == 5) + ``` - * To define the objective function. For example + * In CP-SAT, the objective is a linear expression: - model.Minimize(x + 2 * y + z) + ``` + model.Minimize(x + 2 * y + z) + ``` - For large arrays, you can create constraints and the objective - from lists of linear expressions or coefficients as follows: + * For large arrays, using the LinearExpr class is faster that using the python + `sum()` function. You can create constraints and the objective from lists of + linear expressions or coefficients as follows: - model.Minimize(cp_model.LinearExpr.Sum(expressions)) - model.Add(cp_model.LinearExpr.ScalProd(expressions, coefficients) >= 0) + ``` + model.Minimize(cp_model.LinearExpr.Sum(expressions)) + model.Add(cp_model.LinearExpr.ScalProd(expressions, coefficients) >= 0) + ``` """ @classmethod @@ -2898,24 +2906,32 @@ rather than for solving specific optimization problems.

"""Holds an integer linear expression. A linear expression is built from integer constants and variables. - For example, x + 2 * (y - z + 1). + For example, `x + 2 * (y - z + 1)`. - Linear expressions are used in CP-SAT models in two ways: + Linear expressions are used in CP-SAT models in constraints and in the + objective: - * To define constraints. For example + * You can define linear constraints as in: - model.Add(x + 2 * y <= 5) - model.Add(sum(array_of_vars) == 5) + ``` + model.Add(x + 2 * y <= 5) + model.Add(sum(array_of_vars) == 5) + ``` - * To define the objective function. For example + * In CP-SAT, the objective is a linear expression: - model.Minimize(x + 2 * y + z) + ``` + model.Minimize(x + 2 * y + z) + ``` - For large arrays, you can create constraints and the objective - from lists of linear expressions or coefficients as follows: + * For large arrays, using the LinearExpr class is faster that using the python + `sum()` function. You can create constraints and the objective from lists of + linear expressions or coefficients as follows: - model.Minimize(cp_model.LinearExpr.Sum(expressions)) - model.Add(cp_model.LinearExpr.ScalProd(expressions, coefficients) >= 0) + ``` + model.Minimize(cp_model.LinearExpr.Sum(expressions)) + model.Add(cp_model.LinearExpr.ScalProd(expressions, coefficients) >= 0) + ``` """ @classmethod @@ -3124,22 +3140,31 @@ rather than for solving specific optimization problems.

Holds an integer linear expression.

A linear expression is built from integer constants and variables. -For example, x + 2 * (y - z + 1).

+For example, x + 2 * (y - z + 1).

-

Linear expressions are used in CP-SAT models in two ways:

+

Linear expressions are used in CP-SAT models in constraints and in the +objective:

    -
  • To define constraints. For example

    - -

    model.Add(x + 2 * y <= 5) -model.Add(sum(array_of_vars) == 5)

  • -
  • To define the objective function. For example

    - -

    model.Minimize(x + 2 * y + z)

  • +
  • You can define linear constraints as in:
-

For large arrays, you can create constraints and the objective -from lists of linear expressions or coefficients as follows:

+
model.Add(x + 2 * y <= 5)
+model.Add(sum(array_of_vars) == 5)
+
+ +
    +
  • In CP-SAT, the objective is a linear expression:
  • +
+ +
model.Minimize(x + 2 * y + z)
+
+ +
    +
  • For large arrays, using the LinearExpr class is faster that using the python +sum() function. You can create constraints and the objective from lists of +linear expressions or coefficients as follows:
  • +
model.Minimize(cp_model.LinearExpr.Sum(expressions))
 model.Add(cp_model.LinearExpr.ScalProd(expressions, coefficients) >= 0)
diff --git a/docs/python/ortools/util/sorted_interval_list.html b/docs/python/ortools/util/sorted_interval_list.html
index b3aae30b21..1d6388f1c3 100644
--- a/docs/python/ortools/util/sorted_interval_list.html
+++ b/docs/python/ortools/util/sorted_interval_list.html
@@ -114,7 +114,7 @@ sorted_interval_list    
                         
View Source
# This file was automatically generated by SWIG (http://www.swig.org).
-# Version 4.0.1
+# Version 4.0.2
 #
 # Do not make changes to this file unless you know what you are doing--modify
 # the SWIG interface file instead.
diff --git a/ortools/sat/python/cp_model.py b/ortools/sat/python/cp_model.py
index fe2c8688f8..e87de1d242 100644
--- a/ortools/sat/python/cp_model.py
+++ b/ortools/sat/python/cp_model.py
@@ -149,24 +149,32 @@ class LinearExpr(object):
     """Holds an integer linear expression.
 
   A linear expression is built from integer constants and variables.
-  For example, x + 2 * (y - z + 1).
+  For example, `x + 2 * (y - z + 1)`.
 
-  Linear expressions are used in CP-SAT models in two ways:
+  Linear expressions are used in CP-SAT models in constraints and in the
+  objective:
 
-  * To define constraints. For example
+  * You can define linear constraints as in:
 
-      model.Add(x + 2 * y <= 5)
-      model.Add(sum(array_of_vars) == 5)
+  ```
+  model.Add(x + 2 * y <= 5)
+  model.Add(sum(array_of_vars) == 5)
+  ```
 
-  * To define the objective function. For example
+  * In CP-SAT, the objective is a linear expression:
 
-      model.Minimize(x + 2 * y + z)
+  ```
+  model.Minimize(x + 2 * y + z)
+  ```
 
-  For large arrays, you can create constraints and the objective
-  from lists of linear expressions or coefficients as follows:
+  * For large arrays, using the LinearExpr class is faster that using the python
+  `sum()` function. You can create constraints and the objective from lists of
+  linear expressions or coefficients as follows:
 
-      model.Minimize(cp_model.LinearExpr.Sum(expressions))
-      model.Add(cp_model.LinearExpr.ScalProd(expressions, coefficients) >= 0)
+  ```
+  model.Minimize(cp_model.LinearExpr.Sum(expressions))
+  model.Add(cp_model.LinearExpr.ScalProd(expressions, coefficients) >= 0)
+  ```
   """
 
     @classmethod