diff --git a/ortools/constraint_solver/doc/routing_svg.py b/ortools/constraint_solver/doc/routing_svg.py
index 754c59809d..8e2610cd3d 100755
--- a/ortools/constraint_solver/doc/routing_svg.py
+++ b/ortools/constraint_solver/doc/routing_svg.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# Copyright 2010-2021 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -570,7 +571,7 @@ class SVGPrinter(object): # pylint: disable=too-many-instance-attributes
# First print route
previous_loc_idx = None
for loc_idx in route:
- if previous_loc_idx and previous_loc_idx != loc_idx:
+ if previous_loc_idx != None and previous_loc_idx != loc_idx:
self._svg.draw_polyline(self._data.locations[previous_loc_idx],
self._data.locations[loc_idx],
self._stroke_width, color, colorname)
@@ -833,10 +834,10 @@ def main(): # pylint: disable=too-many-locals,too-many-branches
distance_dimension.CumulVar(delivery_index))
if args['fifo']:
routing.SetPickupAndDeliveryPolicyOfAllVehicles(
- pywrapcp.RoutingModel.FIFO)
+ pywrapcp.RoutingModel.PICKUP_AND_DELIVERY_FIFO)
if args['lifo']:
routing.SetPickupAndDeliveryPolicyOfAllVehicles(
- pywrapcp.RoutingModel.LIFO)
+ pywrapcp.RoutingModel.PICKUP_AND_DELIVERY_LIFO)
if args['starts_ends']:
dimension_name = 'Distance'
diff --git a/ortools/constraint_solver/doc/tsp_distance_matrix_solution.svg b/ortools/constraint_solver/doc/tsp_distance_matrix_solution.svg
index b91a3132d8..f68bf820c0 100644
--- a/ortools/constraint_solver/doc/tsp_distance_matrix_solution.svg
+++ b/ortools/constraint_solver/doc/tsp_distance_matrix_solution.svg
@@ -41,7 +41,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
-
+
diff --git a/ortools/constraint_solver/doc/tsp_solution.svg b/ortools/constraint_solver/doc/tsp_solution.svg
index b91a3132d8..f68bf820c0 100644
--- a/ortools/constraint_solver/doc/tsp_solution.svg
+++ b/ortools/constraint_solver/doc/tsp_solution.svg
@@ -41,7 +41,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
-
+
diff --git a/ortools/constraint_solver/doc/vrp_capacity_solution.svg b/ortools/constraint_solver/doc/vrp_capacity_solution.svg
index c95a1e47c6..21cf1f915e 100644
--- a/ortools/constraint_solver/doc/vrp_capacity_solution.svg
+++ b/ortools/constraint_solver/doc/vrp_capacity_solution.svg
@@ -41,7 +41,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
-
+
@@ -55,7 +55,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
1
7
-
+
@@ -69,7 +69,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
10
9
-
+
@@ -83,7 +83,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
15
13
-
+
diff --git a/ortools/constraint_solver/doc/vrp_drop_nodes_solution.svg b/ortools/constraint_solver/doc/vrp_drop_nodes_solution.svg
index e173c26de4..cbb33a2f3b 100644
--- a/ortools/constraint_solver/doc/vrp_drop_nodes_solution.svg
+++ b/ortools/constraint_solver/doc/vrp_drop_nodes_solution.svg
@@ -41,7 +41,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
-
+
@@ -52,7 +52,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
14
9
-
+
@@ -69,7 +69,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
11
12
-
+
@@ -77,7 +77,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
7
13
-
+
diff --git a/ortools/constraint_solver/doc/vrp_global_span_solution.svg b/ortools/constraint_solver/doc/vrp_global_span_solution.svg
index 48d29561af..8fa10ff130 100644
--- a/ortools/constraint_solver/doc/vrp_global_span_solution.svg
+++ b/ortools/constraint_solver/doc/vrp_global_span_solution.svg
@@ -41,7 +41,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
-
+
@@ -55,7 +55,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
2
5
-
+
@@ -69,7 +69,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
4
3
-
+
@@ -83,7 +83,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
16
14
-
+
diff --git a/ortools/constraint_solver/doc/vrp_pickup_delivery_fifo_solution.svg b/ortools/constraint_solver/doc/vrp_pickup_delivery_fifo_solution.svg
index 49cc99d79b..7e67e6f437 100644
--- a/ortools/constraint_solver/doc/vrp_pickup_delivery_fifo_solution.svg
+++ b/ortools/constraint_solver/doc/vrp_pickup_delivery_fifo_solution.svg
@@ -41,7 +41,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
-
+
@@ -55,7 +55,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
6
9
-
+
@@ -69,7 +69,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
2
10
-
+
@@ -83,7 +83,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
13
12
-
+
diff --git a/ortools/constraint_solver/doc/vrp_pickup_delivery_lifo_solution.svg b/ortools/constraint_solver/doc/vrp_pickup_delivery_lifo_solution.svg
index 4a2d2ec6e4..d9d2905f69 100644
--- a/ortools/constraint_solver/doc/vrp_pickup_delivery_lifo_solution.svg
+++ b/ortools/constraint_solver/doc/vrp_pickup_delivery_lifo_solution.svg
@@ -41,7 +41,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
-
+
@@ -55,7 +55,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
13
12
-
+
@@ -69,7 +69,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
10
9
-
+
@@ -83,7 +83,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
15
11
-
+
diff --git a/ortools/constraint_solver/doc/vrp_pickup_delivery_solution.svg b/ortools/constraint_solver/doc/vrp_pickup_delivery_solution.svg
index 4a2d2ec6e4..d9d2905f69 100644
--- a/ortools/constraint_solver/doc/vrp_pickup_delivery_solution.svg
+++ b/ortools/constraint_solver/doc/vrp_pickup_delivery_solution.svg
@@ -41,7 +41,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
-
+
@@ -55,7 +55,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
13
12
-
+
@@ -69,7 +69,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
10
9
-
+
@@ -83,7 +83,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
15
11
-
+
diff --git a/ortools/constraint_solver/doc/vrp_resources_solution.svg b/ortools/constraint_solver/doc/vrp_resources_solution.svg
index 9b4cf596a7..1315aa4bd6 100644
--- a/ortools/constraint_solver/doc/vrp_resources_solution.svg
+++ b/ortools/constraint_solver/doc/vrp_resources_solution.svg
@@ -41,7 +41,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
-
+
@@ -52,7 +52,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
14
16
-
+
@@ -66,7 +66,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
15
11
-
+
@@ -80,7 +80,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
4
3
-
+
@@ -124,7 +124,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
[8]
[11]
[13]
-[20]
+[25]
[0]
[4]
@@ -138,7 +138,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
[11]
[13]
[14]
-[25]
+[24]
[0]
[2]
@@ -146,5 +146,5 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
[6]
[10]
[14]
-[25]
+[29]
diff --git a/ortools/constraint_solver/doc/vrp_solution.svg b/ortools/constraint_solver/doc/vrp_solution.svg
index 0450e2477b..c02a81fb9e 100644
--- a/ortools/constraint_solver/doc/vrp_solution.svg
+++ b/ortools/constraint_solver/doc/vrp_solution.svg
@@ -41,10 +41,10 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
-
-
-
-
+
+
+
+
diff --git a/ortools/constraint_solver/doc/vrp_starts_ends_solution.svg b/ortools/constraint_solver/doc/vrp_starts_ends_solution.svg
index 4806136ca4..31223c03ce 100644
--- a/ortools/constraint_solver/doc/vrp_starts_ends_solution.svg
+++ b/ortools/constraint_solver/doc/vrp_starts_ends_solution.svg
@@ -41,7 +41,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
-
+
@@ -54,7 +54,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
3
7
-
+
@@ -67,7 +67,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
8
5
-
+
@@ -80,7 +80,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
12
13
-
+
diff --git a/ortools/constraint_solver/doc/vrp_time_windows_solution.svg b/ortools/constraint_solver/doc/vrp_time_windows_solution.svg
index 362fbb1056..c211dd8542 100644
--- a/ortools/constraint_solver/doc/vrp_time_windows_solution.svg
+++ b/ortools/constraint_solver/doc/vrp_time_windows_solution.svg
@@ -41,7 +41,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
-
+
@@ -52,7 +52,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
14
16
-
+
@@ -66,7 +66,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
3
1
-
+
@@ -80,7 +80,7 @@ width="1022.6666666666666" height="750.6666666666666" viewBox="-55.3333333333333
15
11
-
+