diff --git a/examples/notebook/algorithms/knapsack.ipynb b/examples/notebook/algorithms/knapsack.ipynb index 2d6ceebe07..b22a4d317a 100644 --- a/examples/notebook/algorithms/knapsack.ipynb +++ b/examples/notebook/algorithms/knapsack.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -82,7 +82,6 @@ "\"\"\"A simple knapsack problem.\"\"\"\n", "# [START program]\n", "# [START import]\n", - "from __future__ import print_function\n", "from ortools.algorithms import pywrapknapsack_solver\n", "# [END import]\n", "\n", diff --git a/examples/notebook/algorithms/simple_knapsack_program.ipynb b/examples/notebook/algorithms/simple_knapsack_program.ipynb index d4274811b1..f1e5fecc51 100644 --- a/examples/notebook/algorithms/simple_knapsack_program.ipynb +++ b/examples/notebook/algorithms/simple_knapsack_program.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -82,7 +82,6 @@ "# [START program]\n", "\"\"\"A simple knapsack problem.\"\"\"\n", "# [START import]\n", - "from __future__ import print_function\n", "from ortools.algorithms import pywrapknapsack_solver\n", "# [END import]\n", "\n", diff --git a/examples/notebook/constraint_solver/cvrp.ipynb b/examples/notebook/constraint_solver/cvrp.ipynb index 45eaa4cb41..2dc361d39a 100644 --- a/examples/notebook/constraint_solver/cvrp.ipynb +++ b/examples/notebook/constraint_solver/cvrp.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -92,10 +92,8 @@ " Distances are in meters.\n", "\"\"\"\n", "\n", - "from __future__ import print_function\n", "\n", "from functools import partial\n", - "from six.moves import xrange\n", "\n", "from ortools.constraint_solver import pywrapcp\n", "from ortools.constraint_solver import routing_enums_pb2\n", @@ -153,9 +151,9 @@ " \"\"\"Creates callback to return distance between points.\"\"\"\n", " _distances = {}\n", " # precompute distance between location to have distance callback in O(1)\n", - " for from_node in xrange(data['num_locations']):\n", + " for from_node in range(data['num_locations']):\n", " _distances[from_node] = {}\n", - " for to_node in xrange(data['num_locations']):\n", + " for to_node in range(data['num_locations']):\n", " if from_node == to_node:\n", " _distances[from_node][to_node] = 0\n", " else:\n", @@ -201,7 +199,7 @@ " total_distance = 0\n", " total_load = 0\n", " capacity_dimension = routing.GetDimensionOrDie('Capacity')\n", - " for vehicle_id in xrange(data['num_vehicles']):\n", + " for vehicle_id in range(data['num_vehicles']):\n", " index = routing.Start(vehicle_id)\n", " plan_output = 'Route for vehicle {}:\\n'.format(vehicle_id)\n", " distance = 0\n", diff --git a/examples/notebook/constraint_solver/cvrp_reload.ipynb b/examples/notebook/constraint_solver/cvrp_reload.ipynb index c1ba005c45..82b8a28766 100644 --- a/examples/notebook/constraint_solver/cvrp_reload.ipynb +++ b/examples/notebook/constraint_solver/cvrp_reload.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -92,10 +92,8 @@ " Distances are in meters.\n", "\"\"\"\n", "\n", - "from __future__ import print_function\n", "\n", "from functools import partial\n", - "from six.moves import xrange\n", "\n", "from ortools.constraint_solver import pywrapcp\n", "from ortools.constraint_solver import routing_enums_pb2\n", @@ -191,9 +189,9 @@ " \"\"\"Creates callback to return distance between points.\"\"\"\n", " _distances = {}\n", " # precompute distance between location to have distance callback in O(1)\n", - " for from_node in xrange(data['num_locations']):\n", + " for from_node in range(data['num_locations']):\n", " _distances[from_node] = {}\n", - " for to_node in xrange(data['num_locations']):\n", + " for to_node in range(data['num_locations']):\n", " if from_node == to_node:\n", " _distances[from_node][to_node] = 0\n", " else:\n", @@ -273,9 +271,9 @@ "\n", " _total_time = {}\n", " # precompute total time to have time callback in O(1)\n", - " for from_node in xrange(data['num_locations']):\n", + " for from_node in range(data['num_locations']):\n", " _total_time[from_node] = {}\n", - " for to_node in xrange(data['num_locations']):\n", + " for to_node in range(data['num_locations']):\n", " if from_node == to_node:\n", " _total_time[from_node][to_node] = 0\n", " else:\n", @@ -312,7 +310,7 @@ " routing.AddToAssignment(time_dimension.SlackVar(index))\n", " # Add time window constraints for each vehicle start node\n", " # and 'copy' the slack var in the solution object (aka Assignment) to print it\n", - " for vehicle_id in xrange(data['num_vehicles']):\n", + " for vehicle_id in range(data['num_vehicles']):\n", " index = routing.Start(vehicle_id)\n", " time_dimension.CumulVar(index).SetRange(data['time_windows'][0][0],\n", " data['time_windows'][0][1])\n", @@ -333,13 +331,13 @@ " capacity_dimension = routing.GetDimensionOrDie('Capacity')\n", " time_dimension = routing.GetDimensionOrDie('Time')\n", " dropped = []\n", - " for order in xrange(0, routing.nodes()):\n", + " for order in range(0, routing.nodes()):\n", " index = manager.NodeToIndex(order)\n", " if assignment.Value(routing.NextVar(index)) == index:\n", " dropped.append(order)\n", " print('dropped orders: {}'.format(dropped))\n", "\n", - " for vehicle_id in xrange(data['num_vehicles']):\n", + " for vehicle_id in range(data['num_vehicles']):\n", " index = routing.Start(vehicle_id)\n", " plan_output = 'Route for vehicle {}:\\n'.format(vehicle_id)\n", " distance = 0\n", diff --git a/examples/notebook/constraint_solver/cvrptw.ipynb b/examples/notebook/constraint_solver/cvrptw.ipynb index bea4fa32a0..62b4dd3b22 100644 --- a/examples/notebook/constraint_solver/cvrptw.ipynb +++ b/examples/notebook/constraint_solver/cvrptw.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -92,10 +92,8 @@ " Distances are in meters and time in minutes.\n", "\"\"\"\n", "\n", - "from __future__ import print_function\n", "\n", "from functools import partial\n", - "from six.moves import xrange\n", "\n", "from ortools.constraint_solver import pywrapcp\n", "from ortools.constraint_solver import routing_enums_pb2\n", @@ -165,9 +163,9 @@ " \"\"\"Creates callback to return distance between points.\"\"\"\n", " _distances = {}\n", " # precompute distance between location to have distance callback in O(1)\n", - " for from_node in xrange(data['num_locations']):\n", + " for from_node in range(data['num_locations']):\n", " _distances[from_node] = {}\n", - " for to_node in xrange(data['num_locations']):\n", + " for to_node in range(data['num_locations']):\n", " if from_node == to_node:\n", " _distances[from_node][to_node] = 0\n", " else:\n", @@ -222,9 +220,9 @@ "\n", " _total_time = {}\n", " # precompute total time to have time callback in O(1)\n", - " for from_node in xrange(data['num_locations']):\n", + " for from_node in range(data['num_locations']):\n", " _total_time[from_node] = {}\n", - " for to_node in xrange(data['num_locations']):\n", + " for to_node in range(data['num_locations']):\n", " if from_node == to_node:\n", " _total_time[from_node][to_node] = 0\n", " else:\n", @@ -261,7 +259,7 @@ " routing.AddToAssignment(time_dimension.SlackVar(index))\n", " # Add time window constraints for each vehicle start node\n", " # and 'copy' the slack var in the solution object (aka Assignment) to print it\n", - " for vehicle_id in xrange(data['num_vehicles']):\n", + " for vehicle_id in range(data['num_vehicles']):\n", " index = routing.Start(vehicle_id)\n", " time_dimension.CumulVar(index).SetRange(data['time_windows'][0][0],\n", " data['time_windows'][0][1])\n", @@ -281,7 +279,7 @@ " total_time = 0\n", " capacity_dimension = routing.GetDimensionOrDie('Capacity')\n", " time_dimension = routing.GetDimensionOrDie('Time')\n", - " for vehicle_id in xrange(data['num_vehicles']):\n", + " for vehicle_id in range(data['num_vehicles']):\n", " index = routing.Start(vehicle_id)\n", " plan_output = 'Route for vehicle {}:\\n'.format(vehicle_id)\n", " distance = 0\n", diff --git a/examples/notebook/constraint_solver/cvrptw_break.ipynb b/examples/notebook/constraint_solver/cvrptw_break.ipynb index a98a6a7207..1ace4c99a2 100644 --- a/examples/notebook/constraint_solver/cvrptw_break.ipynb +++ b/examples/notebook/constraint_solver/cvrptw_break.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -92,10 +92,8 @@ " Distances are in meters and time in minutes.\n", "\"\"\"\n", "\n", - "from __future__ import print_function\n", "\n", "from functools import partial\n", - "from six.moves import xrange\n", "\n", "from ortools.constraint_solver import pywrapcp\n", "from ortools.constraint_solver import routing_enums_pb2\n", @@ -166,9 +164,9 @@ " \"\"\"Creates callback to return distance between points.\"\"\"\n", " _distances = {}\n", " # precompute distance between location to have distance callback in O(1)\n", - " for from_node in xrange(data['num_locations']):\n", + " for from_node in range(data['num_locations']):\n", " _distances[from_node] = {}\n", - " for to_node in xrange(data['num_locations']):\n", + " for to_node in range(data['num_locations']):\n", " if from_node == to_node:\n", " _distances[from_node][to_node] = 0\n", " else:\n", @@ -223,9 +221,9 @@ "\n", " _total_time = {}\n", " # precompute total time to have time callback in O(1)\n", - " for from_node in xrange(data['num_locations']):\n", + " for from_node in range(data['num_locations']):\n", " _total_time[from_node] = {}\n", - " for to_node in xrange(data['num_locations']):\n", + " for to_node in range(data['num_locations']):\n", " if from_node == to_node:\n", " _total_time[from_node][to_node] = 0\n", " else:\n", @@ -262,7 +260,7 @@ " routing.AddToAssignment(time_dimension.SlackVar(index))\n", " # Add time window constraints for each vehicle start node\n", " # and 'copy' the slack var in the solution object (aka Assignment) to print it\n", - " for vehicle_id in xrange(data['num_vehicles']):\n", + " for vehicle_id in range(data['num_vehicles']):\n", " index = routing.Start(vehicle_id)\n", " time_dimension.CumulVar(index).SetRange(data['time_windows'][0][0],\n", " data['time_windows'][0][1])\n", @@ -280,7 +278,7 @@ "\n", " print('Breaks:')\n", " intervals = assignment.IntervalVarContainer()\n", - " for i in xrange(intervals.Size()):\n", + " for i in range(intervals.Size()):\n", " brk = intervals.Element(i)\n", " if brk.PerformedValue() == 1:\n", " print('{}: Start({}) Duration({})'.format(\n", @@ -295,7 +293,7 @@ " total_time = 0\n", " capacity_dimension = routing.GetDimensionOrDie('Capacity')\n", " time_dimension = routing.GetDimensionOrDie('Time')\n", - " for vehicle_id in xrange(data['num_vehicles']):\n", + " for vehicle_id in range(data['num_vehicles']):\n", " index = routing.Start(vehicle_id)\n", " plan_output = 'Route for vehicle {}:\\n'.format(vehicle_id)\n", " distance = 0\n", @@ -366,7 +364,7 @@ "# Add breaks\n", "time_dimension = routing.GetDimensionOrDie(\"Time\")\n", "node_visit_transit = {}\n", - "for n in xrange(routing.Size()):\n", + "for n in range(routing.Size()):\n", " if n >= data['num_locations']:\n", " node_visit_transit[n] = 0\n", " else:\n", @@ -374,7 +372,7 @@ " data['demands'][n] * data['time_per_demand_unit'])\n", "\n", "break_intervals = {}\n", - "#for v in xrange(data['num_vehicles']):\n", + "#for v in range(data['num_vehicles']):\n", "for v in [0]:\n", " vehicle_break = data['breaks'][v]\n", " break_intervals[v] = [\n", diff --git a/examples/notebook/constraint_solver/simple_cp_program.ipynb b/examples/notebook/constraint_solver/simple_cp_program.ipynb index 697f2d8179..1f89e89671 100644 --- a/examples/notebook/constraint_solver/simple_cp_program.ipynb +++ b/examples/notebook/constraint_solver/simple_cp_program.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -83,7 +83,6 @@ "\"\"\"Simple Constraint optimization example.\"\"\"\n", "\n", "# [START import]\n", - "from __future__ import print_function\n", "from ortools.constraint_solver import pywrapcp\n", "# [END import]\n", "\n", diff --git a/examples/notebook/constraint_solver/simple_routing_program.ipynb b/examples/notebook/constraint_solver/simple_routing_program.ipynb index 883302541d..63d065c16e 100644 --- a/examples/notebook/constraint_solver/simple_routing_program.ipynb +++ b/examples/notebook/constraint_solver/simple_routing_program.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -83,7 +83,6 @@ "\"\"\"Vehicle Routing example.\"\"\"\n", "\n", "# [START import]\n", - "from __future__ import print_function\n", "from ortools.constraint_solver import routing_enums_pb2\n", "from ortools.constraint_solver import pywrapcp\n", "# [END import]\n", diff --git a/examples/notebook/constraint_solver/tsp.ipynb b/examples/notebook/constraint_solver/tsp.ipynb index 33d712424f..c932a1247b 100644 --- a/examples/notebook/constraint_solver/tsp.ipynb +++ b/examples/notebook/constraint_solver/tsp.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -87,7 +87,6 @@ "\"\"\"\n", "\n", "# [START import]\n", - "from __future__ import print_function\n", "from ortools.constraint_solver import routing_enums_pb2\n", "from ortools.constraint_solver import pywrapcp\n", "# [END import]\n", diff --git a/examples/notebook/constraint_solver/tsp_circuit_board.ipynb b/examples/notebook/constraint_solver/tsp_circuit_board.ipynb index 876ead1608..a312710b7b 100644 --- a/examples/notebook/constraint_solver/tsp_circuit_board.ipynb +++ b/examples/notebook/constraint_solver/tsp_circuit_board.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -83,7 +83,6 @@ "\"\"\"Simple travelling salesman problem on a circuit board.\"\"\"\n", "\n", "# [START import]\n", - "from __future__ import print_function\n", "import math\n", "from ortools.constraint_solver import routing_enums_pb2\n", "from ortools.constraint_solver import pywrapcp\n", diff --git a/examples/notebook/constraint_solver/tsp_cities.ipynb b/examples/notebook/constraint_solver/tsp_cities.ipynb index 37fac83208..0959509a43 100644 --- a/examples/notebook/constraint_solver/tsp_cities.ipynb +++ b/examples/notebook/constraint_solver/tsp_cities.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -83,7 +83,6 @@ "\"\"\"Simple travelling salesman problem between cities.\"\"\"\n", "\n", "# [START import]\n", - "from __future__ import print_function\n", "from ortools.constraint_solver import routing_enums_pb2\n", "from ortools.constraint_solver import pywrapcp\n", "\n", diff --git a/examples/notebook/constraint_solver/tsp_distance_matrix.ipynb b/examples/notebook/constraint_solver/tsp_distance_matrix.ipynb index e27f595579..806fb587c4 100644 --- a/examples/notebook/constraint_solver/tsp_distance_matrix.ipynb +++ b/examples/notebook/constraint_solver/tsp_distance_matrix.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -83,7 +83,6 @@ "\"\"\"Simple Travelling Salesman Problem.\"\"\"\n", "\n", "# [START import]\n", - "from __future__ import print_function\n", "from ortools.constraint_solver import routing_enums_pb2\n", "from ortools.constraint_solver import pywrapcp\n", "# [END import]\n", diff --git a/examples/notebook/constraint_solver/vrp.ipynb b/examples/notebook/constraint_solver/vrp.ipynb index 639e3027e4..1e5286109e 100644 --- a/examples/notebook/constraint_solver/vrp.ipynb +++ b/examples/notebook/constraint_solver/vrp.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -83,7 +83,6 @@ "\"\"\"Simple Vehicles Routing Problem.\"\"\"\n", "\n", "# [START import]\n", - "from __future__ import print_function\n", "from ortools.constraint_solver import routing_enums_pb2\n", "from ortools.constraint_solver import pywrapcp\n", "# [END import]\n", diff --git a/examples/notebook/constraint_solver/vrp_capacity.ipynb b/examples/notebook/constraint_solver/vrp_capacity.ipynb index 2dfc125a1b..82e41c4c6a 100644 --- a/examples/notebook/constraint_solver/vrp_capacity.ipynb +++ b/examples/notebook/constraint_solver/vrp_capacity.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -83,7 +83,6 @@ "\"\"\"Capacited Vehicles Routing Problem (CVRP).\"\"\"\n", "\n", "# [START import]\n", - "from __future__ import print_function\n", "from ortools.constraint_solver import routing_enums_pb2\n", "from ortools.constraint_solver import pywrapcp\n", "# [END import]\n", diff --git a/examples/notebook/constraint_solver/vrp_drop_nodes.ipynb b/examples/notebook/constraint_solver/vrp_drop_nodes.ipynb index 470f0e0427..980e8f25e6 100644 --- a/examples/notebook/constraint_solver/vrp_drop_nodes.ipynb +++ b/examples/notebook/constraint_solver/vrp_drop_nodes.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -83,7 +83,6 @@ "\"\"\"Capacited Vehicles Routing Problem (CVRP).\"\"\"\n", "\n", "# [START import]\n", - "from __future__ import print_function\n", "from ortools.constraint_solver import routing_enums_pb2\n", "from ortools.constraint_solver import pywrapcp\n", "# [END import]\n", diff --git a/examples/notebook/constraint_solver/vrp_global_span.ipynb b/examples/notebook/constraint_solver/vrp_global_span.ipynb index d6ecbd2586..38e296fa7b 100644 --- a/examples/notebook/constraint_solver/vrp_global_span.ipynb +++ b/examples/notebook/constraint_solver/vrp_global_span.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -83,7 +83,6 @@ "\"\"\"Vehicles Routing Problem (VRP).\"\"\"\n", "\n", "# [START import]\n", - "from __future__ import print_function\n", "from ortools.constraint_solver import routing_enums_pb2\n", "from ortools.constraint_solver import pywrapcp\n", "# [END import]\n", diff --git a/examples/notebook/constraint_solver/vrp_initial_routes.ipynb b/examples/notebook/constraint_solver/vrp_initial_routes.ipynb index 9a8ec99211..3af95990a6 100644 --- a/examples/notebook/constraint_solver/vrp_initial_routes.ipynb +++ b/examples/notebook/constraint_solver/vrp_initial_routes.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -83,7 +83,6 @@ "\"\"\"Vehicles Routing Problem (VRP).\"\"\"\n", "\n", "# [START import]\n", - "from __future__ import print_function\n", "from ortools.constraint_solver import pywrapcp\n", "\n", "# [END import]\n", diff --git a/examples/notebook/constraint_solver/vrp_pickup_delivery.ipynb b/examples/notebook/constraint_solver/vrp_pickup_delivery.ipynb index 00da858cd3..16e894372b 100644 --- a/examples/notebook/constraint_solver/vrp_pickup_delivery.ipynb +++ b/examples/notebook/constraint_solver/vrp_pickup_delivery.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -83,7 +83,6 @@ "\"\"\"Simple Pickup Delivery Problem (PDP).\"\"\"\n", "\n", "# [START import]\n", - "from __future__ import print_function\n", "from ortools.constraint_solver import routing_enums_pb2\n", "from ortools.constraint_solver import pywrapcp\n", "# [END import]\n", diff --git a/examples/notebook/constraint_solver/vrp_pickup_delivery_fifo.ipynb b/examples/notebook/constraint_solver/vrp_pickup_delivery_fifo.ipynb index 10cc9b63e1..1727d6abf4 100644 --- a/examples/notebook/constraint_solver/vrp_pickup_delivery_fifo.ipynb +++ b/examples/notebook/constraint_solver/vrp_pickup_delivery_fifo.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -83,7 +83,6 @@ "\"\"\"Simple Pickup Delivery Problem (PDP).\"\"\"\n", "\n", "# [START import]\n", - "from __future__ import print_function\n", "from ortools.constraint_solver import routing_enums_pb2\n", "from ortools.constraint_solver import pywrapcp\n", "# [END import]\n", diff --git a/examples/notebook/constraint_solver/vrp_pickup_delivery_lifo.ipynb b/examples/notebook/constraint_solver/vrp_pickup_delivery_lifo.ipynb index 1d951b1837..38f8093618 100644 --- a/examples/notebook/constraint_solver/vrp_pickup_delivery_lifo.ipynb +++ b/examples/notebook/constraint_solver/vrp_pickup_delivery_lifo.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -83,7 +83,6 @@ "\"\"\"Simple Pickup Delivery Problem (PDP).\"\"\"\n", "\n", "# [START import]\n", - "from __future__ import print_function\n", "from ortools.constraint_solver import routing_enums_pb2\n", "from ortools.constraint_solver import pywrapcp\n", "# [END import]\n", diff --git a/examples/notebook/constraint_solver/vrp_resources.ipynb b/examples/notebook/constraint_solver/vrp_resources.ipynb index e260603719..d97acf9717 100644 --- a/examples/notebook/constraint_solver/vrp_resources.ipynb +++ b/examples/notebook/constraint_solver/vrp_resources.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -83,7 +83,6 @@ "\"\"\"Vehicles Routing Problem (VRP) with Resource Constraints.\"\"\"\n", "\n", "# [START import]\n", - "from __future__ import print_function\n", "from ortools.constraint_solver import routing_enums_pb2\n", "from ortools.constraint_solver import pywrapcp\n", "# [END import]\n", diff --git a/examples/notebook/constraint_solver/vrp_starts_ends.ipynb b/examples/notebook/constraint_solver/vrp_starts_ends.ipynb index 3497a82435..4368de7441 100644 --- a/examples/notebook/constraint_solver/vrp_starts_ends.ipynb +++ b/examples/notebook/constraint_solver/vrp_starts_ends.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -83,7 +83,6 @@ "\"\"\"Simple Vehicles Routing Problem.\"\"\"\n", "\n", "# [START import]\n", - "from __future__ import print_function\n", "from ortools.constraint_solver import routing_enums_pb2\n", "from ortools.constraint_solver import pywrapcp\n", "# [END import]\n", diff --git a/examples/notebook/constraint_solver/vrp_time_windows.ipynb b/examples/notebook/constraint_solver/vrp_time_windows.ipynb index 2d6b61ec6f..b87d30f44d 100644 --- a/examples/notebook/constraint_solver/vrp_time_windows.ipynb +++ b/examples/notebook/constraint_solver/vrp_time_windows.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -83,7 +83,6 @@ "\"\"\"Vehicles Routing Problem (VRP) with Time Windows.\"\"\"\n", "\n", "# [START import]\n", - "from __future__ import print_function\n", "from ortools.constraint_solver import routing_enums_pb2\n", "from ortools.constraint_solver import pywrapcp\n", "# [END import]\n", diff --git a/examples/notebook/constraint_solver/vrp_with_time_limit.ipynb b/examples/notebook/constraint_solver/vrp_with_time_limit.ipynb index 6e60ec0b53..4c846b6704 100644 --- a/examples/notebook/constraint_solver/vrp_with_time_limit.ipynb +++ b/examples/notebook/constraint_solver/vrp_with_time_limit.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -83,7 +83,6 @@ "\"\"\"Vehicles Routing Problem (VRP).\"\"\"\n", "\n", "# [START import]\n", - "from __future__ import print_function\n", "from ortools.constraint_solver import routing_enums_pb2\n", "from ortools.constraint_solver import pywrapcp\n", "# [END import]\n", diff --git a/examples/notebook/constraint_solver/vrpgs.ipynb b/examples/notebook/constraint_solver/vrpgs.ipynb index 3884bd887c..bbbc21b1d9 100644 --- a/examples/notebook/constraint_solver/vrpgs.ipynb +++ b/examples/notebook/constraint_solver/vrpgs.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -92,10 +92,8 @@ " Distances are in meters.\n", "\"\"\"\n", "\n", - "from __future__ import print_function\n", "\n", "from functools import partial\n", - "from six.moves import xrange\n", "\n", "from ortools.constraint_solver import pywrapcp\n", "from ortools.constraint_solver import routing_enums_pb2\n", @@ -142,9 +140,9 @@ " \"\"\"Creates callback to return distance between points.\"\"\"\n", " _distances = {}\n", " # precompute distance between location to have distance callback in O(1)\n", - " for from_node in xrange(data['num_locations']):\n", + " for from_node in range(data['num_locations']):\n", " _distances[from_node] = {}\n", - " for to_node in xrange(data['num_locations']):\n", + " for to_node in range(data['num_locations']):\n", " if from_node == to_node:\n", " _distances[from_node][to_node] = 0\n", " else:\n", @@ -181,7 +179,7 @@ " \"\"\"Prints assignment on console\"\"\"\n", " print('Objective: {}'.format(assignment.ObjectiveValue()))\n", " total_distance = 0\n", - " for vehicle_id in xrange(data['num_vehicles']):\n", + " for vehicle_id in range(data['num_vehicles']):\n", " index = routing.Start(vehicle_id)\n", " plan_output = 'Route for vehicle {}:\\n'.format(vehicle_id)\n", " distance = 0\n", diff --git a/examples/notebook/contrib/3_jugs_mip.ipynb b/examples/notebook/contrib/3_jugs_mip.ipynb index ae9deb20f9..49f9cc39ff 100644 --- a/examples/notebook/contrib/3_jugs_mip.ipynb +++ b/examples/notebook/contrib/3_jugs_mip.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/3_jugs_regular.ipynb b/examples/notebook/contrib/3_jugs_regular.ipynb index a49e68793e..9d1abadc52 100644 --- a/examples/notebook/contrib/3_jugs_regular.ipynb +++ b/examples/notebook/contrib/3_jugs_regular.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/a_round_of_golf.ipynb b/examples/notebook/contrib/a_round_of_golf.ipynb index a3dd1c5877..11fda6415c 100644 --- a/examples/notebook/contrib/a_round_of_golf.ipynb +++ b/examples/notebook/contrib/a_round_of_golf.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/all_interval.ipynb b/examples/notebook/contrib/all_interval.ipynb index a3daac6670..fe1cb4ae45 100644 --- a/examples/notebook/contrib/all_interval.ipynb +++ b/examples/notebook/contrib/all_interval.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/alldifferent_except_0.ipynb b/examples/notebook/contrib/alldifferent_except_0.ipynb index 315f6964a0..8b050d78ff 100644 --- a/examples/notebook/contrib/alldifferent_except_0.ipynb +++ b/examples/notebook/contrib/alldifferent_except_0.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/alphametic.ipynb b/examples/notebook/contrib/alphametic.ipynb index ba3159ef98..7c426c43e5 100644 --- a/examples/notebook/contrib/alphametic.ipynb +++ b/examples/notebook/contrib/alphametic.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/assignment.ipynb b/examples/notebook/contrib/assignment.ipynb index a8961d6b6a..6aa2f53698 100644 --- a/examples/notebook/contrib/assignment.ipynb +++ b/examples/notebook/contrib/assignment.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/assignment6_mip.ipynb b/examples/notebook/contrib/assignment6_mip.ipynb index 3e8a955e13..5ce416afa2 100644 --- a/examples/notebook/contrib/assignment6_mip.ipynb +++ b/examples/notebook/contrib/assignment6_mip.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/bacp.ipynb b/examples/notebook/contrib/bacp.ipynb index 8d8ec07d63..31656a9b12 100644 --- a/examples/notebook/contrib/bacp.ipynb +++ b/examples/notebook/contrib/bacp.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/blending.ipynb b/examples/notebook/contrib/blending.ipynb index d0edd303d0..43ca36951f 100644 --- a/examples/notebook/contrib/blending.ipynb +++ b/examples/notebook/contrib/blending.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/broken_weights.ipynb b/examples/notebook/contrib/broken_weights.ipynb index 19ef0f33f4..a7f064a917 100644 --- a/examples/notebook/contrib/broken_weights.ipynb +++ b/examples/notebook/contrib/broken_weights.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/bus_schedule.ipynb b/examples/notebook/contrib/bus_schedule.ipynb index 05c832975c..ddb99076d2 100644 --- a/examples/notebook/contrib/bus_schedule.ipynb +++ b/examples/notebook/contrib/bus_schedule.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/car.ipynb b/examples/notebook/contrib/car.ipynb index 2b0720b710..124472fe4b 100644 --- a/examples/notebook/contrib/car.ipynb +++ b/examples/notebook/contrib/car.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/check_dependencies.ipynb b/examples/notebook/contrib/check_dependencies.ipynb index 14a8edaccc..e2212920ee 100644 --- a/examples/notebook/contrib/check_dependencies.ipynb +++ b/examples/notebook/contrib/check_dependencies.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/circuit.ipynb b/examples/notebook/contrib/circuit.ipynb index ada83fb5e3..ea240c334a 100644 --- a/examples/notebook/contrib/circuit.ipynb +++ b/examples/notebook/contrib/circuit.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/coins3.ipynb b/examples/notebook/contrib/coins3.ipynb index 83d72c5739..2693254ce1 100644 --- a/examples/notebook/contrib/coins3.ipynb +++ b/examples/notebook/contrib/coins3.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/coins_grid.ipynb b/examples/notebook/contrib/coins_grid.ipynb index d77dff4ba1..eb42e11db4 100644 --- a/examples/notebook/contrib/coins_grid.ipynb +++ b/examples/notebook/contrib/coins_grid.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/coins_grid_mip.ipynb b/examples/notebook/contrib/coins_grid_mip.ipynb index 048999c83f..5998d87533 100644 --- a/examples/notebook/contrib/coins_grid_mip.ipynb +++ b/examples/notebook/contrib/coins_grid_mip.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/coloring_ip.ipynb b/examples/notebook/contrib/coloring_ip.ipynb index 425bb1c3f3..56606acbd0 100644 --- a/examples/notebook/contrib/coloring_ip.ipynb +++ b/examples/notebook/contrib/coloring_ip.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/combinatorial_auction2.ipynb b/examples/notebook/contrib/combinatorial_auction2.ipynb index bc3eabbf46..9f199f0b9a 100644 --- a/examples/notebook/contrib/combinatorial_auction2.ipynb +++ b/examples/notebook/contrib/combinatorial_auction2.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/contiguity_regular.ipynb b/examples/notebook/contrib/contiguity_regular.ipynb index ac749deedc..32a02d9851 100644 --- a/examples/notebook/contrib/contiguity_regular.ipynb +++ b/examples/notebook/contrib/contiguity_regular.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/costas_array.ipynb b/examples/notebook/contrib/costas_array.ipynb index 1cb7e143db..3bbaaa603c 100644 --- a/examples/notebook/contrib/costas_array.ipynb +++ b/examples/notebook/contrib/costas_array.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/covering_opl.ipynb b/examples/notebook/contrib/covering_opl.ipynb index 3c74b27c25..ad966f196d 100644 --- a/examples/notebook/contrib/covering_opl.ipynb +++ b/examples/notebook/contrib/covering_opl.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/crew.ipynb b/examples/notebook/contrib/crew.ipynb index 0cb4e7b739..520e7cd3bc 100644 --- a/examples/notebook/contrib/crew.ipynb +++ b/examples/notebook/contrib/crew.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/crossword2.ipynb b/examples/notebook/contrib/crossword2.ipynb index f0b54a031a..34a0d3c5e6 100644 --- a/examples/notebook/contrib/crossword2.ipynb +++ b/examples/notebook/contrib/crossword2.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/crypta.ipynb b/examples/notebook/contrib/crypta.ipynb index c9b1254935..14dea159e1 100644 --- a/examples/notebook/contrib/crypta.ipynb +++ b/examples/notebook/contrib/crypta.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/crypto.ipynb b/examples/notebook/contrib/crypto.ipynb index 93eddfceb9..70ac77143f 100644 --- a/examples/notebook/contrib/crypto.ipynb +++ b/examples/notebook/contrib/crypto.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/curious_set_of_integers.ipynb b/examples/notebook/contrib/curious_set_of_integers.ipynb index 4e61becff9..fb86a7e3ca 100644 --- a/examples/notebook/contrib/curious_set_of_integers.ipynb +++ b/examples/notebook/contrib/curious_set_of_integers.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/debruijn_binary.ipynb b/examples/notebook/contrib/debruijn_binary.ipynb index 7d0dbf89ac..77627a9744 100644 --- a/examples/notebook/contrib/debruijn_binary.ipynb +++ b/examples/notebook/contrib/debruijn_binary.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/diet1.ipynb b/examples/notebook/contrib/diet1.ipynb index c61ab9d231..12cdaa96cf 100644 --- a/examples/notebook/contrib/diet1.ipynb +++ b/examples/notebook/contrib/diet1.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/diet1_b.ipynb b/examples/notebook/contrib/diet1_b.ipynb index 5e07c269e2..12e9b18797 100644 --- a/examples/notebook/contrib/diet1_b.ipynb +++ b/examples/notebook/contrib/diet1_b.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/diet1_mip.ipynb b/examples/notebook/contrib/diet1_mip.ipynb index 787eab4659..75643a031e 100644 --- a/examples/notebook/contrib/diet1_mip.ipynb +++ b/examples/notebook/contrib/diet1_mip.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/discrete_tomography.ipynb b/examples/notebook/contrib/discrete_tomography.ipynb index 3281496142..383a61502f 100644 --- a/examples/notebook/contrib/discrete_tomography.ipynb +++ b/examples/notebook/contrib/discrete_tomography.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/divisible_by_9_through_1.ipynb b/examples/notebook/contrib/divisible_by_9_through_1.ipynb index b7647a97a9..54bc39bdb6 100644 --- a/examples/notebook/contrib/divisible_by_9_through_1.ipynb +++ b/examples/notebook/contrib/divisible_by_9_through_1.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/dudeney.ipynb b/examples/notebook/contrib/dudeney.ipynb index 03a0b6d294..0275666f34 100644 --- a/examples/notebook/contrib/dudeney.ipynb +++ b/examples/notebook/contrib/dudeney.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/einav_puzzle.ipynb b/examples/notebook/contrib/einav_puzzle.ipynb index b68adc7a5c..7f52f99af0 100644 --- a/examples/notebook/contrib/einav_puzzle.ipynb +++ b/examples/notebook/contrib/einav_puzzle.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/einav_puzzle2.ipynb b/examples/notebook/contrib/einav_puzzle2.ipynb index 42ac3a1a45..087c7239da 100644 --- a/examples/notebook/contrib/einav_puzzle2.ipynb +++ b/examples/notebook/contrib/einav_puzzle2.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/eq10.ipynb b/examples/notebook/contrib/eq10.ipynb index f0ac17a98d..6f8ccb3e05 100644 --- a/examples/notebook/contrib/eq10.ipynb +++ b/examples/notebook/contrib/eq10.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/eq20.ipynb b/examples/notebook/contrib/eq20.ipynb index 4e55173257..c5fe68794c 100644 --- a/examples/notebook/contrib/eq20.ipynb +++ b/examples/notebook/contrib/eq20.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/fill_a_pix.ipynb b/examples/notebook/contrib/fill_a_pix.ipynb index 7aa72e23d3..d712e75450 100644 --- a/examples/notebook/contrib/fill_a_pix.ipynb +++ b/examples/notebook/contrib/fill_a_pix.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/furniture_moving.ipynb b/examples/notebook/contrib/furniture_moving.ipynb index eed36b02ae..1831783243 100644 --- a/examples/notebook/contrib/furniture_moving.ipynb +++ b/examples/notebook/contrib/furniture_moving.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/futoshiki.ipynb b/examples/notebook/contrib/futoshiki.ipynb index 9d77db6c66..fc39a6b25c 100644 --- a/examples/notebook/contrib/futoshiki.ipynb +++ b/examples/notebook/contrib/futoshiki.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/game_theory_taha.ipynb b/examples/notebook/contrib/game_theory_taha.ipynb index 9dd2b144e8..4b0ddb2437 100644 --- a/examples/notebook/contrib/game_theory_taha.ipynb +++ b/examples/notebook/contrib/game_theory_taha.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/grocery.ipynb b/examples/notebook/contrib/grocery.ipynb index dc9d25f66e..d2defe9091 100644 --- a/examples/notebook/contrib/grocery.ipynb +++ b/examples/notebook/contrib/grocery.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/hidato.ipynb b/examples/notebook/contrib/hidato.ipynb index 01b9060142..ba1dc4350c 100644 --- a/examples/notebook/contrib/hidato.ipynb +++ b/examples/notebook/contrib/hidato.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/just_forgotten.ipynb b/examples/notebook/contrib/just_forgotten.ipynb index e25dc30e20..acd60fd34b 100644 --- a/examples/notebook/contrib/just_forgotten.ipynb +++ b/examples/notebook/contrib/just_forgotten.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/kakuro.ipynb b/examples/notebook/contrib/kakuro.ipynb index 2e3ac2d984..b576ad0bd3 100644 --- a/examples/notebook/contrib/kakuro.ipynb +++ b/examples/notebook/contrib/kakuro.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/kenken2.ipynb b/examples/notebook/contrib/kenken2.ipynb index 308771c0a7..676b21caf9 100644 --- a/examples/notebook/contrib/kenken2.ipynb +++ b/examples/notebook/contrib/kenken2.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/killer_sudoku.ipynb b/examples/notebook/contrib/killer_sudoku.ipynb index b0473880ea..adbccaeefe 100644 --- a/examples/notebook/contrib/killer_sudoku.ipynb +++ b/examples/notebook/contrib/killer_sudoku.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/knapsack_cp.ipynb b/examples/notebook/contrib/knapsack_cp.ipynb index fe33a8be0f..7ee5194973 100644 --- a/examples/notebook/contrib/knapsack_cp.ipynb +++ b/examples/notebook/contrib/knapsack_cp.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/knapsack_mip.ipynb b/examples/notebook/contrib/knapsack_mip.ipynb index 632d584fe1..77e291b049 100644 --- a/examples/notebook/contrib/knapsack_mip.ipynb +++ b/examples/notebook/contrib/knapsack_mip.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/labeled_dice.ipynb b/examples/notebook/contrib/labeled_dice.ipynb index d8cae2c68c..c47c3041cb 100644 --- a/examples/notebook/contrib/labeled_dice.ipynb +++ b/examples/notebook/contrib/labeled_dice.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/langford.ipynb b/examples/notebook/contrib/langford.ipynb index a46ebf5e89..542f10ebf1 100644 --- a/examples/notebook/contrib/langford.ipynb +++ b/examples/notebook/contrib/langford.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/least_diff.ipynb b/examples/notebook/contrib/least_diff.ipynb index 0f257d738f..86f1ad738a 100644 --- a/examples/notebook/contrib/least_diff.ipynb +++ b/examples/notebook/contrib/least_diff.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/least_square.ipynb b/examples/notebook/contrib/least_square.ipynb index 0028abff34..49297385fc 100644 --- a/examples/notebook/contrib/least_square.ipynb +++ b/examples/notebook/contrib/least_square.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/lectures.ipynb b/examples/notebook/contrib/lectures.ipynb index 4aca6e11e7..b10df69aa8 100644 --- a/examples/notebook/contrib/lectures.ipynb +++ b/examples/notebook/contrib/lectures.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/magic_sequence_sat.ipynb b/examples/notebook/contrib/magic_sequence_sat.ipynb index 46cf1362e9..051520e210 100644 --- a/examples/notebook/contrib/magic_sequence_sat.ipynb +++ b/examples/notebook/contrib/magic_sequence_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/magic_square.ipynb b/examples/notebook/contrib/magic_square.ipynb index c3c33133c4..c18a6be4ae 100644 --- a/examples/notebook/contrib/magic_square.ipynb +++ b/examples/notebook/contrib/magic_square.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/magic_square_and_cards.ipynb b/examples/notebook/contrib/magic_square_and_cards.ipynb index 9d6bedd3c4..57c934d393 100644 --- a/examples/notebook/contrib/magic_square_and_cards.ipynb +++ b/examples/notebook/contrib/magic_square_and_cards.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/magic_square_mip.ipynb b/examples/notebook/contrib/magic_square_mip.ipynb index 370a1bc23d..85ce9ed7f0 100644 --- a/examples/notebook/contrib/magic_square_mip.ipynb +++ b/examples/notebook/contrib/magic_square_mip.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/map.ipynb b/examples/notebook/contrib/map.ipynb index 2ec10facfc..3760073656 100644 --- a/examples/notebook/contrib/map.ipynb +++ b/examples/notebook/contrib/map.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/marathon2.ipynb b/examples/notebook/contrib/marathon2.ipynb index 34a481f6a7..7bb3fbd430 100644 --- a/examples/notebook/contrib/marathon2.ipynb +++ b/examples/notebook/contrib/marathon2.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/max_flow_taha.ipynb b/examples/notebook/contrib/max_flow_taha.ipynb index 9ee3441f9b..27d53e7fff 100644 --- a/examples/notebook/contrib/max_flow_taha.ipynb +++ b/examples/notebook/contrib/max_flow_taha.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/max_flow_winston1.ipynb b/examples/notebook/contrib/max_flow_winston1.ipynb index 7be922f20c..7a3a303731 100644 --- a/examples/notebook/contrib/max_flow_winston1.ipynb +++ b/examples/notebook/contrib/max_flow_winston1.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/minesweeper.ipynb b/examples/notebook/contrib/minesweeper.ipynb index d5f751e320..f825910b0a 100644 --- a/examples/notebook/contrib/minesweeper.ipynb +++ b/examples/notebook/contrib/minesweeper.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/mr_smith.ipynb b/examples/notebook/contrib/mr_smith.ipynb index 56272c751f..50f09ed142 100644 --- a/examples/notebook/contrib/mr_smith.ipynb +++ b/examples/notebook/contrib/mr_smith.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/nonogram_default_search.ipynb b/examples/notebook/contrib/nonogram_default_search.ipynb index fd95c95a53..f2e525cfc7 100644 --- a/examples/notebook/contrib/nonogram_default_search.ipynb +++ b/examples/notebook/contrib/nonogram_default_search.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/nonogram_regular.ipynb b/examples/notebook/contrib/nonogram_regular.ipynb index 28b101ccf8..7691bca3da 100644 --- a/examples/notebook/contrib/nonogram_regular.ipynb +++ b/examples/notebook/contrib/nonogram_regular.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/nonogram_table.ipynb b/examples/notebook/contrib/nonogram_table.ipynb index 7929d917a0..02dc759451 100644 --- a/examples/notebook/contrib/nonogram_table.ipynb +++ b/examples/notebook/contrib/nonogram_table.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/nonogram_table2.ipynb b/examples/notebook/contrib/nonogram_table2.ipynb index ff79b1e916..25056d468a 100644 --- a/examples/notebook/contrib/nonogram_table2.ipynb +++ b/examples/notebook/contrib/nonogram_table2.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/nontransitive_dice.ipynb b/examples/notebook/contrib/nontransitive_dice.ipynb index 1249d959a2..faaa813397 100644 --- a/examples/notebook/contrib/nontransitive_dice.ipynb +++ b/examples/notebook/contrib/nontransitive_dice.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/nqueens.ipynb b/examples/notebook/contrib/nqueens.ipynb index 3c06875897..7823064ba8 100644 --- a/examples/notebook/contrib/nqueens.ipynb +++ b/examples/notebook/contrib/nqueens.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/nqueens2.ipynb b/examples/notebook/contrib/nqueens2.ipynb index f81d2b3a55..4469350225 100644 --- a/examples/notebook/contrib/nqueens2.ipynb +++ b/examples/notebook/contrib/nqueens2.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/nqueens3.ipynb b/examples/notebook/contrib/nqueens3.ipynb index 0dcbcb078e..54fa51c32c 100644 --- a/examples/notebook/contrib/nqueens3.ipynb +++ b/examples/notebook/contrib/nqueens3.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/nurse_rostering.ipynb b/examples/notebook/contrib/nurse_rostering.ipynb index aaa97ce3ff..c6b42808c4 100644 --- a/examples/notebook/contrib/nurse_rostering.ipynb +++ b/examples/notebook/contrib/nurse_rostering.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/nurses_cp.ipynb b/examples/notebook/contrib/nurses_cp.ipynb index 9be61f4144..3cc36c22d7 100644 --- a/examples/notebook/contrib/nurses_cp.ipynb +++ b/examples/notebook/contrib/nurses_cp.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/olympic.ipynb b/examples/notebook/contrib/olympic.ipynb index 3ba6aa5de7..9bf19a8d89 100644 --- a/examples/notebook/contrib/olympic.ipynb +++ b/examples/notebook/contrib/olympic.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/organize_day.ipynb b/examples/notebook/contrib/organize_day.ipynb index 4f1b670a6c..cb8941a77a 100644 --- a/examples/notebook/contrib/organize_day.ipynb +++ b/examples/notebook/contrib/organize_day.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/p_median.ipynb b/examples/notebook/contrib/p_median.ipynb index 3b59ed112d..8effa6a6b8 100644 --- a/examples/notebook/contrib/p_median.ipynb +++ b/examples/notebook/contrib/p_median.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/pandigital_numbers.ipynb b/examples/notebook/contrib/pandigital_numbers.ipynb index 72b47d51ef..19d947ba1a 100644 --- a/examples/notebook/contrib/pandigital_numbers.ipynb +++ b/examples/notebook/contrib/pandigital_numbers.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/photo_problem.ipynb b/examples/notebook/contrib/photo_problem.ipynb index 16f0e3e3c3..9db6d4144c 100644 --- a/examples/notebook/contrib/photo_problem.ipynb +++ b/examples/notebook/contrib/photo_problem.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/place_number_puzzle.ipynb b/examples/notebook/contrib/place_number_puzzle.ipynb index 044093b044..cdd171aa7c 100644 --- a/examples/notebook/contrib/place_number_puzzle.ipynb +++ b/examples/notebook/contrib/place_number_puzzle.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/post_office_problem2.ipynb b/examples/notebook/contrib/post_office_problem2.ipynb index 208b5c2a51..07124408f4 100644 --- a/examples/notebook/contrib/post_office_problem2.ipynb +++ b/examples/notebook/contrib/post_office_problem2.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/production.ipynb b/examples/notebook/contrib/production.ipynb index 1eb7bd1046..6bc55d1ab3 100644 --- a/examples/notebook/contrib/production.ipynb +++ b/examples/notebook/contrib/production.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/project_scheduling_sat.ipynb b/examples/notebook/contrib/project_scheduling_sat.ipynb index f6b2d54162..a977b9cc31 100644 --- a/examples/notebook/contrib/project_scheduling_sat.ipynb +++ b/examples/notebook/contrib/project_scheduling_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/pyls_api.ipynb b/examples/notebook/contrib/pyls_api.ipynb index a2eb9f50e3..d99b1db299 100644 --- a/examples/notebook/contrib/pyls_api.ipynb +++ b/examples/notebook/contrib/pyls_api.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/quasigroup_completion.ipynb b/examples/notebook/contrib/quasigroup_completion.ipynb index 0c1864f2a0..4eb2ae0b96 100644 --- a/examples/notebook/contrib/quasigroup_completion.ipynb +++ b/examples/notebook/contrib/quasigroup_completion.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/regular.ipynb b/examples/notebook/contrib/regular.ipynb index 1cc645ac79..3ff88f972c 100644 --- a/examples/notebook/contrib/regular.ipynb +++ b/examples/notebook/contrib/regular.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/regular_table.ipynb b/examples/notebook/contrib/regular_table.ipynb index bd4a45f2db..23be137506 100644 --- a/examples/notebook/contrib/regular_table.ipynb +++ b/examples/notebook/contrib/regular_table.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/regular_table2.ipynb b/examples/notebook/contrib/regular_table2.ipynb index 1e9d76efcb..8e2c4acdf7 100644 --- a/examples/notebook/contrib/regular_table2.ipynb +++ b/examples/notebook/contrib/regular_table2.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/rogo2.ipynb b/examples/notebook/contrib/rogo2.ipynb index ac181217ad..b563545aad 100644 --- a/examples/notebook/contrib/rogo2.ipynb +++ b/examples/notebook/contrib/rogo2.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/rostering_with_travel.ipynb b/examples/notebook/contrib/rostering_with_travel.ipynb index 035662eebc..3a37df3b3f 100644 --- a/examples/notebook/contrib/rostering_with_travel.ipynb +++ b/examples/notebook/contrib/rostering_with_travel.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/safe_cracking.ipynb b/examples/notebook/contrib/safe_cracking.ipynb index fb972b999a..dd37b1a3f2 100644 --- a/examples/notebook/contrib/safe_cracking.ipynb +++ b/examples/notebook/contrib/safe_cracking.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/scheduling_speakers.ipynb b/examples/notebook/contrib/scheduling_speakers.ipynb index 8fca110e35..af099c0f02 100644 --- a/examples/notebook/contrib/scheduling_speakers.ipynb +++ b/examples/notebook/contrib/scheduling_speakers.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/scheduling_with_transitions_sat.ipynb b/examples/notebook/contrib/scheduling_with_transitions_sat.ipynb index f9b176ed60..0f5e917894 100644 --- a/examples/notebook/contrib/scheduling_with_transitions_sat.ipynb +++ b/examples/notebook/contrib/scheduling_with_transitions_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/school_scheduling_sat.ipynb b/examples/notebook/contrib/school_scheduling_sat.ipynb index c24b3e0531..326dc1e4fa 100644 --- a/examples/notebook/contrib/school_scheduling_sat.ipynb +++ b/examples/notebook/contrib/school_scheduling_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/secret_santa.ipynb b/examples/notebook/contrib/secret_santa.ipynb index 71a5d00ab6..18f9d59535 100644 --- a/examples/notebook/contrib/secret_santa.ipynb +++ b/examples/notebook/contrib/secret_santa.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/secret_santa2.ipynb b/examples/notebook/contrib/secret_santa2.ipynb index 033d88c2cb..e40ee67b61 100644 --- a/examples/notebook/contrib/secret_santa2.ipynb +++ b/examples/notebook/contrib/secret_santa2.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/send_more_money_any_base.ipynb b/examples/notebook/contrib/send_more_money_any_base.ipynb index 8871ee6837..67c1b9ef55 100644 --- a/examples/notebook/contrib/send_more_money_any_base.ipynb +++ b/examples/notebook/contrib/send_more_money_any_base.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/send_most_money.ipynb b/examples/notebook/contrib/send_most_money.ipynb index e2d5d9b4e5..8c04e624f0 100644 --- a/examples/notebook/contrib/send_most_money.ipynb +++ b/examples/notebook/contrib/send_most_money.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/seseman.ipynb b/examples/notebook/contrib/seseman.ipynb index b4c102cf4e..aa23ee4e16 100644 --- a/examples/notebook/contrib/seseman.ipynb +++ b/examples/notebook/contrib/seseman.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/seseman_b.ipynb b/examples/notebook/contrib/seseman_b.ipynb index aa039ee312..5a3a293b01 100644 --- a/examples/notebook/contrib/seseman_b.ipynb +++ b/examples/notebook/contrib/seseman_b.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/set_covering.ipynb b/examples/notebook/contrib/set_covering.ipynb index aac5027729..1016e869c0 100644 --- a/examples/notebook/contrib/set_covering.ipynb +++ b/examples/notebook/contrib/set_covering.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/set_covering2.ipynb b/examples/notebook/contrib/set_covering2.ipynb index 3a9403a01a..2d1c4b3065 100644 --- a/examples/notebook/contrib/set_covering2.ipynb +++ b/examples/notebook/contrib/set_covering2.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/set_covering3.ipynb b/examples/notebook/contrib/set_covering3.ipynb index f53d591499..f5bd4af7c8 100644 --- a/examples/notebook/contrib/set_covering3.ipynb +++ b/examples/notebook/contrib/set_covering3.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/set_covering4.ipynb b/examples/notebook/contrib/set_covering4.ipynb index ebc7bf1cba..2c6ffa0c55 100644 --- a/examples/notebook/contrib/set_covering4.ipynb +++ b/examples/notebook/contrib/set_covering4.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/set_covering_deployment.ipynb b/examples/notebook/contrib/set_covering_deployment.ipynb index 6b23e5a1a2..4efa688a93 100644 --- a/examples/notebook/contrib/set_covering_deployment.ipynb +++ b/examples/notebook/contrib/set_covering_deployment.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/set_covering_skiena.ipynb b/examples/notebook/contrib/set_covering_skiena.ipynb index 7b1c865076..825d0a80d8 100644 --- a/examples/notebook/contrib/set_covering_skiena.ipynb +++ b/examples/notebook/contrib/set_covering_skiena.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/set_partition.ipynb b/examples/notebook/contrib/set_partition.ipynb index a8a053ec08..8366327f9a 100644 --- a/examples/notebook/contrib/set_partition.ipynb +++ b/examples/notebook/contrib/set_partition.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/sicherman_dice.ipynb b/examples/notebook/contrib/sicherman_dice.ipynb index 7e7d34be2e..c90ef2e99e 100644 --- a/examples/notebook/contrib/sicherman_dice.ipynb +++ b/examples/notebook/contrib/sicherman_dice.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/ski_assignment.ipynb b/examples/notebook/contrib/ski_assignment.ipynb index 837c67c0c6..8e9101ff30 100644 --- a/examples/notebook/contrib/ski_assignment.ipynb +++ b/examples/notebook/contrib/ski_assignment.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/slitherlink.ipynb b/examples/notebook/contrib/slitherlink.ipynb index feea46d02f..c025ae681f 100644 --- a/examples/notebook/contrib/slitherlink.ipynb +++ b/examples/notebook/contrib/slitherlink.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/sports_schedule_sat.ipynb b/examples/notebook/contrib/sports_schedule_sat.ipynb index f767c22ecf..2f9874c045 100644 --- a/examples/notebook/contrib/sports_schedule_sat.ipynb +++ b/examples/notebook/contrib/sports_schedule_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/stable_marriage.ipynb b/examples/notebook/contrib/stable_marriage.ipynb index 6c97994c1f..cf16fb0f10 100644 --- a/examples/notebook/contrib/stable_marriage.ipynb +++ b/examples/notebook/contrib/stable_marriage.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/stable_marriage_sat.ipynb b/examples/notebook/contrib/stable_marriage_sat.ipynb index bb6a3c8f9a..997ce8f04e 100644 --- a/examples/notebook/contrib/stable_marriage_sat.ipynb +++ b/examples/notebook/contrib/stable_marriage_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/steel.ipynb b/examples/notebook/contrib/steel.ipynb index d001e1dab2..411df37077 100644 --- a/examples/notebook/contrib/steel.ipynb +++ b/examples/notebook/contrib/steel.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/steel_lns.ipynb b/examples/notebook/contrib/steel_lns.ipynb index c8a060456c..11521bf80f 100644 --- a/examples/notebook/contrib/steel_lns.ipynb +++ b/examples/notebook/contrib/steel_lns.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/stigler.ipynb b/examples/notebook/contrib/stigler.ipynb index c6e512218b..99cd91261c 100644 --- a/examples/notebook/contrib/stigler.ipynb +++ b/examples/notebook/contrib/stigler.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/strimko2.ipynb b/examples/notebook/contrib/strimko2.ipynb index 79c9618e66..7208706374 100644 --- a/examples/notebook/contrib/strimko2.ipynb +++ b/examples/notebook/contrib/strimko2.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/subset_sum.ipynb b/examples/notebook/contrib/subset_sum.ipynb index b10151f8b7..eac3f575c5 100644 --- a/examples/notebook/contrib/subset_sum.ipynb +++ b/examples/notebook/contrib/subset_sum.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/survo_puzzle.ipynb b/examples/notebook/contrib/survo_puzzle.ipynb index ec4c514939..9c6741c9a0 100644 --- a/examples/notebook/contrib/survo_puzzle.ipynb +++ b/examples/notebook/contrib/survo_puzzle.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/toNum.ipynb b/examples/notebook/contrib/toNum.ipynb index 9d9b6f591b..b99e9c123a 100644 --- a/examples/notebook/contrib/toNum.ipynb +++ b/examples/notebook/contrib/toNum.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/traffic_lights.ipynb b/examples/notebook/contrib/traffic_lights.ipynb index 419311d715..76884d3043 100644 --- a/examples/notebook/contrib/traffic_lights.ipynb +++ b/examples/notebook/contrib/traffic_lights.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/vendor_scheduling.ipynb b/examples/notebook/contrib/vendor_scheduling.ipynb index 0b032ae91a..9f0e84e290 100644 --- a/examples/notebook/contrib/vendor_scheduling.ipynb +++ b/examples/notebook/contrib/vendor_scheduling.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/volsay.ipynb b/examples/notebook/contrib/volsay.ipynb index a4b6f1cada..1b9a4072f3 100644 --- a/examples/notebook/contrib/volsay.ipynb +++ b/examples/notebook/contrib/volsay.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/volsay2.ipynb b/examples/notebook/contrib/volsay2.ipynb index 3e336f2e5b..5a2ca2001e 100644 --- a/examples/notebook/contrib/volsay2.ipynb +++ b/examples/notebook/contrib/volsay2.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/volsay3.ipynb b/examples/notebook/contrib/volsay3.ipynb index f81c8faef4..bb73b4a7fe 100644 --- a/examples/notebook/contrib/volsay3.ipynb +++ b/examples/notebook/contrib/volsay3.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/wedding_optimal_chart.ipynb b/examples/notebook/contrib/wedding_optimal_chart.ipynb index ae78603d4d..20eeeb9fb4 100644 --- a/examples/notebook/contrib/wedding_optimal_chart.ipynb +++ b/examples/notebook/contrib/wedding_optimal_chart.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/who_killed_agatha.ipynb b/examples/notebook/contrib/who_killed_agatha.ipynb index 26386c161d..71a1a29816 100644 --- a/examples/notebook/contrib/who_killed_agatha.ipynb +++ b/examples/notebook/contrib/who_killed_agatha.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/xkcd.ipynb b/examples/notebook/contrib/xkcd.ipynb index 1348f2d92a..a49de8e76e 100644 --- a/examples/notebook/contrib/xkcd.ipynb +++ b/examples/notebook/contrib/xkcd.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/contrib/young_tableaux.ipynb b/examples/notebook/contrib/young_tableaux.ipynb index d268d611bb..c2581d28b2 100644 --- a/examples/notebook/contrib/young_tableaux.ipynb +++ b/examples/notebook/contrib/young_tableaux.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/examples/appointments.ipynb b/examples/notebook/examples/appointments.ipynb index 91e4e3b54c..8648309fbc 100644 --- a/examples/notebook/examples/appointments.ipynb +++ b/examples/notebook/examples/appointments.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,8 +81,6 @@ "# limitations under the License.\n", "\"\"\"Generates possible daily schedules for workers.\"\"\"\n", "\n", - "from __future__ import print_function\n", - "from __future__ import division\n", "\n", "import argparse\n", "from ortools.sat.python import cp_model\n", diff --git a/examples/notebook/examples/arc_flow_cutting_stock_sat.ipynb b/examples/notebook/examples/arc_flow_cutting_stock_sat.ipynb index d32e44aba8..c914f7dcfe 100644 --- a/examples/notebook/examples/arc_flow_cutting_stock_sat.ipynb +++ b/examples/notebook/examples/arc_flow_cutting_stock_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,7 +81,6 @@ "# limitations under the License.\n", "\"\"\"Cutting stock problem with the objective to minimize wasted space.\"\"\"\n", "\n", - "from __future__ import print_function\n", "\n", "import argparse\n", "import collections\n", diff --git a/examples/notebook/examples/assignment2_sat.ipynb b/examples/notebook/examples/assignment2_sat.ipynb index 8d7056fdf1..47ea4cebc1 100644 --- a/examples/notebook/examples/assignment2_sat.ipynb +++ b/examples/notebook/examples/assignment2_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -80,7 +80,6 @@ "# See the License for the specific language governing permissions and\n", "# limitations under the License.\n", "\n", - "from __future__ import print_function\n", "from ortools.sat.python import cp_model\n", "\n", "\n", diff --git a/examples/notebook/examples/assignment_with_constraints_sat.ipynb b/examples/notebook/examples/assignment_with_constraints_sat.ipynb index 4d606a5f50..69da27f931 100644 --- a/examples/notebook/examples/assignment_with_constraints_sat.ipynb +++ b/examples/notebook/examples/assignment_with_constraints_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,7 +81,6 @@ "# limitations under the License.\n", "\"\"\"Solve an assignment problem with combination constraints on workers.\"\"\"\n", "\n", - "from __future__ import print_function\n", "\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/examples/balance_group_sat.ipynb b/examples/notebook/examples/balance_group_sat.ipynb index d62367ab80..007f7da53c 100644 --- a/examples/notebook/examples/balance_group_sat.ipynb +++ b/examples/notebook/examples/balance_group_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -87,8 +87,6 @@ "be in that group.\n", "\"\"\"\n", "\n", - "from __future__ import print_function\n", - "from __future__ import division\n", "\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/examples/bus_driver_scheduling_flow_sat.ipynb b/examples/notebook/examples/bus_driver_scheduling_flow_sat.ipynb index 1cd9453489..f3e8017527 100644 --- a/examples/notebook/examples/bus_driver_scheduling_flow_sat.ipynb +++ b/examples/notebook/examples/bus_driver_scheduling_flow_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -90,7 +90,6 @@ "- 15 min cleaning time after the last shift\n", "- 2 min waiting time after each shift for passenger boarding and alighting\n", "\"\"\"\n", - "from __future__ import print_function\n", "\n", "import argparse\n", "import collections\n", diff --git a/examples/notebook/examples/bus_driver_scheduling_sat.ipynb b/examples/notebook/examples/bus_driver_scheduling_sat.ipynb index 24ddaac8c7..76938e2d8c 100644 --- a/examples/notebook/examples/bus_driver_scheduling_sat.ipynb +++ b/examples/notebook/examples/bus_driver_scheduling_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -90,13 +90,23 @@ "- 15 min cleaning time after the last shift\n", "- 2 min waiting time after each shift for passenger boarding and alighting\n", "\"\"\"\n", - "from __future__ import print_function\n", "\n", "import collections\n", "import math\n", "\n", + "from google.protobuf import text_format\n", + "from absl import app\n", + "from absl import flags\n", "from ortools.sat.python import cp_model\n", "\n", + "FLAGS = flags.FLAGS\n", + "\n", + "flags.DEFINE_string('output_proto', '',\n", + " 'Output file to write the cp_model proto to.')\n", + "flags.DEFINE_string('params', 'num_search_workers:8,log_search_progress:true',\n", + " 'Sat solver parameters.')\n", + "flags.DEFINE_integer('instance', 1, 'Instance to select (1, 2, 3).', 1, 3)\n", + "\n", "SAMPLE_SHIFTS_SMALL = [\n", " #\n", " # column description:\n", @@ -1721,22 +1731,39 @@ " [1355, '00:57', '01:07', 1497, 1507, 10]\n", "] # yapf:disable\n", "\n", - "\n", - "SAMPLE_SHIFTS = SAMPLE_SHIFTS_MEDIUM\n", + "# pytype: disable=wrong-arg-types\n", "\n", "\n", "def bus_driver_scheduling(minimize_drivers, max_num_drivers):\n", " \"\"\"Optimize the bus driver scheduling problem.\n", "\n", - " This model has two modes.\n", + " This model has two modes.\n", "\n", - " If minimize_drivers == True, the objective will be to find the minimal\n", - " number of drivers, independently of the working times of each drivers.\n", + " If minimize_drivers == True, the objective will be to find the minimal\n", + " number of drivers, independently of the working times of each drivers.\n", "\n", - " Otherwise, will will create max_num_drivers non optional drivers, and\n", - " minimize the sum of working times of these drivers.\n", - " \"\"\"\n", - " num_shifts = len(SAMPLE_SHIFTS)\n", + " Otherwise, will will create max_num_drivers non optional drivers, and\n", + " minimize the sum of working times of these drivers.\n", + "\n", + " Args:\n", + " minimize_drivers: A Boolean parameter specifying the objective of the\n", + " problem. If True, it tries to minimize the number of used drivers. If\n", + " false, it minimizes the sum of working times per workers.\n", + " max_num_drivers: This number specifies the exact number of non optional\n", + " drivers to use. This is only used if 'minimize_drivers' is False.\n", + "\n", + " Returns:\n", + " The objective value of the model.\n", + " \"\"\"\n", + " shifts = None\n", + " if FLAGS.instance == 1:\n", + " shifts = SAMPLE_SHIFTS_SMALL\n", + " elif FLAGS.instance == 2:\n", + " shifts = SAMPLE_SHIFTS_MEDIUM\n", + " elif FLAGS.instance == 3:\n", + " shifts = SAMPLE_SHIFTS_LARGE\n", + "\n", + " num_shifts = len(shifts)\n", "\n", " # All durations are in minutes.\n", " max_driving_time = 540 # 8 hours.\n", @@ -1749,12 +1776,12 @@ " cleanup_time = 15\n", "\n", " # Computed data.\n", - " total_driving_time = sum(shift[5] for shift in SAMPLE_SHIFTS)\n", - " min_num_drivers = int(\n", - " math.ceil(total_driving_time * 1.0 / max_driving_time))\n", + " total_driving_time = sum(shift[5] for shift in shifts)\n", + " min_num_drivers = int(math.ceil(total_driving_time * 1.0 /\n", + " max_driving_time))\n", " num_drivers = 2 * min_num_drivers if minimize_drivers else max_num_drivers\n", - " min_start_time = min(shift[3] for shift in SAMPLE_SHIFTS)\n", - " max_end_time = max(shift[4] for shift in SAMPLE_SHIFTS)\n", + " min_start_time = min(shift[3] for shift in shifts)\n", + " max_end_time = max(shift[4] for shift in shifts)\n", "\n", " print('Bus driver scheduling')\n", " print(' num shifts =', num_shifts)\n", @@ -1829,7 +1856,7 @@ " performed[d, s] = model.NewBoolVar('performed_%i_%i' % (d, s))\n", "\n", " for s in range(num_shifts):\n", - " shift = SAMPLE_SHIFTS[s]\n", + " shift = shifts[s]\n", " duration = shift[5]\n", "\n", " # Arc from source to shift.\n", @@ -1841,10 +1868,9 @@ " shared_incoming_literals[s].append(source_lit)\n", " model.Add(start_times[d] == shift[3] -\n", " setup_time).OnlyEnforceIf(source_lit)\n", - " model.Add(\n", - " total_driving[d, s] == duration).OnlyEnforceIf(source_lit)\n", - " model.Add(\n", - " no_break_driving[d, s] == duration).OnlyEnforceIf(source_lit)\n", + " model.Add(total_driving[d, s] == duration).OnlyEnforceIf(source_lit)\n", + " model.Add(no_break_driving[d,\n", + " s] == duration).OnlyEnforceIf(source_lit)\n", " starting_shifts[d, s] = source_lit\n", "\n", " # Arc from shift to sink\n", @@ -1856,14 +1882,15 @@ " incoming_sink_literals.append(sink_lit)\n", " model.Add(end_times[d] == shift[4] +\n", " cleanup_time).OnlyEnforceIf(sink_lit)\n", - " model.Add(driving_times[d] == total_driving[d, s]).OnlyEnforceIf(\n", - " sink_lit)\n", + " model.Add(\n", + " driving_times[d] == total_driving[d, s]).OnlyEnforceIf(sink_lit)\n", "\n", " # Node not performed\n", " # - set both driving times to 0\n", " # - add a looping arc on the node\n", - " model.Add(total_driving[d, s] == 0).OnlyEnforceIf(\n", - " performed[d, s].Not())\n", + " model.Add(total_driving[d,\n", + " s] == 0).OnlyEnforceIf(performed[d,\n", + " s].Not())\n", " model.Add(no_break_driving[d, s] == 0).OnlyEnforceIf(\n", " performed[d, s].Not())\n", " incoming_literals[s].append(performed[d, s].Not())\n", @@ -1880,7 +1907,7 @@ " performed[d, s])\n", "\n", " for o in range(num_shifts):\n", - " other = SAMPLE_SHIFTS[o]\n", + " other = shifts[o]\n", " delay = other[3] - shift[4]\n", " if delay < min_delay_between_shifts:\n", " continue\n", @@ -1895,9 +1922,8 @@ " model.Add(\n", " no_break_driving[d, o] == other[5]).OnlyEnforceIf(lit)\n", " else:\n", - " model.Add(\n", - " no_break_driving[d, o] == no_break_driving[d, s] +\n", - " other[5]).OnlyEnforceIf(lit)\n", + " model.Add(no_break_driving[d, o] == no_break_driving[d, s] +\n", + " other[5]).OnlyEnforceIf(lit)\n", "\n", " # Add arc\n", " outgoing_literals[s].append(lit)\n", @@ -1959,26 +1985,32 @@ " working_drivers[d + 1].Not())\n", "\n", " # Redundant constraints: sum of driving times = sum of shift driving times\n", - " model.Add(sum(driving_times) == total_driving_time)\n", + " model.Add(cp_model.LinearExpr.Sum(driving_times) == total_driving_time)\n", " if not minimize_drivers:\n", " model.Add(\n", - " sum(working_times) == total_driving_time +\n", + " cp_model.LinearExpr.Sum(working_times) == total_driving_time +\n", " num_drivers * (setup_time + cleanup_time) +\n", " cp_model.LinearExpr.ScalProd(delay_literals, delay_weights))\n", "\n", " if minimize_drivers:\n", " # Minimize the number of working drivers\n", - " model.Minimize(sum(working_drivers))\n", + " model.Minimize(cp_model.LinearExpr.Sum(working_drivers))\n", " else:\n", " # Minimize the sum of delays between tasks, which in turns minimize the\n", " # sum of working times as the total driving time is fixed\n", " model.Minimize(\n", " cp_model.LinearExpr.ScalProd(delay_literals, delay_weights))\n", "\n", + " if not minimize_drivers and FLAGS.output_proto:\n", + " print('Writing proto to %s' % FLAGS.output_proto)\n", + " with open(FLAGS.output_proto, 'w') as text_file:\n", + " text_file.write(str(model))\n", + "\n", " # Solve model.\n", " solver = cp_model.CpSolver()\n", - " solver.parameters.log_search_progress = True # not minimize_drivers\n", - " solver.parameters.num_search_workers = 8\n", + " if FLAGS.params:\n", + " text_format.Parse(FLAGS.params, solver.parameters)\n", + "\n", " status = solver.Solve(model)\n", "\n", " if status != cp_model.OPTIMAL and status != cp_model.FEASIBLE:\n", @@ -1998,7 +2030,7 @@ "\n", " first = True\n", " for s in range(num_shifts):\n", - " shift = SAMPLE_SHIFTS[s]\n", + " shift = shifts[s]\n", "\n", " if not solver.BooleanValue(performed[d, s]):\n", " continue\n", @@ -2008,21 +2040,20 @@ " # no_break_driving which was reinitialized in that case.\n", " if solver.Value(no_break_driving[d, s]) == shift[5] and not first:\n", " print(' **break**')\n", - " print(' shift ', shift[0], ':', shift[1], \"-\", shift[2])\n", + " print(' shift ', shift[0], ':', shift[1], '-', shift[2])\n", " first = False\n", "\n", " return int(solver.ObjectiveValue())\n", "\n", "\n", - "def optimize_bus_driver_allocation():\n", - " \"\"\"Optimize the bus driver allocation in two passes.\"\"\"\n", - " print('----------- first pass: minimize the number of drivers')\n", - " num_drivers = bus_driver_scheduling(True, -1)\n", + "\"\"\"Optimize the bus driver allocation in two passes.\"\"\"\n", + "print('----------- first pass: minimize the number of drivers')\n", + "num_drivers = bus_driver_scheduling(True, -1)\n", + "if num_drivers == -1:\n", + " print('no solution found, skipping the final step')\n", + "else:\n", " print('----------- second pass: minimize the sum of working times')\n", " bus_driver_scheduling(False, num_drivers)\n", - "\n", - "\n", - "optimize_bus_driver_allocation()\n", "\n" ] } diff --git a/examples/notebook/examples/chemical_balance_lp.ipynb b/examples/notebook/examples/chemical_balance_lp.ipynb index dcf236d684..377495b4e1 100644 --- a/examples/notebook/examples/chemical_balance_lp.ipynb +++ b/examples/notebook/examples/chemical_balance_lp.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -86,8 +86,6 @@ "# Furthermore, if one color is an a group, at least k items with this color must\n", "# be in that group.\n", "\n", - "from __future__ import print_function\n", - "from __future__ import division\n", "\n", "from ortools.linear_solver import pywraplp\n", "\n", diff --git a/examples/notebook/examples/chemical_balance_sat.ipynb b/examples/notebook/examples/chemical_balance_sat.ipynb index c4524f12ca..9a00fddbc6 100644 --- a/examples/notebook/examples/chemical_balance_sat.ipynb +++ b/examples/notebook/examples/chemical_balance_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -86,8 +86,6 @@ "# Furthermore, if one color is an a group, at least k items with this color must\n", "# be in that group.\n", "\n", - "from __future__ import print_function\n", - "from __future__ import division\n", "\n", "from ortools.sat.python import cp_model\n", "import math\n", diff --git a/examples/notebook/examples/clustering_sat.ipynb b/examples/notebook/examples/clustering_sat.ipynb index 97a48b0557..2dc69496df 100644 --- a/examples/notebook/examples/clustering_sat.ipynb +++ b/examples/notebook/examples/clustering_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,8 +81,6 @@ "# limitations under the License.\n", "\"\"\"Cluster 40 cities in 4 equal groups to minimize sum of crossed distances.\"\"\"\n", "\n", - "from __future__ import print_function\n", - "from __future__ import division\n", "\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/examples/cover_rectangle_sat.ipynb b/examples/notebook/examples/cover_rectangle_sat.ipynb index b2225eedc6..c9508f9bf1 100644 --- a/examples/notebook/examples/cover_rectangle_sat.ipynb +++ b/examples/notebook/examples/cover_rectangle_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,8 +81,6 @@ "# limitations under the License.\n", "\"\"\"Fill a 72x37 rectangle by a minimum number of non-overlapping squares.\"\"\"\n", "\n", - "from __future__ import print_function\n", - "from __future__ import division\n", "\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/examples/cvrptw_plot.ipynb b/examples/notebook/examples/cvrptw_plot.ipynb index d98b15ceb2..0b88031cec 100644 --- a/examples/notebook/examples/cvrptw_plot.ipynb +++ b/examples/notebook/examples/cvrptw_plot.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/examples/flexible_job_shop_sat.ipynb b/examples/notebook/examples/flexible_job_shop_sat.ipynb index 8c3f7437ab..e9a042b0d4 100644 --- a/examples/notebook/examples/flexible_job_shop_sat.ipynb +++ b/examples/notebook/examples/flexible_job_shop_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,7 +81,6 @@ "# limitations under the License.\n", "\"\"\"Solves a flexible jobshop problems with the CP-SAT solver.\"\"\"\n", "\n", - "from __future__ import print_function\n", "\n", "import collections\n", "from ortools.sat.python import cp_model\n", diff --git a/examples/notebook/examples/gate_scheduling_sat.ipynb b/examples/notebook/examples/gate_scheduling_sat.ipynb index 23283917a1..a26e126b82 100644 --- a/examples/notebook/examples/gate_scheduling_sat.ipynb +++ b/examples/notebook/examples/gate_scheduling_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/examples/golomb8.ipynb b/examples/notebook/examples/golomb8.ipynb index a933040114..22161c065d 100644 --- a/examples/notebook/examples/golomb8.ipynb +++ b/examples/notebook/examples/golomb8.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -89,8 +89,12 @@ "of the rule.\n", "\"\"\"\n", "\n", + "from absl import app\n", + "from absl import flags\n", "from ortools.constraint_solver import pywrapcp\n", "\n", + "FLAGS = flags.FLAGS\n", + "\n", "# We disable the following warning because it is a false positive on constraints\n", "# like: solver.Add(x == 0)\n", "# pylint: disable=g-explicit-bool-comparison\n", @@ -108,11 +112,13 @@ "objective = solver.Minimize(marks[size - 1], 1)\n", "\n", "solver.Add(marks[0] == 0)\n", - "solver.Add(\n", - " solver.AllDifferent([\n", - " marks[j] - marks[i]\n", - " for i in range(0, size - 1) for j in range(i + 1, size)\n", - " ]))\n", + "\n", + "# We expand the creation of the diff array to avoid a pylint warning.\n", + "diffs = []\n", + "for i in range(0, size - 1):\n", + " for j in range(i + 1, size):\n", + " diffs.append(marks[j] - marks[i])\n", + "solver.Add(solver.AllDifferent(diffs))\n", "\n", "solver.Add(marks[size - 1] - marks[size - 2] > marks[1] - marks[0])\n", "for i in range(0, size - 2):\n", diff --git a/examples/notebook/examples/hidato_sat.ipynb b/examples/notebook/examples/hidato_sat.ipynb index 9ce652ecc7..a47a300623 100644 --- a/examples/notebook/examples/hidato_sat.ipynb +++ b/examples/notebook/examples/hidato_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,8 +81,6 @@ "# limitations under the License.\n", "\"\"\"Solves the Hidato problem with the CP-SAT solver.\"\"\"\n", "\n", - "from __future__ import print_function\n", - "\n", "from ortools.sat.python import visualization\n", "from ortools.sat.python import cp_model\n", "\n", @@ -100,13 +98,16 @@ " rows: the number of rows in the grid\n", " cols: the number of columns in the grid\n", " \"\"\"\n", - " return [\n", - " (x * cols + y, (x + dx) * cols + (y + dy)) for x in range(rows)\n", - " for y in range(cols) for dx in (-1, 0, 1)\n", - " for dy in (-1, 0, 1)\n", - " if (x + dx >= 0 and x + dx < rows and y + dy >= 0 and y + dy < cols and\n", - " (dx != 0 or dy != 0))\n", - " ]\n", + " result = []\n", + " for x in range(rows):\n", + " for y in range(cols):\n", + " for dx in (-1, 0, 1):\n", + " for dy in (-1, 0, 1):\n", + " if (x + dx >= 0 and x + dx < rows and y + dy >= 0 and\n", + " y + dy < cols and (dx != 0 or dy != 0)):\n", + " result.append(\n", + " (x * cols + y, (x + dx) * cols + (y + dy)))\n", + " return result\n", "\n", "\n", "def print_solution(positions, rows, cols):\n", @@ -152,8 +153,8 @@ " elif problem == 2:\n", " puzzle = [[0, 44, 41, 0, 0, 0, 0], [0, 43, 0, 28, 29, 0, 0],\n", " [0, 1, 0, 0, 0, 33, 0], [0, 2, 25, 4, 34, 0, 36],\n", - " [49, 16, 0, 23, 0, 0, 0], [0, 19, 0, 0, 12, 7,\n", - " 0], [0, 0, 0, 14, 0, 0, 0]]\n", + " [49, 16, 0, 23, 0, 0, 0], [0, 19, 0, 0, 12, 7, 0],\n", + " [0, 0, 0, 14, 0, 0, 0]]\n", "\n", " elif problem == 3:\n", " # Problems from the book:\n", @@ -175,10 +176,9 @@ " elif problem == 6:\n", " # Problem 15 (Intermediate)\n", " puzzle = [[64, 0, 0, 0, 0, 0, 0, 0], [1, 63, 0, 59, 15, 57, 53, 0],\n", - " [0, 4, 0, 14, 0, 0, 0, 0], [3, 0, 11, 0, 20, 19, 0,\n", - " 50], [0, 0, 0, 0, 22, 0, 48, 40],\n", - " [9, 0, 0, 32, 23, 0, 0, 41], [27, 0, 0, 0, 36, 0, 46,\n", - " 0], [28, 30, 0, 35, 0, 0, 0, 0]]\n", + " [0, 4, 0, 14, 0, 0, 0, 0], [3, 0, 11, 0, 20, 19, 0, 50],\n", + " [0, 0, 0, 0, 22, 0, 48, 40], [9, 0, 0, 32, 23, 0, 0, 41],\n", + " [27, 0, 0, 0, 36, 0, 46, 0], [28, 30, 0, 35, 0, 0, 0, 0]]\n", " return puzzle\n", "\n", "\n", @@ -241,8 +241,8 @@ " output.AddRectangle(x, r - y - 1, 1, 1, color, 'black',\n", " str(i + 1))\n", "\n", - " output.AddTitle('Puzzle %i solved in %f s' % (index,\n", - " solver.WallTime()))\n", + " output.AddTitle('Puzzle %i solved in %f s' %\n", + " (index, solver.WallTime()))\n", " output.Display()\n", " else:\n", " print_solution(\n", diff --git a/examples/notebook/examples/integer_programming.ipynb b/examples/notebook/examples/integer_programming.ipynb index 490cbadbbd..bd44ba92eb 100644 --- a/examples/notebook/examples/integer_programming.ipynb +++ b/examples/notebook/examples/integer_programming.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,8 +81,6 @@ "# limitations under the License.\n", "\"\"\"Integer programming examples that show how to use the APIs.\"\"\"\n", "\n", - "from __future__ import print_function\n", - "\n", "from ortools.linear_solver import pywraplp\n", "\n", "\n", diff --git a/examples/notebook/examples/jobshop_ft06_distance_sat.ipynb b/examples/notebook/examples/jobshop_ft06_distance_sat.ipynb index 3e0cf2be96..aff3ed3dfa 100644 --- a/examples/notebook/examples/jobshop_ft06_distance_sat.ipynb +++ b/examples/notebook/examples/jobshop_ft06_distance_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -93,8 +93,6 @@ "machine.\n", "\"\"\"\n", "\n", - "from __future__ import print_function\n", - "\n", "import collections\n", "\n", "from ortools.sat.python import cp_model\n", @@ -135,8 +133,9 @@ " end_var = model.NewIntVar(0, horizon, 'end_%i_%i' % (i, j))\n", " interval_var = model.NewIntervalVar(start_var, duration, end_var,\n", " 'interval_%i_%i' % (i, j))\n", - " all_tasks[(i, j)] = task_type(\n", - " start=start_var, end=end_var, interval=interval_var)\n", + " all_tasks[(i, j)] = task_type(start=start_var,\n", + " end=end_var,\n", + " interval=interval_var)\n", "\n", " # Create disjuctive constraints.\n", " for i in all_machines:\n", @@ -171,8 +170,8 @@ " # We add the reified precedence to link the literal with the\n", " # times of the two tasks.\n", " min_distance = distance_between_jobs(j1, j2)\n", - " model.Add(job_starts[j2] >=\n", - " job_ends[j1] + min_distance).OnlyEnforceIf(lit)\n", + " model.Add(job_starts[j2] >= job_ends[j1] +\n", + " min_distance).OnlyEnforceIf(lit)\n", "\n", " model.AddCircuit(arcs)\n", "\n", diff --git a/examples/notebook/examples/jobshop_ft06_sat.ipynb b/examples/notebook/examples/jobshop_ft06_sat.ipynb index 70b524230a..f0ea8c3ba4 100644 --- a/examples/notebook/examples/jobshop_ft06_sat.ipynb +++ b/examples/notebook/examples/jobshop_ft06_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -89,7 +89,6 @@ "The objective is to minimize the maximum completion time of all\n", "jobs. This is called the makespan.\n", "\"\"\"\n", - "from __future__ import print_function\n", "\n", "import collections\n", "\n", @@ -127,8 +126,9 @@ " end_var = model.NewIntVar(0, horizon, 'end_%i_%i' % (i, j))\n", " interval_var = model.NewIntervalVar(start_var, duration, end_var,\n", " 'interval_%i_%i' % (i, j))\n", - " all_tasks[(i, j)] = task_type(\n", - " start=start_var, end=end_var, interval=interval_var)\n", + " all_tasks[(i, j)] = task_type(start=start_var,\n", + " end=end_var,\n", + " interval=interval_var)\n", "\n", " # Create disjuctive constraints.\n", " machine_to_jobs = {}\n", diff --git a/examples/notebook/examples/jobshop_with_maintenance_sat.ipynb b/examples/notebook/examples/jobshop_with_maintenance_sat.ipynb index 610ccf1d55..de7dd696c1 100644 --- a/examples/notebook/examples/jobshop_with_maintenance_sat.ipynb +++ b/examples/notebook/examples/jobshop_with_maintenance_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,8 +81,6 @@ "# limitations under the License.\n", "\"\"\"Jobshop with maintenance tasks using the CP-SAT solver.\"\"\"\n", "\n", - "from __future__ import absolute_import\n", - "from __future__ import print_function\n", "\n", "import collections\n", "\n", diff --git a/examples/notebook/examples/linear_assignment_api.ipynb b/examples/notebook/examples/linear_assignment_api.ipynb index fed76911c9..658d0bc0ae 100644 --- a/examples/notebook/examples/linear_assignment_api.ipynb +++ b/examples/notebook/examples/linear_assignment_api.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -85,14 +85,13 @@ " http://www.ee.oulu.fi/~mpa/matreng/eem1_2-1.htm with kCost[0][1]\n", " modified so the optimum solution is unique.\n", "\"\"\"\n", - "from __future__ import print_function\n", "\n", + "from absl import app\n", "from ortools.graph import pywrapgraph\n", "\n", "\n", "def RunAssignmentOn4x4Matrix():\n", - " \"\"\"Test linear sum assignment on a 4x4 matrix.\n", - " \"\"\"\n", + " \"\"\"Test linear sum assignment on a 4x4 matrix.\"\"\"\n", " num_sources = 4\n", " num_targets = 4\n", " cost = [[90, 76, 75, 80], [35, 85, 55, 65], [125, 95, 90, 105],\n", diff --git a/examples/notebook/examples/linear_programming.ipynb b/examples/notebook/examples/linear_programming.ipynb index e3f1d9ea95..e61b9a919a 100644 --- a/examples/notebook/examples/linear_programming.ipynb +++ b/examples/notebook/examples/linear_programming.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,8 +81,6 @@ "# limitations under the License.\n", "\"\"\"Linear programming examples that show how to use the APIs.\"\"\"\n", "\n", - "from __future__ import print_function\n", - "\n", "from ortools.linear_solver import pywraplp\n", "\n", "\n", diff --git a/examples/notebook/examples/magic_sequence_distribute.ipynb b/examples/notebook/examples/magic_sequence_distribute.ipynb index 7a5b7811d4..234cab1f27 100644 --- a/examples/notebook/examples/magic_sequence_distribute.ipynb +++ b/examples/notebook/examples/magic_sequence_distribute.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -85,20 +85,30 @@ "occurrences of i in this sequence is equal to the value of the ith number.\n", "It uses an aggregated formulation of the count expression called\n", "distribute().\n", - "\"\"\"\n", - "from __future__ import print_function\n", "\n", + "Usage: python magic_sequence_distribute.py NUMBER\n", + "\"\"\"\n", + "\n", + "from absl import app\n", + "from absl import flags\n", "from ortools.constraint_solver import pywrapcp\n", "\n", + "FLAGS = flags.FLAGS\n", + "\n", "\n", "# Create the solver.\n", "solver = pywrapcp.Solver('magic sequence')\n", "\n", - "size = 100\n", + "# Create an array of IntVars to hold the answers.\n", + "size = int(argv[1]) if len(argv) > 1 else 100\n", "all_values = list(range(0, size))\n", "all_vars = [solver.IntVar(0, size, 'vars_%d' % i) for i in all_values]\n", "\n", + "# The number of variables equal to j shall be the value of all_vars[j].\n", "solver.Add(solver.Distribute(all_vars, all_values, all_vars))\n", + "\n", + "# The sum of all the values shall be equal to the size.\n", + "# (This constraint is redundant, but speeds up the search.)\n", "solver.Add(solver.Sum(all_vars) == size)\n", "\n", "solver.NewSearch(\n", diff --git a/examples/notebook/examples/nqueens_sat.ipynb b/examples/notebook/examples/nqueens_sat.ipynb index 4109c9599a..261ddfd99d 100644 --- a/examples/notebook/examples/nqueens_sat.ipynb +++ b/examples/notebook/examples/nqueens_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -80,7 +80,6 @@ "# See the License for the specific language governing permissions and\n", "# limitations under the License.\n", "\"\"\"OR-tools solution to the N-queens problem.\"\"\"\n", - "from __future__ import print_function\n", "import time\n", "import sys\n", "from ortools.sat.python import cp_model\n", @@ -116,8 +115,6 @@ " print()\n", "\n", "\n", - "# Sets the size of the board.\n", - "board_size = 8\n", "# Creates the solver.\n", "model = cp_model.CpModel()\n", "# Creates the variables.\n", diff --git a/examples/notebook/examples/prize_collecting_tsp_sat.ipynb b/examples/notebook/examples/prize_collecting_tsp_sat.ipynb index ab3054e196..e279839ae7 100644 --- a/examples/notebook/examples/prize_collecting_tsp_sat.ipynb +++ b/examples/notebook/examples/prize_collecting_tsp_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,7 +81,6 @@ "# limitations under the License.\n", "\"\"\"Simple travelling salesman problem between cities.\"\"\"\n", "\n", - "from __future__ import print_function\n", "\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/examples/pyflow_example.ipynb b/examples/notebook/examples/pyflow_example.ipynb index 561339ff92..15c059a476 100644 --- a/examples/notebook/examples/pyflow_example.ipynb +++ b/examples/notebook/examples/pyflow_example.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,7 +81,7 @@ "# limitations under the License.\n", "\"\"\"MaxFlow and MinCostFlow examples.\"\"\"\n", "\n", - "from __future__ import print_function\n", + "from absl import app\n", "from ortools.graph import pywrapgraph\n", "\n", "\n", @@ -98,9 +98,9 @@ " if max_flow.Solve(0, 5) == max_flow.OPTIMAL:\n", " print('Total flow', max_flow.OptimalFlow(), '/', expected_total_flow)\n", " for i in range(max_flow.NumArcs()):\n", - " print(('From source %d to target %d: %d / %d' %\n", - " (max_flow.Tail(i), max_flow.Head(i), max_flow.Flow(i),\n", - " max_flow.Capacity(i))))\n", + " print('From source %d to target %d: %d / %d' %\n", + " (max_flow.Tail(i), max_flow.Head(i), max_flow.Flow(i),\n", + " max_flow.Capacity(i)))\n", " print('Source side min-cut:', max_flow.GetSourceSideMinCut())\n", " print('Sink side min-cut:', max_flow.GetSinkSideMinCut())\n", " else:\n", @@ -122,8 +122,9 @@ " min_cost_flow = pywrapgraph.SimpleMinCostFlow()\n", " for source in range(0, num_sources):\n", " for target in range(0, num_targets):\n", - " min_cost_flow.AddArcWithCapacityAndUnitCost(\n", - " source, num_sources + target, 1, costs[source][target])\n", + " min_cost_flow.AddArcWithCapacityAndUnitCost(source,\n", + " num_sources + target, 1,\n", + " costs[source][target])\n", " for node in range(0, num_sources):\n", " min_cost_flow.SetNodeSupply(node, 1)\n", " min_cost_flow.SetNodeSupply(num_sources + node, -1)\n", @@ -133,9 +134,8 @@ " for i in range(0, min_cost_flow.NumArcs()):\n", " if min_cost_flow.Flow(i) > 0:\n", " print('From source %d to target %d: cost %d' %\n", - " (min_cost_flow.Tail(i),\n", - " min_cost_flow.Head(i) - num_sources,\n", - " min_cost_flow.UnitCost(i)))\n", + " (min_cost_flow.Tail(i), min_cost_flow.Head(i) -\n", + " num_sources, min_cost_flow.UnitCost(i)))\n", " else:\n", " print('There was an issue with the min cost flow input.')\n", "\n", diff --git a/examples/notebook/examples/qubo_sat.ipynb b/examples/notebook/examples/qubo_sat.ipynb index c8fe7c27ae..2f9f74c3f9 100644 --- a/examples/notebook/examples/qubo_sat.ipynb +++ b/examples/notebook/examples/qubo_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -69,7 +69,6 @@ "source": [ "\"\"\"Solves a Qubo program using the CP-SAT solver.\"\"\"\n", "\n", - "from __future__ import print_function\n", "\n", "import time\n", "\n", diff --git a/examples/notebook/examples/random_tsp.ipynb b/examples/notebook/examples/random_tsp.ipynb index 2549f7fdef..b9531693da 100644 --- a/examples/notebook/examples/random_tsp.ipynb +++ b/examples/notebook/examples/random_tsp.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/examples/rcpsp_sat.ipynb b/examples/notebook/examples/rcpsp_sat.ipynb index 48a7692d0c..6fbfa7e7d4 100644 --- a/examples/notebook/examples/rcpsp_sat.ipynb +++ b/examples/notebook/examples/rcpsp_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,27 +81,24 @@ "# limitations under the License.\n", "\"\"\"Sat based solver for the RCPSP problems (see rcpsp.proto).\"\"\"\n", "\n", - "from __future__ import absolute_import\n", - "from __future__ import division\n", - "from __future__ import print_function\n", - "\n", - "import argparse\n", "import collections\n", "import time\n", "\n", "from google.protobuf import text_format\n", + "from absl import app\n", + "from absl import flags\n", "from ortools.data import pywraprcpsp\n", "from ortools.sat.python import cp_model\n", "\n", - "PARSER = argparse.ArgumentParser()\n", - "PARSER.add_argument(\n", - " '--input', default=\"\", help='Input file to parse and solve.')\n", - "PARSER.add_argument(\n", - " '--output_proto',\n", - " default=\"\",\n", - " help='Output file to write the cp_model'\n", - " 'proto to.')\n", - "PARSER.add_argument('--params', default=\"\", help='Sat solver parameters.')\n", + "FLAGS = flags.FLAGS\n", + "\n", + "flags.DEFINE_string('input', '', 'Input file to parse and solve.')\n", + "flags.DEFINE_string('output_proto', '',\n", + " 'Output file to write the cp_model proto to.')\n", + "flags.DEFINE_string('params', '', 'Sat solver parameters.')\n", + "flags.DEFINE_bool('use_interval_makespan', True,\n", + " 'Whether we encode the makespan using an interval or not.')\n", + "flags.DEFINE_integer('horizon', -1, 'Force horizon.')\n", "\n", "\n", "class SolutionPrinter(cp_model.CpSolverSolutionCallback):\n", @@ -121,7 +118,7 @@ " self.__solution_count += 1\n", "\n", "\n", - "def solve_rcpsp(problem, proto_file, params):\n", + "def SolveRcpsp(problem, proto_file, params):\n", " \"\"\"Parse and solve a given RCPSP problem in proto format.\"\"\"\n", "\n", " # Determine problem type.\n", @@ -149,6 +146,8 @@ " all_resources = range(num_resources)\n", "\n", " horizon = problem.deadline if problem.deadline != -1 else problem.horizon\n", + " if FLAGS.horizon > 0:\n", + " horizon = FLAGS.horizon\n", " if horizon == -1: # Naive computation.\n", " horizon = sum(max(r.duration for r in t.recipes) for t in problem.tasks)\n", " if problem.is_rcpsp_max:\n", @@ -258,6 +257,9 @@ "\n", " # Create makespan variable\n", " makespan = model.NewIntVar(0, horizon, 'makespan')\n", + " interval_makespan = model.NewIntervalVar(\n", + " makespan, model.NewIntVar(1, horizon, 'interval_makespan_size'),\n", + " model.NewConstant(horizon + 1), 'interval_makespan')\n", "\n", " # Add precedences.\n", " if problem.is_rcpsp_max:\n", @@ -286,6 +288,8 @@ " for t in all_active_tasks:\n", " for n in problem.tasks[t].successors:\n", " if n == num_tasks - 1:\n", + " # TODO(user): I guess these are still useful, but we might want to\n", + " # experiment with removing them.\n", " model.Add(task_ends[t] <= makespan)\n", " else:\n", " model.Add(task_ends[t] <= task_starts[n])\n", @@ -310,13 +314,19 @@ " max_cost += c * resource.unit_cost\n", " elif resource.renewable:\n", " if intervals_per_resource[r]:\n", - " model.AddCumulative(intervals_per_resource[r],\n", - " demands_per_resource[r], c)\n", + " if FLAGS.use_interval_makespan:\n", + " model.AddCumulative(\n", + " intervals_per_resource[r] + [interval_makespan],\n", + " demands_per_resource[r] + [c], c)\n", + " else:\n", + " model.AddCumulative(intervals_per_resource[r],\n", + " demands_per_resource[r], c)\n", " elif presences_per_resource[r]: # Non empty non renewable resource.\n", " if problem.is_consumer_producer:\n", - " model.AddReservoirConstraint(\n", - " starts_per_resource[r], demands_per_resource[r],\n", - " resource.min_capacity, resource.max_capacity)\n", + " model.AddReservoirConstraint(starts_per_resource[r],\n", + " demands_per_resource[r],\n", + " resource.min_capacity,\n", + " resource.max_capacity)\n", " else:\n", " model.Add(\n", " sum(presences_per_resource[r][i] *\n", @@ -326,8 +336,9 @@ " # Objective.\n", " if problem.is_resource_investment:\n", " objective = model.NewIntVar(0, max_cost, 'capacity_costs')\n", - " model.Add(objective == sum(problem.resources[i].unit_cost * capacities[\n", - " i] for i in range(len(capacities))))\n", + " model.Add(objective == sum(problem.resources[i].unit_cost *\n", + " capacities[i]\n", + " for i in range(len(capacities))))\n", " else:\n", " objective = makespan\n", "\n", @@ -341,15 +352,15 @@ " # Solve model.\n", " solver = cp_model.CpSolver()\n", " if params:\n", - " text_format.Merge(params, solver.parameters)\n", + " text_format.Parse(params, solver.parameters)\n", " solution_printer = SolutionPrinter()\n", " solver.SolveWithSolutionCallback(model, solution_printer)\n", " print(solver.ResponseStats())\n", "\n", "\n", "rcpsp_parser = pywraprcpsp.RcpspParser()\n", - "rcpsp_parser.ParseFile(args.input)\n", - "solve_rcpsp(rcpsp_parser.Problem(), args.output_proto, args.params)\n", + "rcpsp_parser.ParseFile(FLAGS.input)\n", + "SolveRcpsp(rcpsp_parser.Problem(), FLAGS.output_proto, FLAGS.params)\n", "\n" ] } diff --git a/examples/notebook/examples/reallocate_sat.ipynb b/examples/notebook/examples/reallocate_sat.ipynb index a855e093e6..b71359588d 100644 --- a/examples/notebook/examples/reallocate_sat.ipynb +++ b/examples/notebook/examples/reallocate_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,7 +81,6 @@ "# limitations under the License.\n", "\"\"\"Reallocate production to smooth it over years.\"\"\"\n", "\n", - "from __future__ import print_function\n", "\n", "import collections\n", "\n", diff --git a/examples/notebook/examples/shift_scheduling_sat.ipynb b/examples/notebook/examples/shift_scheduling_sat.ipynb index 9ff5abfb1b..f2f9f3d4d3 100644 --- a/examples/notebook/examples/shift_scheduling_sat.ipynb +++ b/examples/notebook/examples/shift_scheduling_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,21 +81,17 @@ "# limitations under the License.\n", "\"\"\"Creates a shift scheduling problem and solves it.\"\"\"\n", "\n", - "from __future__ import print_function\n", - "\n", - "import argparse\n", - "\n", "from ortools.sat.python import cp_model\n", "\n", "from google.protobuf import text_format\n", + "from absl import app\n", + "from absl import flags\n", "\n", - "PARSER = argparse.ArgumentParser()\n", - "PARSER.add_argument(\n", - " '--output_proto',\n", - " default=\"\",\n", - " help='Output file to write the cp_model'\n", - " 'proto to.')\n", - "PARSER.add_argument('--params', default=\"\", help='Sat solver parameters.')\n", + "FLAGS = flags.FLAGS\n", + "\n", + "flags.DEFINE_string('output_proto', '',\n", + " 'Output file to write the cp_model proto to.')\n", + "flags.DEFINE_string('params', '', 'Sat solver parameters.')\n", "\n", "\n", "def negated_bounded_span(works, start, length):\n", @@ -161,13 +157,13 @@ "\n", " # Forbid sequences that are too short.\n", " for length in range(1, hard_min):\n", - " for start in range(len(works) - length + 1):\n", + " for start in range(len(works) - length - 1):\n", " model.AddBoolOr(negated_bounded_span(works, start, length))\n", "\n", " # Penalize sequences that are below the soft limit.\n", " if min_cost > 0:\n", " for length in range(hard_min, soft_min):\n", - " for start in range(len(works) - length + 1):\n", + " for start in range(len(works) - length - 1):\n", " span = negated_bounded_span(works, start, length)\n", " name = ': under_span(start=%i, length=%i)' % (start, length)\n", " lit = model.NewBoolVar(prefix + name)\n", @@ -181,7 +177,7 @@ " # Penalize sequences that are above the soft limit.\n", " if max_cost > 0:\n", " for length in range(soft_max + 1, hard_max + 1):\n", - " for start in range(len(works) - length + 1):\n", + " for start in range(len(works) - length - 1):\n", " span = negated_bounded_span(works, start, length)\n", " name = ': over_span(start=%i, length=%i)' % (start, length)\n", " lit = model.NewBoolVar(prefix + name)\n", @@ -192,7 +188,7 @@ " cost_coefficients.append(max_cost * (length - soft_max))\n", "\n", " # Just forbid any sequence of true variables with length hard_max + 1\n", - " for start in range(len(works) - hard_max):\n", + " for start in range(len(works) - hard_max - 1):\n", " model.AddBoolOr(\n", " [works[i].Not() for i in range(start, start + hard_max + 1)])\n", " return cost_literals, cost_coefficients\n", @@ -290,7 +286,7 @@ " (3, 0, 5, -2),\n", " # Employee 5 wants a night shift on the second Thursday.\n", " (5, 3, 10, -2),\n", - " # Employee 2 does not want a night shift on the first Friday.\n", + " # Employee 2 does not want a night shift on the third Friday.\n", " (2, 3, 4, 4)\n", " ]\n", "\n", @@ -377,8 +373,8 @@ " works = [work[e, shift, d] for d in range(num_days)]\n", " variables, coeffs = add_soft_sequence_constraint(\n", " model, works, hard_min, soft_min, min_cost, soft_max, hard_max,\n", - " max_cost, 'shift_constraint(employee %i, shift %i)' % (e,\n", - " shift))\n", + " max_cost,\n", + " 'shift_constraint(employee %i, shift %i)' % (e, shift))\n", " obj_bool_vars.extend(variables)\n", " obj_bool_coeffs.extend(coeffs)\n", "\n", @@ -401,8 +397,8 @@ " for e in range(num_employees):\n", " for d in range(num_days - 1):\n", " transition = [\n", - " work[e, previous_shift, d].Not(),\n", - " work[e, next_shift, d + 1].Not()\n", + " work[e, previous_shift, d].Not(), work[e, next_shift,\n", + " d + 1].Not()\n", " ]\n", " if cost == 0:\n", " model.AddBoolOr(transition)\n", @@ -436,9 +432,9 @@ " # Objective\n", " model.Minimize(\n", " sum(obj_bool_vars[i] * obj_bool_coeffs[i]\n", - " for i in range(len(obj_bool_vars)))\n", - " + sum(obj_int_vars[i] * obj_int_coeffs[i]\n", - " for i in range(len(obj_int_vars))))\n", + " for i in range(len(obj_bool_vars))) +\n", + " sum(obj_int_vars[i] * obj_int_coeffs[i]\n", + " for i in range(len(obj_int_vars))))\n", "\n", " if output_proto:\n", " print('Writing proto to %s' % output_proto)\n", @@ -447,9 +443,8 @@ "\n", " # Solve the model.\n", " solver = cp_model.CpSolver()\n", - " solver.parameters.num_search_workers = 8\n", " if params:\n", - " text_format.Merge(params, solver.parameters)\n", + " text_format.Parse(params, solver.parameters)\n", " solution_printer = cp_model.ObjectiveSolutionPrinter()\n", " status = solver.SolveWithSolutionCallback(model, solution_printer)\n", "\n", @@ -483,11 +478,14 @@ " (var.Name(), solver.Value(var), obj_int_coeffs[i]))\n", "\n", " print()\n", - " print(solver.ResponseStats())\n", + " print('Statistics')\n", + " print(' - status : %s' % solver.StatusName(status))\n", + " print(' - conflicts : %i' % solver.NumConflicts())\n", + " print(' - branches : %i' % solver.NumBranches())\n", + " print(' - wall time : %f s' % solver.WallTime())\n", "\n", "\n", - "\"\"\"Main.\"\"\"\n", - "solve_shift_scheduling(args.params, args.output_proto)\n", + "solve_shift_scheduling(FLAGS.params, FLAGS.output_proto)\n", "\n" ] } diff --git a/examples/notebook/examples/single_machine_scheduling_with_setup_release_due_dates_sat.ipynb b/examples/notebook/examples/single_machine_scheduling_with_setup_release_due_dates_sat.ipynb index 5eb24d9772..f814553e2c 100644 --- a/examples/notebook/examples/single_machine_scheduling_with_setup_release_due_dates_sat.ipynb +++ b/examples/notebook/examples/single_machine_scheduling_with_setup_release_due_dates_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -80,9 +80,6 @@ "# See the License for the specific language governing permissions and\n", "# limitations under the License.\n", "\"\"\"Single machine jobshop with setup times, release dates and due dates.\"\"\"\n", - "from __future__ import print_function\n", - "from __future__ import absolute_import\n", - "from __future__ import division\n", "\n", "import argparse\n", "\n", diff --git a/examples/notebook/examples/steel_mill_slab_sat.ipynb b/examples/notebook/examples/steel_mill_slab_sat.ipynb index 37f251e398..fda185f811 100644 --- a/examples/notebook/examples/steel_mill_slab_sat.ipynb +++ b/examples/notebook/examples/steel_mill_slab_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,7 +81,6 @@ "# limitations under the License.\n", "\"\"\"Solves the Stell Mill Slab problem with 4 different techniques.\"\"\"\n", "\n", - "from __future__ import print_function\n", "\n", "import argparse\n", "import collections\n", diff --git a/examples/notebook/examples/stigler_diet.ipynb b/examples/notebook/examples/stigler_diet.ipynb index 3c7cf0ba92..e998333e90 100644 --- a/examples/notebook/examples/stigler_diet.ipynb +++ b/examples/notebook/examples/stigler_diet.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -83,8 +83,6 @@ "# limitations under the License.\n", "\"\"\"Stigler diet example\"\"\"\n", "\n", - "from __future__ import print_function\n", - "from six.moves import xrange\n", "from ortools.linear_solver import pywraplp\n", "\n", "\n", diff --git a/examples/notebook/examples/sudoku_sat.ipynb b/examples/notebook/examples/sudoku_sat.ipynb index 4e2e81bd08..434b4bbf87 100644 --- a/examples/notebook/examples/sudoku_sat.ipynb +++ b/examples/notebook/examples/sudoku_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,8 +81,6 @@ "# limitations under the License.\n", "\"\"\"This model implements a sudoku solver.\"\"\"\n", "\n", - "from __future__ import print_function\n", - "\n", "from ortools.sat.python import cp_model\n", "\n", "\n", @@ -97,10 +95,10 @@ " cell = list(range(0, cell_size))\n", "\n", " initial_grid = [[0, 6, 0, 0, 5, 0, 0, 2, 0], [0, 0, 0, 3, 0, 0, 0, 9, 0],\n", - " [7, 0, 0, 6, 0, 0, 0, 1, 0], [0, 0, 6, 0, 3, 0, 4, 0, 0], [\n", - " 0, 0, 4, 0, 7, 0, 1, 0, 0\n", - " ], [0, 0, 5, 0, 9, 0, 8, 0, 0], [0, 4, 0, 0, 0, 1, 0, 0, 6],\n", - " [0, 3, 0, 0, 0, 8, 0, 0, 0], [0, 2, 0, 0, 4, 0, 0, 5, 0]]\n", + " [7, 0, 0, 6, 0, 0, 0, 1, 0], [0, 0, 6, 0, 3, 0, 4, 0, 0],\n", + " [0, 0, 4, 0, 7, 0, 1, 0, 0], [0, 0, 5, 0, 9, 0, 8, 0, 0],\n", + " [0, 4, 0, 0, 0, 1, 0, 0, 6], [0, 3, 0, 0, 0, 8, 0, 0, 0],\n", + " [0, 2, 0, 0, 4, 0, 0, 5, 0]]\n", "\n", " grid = {}\n", " for i in line:\n", @@ -137,14 +135,7 @@ " status = solver.Solve(model)\n", " if status == cp_model.OPTIMAL:\n", " for i in line:\n", - " output = ''\n", - " for j in line:\n", - " output += str(int(solver.Value(grid[(i, j)]))) + ' '\n", - " if j == 2 or j == 5:\n", - " output += '| '\n", - " print(output)\n", - " if i == 2 or i == 5:\n", - " print('------|-------|-------')\n", + " print([int(solver.Value(grid[(i, j)])) for j in line])\n", "\n", "\n", "solve_sudoku()\n", diff --git a/examples/notebook/examples/task_allocation_sat.ipynb b/examples/notebook/examples/task_allocation_sat.ipynb index e5035bea6e..c642858d0b 100644 --- a/examples/notebook/examples/task_allocation_sat.ipynb +++ b/examples/notebook/examples/task_allocation_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -84,7 +84,6 @@ "http://yetanothermathprogrammingconsultant.blogspot.com/2018/09/minizinc-cpsat-vs-mip.html\n", "\"\"\"\n", "\n", - "from __future__ import print_function\n", "\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/examples/tasks_and_workers_assignment_sat.ipynb b/examples/notebook/examples/tasks_and_workers_assignment_sat.ipynb index 43288a71ef..f00ec1b15c 100644 --- a/examples/notebook/examples/tasks_and_workers_assignment_sat.ipynb +++ b/examples/notebook/examples/tasks_and_workers_assignment_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,7 +81,6 @@ "# limitations under the License.\n", "\"\"\"Tasks and workers to group assignment to average sum(cost) / #workers\"\"\"\n", "\n", - "from __future__ import print_function\n", "\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/examples/transit_time.ipynb b/examples/notebook/examples/transit_time.ipynb index 36b275848f..167178d0ef 100644 --- a/examples/notebook/examples/transit_time.ipynb +++ b/examples/notebook/examples/transit_time.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -90,8 +90,6 @@ " here we use: 114m x 80m city block\n", "\"\"\"\n", "\n", - "from __future__ import print_function\n", - "from six.moves import xrange\n", "from ortools.constraint_solver import pywrapcp\n", "from ortools.constraint_solver import routing_enums_pb2\n", "\n", @@ -242,9 +240,9 @@ " \"\"\"Initializes the total time matrix.\"\"\"\n", " self._total_time = {}\n", " # precompute total time to have time callback in O(1)\n", - " for from_node in xrange(data.num_locations):\n", + " for from_node in range(data.num_locations):\n", " self._total_time[from_node] = {}\n", - " for to_node in xrange(data.num_locations):\n", + " for to_node in range(data.num_locations):\n", " if from_node == to_node:\n", " self._total_time[from_node][to_node] = 0\n", " else:\n", diff --git a/examples/notebook/examples/tsp_sat.ipynb b/examples/notebook/examples/tsp_sat.ipynb index ab34e42233..f63f953ad1 100644 --- a/examples/notebook/examples/tsp_sat.ipynb +++ b/examples/notebook/examples/tsp_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,7 +81,6 @@ "# limitations under the License.\n", "\"\"\"Simple travelling salesman problem between cities.\"\"\"\n", "\n", - "from __future__ import print_function\n", "\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/examples/vendor_scheduling_sat.ipynb b/examples/notebook/examples/vendor_scheduling_sat.ipynb index f2a6001bd4..7327295e8c 100644 --- a/examples/notebook/examples/vendor_scheduling_sat.ipynb +++ b/examples/notebook/examples/vendor_scheduling_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,9 +81,6 @@ "# limitations under the License.\n", "\"\"\"Solves a simple shift scheduling problem.\"\"\"\n", "\n", - "from __future__ import absolute_import\n", - "from __future__ import division\n", - "from __future__ import print_function\n", "\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/examples/wedding_optimal_chart_sat.ipynb b/examples/notebook/examples/wedding_optimal_chart_sat.ipynb index 7892c970f1..2cbfd07ee3 100644 --- a/examples/notebook/examples/wedding_optimal_chart_sat.ipynb +++ b/examples/notebook/examples/wedding_optimal_chart_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -105,7 +105,6 @@ "https://github.com/google/or-tools/blob/master/examples/csharp/wedding_optimal_chart.cs\n", "\"\"\"\n", "\n", - "from __future__ import print_function\n", "import time\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/examples/worker_schedule_sat.ipynb b/examples/notebook/examples/worker_schedule_sat.ipynb index 8a86bb043f..03b0fe2c76 100644 --- a/examples/notebook/examples/worker_schedule_sat.ipynb +++ b/examples/notebook/examples/worker_schedule_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -79,7 +79,6 @@ "# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n", "# See the License for the specific language governing permissions and\n", "# limitations under the License.\n", - "from __future__ import print_function\n", "\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/examples/zebra_sat.ipynb b/examples/notebook/examples/zebra_sat.ipynb index 753130b831..9e85757781 100644 --- a/examples/notebook/examples/zebra_sat.ipynb +++ b/examples/notebook/examples/zebra_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -100,7 +100,6 @@ "\n", "Who owns a zebra and who drinks water?\n", "\"\"\"\n", - "from __future__ import print_function\n", "\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/graph/simple_max_flow_program.ipynb b/examples/notebook/graph/simple_max_flow_program.ipynb index 4d7445643b..d71771ba04 100644 --- a/examples/notebook/graph/simple_max_flow_program.ipynb +++ b/examples/notebook/graph/simple_max_flow_program.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -82,7 +82,6 @@ "# [START program]\n", "\"\"\"From Taha 'Introduction to Operations Research', example 6.4-2.\"\"\"\n", "# [START import]\n", - "from __future__ import print_function\n", "from ortools.graph import pywrapgraph\n", "# [END import]\n", "\n", diff --git a/examples/notebook/graph/simple_min_cost_flow_program.ipynb b/examples/notebook/graph/simple_min_cost_flow_program.ipynb index 54d7544614..def8c9a85d 100644 --- a/examples/notebook/graph/simple_min_cost_flow_program.ipynb +++ b/examples/notebook/graph/simple_min_cost_flow_program.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -82,7 +82,6 @@ "# [START program]\n", "\"\"\"From Bradley, H. and M., 'Applied Mathematical Programming', figure 8.1.\"\"\"\n", "# [START import]\n", - "from __future__ import print_function\n", "from ortools.graph import pywrapgraph\n", "# [END import]\n", "\n", diff --git a/examples/notebook/linear_solver/assignment_mip.ipynb b/examples/notebook/linear_solver/assignment_mip.ipynb index 731e1e8b59..25f00c29e7 100644 --- a/examples/notebook/linear_solver/assignment_mip.ipynb +++ b/examples/notebook/linear_solver/assignment_mip.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/linear_solver/bin_packing_mip.ipynb b/examples/notebook/linear_solver/bin_packing_mip.ipynb index 70a2c421cc..227b6f3059 100644 --- a/examples/notebook/linear_solver/bin_packing_mip.ipynb +++ b/examples/notebook/linear_solver/bin_packing_mip.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -82,7 +82,6 @@ "\"\"\"Solve a simple bin packing problem using a MIP solver.\"\"\"\n", "# [START program]\n", "# [START import]\n", - "from __future__ import print_function\n", "from ortools.linear_solver import pywraplp\n", "\n", "# [END import]\n", diff --git a/examples/notebook/linear_solver/integer_programming_example.ipynb b/examples/notebook/linear_solver/integer_programming_example.ipynb index a0775e29bb..126fef0dbd 100644 --- a/examples/notebook/linear_solver/integer_programming_example.ipynb +++ b/examples/notebook/linear_solver/integer_programming_example.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,7 +81,6 @@ "# limitations under the License.\n", "\"\"\"Small example to illustrate solving a MIP problem.\"\"\"\n", "# [START program]\n", - "from __future__ import print_function\n", "# [START import]\n", "from ortools.linear_solver import pywraplp\n", "# [END import]\n", diff --git a/examples/notebook/linear_solver/linear_programming_example.ipynb b/examples/notebook/linear_solver/linear_programming_example.ipynb index 11e2c204c9..85e5c39e85 100644 --- a/examples/notebook/linear_solver/linear_programming_example.ipynb +++ b/examples/notebook/linear_solver/linear_programming_example.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,7 +81,6 @@ "# limitations under the License.\n", "\"\"\"Linear optimization example.\"\"\"\n", "# [START program]\n", - "from __future__ import print_function\n", "# [START import]\n", "from ortools.linear_solver import pywraplp\n", "\n", diff --git a/examples/notebook/linear_solver/mip_var_array.ipynb b/examples/notebook/linear_solver/mip_var_array.ipynb index a19ecea2a1..25aaf19556 100644 --- a/examples/notebook/linear_solver/mip_var_array.ipynb +++ b/examples/notebook/linear_solver/mip_var_array.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -82,7 +82,6 @@ "\"\"\"MIP example that uses a variable array.\"\"\"\n", "# [START program]\n", "# [START import]\n", - "from __future__ import print_function\n", "from ortools.linear_solver import pywraplp\n", "\n", "# [END import]\n", diff --git a/examples/notebook/linear_solver/multiple_knapsack_mip.ipynb b/examples/notebook/linear_solver/multiple_knapsack_mip.ipynb index 09ad3a9b0c..a6e0a0f258 100644 --- a/examples/notebook/linear_solver/multiple_knapsack_mip.ipynb +++ b/examples/notebook/linear_solver/multiple_knapsack_mip.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -82,7 +82,6 @@ "\"\"\"Solve a multiple knapsack problem using a MIP solver.\"\"\"\n", "# [START program]\n", "# [START import]\n", - "from __future__ import print_function\n", "from ortools.linear_solver import pywraplp\n", "\n", "# [END import]\n", diff --git a/examples/notebook/linear_solver/simple_lp_program.ipynb b/examples/notebook/linear_solver/simple_lp_program.ipynb index 0517a1e6a7..b507e8a2c6 100644 --- a/examples/notebook/linear_solver/simple_lp_program.ipynb +++ b/examples/notebook/linear_solver/simple_lp_program.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -82,7 +82,6 @@ "\"\"\"Minimal example to call the GLOP solver.\"\"\"\n", "# [START program]\n", "# [START import]\n", - "from __future__ import print_function\n", "from ortools.linear_solver import pywraplp\n", "# [END import]\n", "\n", diff --git a/examples/notebook/linear_solver/simple_mip_program.ipynb b/examples/notebook/linear_solver/simple_mip_program.ipynb index 3629179b4a..df0c94ff88 100644 --- a/examples/notebook/linear_solver/simple_mip_program.ipynb +++ b/examples/notebook/linear_solver/simple_mip_program.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -82,7 +82,6 @@ "\"\"\"Integer programming examples that show how to use the APIs.\"\"\"\n", "# [START program]\n", "# [START import]\n", - "from __future__ import print_function\n", "from ortools.linear_solver import pywraplp\n", "# [END import]\n", "\n", diff --git a/examples/notebook/sat/assignment_sat.ipynb b/examples/notebook/sat/assignment_sat.ipynb index efc57d2455..09600c31e3 100644 --- a/examples/notebook/sat/assignment_sat.ipynb +++ b/examples/notebook/sat/assignment_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/sat/binpacking_problem_sat.ipynb b/examples/notebook/sat/binpacking_problem_sat.ipynb index d6b3b8d952..912fa5901f 100644 --- a/examples/notebook/sat/binpacking_problem_sat.ipynb +++ b/examples/notebook/sat/binpacking_problem_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,7 +81,6 @@ "# limitations under the License.\n", "\"\"\"Solves a binpacking problem using the CP-SAT solver.\"\"\"\n", "\n", - "from __future__ import print_function\n", "\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/sat/bool_or_sample_sat.ipynb b/examples/notebook/sat/bool_or_sample_sat.ipynb index 3ea82e3eed..570e8b1353 100644 --- a/examples/notebook/sat/bool_or_sample_sat.ipynb +++ b/examples/notebook/sat/bool_or_sample_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,9 +81,6 @@ "# limitations under the License.\n", "\"\"\"Code sample to demonstrates a simple Boolean constraint.\"\"\"\n", "\n", - "from __future__ import absolute_import\n", - "from __future__ import division\n", - "from __future__ import print_function\n", "\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/sat/boolean_product_sample_sat.ipynb b/examples/notebook/sat/boolean_product_sample_sat.ipynb index af6a21c345..89dae1846e 100644 --- a/examples/notebook/sat/boolean_product_sample_sat.ipynb +++ b/examples/notebook/sat/boolean_product_sample_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,9 +81,6 @@ "# limitations under the License.\n", "\"\"\"Code sample that encodes the product of two Boolean variables.\"\"\"\n", "\n", - "from __future__ import absolute_import\n", - "from __future__ import division\n", - "from __future__ import print_function\n", "\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/sat/channeling_sample_sat.ipynb b/examples/notebook/sat/channeling_sample_sat.ipynb index 0a4e049d5f..f62cfbc803 100644 --- a/examples/notebook/sat/channeling_sample_sat.ipynb +++ b/examples/notebook/sat/channeling_sample_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,9 +81,6 @@ "# limitations under the License.\n", "\"\"\"Link integer constraints together.\"\"\"\n", "\n", - "from __future__ import absolute_import\n", - "from __future__ import division\n", - "from __future__ import print_function\n", "\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/sat/cp_is_fun_sat.ipynb b/examples/notebook/sat/cp_is_fun_sat.ipynb index dccbdb0654..3f189f6cac 100644 --- a/examples/notebook/sat/cp_is_fun_sat.ipynb +++ b/examples/notebook/sat/cp_is_fun_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -89,7 +89,6 @@ "\"\"\"\n", "\n", "# [START program]\n", - "from __future__ import print_function\n", "\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/sat/earliness_tardiness_cost_sample_sat.ipynb b/examples/notebook/sat/earliness_tardiness_cost_sample_sat.ipynb index c37f41378c..7fd069a85e 100644 --- a/examples/notebook/sat/earliness_tardiness_cost_sample_sat.ipynb +++ b/examples/notebook/sat/earliness_tardiness_cost_sample_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,9 +81,6 @@ "# limitations under the License.\n", "\"\"\"Encodes an convex piecewise linear function.\"\"\"\n", "\n", - "from __future__ import absolute_import\n", - "from __future__ import division\n", - "from __future__ import print_function\n", "\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/sat/interval_sample_sat.ipynb b/examples/notebook/sat/interval_sample_sat.ipynb index 060cc1b7ae..ce0dbc64ac 100644 --- a/examples/notebook/sat/interval_sample_sat.ipynb +++ b/examples/notebook/sat/interval_sample_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,9 +81,6 @@ "# limitations under the License.\n", "\"\"\"Code sample to demonstrates how to build an interval.\"\"\"\n", "\n", - "from __future__ import absolute_import\n", - "from __future__ import division\n", - "from __future__ import print_function\n", "\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/sat/literal_sample_sat.ipynb b/examples/notebook/sat/literal_sample_sat.ipynb index 6d19732c60..1deff00c52 100644 --- a/examples/notebook/sat/literal_sample_sat.ipynb +++ b/examples/notebook/sat/literal_sample_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,9 +81,6 @@ "# limitations under the License.\n", "\"\"\"Code sample to demonstrate Boolean variable and literals.\"\"\"\n", "\n", - "from __future__ import absolute_import\n", - "from __future__ import division\n", - "from __future__ import print_function\n", "\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/sat/minimal_jobshop_sat.ipynb b/examples/notebook/sat/minimal_jobshop_sat.ipynb index de97dfeeeb..5bf3b64b46 100644 --- a/examples/notebook/sat/minimal_jobshop_sat.ipynb +++ b/examples/notebook/sat/minimal_jobshop_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -82,7 +82,6 @@ "\"\"\"Minimal jobshop example.\"\"\"\n", "\n", "# [START program]\n", - "from __future__ import print_function\n", "\n", "import collections\n", "\n", diff --git a/examples/notebook/sat/multiple_knapsack_sat.ipynb b/examples/notebook/sat/multiple_knapsack_sat.ipynb index 911e6bc70c..7ad99528b6 100644 --- a/examples/notebook/sat/multiple_knapsack_sat.ipynb +++ b/examples/notebook/sat/multiple_knapsack_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -83,9 +83,6 @@ "\"\"\"Solves a multiple knapsack problem using the CP-SAT solver.\"\"\"\n", "\n", "# [START import]\n", - "from __future__ import absolute_import\n", - "from __future__ import division\n", - "from __future__ import print_function\n", "\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/sat/no_overlap_sample_sat.ipynb b/examples/notebook/sat/no_overlap_sample_sat.ipynb index 3bbe9a38fc..7ed4669ac2 100644 --- a/examples/notebook/sat/no_overlap_sample_sat.ipynb +++ b/examples/notebook/sat/no_overlap_sample_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,9 +81,6 @@ "# limitations under the License.\n", "\"\"\"Code sample to demonstrate how to build a NoOverlap constraint.\"\"\"\n", "\n", - "from __future__ import absolute_import\n", - "from __future__ import division\n", - "from __future__ import print_function\n", "\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/sat/nurses_sat.ipynb b/examples/notebook/sat/nurses_sat.ipynb index 009d185a17..598d83f792 100644 --- a/examples/notebook/sat/nurses_sat.ipynb +++ b/examples/notebook/sat/nurses_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/sat/optional_interval_sample_sat.ipynb b/examples/notebook/sat/optional_interval_sample_sat.ipynb index b7468b43c7..993fb7f4ef 100644 --- a/examples/notebook/sat/optional_interval_sample_sat.ipynb +++ b/examples/notebook/sat/optional_interval_sample_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,9 +81,6 @@ "# limitations under the License.\n", "\"\"\"Code sample to demonstrates how to build an optional interval.\"\"\"\n", "\n", - "from __future__ import absolute_import\n", - "from __future__ import division\n", - "from __future__ import print_function\n", "\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/sat/rabbits_and_pheasants_sat.ipynb b/examples/notebook/sat/rabbits_and_pheasants_sat.ipynb index c09be5cc79..50636a369d 100644 --- a/examples/notebook/sat/rabbits_and_pheasants_sat.ipynb +++ b/examples/notebook/sat/rabbits_and_pheasants_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,9 +81,6 @@ "# limitations under the License.\n", "\"\"\"Rabbits and Pheasants quizz.\"\"\"\n", "\n", - "from __future__ import absolute_import\n", - "from __future__ import division\n", - "from __future__ import print_function\n", "\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/sat/ranking_sample_sat.ipynb b/examples/notebook/sat/ranking_sample_sat.ipynb index 26aa277d65..58aa77799e 100644 --- a/examples/notebook/sat/ranking_sample_sat.ipynb +++ b/examples/notebook/sat/ranking_sample_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,7 +81,6 @@ "# limitations under the License.\n", "\"\"\"Code sample to demonstrates how to rank intervals.\"\"\"\n", "\n", - "from __future__ import print_function\n", "\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/sat/reified_sample_sat.ipynb b/examples/notebook/sat/reified_sample_sat.ipynb index e83acd106d..21bb868774 100644 --- a/examples/notebook/sat/reified_sample_sat.ipynb +++ b/examples/notebook/sat/reified_sample_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,9 +81,6 @@ "# limitations under the License.\n", "\"\"\"Simple model with a reified constraint.\"\"\"\n", "\n", - "from __future__ import absolute_import\n", - "from __future__ import division\n", - "from __future__ import print_function\n", "\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/sat/schedule_requests_sat.ipynb b/examples/notebook/sat/schedule_requests_sat.ipynb index 755c0d3a85..d75df29b97 100644 --- a/examples/notebook/sat/schedule_requests_sat.ipynb +++ b/examples/notebook/sat/schedule_requests_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { diff --git a/examples/notebook/sat/scheduling_with_calendar_sample_sat.ipynb b/examples/notebook/sat/scheduling_with_calendar_sample_sat.ipynb index 22218cdd5a..57eb4ba96b 100644 --- a/examples/notebook/sat/scheduling_with_calendar_sample_sat.ipynb +++ b/examples/notebook/sat/scheduling_with_calendar_sample_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,9 +81,6 @@ "# limitations under the License.\n", "\"\"\"Code sample to demonstrate how an interval can span across a break.\"\"\"\n", "\n", - "from __future__ import absolute_import\n", - "from __future__ import division\n", - "from __future__ import print_function\n", "\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/sat/search_for_all_solutions_sample_sat.ipynb b/examples/notebook/sat/search_for_all_solutions_sample_sat.ipynb index ba751da7c5..72304dfde3 100644 --- a/examples/notebook/sat/search_for_all_solutions_sample_sat.ipynb +++ b/examples/notebook/sat/search_for_all_solutions_sample_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -82,9 +82,6 @@ "\"\"\"Code sample that solves a model and displays all solutions.\"\"\"\n", "\n", "# [START program]\n", - "from __future__ import absolute_import\n", - "from __future__ import division\n", - "from __future__ import print_function\n", "\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/sat/simple_sat_program.ipynb b/examples/notebook/sat/simple_sat_program.ipynb index d3292bcff2..dd01be64f8 100644 --- a/examples/notebook/sat/simple_sat_program.ipynb +++ b/examples/notebook/sat/simple_sat_program.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -82,9 +82,6 @@ "\"\"\"Simple solve.\"\"\"\n", "\n", "# [START program]\n", - "from __future__ import absolute_import\n", - "from __future__ import division\n", - "from __future__ import print_function\n", "\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/sat/solution_hinting_sample_sat.ipynb b/examples/notebook/sat/solution_hinting_sample_sat.ipynb index 0108d3af14..9c630caa9d 100644 --- a/examples/notebook/sat/solution_hinting_sample_sat.ipynb +++ b/examples/notebook/sat/solution_hinting_sample_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -82,9 +82,6 @@ "\"\"\"Code sample that solves a model using solution hinting.\"\"\"\n", "\n", "# [START program]\n", - "from __future__ import absolute_import\n", - "from __future__ import division\n", - "from __future__ import print_function\n", "\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/sat/solve_and_print_intermediate_solutions_sample_sat.ipynb b/examples/notebook/sat/solve_and_print_intermediate_solutions_sample_sat.ipynb index b284ccf749..a35d8da88b 100644 --- a/examples/notebook/sat/solve_and_print_intermediate_solutions_sample_sat.ipynb +++ b/examples/notebook/sat/solve_and_print_intermediate_solutions_sample_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -82,9 +82,6 @@ "\"\"\"Solves an optimization problem and displays all intermediate solutions.\"\"\"\n", "\n", "# [START program]\n", - "from __future__ import absolute_import\n", - "from __future__ import division\n", - "from __future__ import print_function\n", "\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/sat/solve_with_time_limit_sample_sat.ipynb b/examples/notebook/sat/solve_with_time_limit_sample_sat.ipynb index 7b8c9e612d..3a0e022001 100644 --- a/examples/notebook/sat/solve_with_time_limit_sample_sat.ipynb +++ b/examples/notebook/sat/solve_with_time_limit_sample_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,9 +81,6 @@ "# limitations under the License.\n", "\"\"\"Solves a problem with a time limit.\"\"\"\n", "\n", - "from __future__ import absolute_import\n", - "from __future__ import division\n", - "from __future__ import print_function\n", "\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/sat/step_function_sample_sat.ipynb b/examples/notebook/sat/step_function_sample_sat.ipynb index a06b8adc73..df9ebe1693 100644 --- a/examples/notebook/sat/step_function_sample_sat.ipynb +++ b/examples/notebook/sat/step_function_sample_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,9 +81,6 @@ "# limitations under the License.\n", "\"\"\"Implements a step function.\"\"\"\n", "\n", - "from __future__ import absolute_import\n", - "from __future__ import division\n", - "from __future__ import print_function\n", "\n", "from ortools.sat.python import cp_model\n", "\n", diff --git a/examples/notebook/sat/stop_after_n_solutions_sample_sat.ipynb b/examples/notebook/sat/stop_after_n_solutions_sample_sat.ipynb index 5e77808898..161185d552 100644 --- a/examples/notebook/sat/stop_after_n_solutions_sample_sat.ipynb +++ b/examples/notebook/sat/stop_after_n_solutions_sample_sat.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "##### Copyright 2020 The OR-Tools Authors." + "##### Copyright 2020 Google LLC." ] }, { @@ -81,9 +81,6 @@ "# limitations under the License.\n", "\"\"\"Code sample that solves a model and displays a small number of solutions.\"\"\"\n", "\n", - "from __future__ import absolute_import\n", - "from __future__ import division\n", - "from __future__ import print_function\n", "\n", "from ortools.sat.python import cp_model\n", "\n",