diff --git a/examples/notebook/algorithms/knapsack.ipynb b/examples/notebook/algorithms/knapsack.ipynb
index 8f007ed6c4..f9df7c9264 100644
--- a/examples/notebook/algorithms/knapsack.ipynb
+++ b/examples/notebook/algorithms/knapsack.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "93bcd319",
+ "id": "6fe774c1",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "971cfc26",
+ "id": "19108444",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "a7f5d600",
+ "id": "50a4cdf8",
"metadata": {},
"source": [
"# knapsack"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "e6c2754f",
+ "id": "a3979fa6",
"metadata": {},
"source": [
"
\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "c854806a",
+ "id": "f65ba5f9",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "dfe10e1c",
+ "id": "396ac14d",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "b80c9466",
+ "id": "6b82ee54",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/algorithms/simple_knapsack_program.ipynb b/examples/notebook/algorithms/simple_knapsack_program.ipynb
index 666fd21921..f95f091e08 100644
--- a/examples/notebook/algorithms/simple_knapsack_program.ipynb
+++ b/examples/notebook/algorithms/simple_knapsack_program.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "50621336",
+ "id": "0e92d630",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "641d7beb",
+ "id": "7ce7f69f",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "787d1364",
+ "id": "780fc17d",
"metadata": {},
"source": [
"# simple_knapsack_program"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "f5664c71",
+ "id": "40d24637",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "108e02f7",
+ "id": "9ae680d7",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "d4853051",
+ "id": "0f01b421",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "7907fdb4",
+ "id": "ee3d56b5",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/constraint_solver/cp_is_fun_cp.ipynb b/examples/notebook/constraint_solver/cp_is_fun_cp.ipynb
new file mode 100644
index 0000000000..ecafa376f8
--- /dev/null
+++ b/examples/notebook/constraint_solver/cp_is_fun_cp.ipynb
@@ -0,0 +1,163 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "id": "c9285a0d",
+ "metadata": {},
+ "source": [
+ "##### Copyright 2021 Google LLC."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "19e19090",
+ "metadata": {},
+ "source": [
+ "Licensed under the Apache License, Version 2.0 (the \"License\");\n",
+ "you may not use this file except in compliance with the License.\n",
+ "You may obtain a copy of the License at\n",
+ "\n",
+ " http://www.apache.org/licenses/LICENSE-2.0\n",
+ "\n",
+ "Unless required by applicable law or agreed to in writing, software\n",
+ "distributed under the License is distributed on an \"AS IS\" BASIS,\n",
+ "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"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "9ed9fd67",
+ "metadata": {},
+ "source": [
+ "# cp_is_fun_cp"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "21260bf9",
+ "metadata": {},
+ "source": [
+ ""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "ee1a66c7",
+ "metadata": {},
+ "source": [
+ "First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "cf537144",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "!pip install ortools"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "fa0154fd",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "#!/usr/bin/env python3\n",
+ "# Copyright 2010-2021 Google LLC\n",
+ "# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
+ "# you may not use this file except in compliance with the License.\n",
+ "# You may obtain a copy of the License at\n",
+ "#\n",
+ "# http://www.apache.org/licenses/LICENSE-2.0\n",
+ "#\n",
+ "# Unless required by applicable law or agreed to in writing, software\n",
+ "# distributed under the License is distributed on an \"AS IS\" BASIS,\n",
+ "# 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",
+ "# [START program]\n",
+ "\"\"\"Cryptarithmetic puzzle.\n",
+ "\n",
+ "First attempt to solve equation CP + IS + FUN = TRUE\n",
+ "where each letter represents a unique digit.\n",
+ "\n",
+ "This problem has 72 different solutions in base 10.\n",
+ "\"\"\"\n",
+ "# [START import]\n",
+ "from ortools.constraint_solver import pywrapcp\n",
+ "# [END import]\n",
+ "\n",
+ "\n",
+ "# Constraint programming engine\n",
+ "# [START solver]\n",
+ "solver = pywrapcp.Solver('CP is fun!')\n",
+ "# [END solver]\n",
+ "\n",
+ "# [START variables]\n",
+ "base = 10\n",
+ "\n",
+ "# Decision variables.\n",
+ "digits = list(range(0, base))\n",
+ "digits_without_zero = list(range(1, base))\n",
+ "c = solver.IntVar(digits_without_zero, 'C')\n",
+ "p = solver.IntVar(digits, 'P')\n",
+ "i = solver.IntVar(digits_without_zero, 'I')\n",
+ "s = solver.IntVar(digits, 'S')\n",
+ "f = solver.IntVar(digits_without_zero, 'F')\n",
+ "u = solver.IntVar(digits, 'U')\n",
+ "n = solver.IntVar(digits, 'N')\n",
+ "t = solver.IntVar(digits_without_zero, 'T')\n",
+ "r = solver.IntVar(digits, 'R')\n",
+ "e = solver.IntVar(digits, 'E')\n",
+ "\n",
+ "# We need to group variables in a list to use the constraint AllDifferent.\n",
+ "letters = [c, p, i, s, f, u, n, t, r, e]\n",
+ "\n",
+ "# Verify that we have enough digits.\n",
+ "assert base >= len(letters)\n",
+ "# [END variables]\n",
+ "\n",
+ "# Define constraints.\n",
+ "# [START constraints]\n",
+ "solver.Add(solver.AllDifferent(letters))\n",
+ "\n",
+ "# CP + IS + FUN = TRUE\n",
+ "solver.Add(p + s + n + base * (c + i + u) + base * base * f == e +\n",
+ " base * u + base * base * r + base * base * base * t)\n",
+ "# [END constraints]\n",
+ "\n",
+ "# [START solve]\n",
+ "solution_count = 0\n",
+ "db = solver.Phase(letters, solver.INT_VAR_DEFAULT, solver.INT_VALUE_DEFAULT)\n",
+ "solver.NewSearch(db)\n",
+ "while solver.NextSolution():\n",
+ " print(letters)\n",
+ " # Is CP + IS + FUN = TRUE?\n",
+ " assert (base * c.Value() + p.Value() + base * i.Value() + s.Value() +\n",
+ " base * base * f.Value() + base * u.Value() +\n",
+ " n.Value() == base * base * base * t.Value() +\n",
+ " base * base * r.Value() + base * u.Value() + e.Value())\n",
+ " solution_count += 1\n",
+ "solver.EndSearch()\n",
+ "print(f'Number of solutions found: {solution_count}')\n",
+ "# [END solve]\n",
+ "\n"
+ ]
+ }
+ ],
+ "metadata": {},
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/examples/notebook/constraint_solver/cvrp.ipynb b/examples/notebook/constraint_solver/cvrp.ipynb
index e0f73bec7e..3caa271b93 100644
--- a/examples/notebook/constraint_solver/cvrp.ipynb
+++ b/examples/notebook/constraint_solver/cvrp.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "2ddb2b8f",
+ "id": "c0fc7eab",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "828807d1",
+ "id": "93dc1a36",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "aedcf2ce",
+ "id": "1bf43435",
"metadata": {},
"source": [
"# cvrp"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "57b388d2",
+ "id": "71913d19",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "82fec21b",
+ "id": "3cbec4e4",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "75ee15f8",
+ "id": "bb2af320",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "73095a07",
+ "id": "d03d2f7d",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/constraint_solver/cvrp_reload.ipynb b/examples/notebook/constraint_solver/cvrp_reload.ipynb
index 25b1555717..22a78cf96c 100644
--- a/examples/notebook/constraint_solver/cvrp_reload.ipynb
+++ b/examples/notebook/constraint_solver/cvrp_reload.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "52a54c92",
+ "id": "6bdc14ed",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "afc8343a",
+ "id": "21cd67e6",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "6e567e2a",
+ "id": "aec1818d",
"metadata": {},
"source": [
"# cvrp_reload"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "6c54ccf6",
+ "id": "e45c944c",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "fd058dad",
+ "id": "f603de3b",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "7819d1c6",
+ "id": "5fb17736",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "d60ff22f",
+ "id": "5caf8cc1",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/constraint_solver/cvrptw.ipynb b/examples/notebook/constraint_solver/cvrptw.ipynb
index 409262db74..e04824a2bb 100644
--- a/examples/notebook/constraint_solver/cvrptw.ipynb
+++ b/examples/notebook/constraint_solver/cvrptw.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "e396b229",
+ "id": "f5b5c92c",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "7dcb9d41",
+ "id": "fa0e0054",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "91eddf43",
+ "id": "e4d6908c",
"metadata": {},
"source": [
"# cvrptw"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "6c0132d7",
+ "id": "25118889",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "ff996c61",
+ "id": "b9083d2e",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "d42b4781",
+ "id": "8f9e7452",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "501da3fe",
+ "id": "36bd089b",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/constraint_solver/cvrptw_break.ipynb b/examples/notebook/constraint_solver/cvrptw_break.ipynb
index 98a090aa54..a08afd9d8b 100644
--- a/examples/notebook/constraint_solver/cvrptw_break.ipynb
+++ b/examples/notebook/constraint_solver/cvrptw_break.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "349258a4",
+ "id": "e5262af7",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "ac5fbcff",
+ "id": "a014d63c",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "be884605",
+ "id": "38f0f09d",
"metadata": {},
"source": [
"# cvrptw_break"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "4e6a756c",
+ "id": "f549e41c",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "77f26b01",
+ "id": "f2dcbea4",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "80f875e9",
+ "id": "1bab269a",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "6e5438d6",
+ "id": "6b90c55f",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/constraint_solver/nqueens_cp.ipynb b/examples/notebook/constraint_solver/nqueens_cp.ipynb
new file mode 100644
index 0000000000..f07912b522
--- /dev/null
+++ b/examples/notebook/constraint_solver/nqueens_cp.ipynb
@@ -0,0 +1,160 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "id": "5a53fc20",
+ "metadata": {},
+ "source": [
+ "##### Copyright 2021 Google LLC."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "12af48ea",
+ "metadata": {},
+ "source": [
+ "Licensed under the Apache License, Version 2.0 (the \"License\");\n",
+ "you may not use this file except in compliance with the License.\n",
+ "You may obtain a copy of the License at\n",
+ "\n",
+ " http://www.apache.org/licenses/LICENSE-2.0\n",
+ "\n",
+ "Unless required by applicable law or agreed to in writing, software\n",
+ "distributed under the License is distributed on an \"AS IS\" BASIS,\n",
+ "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"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "6e54fac6",
+ "metadata": {},
+ "source": [
+ "# nqueens_cp"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "fefb5045",
+ "metadata": {},
+ "source": [
+ ""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "d8917a59",
+ "metadata": {},
+ "source": [
+ "First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "3234ebe7",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "!pip install ortools"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "6e21c8e8",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "#!/usr/bin/env python3\n",
+ "# Copyright 2010-2021 Google LLC\n",
+ "# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
+ "# you may not use this file except in compliance with the License.\n",
+ "# You may obtain a copy of the License at\n",
+ "#\n",
+ "# http://www.apache.org/licenses/LICENSE-2.0\n",
+ "#\n",
+ "# Unless required by applicable law or agreed to in writing, software\n",
+ "# distributed under the License is distributed on an \"AS IS\" BASIS,\n",
+ "# 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",
+ "# [START program]\n",
+ "\"\"\"OR-Tools solution to the N-queens problem.\"\"\"\n",
+ "# [START import]\n",
+ "import sys\n",
+ "from ortools.constraint_solver import pywrapcp\n",
+ "# [END import]\n",
+ "\n",
+ "\n",
+ "# Creates the solver.\n",
+ "# [START solver]\n",
+ "solver = pywrapcp.Solver('n-queens')\n",
+ "# [END solver]\n",
+ "\n",
+ "# Creates the variables.\n",
+ "# [START variables]\n",
+ "# The array index is the column, and the value is the row.\n",
+ "queens = [\n",
+ " solver.IntVar(0, board_size - 1, f'x{i}') for i in range(board_size)\n",
+ "]\n",
+ "# [END variables]\n",
+ "\n",
+ "# Creates the constraints.\n",
+ "# [START constraints]\n",
+ "# All rows must be different.\n",
+ "solver.Add(solver.AllDifferent(queens))\n",
+ "\n",
+ "# No two queens can be on the same diagonal.\n",
+ "solver.Add(solver.AllDifferent([queens[i] + i for i in range(board_size)]))\n",
+ "solver.Add(solver.AllDifferent([queens[i] - i for i in range(board_size)]))\n",
+ "# [END constraints]\n",
+ "\n",
+ "# [START db]\n",
+ "db = solver.Phase(queens, solver.CHOOSE_FIRST_UNBOUND,\n",
+ " solver.ASSIGN_MIN_VALUE)\n",
+ "# [END db]\n",
+ "\n",
+ "# [START solve]\n",
+ "# Iterates through the solutions, displaying each.\n",
+ "num_solutions = 0\n",
+ "solver.NewSearch(db)\n",
+ "while solver.NextSolution():\n",
+ " # Displays the solution just computed.\n",
+ " for i in range(board_size):\n",
+ " for j in range(board_size):\n",
+ " if queens[j].Value() == i:\n",
+ " # There is a queen in column j, row i.\n",
+ " print('Q', end=' ')\n",
+ " else:\n",
+ " print('_', end=' ')\n",
+ " print()\n",
+ " print()\n",
+ " num_solutions += 1\n",
+ "solver.EndSearch()\n",
+ "# [END solve]\n",
+ "\n",
+ "# Statistics.\n",
+ "# [START statistics]\n",
+ "print('\\nStatistics')\n",
+ "print(f' failures: {solver.Failures()}')\n",
+ "print(f' branches: {solver.Branches()}')\n",
+ "print(f' wall time: {solver.WallTime()} ms')\n",
+ "print(f' Solutions found: {num_solutions}')\n",
+ "# [END statistics]\n",
+ "\n"
+ ]
+ }
+ ],
+ "metadata": {},
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/examples/notebook/constraint_solver/simple_cp_program.ipynb b/examples/notebook/constraint_solver/simple_cp_program.ipynb
index b1998fdd05..84ed10f847 100644
--- a/examples/notebook/constraint_solver/simple_cp_program.ipynb
+++ b/examples/notebook/constraint_solver/simple_cp_program.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "60bab3a5",
+ "id": "9c9c5044",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "c3c2ba2a",
+ "id": "ac84f530",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "7733fbcb",
+ "id": "9c622751",
"metadata": {},
"source": [
"# simple_cp_program"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "f8f02597",
+ "id": "6eb6c842",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "317821c6",
+ "id": "b02b4077",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "a403bd30",
+ "id": "05dea269",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "ee632a49",
+ "id": "4db5d945",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/constraint_solver/simple_routing_program.ipynb b/examples/notebook/constraint_solver/simple_routing_program.ipynb
index 5765cbf2e0..93ef2fe236 100644
--- a/examples/notebook/constraint_solver/simple_routing_program.ipynb
+++ b/examples/notebook/constraint_solver/simple_routing_program.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "73c3dee6",
+ "id": "58e307f8",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "4b5b29f7",
+ "id": "e54fadbd",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "4a9146a6",
+ "id": "6231fc22",
"metadata": {},
"source": [
"# simple_routing_program"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "4737a1e8",
+ "id": "53c76b90",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "016a31c1",
+ "id": "14872edb",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "23dc3298",
+ "id": "5ce7a297",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "383c75e8",
+ "id": "d34ffa99",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/constraint_solver/tsp.ipynb b/examples/notebook/constraint_solver/tsp.ipynb
index 2f54854f53..d5a42eadec 100644
--- a/examples/notebook/constraint_solver/tsp.ipynb
+++ b/examples/notebook/constraint_solver/tsp.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "e28b12af",
+ "id": "f782f7a8",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "f76be8dd",
+ "id": "3e459c35",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "a23bc189",
+ "id": "f4015114",
"metadata": {},
"source": [
"# tsp"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "20f2235b",
+ "id": "35d8d74b",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "3a63c877",
+ "id": "db999acc",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "cc7e8648",
+ "id": "efbc38d1",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "2a014ff0",
+ "id": "dcf09c80",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/constraint_solver/tsp_circuit_board.ipynb b/examples/notebook/constraint_solver/tsp_circuit_board.ipynb
index 7b4ec3d48a..9f52ed3299 100644
--- a/examples/notebook/constraint_solver/tsp_circuit_board.ipynb
+++ b/examples/notebook/constraint_solver/tsp_circuit_board.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "e9022ee8",
+ "id": "5f004b6d",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "675e834c",
+ "id": "7eae81e8",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "048496bf",
+ "id": "d61c03b3",
"metadata": {},
"source": [
"# tsp_circuit_board"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "3266177f",
+ "id": "1370040d",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "3663296d",
+ "id": "3e465dfb",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "55e2e092",
+ "id": "d956a9db",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "87718beb",
+ "id": "14d7f567",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/constraint_solver/tsp_cities.ipynb b/examples/notebook/constraint_solver/tsp_cities.ipynb
index 74b6b8ca58..5da3a55d28 100644
--- a/examples/notebook/constraint_solver/tsp_cities.ipynb
+++ b/examples/notebook/constraint_solver/tsp_cities.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "7915156f",
+ "id": "960f04a5",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "4b1c3491",
+ "id": "00f05fa3",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "7780313f",
+ "id": "f4885655",
"metadata": {},
"source": [
"# tsp_cities"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "dd0c3e8c",
+ "id": "ce9b1c06",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "18225271",
+ "id": "45ec7433",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "72ab54d5",
+ "id": "38cac232",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "9cf37cd1",
+ "id": "6f9b30c9",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/constraint_solver/tsp_distance_matrix.ipynb b/examples/notebook/constraint_solver/tsp_distance_matrix.ipynb
index bb63b58af5..06b3497f9a 100644
--- a/examples/notebook/constraint_solver/tsp_distance_matrix.ipynb
+++ b/examples/notebook/constraint_solver/tsp_distance_matrix.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "5fd8985c",
+ "id": "fff9e482",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "fd2627cb",
+ "id": "3d7a8f1a",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "cea08948",
+ "id": "7fda6766",
"metadata": {},
"source": [
"# tsp_distance_matrix"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "3810da41",
+ "id": "5dc26d28",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "0ce400dd",
+ "id": "261e6273",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "83fb94e9",
+ "id": "5518b867",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "9ca60546",
+ "id": "6edd0004",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/constraint_solver/vrp.ipynb b/examples/notebook/constraint_solver/vrp.ipynb
index 434c1c417a..00662ea7c2 100644
--- a/examples/notebook/constraint_solver/vrp.ipynb
+++ b/examples/notebook/constraint_solver/vrp.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "160c8465",
+ "id": "858141c9",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "a7083336",
+ "id": "35109b03",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "7a784584",
+ "id": "4cabc570",
"metadata": {},
"source": [
"# vrp"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "4747d365",
+ "id": "639b1087",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "83d26fb6",
+ "id": "0798875d",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "42697668",
+ "id": "9ec9cf57",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "33746109",
+ "id": "f0a3c412",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/constraint_solver/vrp_breaks.ipynb b/examples/notebook/constraint_solver/vrp_breaks.ipynb
index d94e6f5a27..c19500a61b 100644
--- a/examples/notebook/constraint_solver/vrp_breaks.ipynb
+++ b/examples/notebook/constraint_solver/vrp_breaks.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "2d1e25a5",
+ "id": "70942b21",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "a0b209df",
+ "id": "5b399e75",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "d499b5e6",
+ "id": "85c7e2d1",
"metadata": {},
"source": [
"# vrp_breaks"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "4c1c33e1",
+ "id": "d70ca4a0",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "9c7d9039",
+ "id": "65338b19",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "699d7c47",
+ "id": "87304230",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "82611f8b",
+ "id": "dcd925af",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/constraint_solver/vrp_breaks_from_start.ipynb b/examples/notebook/constraint_solver/vrp_breaks_from_start.ipynb
index 8a14f5ae68..7f956c39f0 100644
--- a/examples/notebook/constraint_solver/vrp_breaks_from_start.ipynb
+++ b/examples/notebook/constraint_solver/vrp_breaks_from_start.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "54b4252e",
+ "id": "3fe21dd6",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "105a373d",
+ "id": "5db64da1",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "f56f1fc9",
+ "id": "021a49b8",
"metadata": {},
"source": [
"# vrp_breaks_from_start"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "e4eb3751",
+ "id": "c31c4de6",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "00ecde8c",
+ "id": "745cf35d",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "91ba7503",
+ "id": "222da325",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "54c782c8",
+ "id": "a489a369",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/constraint_solver/vrp_capacity.ipynb b/examples/notebook/constraint_solver/vrp_capacity.ipynb
index bd79062edc..0b30b3df4c 100644
--- a/examples/notebook/constraint_solver/vrp_capacity.ipynb
+++ b/examples/notebook/constraint_solver/vrp_capacity.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "fa7b776e",
+ "id": "9d984c7b",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "d77c537b",
+ "id": "386a7527",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "dea81b72",
+ "id": "f16ef124",
"metadata": {},
"source": [
"# vrp_capacity"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "bcc06fd1",
+ "id": "c363294d",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "a1db4ae8",
+ "id": "03a75c14",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "37cdec8f",
+ "id": "39cb7e0e",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "c6b6718f",
+ "id": "ff52f913",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/constraint_solver/vrp_drop_nodes.ipynb b/examples/notebook/constraint_solver/vrp_drop_nodes.ipynb
index 396aa45ebc..933a717fd3 100644
--- a/examples/notebook/constraint_solver/vrp_drop_nodes.ipynb
+++ b/examples/notebook/constraint_solver/vrp_drop_nodes.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "94a6b19c",
+ "id": "af355f00",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "e1556f05",
+ "id": "0c16feca",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "8665a89c",
+ "id": "e498df02",
"metadata": {},
"source": [
"# vrp_drop_nodes"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "a8277f3a",
+ "id": "dab2c048",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "9cbfd53d",
+ "id": "7fbe2322",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "595330d1",
+ "id": "c61a39ef",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "04a2c58b",
+ "id": "583a14bf",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/constraint_solver/vrp_global_span.ipynb b/examples/notebook/constraint_solver/vrp_global_span.ipynb
index 31037b0055..6aaaed6cbe 100644
--- a/examples/notebook/constraint_solver/vrp_global_span.ipynb
+++ b/examples/notebook/constraint_solver/vrp_global_span.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "9b04fb79",
+ "id": "13207860",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "ad59fa0b",
+ "id": "d88d4e4c",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "9eaf4d47",
+ "id": "0c2302e8",
"metadata": {},
"source": [
"# vrp_global_span"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "9a910b57",
+ "id": "01094fb7",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "79507892",
+ "id": "7c30bae9",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "68edc639",
+ "id": "872053d4",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "983f32c3",
+ "id": "63edd5e4",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/constraint_solver/vrp_initial_routes.ipynb b/examples/notebook/constraint_solver/vrp_initial_routes.ipynb
index 260cd43ec9..90e5f71e3b 100644
--- a/examples/notebook/constraint_solver/vrp_initial_routes.ipynb
+++ b/examples/notebook/constraint_solver/vrp_initial_routes.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "4e0a51c8",
+ "id": "6c9ebc0c",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "b0d4de73",
+ "id": "3f403f7d",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "51ccac64",
+ "id": "163f6ee3",
"metadata": {},
"source": [
"# vrp_initial_routes"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "093de4be",
+ "id": "4f1be7d6",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "d3b2fd75",
+ "id": "2775a83c",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "e3d30c12",
+ "id": "0b5d68e3",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "606b007b",
+ "id": "55384ca8",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/constraint_solver/vrp_node_max.ipynb b/examples/notebook/constraint_solver/vrp_node_max.ipynb
index d217ffc256..bbed5e4aa0 100644
--- a/examples/notebook/constraint_solver/vrp_node_max.ipynb
+++ b/examples/notebook/constraint_solver/vrp_node_max.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "8a3b8363",
+ "id": "cfa33f9f",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "952d3c86",
+ "id": "6b4d93f6",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "a988f7d4",
+ "id": "4cc7bb6c",
"metadata": {},
"source": [
"# vrp_node_max"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "3ff285c7",
+ "id": "ae0c9593",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "f2707823",
+ "id": "17cb0425",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "b3431969",
+ "id": "035b1545",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "28672527",
+ "id": "d05af53d",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/constraint_solver/vrp_nodes_indices.ipynb b/examples/notebook/constraint_solver/vrp_nodes_indices.ipynb
index 6f3690d85a..20fa81da8e 100644
--- a/examples/notebook/constraint_solver/vrp_nodes_indices.ipynb
+++ b/examples/notebook/constraint_solver/vrp_nodes_indices.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "4d11d16d",
+ "id": "5aabb68e",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "c3acdb2e",
+ "id": "22129495",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "207daa24",
+ "id": "b0817d6a",
"metadata": {},
"source": [
"# vrp_nodes_indices"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "ececcc1e",
+ "id": "6b92007c",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "9ac85d96",
+ "id": "fd276f61",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "064e8336",
+ "id": "8a99a81c",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "f4a56f3b",
+ "id": "4fad2e1f",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/constraint_solver/vrp_pickup_delivery.ipynb b/examples/notebook/constraint_solver/vrp_pickup_delivery.ipynb
index d2a8c45c17..9852a69052 100644
--- a/examples/notebook/constraint_solver/vrp_pickup_delivery.ipynb
+++ b/examples/notebook/constraint_solver/vrp_pickup_delivery.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "800f9381",
+ "id": "7078f172",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "4acf247b",
+ "id": "ea34ed8a",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "05edae14",
+ "id": "c85b1310",
"metadata": {},
"source": [
"# vrp_pickup_delivery"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "490b62db",
+ "id": "38cb12dc",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "c1db5c19",
+ "id": "90a068e7",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "30fac23a",
+ "id": "7039f94b",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "b1a35c63",
+ "id": "65262a14",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/constraint_solver/vrp_pickup_delivery_fifo.ipynb b/examples/notebook/constraint_solver/vrp_pickup_delivery_fifo.ipynb
index aa846a4520..41e6fde62f 100644
--- a/examples/notebook/constraint_solver/vrp_pickup_delivery_fifo.ipynb
+++ b/examples/notebook/constraint_solver/vrp_pickup_delivery_fifo.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "3c96db7f",
+ "id": "43a3bee5",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "d5c54c96",
+ "id": "5c969ad2",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "ba4ccfb9",
+ "id": "9d2058c6",
"metadata": {},
"source": [
"# vrp_pickup_delivery_fifo"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "a9f054e0",
+ "id": "4161f1f2",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "22779095",
+ "id": "4b514688",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "245c63d4",
+ "id": "f9e5e2c8",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "949697bf",
+ "id": "901cddbb",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/constraint_solver/vrp_pickup_delivery_lifo.ipynb b/examples/notebook/constraint_solver/vrp_pickup_delivery_lifo.ipynb
index 8624ac3286..1cc2125f17 100644
--- a/examples/notebook/constraint_solver/vrp_pickup_delivery_lifo.ipynb
+++ b/examples/notebook/constraint_solver/vrp_pickup_delivery_lifo.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "042cbbde",
+ "id": "9f575907",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "abb1485a",
+ "id": "01d1a799",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "a620ba16",
+ "id": "b7e128ac",
"metadata": {},
"source": [
"# vrp_pickup_delivery_lifo"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "cb773fe8",
+ "id": "991c48f2",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "e5abbbf9",
+ "id": "c279c2c3",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "1a5ba3a7",
+ "id": "60bbe751",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "1ebaf11b",
+ "id": "ff950536",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/constraint_solver/vrp_resources.ipynb b/examples/notebook/constraint_solver/vrp_resources.ipynb
index a9bf689fd9..0b8637ae2d 100644
--- a/examples/notebook/constraint_solver/vrp_resources.ipynb
+++ b/examples/notebook/constraint_solver/vrp_resources.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "5e175a7e",
+ "id": "8dfc0599",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "c6ad5a6c",
+ "id": "0ae5764e",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "2f8cc686",
+ "id": "58fd487f",
"metadata": {},
"source": [
"# vrp_resources"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "c3ab9318",
+ "id": "6558a101",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "68c3d4e2",
+ "id": "1c662a17",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "7ee1aa92",
+ "id": "eae65180",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "7772adeb",
+ "id": "a107beaa",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/constraint_solver/vrp_starts_ends.ipynb b/examples/notebook/constraint_solver/vrp_starts_ends.ipynb
index 89de35dcfa..73b20d720f 100644
--- a/examples/notebook/constraint_solver/vrp_starts_ends.ipynb
+++ b/examples/notebook/constraint_solver/vrp_starts_ends.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "1a398577",
+ "id": "e5410436",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "592a2fb9",
+ "id": "5daa48fa",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "d6d7c5ee",
+ "id": "8925cb6f",
"metadata": {},
"source": [
"# vrp_starts_ends"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "75b3f4d3",
+ "id": "f5ee552a",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "78936b8c",
+ "id": "797433a5",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "2e980174",
+ "id": "993c8f46",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "177ccc2e",
+ "id": "17db0d31",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/constraint_solver/vrp_time_windows.ipynb b/examples/notebook/constraint_solver/vrp_time_windows.ipynb
index e0173d3e6c..05b293c5dd 100644
--- a/examples/notebook/constraint_solver/vrp_time_windows.ipynb
+++ b/examples/notebook/constraint_solver/vrp_time_windows.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "7e935513",
+ "id": "13c90a9b",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "f9fef11c",
+ "id": "2307a605",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "e76f015b",
+ "id": "2b2d919c",
"metadata": {},
"source": [
"# vrp_time_windows"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "86d26ee7",
+ "id": "c97934a6",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "29394140",
+ "id": "9272b068",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "fc1f8c37",
+ "id": "3dc66be2",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "a0eabda1",
+ "id": "ba521d40",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/constraint_solver/vrp_time_windows_per_vehicles.ipynb b/examples/notebook/constraint_solver/vrp_time_windows_per_vehicles.ipynb
index cc3e08abbb..0901a7c716 100644
--- a/examples/notebook/constraint_solver/vrp_time_windows_per_vehicles.ipynb
+++ b/examples/notebook/constraint_solver/vrp_time_windows_per_vehicles.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "7c75ff11",
+ "id": "5530eb4e",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "e4f7ecec",
+ "id": "6d5e29bd",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "e5613b23",
+ "id": "8b089b57",
"metadata": {},
"source": [
"# vrp_time_windows_per_vehicles"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "d3fe4e7a",
+ "id": "2d0d3bea",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "d27171a2",
+ "id": "0258f0b8",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "31fac765",
+ "id": "c9e2fcad",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "39c0c306",
+ "id": "c2a65702",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/constraint_solver/vrp_tokens.ipynb b/examples/notebook/constraint_solver/vrp_tokens.ipynb
index c5c7566dd4..18f3dc50e5 100644
--- a/examples/notebook/constraint_solver/vrp_tokens.ipynb
+++ b/examples/notebook/constraint_solver/vrp_tokens.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "7f720c5d",
+ "id": "d380e3c1",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "d2167d2a",
+ "id": "39aec5c4",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "d206991f",
+ "id": "30b5e2e7",
"metadata": {},
"source": [
"# vrp_tokens"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "9e965377",
+ "id": "b7373fb6",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "cf333906",
+ "id": "f8ba73c3",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "c56051ec",
+ "id": "bf86aec2",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "920c9fa3",
+ "id": "ed938f25",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/constraint_solver/vrp_with_time_limit.ipynb b/examples/notebook/constraint_solver/vrp_with_time_limit.ipynb
index 26caaa6abb..8221fdcf38 100644
--- a/examples/notebook/constraint_solver/vrp_with_time_limit.ipynb
+++ b/examples/notebook/constraint_solver/vrp_with_time_limit.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "2df5101e",
+ "id": "40385ce6",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "d1a8531e",
+ "id": "b51c4c75",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "59ed5785",
+ "id": "77aab820",
"metadata": {},
"source": [
"# vrp_with_time_limit"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "16a413bb",
+ "id": "3eb2030e",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "0ef04c28",
+ "id": "77ca7816",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "05d4c369",
+ "id": "0b933f44",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "f0935e1f",
+ "id": "71982444",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/constraint_solver/vrpgs.ipynb b/examples/notebook/constraint_solver/vrpgs.ipynb
index 89ebbfa384..703352605c 100644
--- a/examples/notebook/constraint_solver/vrpgs.ipynb
+++ b/examples/notebook/constraint_solver/vrpgs.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "617728f3",
+ "id": "2f062270",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "b380acd9",
+ "id": "9b7773cc",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "64c14a55",
+ "id": "56e72dbd",
"metadata": {},
"source": [
"# vrpgs"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "07241d8e",
+ "id": "eda75982",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "4c85bb3d",
+ "id": "2b1d0be0",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "1ee63fce",
+ "id": "204f4563",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "ed9d337a",
+ "id": "4b91ba5d",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/constraint_solver/vrptw_store_solution_data.ipynb b/examples/notebook/constraint_solver/vrptw_store_solution_data.ipynb
index 21da1d8652..16e47cf1b2 100644
--- a/examples/notebook/constraint_solver/vrptw_store_solution_data.ipynb
+++ b/examples/notebook/constraint_solver/vrptw_store_solution_data.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "35153721",
+ "id": "1be33f0b",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "f333b46e",
+ "id": "bf7f9dc5",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "967931b3",
+ "id": "784bee98",
"metadata": {},
"source": [
"# vrptw_store_solution_data"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "70df7c8c",
+ "id": "4a8c21dd",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "69cef4fe",
+ "id": "36914f90",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "07f27144",
+ "id": "c7ed4373",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "668596b6",
+ "id": "8747822a",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/3_jugs_mip.ipynb b/examples/notebook/contrib/3_jugs_mip.ipynb
index 4c906939b0..a5818ae805 100644
--- a/examples/notebook/contrib/3_jugs_mip.ipynb
+++ b/examples/notebook/contrib/3_jugs_mip.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "97eed262",
+ "id": "03ad806a",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "cf1fc5d4",
+ "id": "5c019d4d",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "2ded5340",
+ "id": "887b7e41",
"metadata": {},
"source": [
"# 3_jugs_mip"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "6ed78d20",
+ "id": "7ddea1aa",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "b5a5c592",
+ "id": "62e08fd9",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "529695c9",
+ "id": "b5e200c6",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "ff756402",
+ "id": "e25340c2",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/3_jugs_regular.ipynb b/examples/notebook/contrib/3_jugs_regular.ipynb
index 4b7d36f80a..ac4afe22b1 100644
--- a/examples/notebook/contrib/3_jugs_regular.ipynb
+++ b/examples/notebook/contrib/3_jugs_regular.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "14cc1e1d",
+ "id": "d3313ddc",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "1666a0da",
+ "id": "3643345f",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "8094e18c",
+ "id": "26573d5d",
"metadata": {},
"source": [
"# 3_jugs_regular"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "fccfa8b8",
+ "id": "8f86eb9c",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "ccba13f7",
+ "id": "d2112763",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "0dc81953",
+ "id": "c95a76cc",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "13e7340f",
+ "id": "fc41c1ef",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/a_round_of_golf.ipynb b/examples/notebook/contrib/a_round_of_golf.ipynb
index b3f9479f2e..1852487cf5 100644
--- a/examples/notebook/contrib/a_round_of_golf.ipynb
+++ b/examples/notebook/contrib/a_round_of_golf.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "676c9a63",
+ "id": "e2f41ea1",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "11559da0",
+ "id": "cba355d7",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "215a3622",
+ "id": "efffee33",
"metadata": {},
"source": [
"# a_round_of_golf"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "8f99bab7",
+ "id": "98c4e991",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "7b49b205",
+ "id": "0917bdbe",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "06d61203",
+ "id": "ecacb034",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "003164cc",
+ "id": "09e18448",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/all_interval.ipynb b/examples/notebook/contrib/all_interval.ipynb
index b669019299..ffa5b7a19a 100644
--- a/examples/notebook/contrib/all_interval.ipynb
+++ b/examples/notebook/contrib/all_interval.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "ab169959",
+ "id": "074feb5c",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "a9d0d134",
+ "id": "6b037e7b",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "6792ad30",
+ "id": "25aa7004",
"metadata": {},
"source": [
"# all_interval"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "6bcafd13",
+ "id": "779f401c",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "846b442e",
+ "id": "78a147c8",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "e14daee6",
+ "id": "2dc6f26f",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "29009d6f",
+ "id": "ed674953",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/alldifferent_except_0.ipynb b/examples/notebook/contrib/alldifferent_except_0.ipynb
index 1c1c8bdae9..e63a4ba0ef 100644
--- a/examples/notebook/contrib/alldifferent_except_0.ipynb
+++ b/examples/notebook/contrib/alldifferent_except_0.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "b4dab548",
+ "id": "449aed0b",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "637039d7",
+ "id": "39b09721",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "078c5cce",
+ "id": "7be8ff1e",
"metadata": {},
"source": [
"# alldifferent_except_0"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "2581b374",
+ "id": "5d433517",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "03816df1",
+ "id": "e6c6eedd",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "2c317842",
+ "id": "40e88f11",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "45fd2103",
+ "id": "8a8cbd39",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/alphametic.ipynb b/examples/notebook/contrib/alphametic.ipynb
index 8be0626404..bee46469b2 100644
--- a/examples/notebook/contrib/alphametic.ipynb
+++ b/examples/notebook/contrib/alphametic.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "f976ef1a",
+ "id": "d4fe5368",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "bd0888ac",
+ "id": "dcb3a19a",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "4b21a464",
+ "id": "5a55d534",
"metadata": {},
"source": [
"# alphametic"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "91c7b2f6",
+ "id": "5b85f30a",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "e6d8a7fb",
+ "id": "cdaa1ccf",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "ea89c5e1",
+ "id": "557d6a61",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "0ae798d5",
+ "id": "b6e34c2b",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/assignment.ipynb b/examples/notebook/contrib/assignment.ipynb
index e08cef8511..1242c79446 100644
--- a/examples/notebook/contrib/assignment.ipynb
+++ b/examples/notebook/contrib/assignment.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "fcc0b183",
+ "id": "cd97c789",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "ddff2a4e",
+ "id": "fe8edf1d",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "ca9c00e9",
+ "id": "2606cfb1",
"metadata": {},
"source": [
"# assignment"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "6e65d826",
+ "id": "825299b6",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "97cfe900",
+ "id": "234fd0ad",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "042182c7",
+ "id": "6857e383",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "2bbbd3b7",
+ "id": "8f46dd86",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/assignment6_mip.ipynb b/examples/notebook/contrib/assignment6_mip.ipynb
index 74c49ccc30..8122614fbf 100644
--- a/examples/notebook/contrib/assignment6_mip.ipynb
+++ b/examples/notebook/contrib/assignment6_mip.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "7276d0e0",
+ "id": "64f8b5e9",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "a1438d78",
+ "id": "2dbed8e4",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "32a4c734",
+ "id": "edd3e3ac",
"metadata": {},
"source": [
"# assignment6_mip"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "7909ac0a",
+ "id": "300f518e",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "7c5379eb",
+ "id": "82b1cd6d",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "0a9a4ef1",
+ "id": "cfca3c46",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "4cabf3bf",
+ "id": "be03aa46",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/bacp.ipynb b/examples/notebook/contrib/bacp.ipynb
index c8f41a9bf5..affc67a296 100644
--- a/examples/notebook/contrib/bacp.ipynb
+++ b/examples/notebook/contrib/bacp.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "ea1887a1",
+ "id": "772db279",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "0424e742",
+ "id": "9065af13",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "e893a5ba",
+ "id": "25f034b7",
"metadata": {},
"source": [
"# bacp"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "b572549c",
+ "id": "2e5c08ec",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "e74ce7aa",
+ "id": "68373660",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "21b877e7",
+ "id": "4a511654",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "5a45ba52",
+ "id": "ccf50fcc",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/blending.ipynb b/examples/notebook/contrib/blending.ipynb
index 4188afe37a..7560f5cd36 100644
--- a/examples/notebook/contrib/blending.ipynb
+++ b/examples/notebook/contrib/blending.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "a8e3f53f",
+ "id": "73b4c7ae",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "318cb4c0",
+ "id": "bc9cace2",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "df117001",
+ "id": "b2b789d7",
"metadata": {},
"source": [
"# blending"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "c983e32e",
+ "id": "4f0becf4",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "2ede1b32",
+ "id": "191c51b8",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "14b7c2d6",
+ "id": "9c832f8c",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "5bbfc855",
+ "id": "d7e0fdd9",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/broken_weights.ipynb b/examples/notebook/contrib/broken_weights.ipynb
index 05a969ed20..e02b752597 100644
--- a/examples/notebook/contrib/broken_weights.ipynb
+++ b/examples/notebook/contrib/broken_weights.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "e8c4a2f5",
+ "id": "f2ecf3a3",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "b7558330",
+ "id": "1f1cce80",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "ebba6d16",
+ "id": "490de144",
"metadata": {},
"source": [
"# broken_weights"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "736af0f3",
+ "id": "db7d4b32",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "d1a4b2e0",
+ "id": "76bc2d44",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "8b48fa01",
+ "id": "4a0a5a9f",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "95458198",
+ "id": "569af3f0",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/bus_schedule.ipynb b/examples/notebook/contrib/bus_schedule.ipynb
index fefefe07f2..02bb885930 100644
--- a/examples/notebook/contrib/bus_schedule.ipynb
+++ b/examples/notebook/contrib/bus_schedule.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "09db0710",
+ "id": "7cdab7d8",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "9c346678",
+ "id": "963d93ca",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "045bdfb4",
+ "id": "4e9a4969",
"metadata": {},
"source": [
"# bus_schedule"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "e4388fe6",
+ "id": "c6e3c9fb",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "19552900",
+ "id": "d6f4e0a5",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "aaa24cf5",
+ "id": "02390223",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "a2731eb5",
+ "id": "2d0517d6",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/car.ipynb b/examples/notebook/contrib/car.ipynb
index fa4ee1ecda..dedd32a716 100644
--- a/examples/notebook/contrib/car.ipynb
+++ b/examples/notebook/contrib/car.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "7b812e60",
+ "id": "e2b720c6",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "8a8432d0",
+ "id": "70f8391e",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "f879b2a2",
+ "id": "7de8fd45",
"metadata": {},
"source": [
"# car"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "4a8a9f47",
+ "id": "67613fcb",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "6422f09d",
+ "id": "9b09f70a",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "d526f7a4",
+ "id": "c5d51486",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "3bd788b1",
+ "id": "fb830d38",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/check_dependencies.ipynb b/examples/notebook/contrib/check_dependencies.ipynb
index f90dc1b4c1..f6f01448d7 100644
--- a/examples/notebook/contrib/check_dependencies.ipynb
+++ b/examples/notebook/contrib/check_dependencies.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "db005efd",
+ "id": "ec83f34a",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "7b97e01e",
+ "id": "24aaced4",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "3581235a",
+ "id": "5d1f2f34",
"metadata": {},
"source": [
"# check_dependencies"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "95fd548b",
+ "id": "4ddf236b",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "0d02a671",
+ "id": "fce67e9e",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "fe165268",
+ "id": "1d506020",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "246d3fbe",
+ "id": "f913789c",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/circuit.ipynb b/examples/notebook/contrib/circuit.ipynb
index 861ca6176e..b3fed9164e 100644
--- a/examples/notebook/contrib/circuit.ipynb
+++ b/examples/notebook/contrib/circuit.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "a2c08450",
+ "id": "a12af62f",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "31ebbf08",
+ "id": "710abbc0",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "ecc627a3",
+ "id": "6c4eaf83",
"metadata": {},
"source": [
"# circuit"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "de949de3",
+ "id": "85e84df3",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "c1a139bd",
+ "id": "bb2f43c9",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "f83e9652",
+ "id": "ec0f081d",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "9c41e2ad",
+ "id": "72c95237",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/coins3.ipynb b/examples/notebook/contrib/coins3.ipynb
index 45d1602b68..f0b7866573 100644
--- a/examples/notebook/contrib/coins3.ipynb
+++ b/examples/notebook/contrib/coins3.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "6d2d0196",
+ "id": "b574be92",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "cf2d618c",
+ "id": "264c1eb0",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "9173c337",
+ "id": "0969a35e",
"metadata": {},
"source": [
"# coins3"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "44646f93",
+ "id": "2a524ccf",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "8bbbdaec",
+ "id": "aadbe175",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "b4426b2a",
+ "id": "04c6abb0",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "34674611",
+ "id": "add0dddc",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/coins_grid.ipynb b/examples/notebook/contrib/coins_grid.ipynb
index 54a542168c..2c2f2631b4 100644
--- a/examples/notebook/contrib/coins_grid.ipynb
+++ b/examples/notebook/contrib/coins_grid.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "976d721f",
+ "id": "5e0b2a3f",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "65c2e210",
+ "id": "275dfa47",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "4df525bf",
+ "id": "ebdd9682",
"metadata": {},
"source": [
"# coins_grid"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "0b2bede3",
+ "id": "a7fec7f6",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "45695b30",
+ "id": "d801bce6",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "b8d6c572",
+ "id": "eb3c7dcb",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "efe2b870",
+ "id": "42c4b365",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/coins_grid_mip.ipynb b/examples/notebook/contrib/coins_grid_mip.ipynb
index 7c5f4e6da6..f167e2ea0f 100644
--- a/examples/notebook/contrib/coins_grid_mip.ipynb
+++ b/examples/notebook/contrib/coins_grid_mip.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "e6a2e957",
+ "id": "9f0d190d",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "07c2edde",
+ "id": "8056afb6",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "e9954b8b",
+ "id": "cd115dab",
"metadata": {},
"source": [
"# coins_grid_mip"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "bee1f63d",
+ "id": "557876ec",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "c9a3114e",
+ "id": "55eb2f4c",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "b3be60ee",
+ "id": "e8ea0fdd",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "9c993458",
+ "id": "f3f53f5f",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/coloring_ip.ipynb b/examples/notebook/contrib/coloring_ip.ipynb
index 46027772a3..fd7c535640 100644
--- a/examples/notebook/contrib/coloring_ip.ipynb
+++ b/examples/notebook/contrib/coloring_ip.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "675dfce3",
+ "id": "7a237d43",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "8e568b30",
+ "id": "d51be545",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "7d59f70b",
+ "id": "6782ef46",
"metadata": {},
"source": [
"# coloring_ip"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "7d4c70f8",
+ "id": "1e10740b",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "c70ebf04",
+ "id": "92d36738",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "b40313a0",
+ "id": "45c14d2d",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "f79a1179",
+ "id": "42279483",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/combinatorial_auction2.ipynb b/examples/notebook/contrib/combinatorial_auction2.ipynb
index 62df99499b..5a93e7ee95 100644
--- a/examples/notebook/contrib/combinatorial_auction2.ipynb
+++ b/examples/notebook/contrib/combinatorial_auction2.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "65005190",
+ "id": "4abd8011",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "747919d9",
+ "id": "a8d1a92c",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "bad6bffd",
+ "id": "72e4e5ba",
"metadata": {},
"source": [
"# combinatorial_auction2"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "59f5d453",
+ "id": "4ab933b9",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "6c03cfc4",
+ "id": "69dd0630",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "d4469db2",
+ "id": "aa9546d2",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "96078b1a",
+ "id": "65ed8e69",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/contiguity_regular.ipynb b/examples/notebook/contrib/contiguity_regular.ipynb
index 775c031f44..1e6ec620be 100644
--- a/examples/notebook/contrib/contiguity_regular.ipynb
+++ b/examples/notebook/contrib/contiguity_regular.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "10d70c6d",
+ "id": "6842f40f",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "7ab31d72",
+ "id": "38c2d98e",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "b6d39d05",
+ "id": "d1d09a71",
"metadata": {},
"source": [
"# contiguity_regular"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "7d8c0273",
+ "id": "42ce4d7f",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "0080c8f3",
+ "id": "8c08905b",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "830f000b",
+ "id": "2bca1da2",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "1da5b895",
+ "id": "5664f2d7",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/costas_array.ipynb b/examples/notebook/contrib/costas_array.ipynb
index 682a42da33..790f25dd69 100644
--- a/examples/notebook/contrib/costas_array.ipynb
+++ b/examples/notebook/contrib/costas_array.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "2f9426c6",
+ "id": "651b72b0",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "c69fc2aa",
+ "id": "e2937bb4",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "1a51bc00",
+ "id": "59f2579a",
"metadata": {},
"source": [
"# costas_array"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "9a58f663",
+ "id": "7937e78d",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "77f4e09e",
+ "id": "8439836d",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "a153042b",
+ "id": "d35310c5",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "c5a97b15",
+ "id": "64ef00e1",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/covering_opl.ipynb b/examples/notebook/contrib/covering_opl.ipynb
index 58d8fe2213..ac5e421b38 100644
--- a/examples/notebook/contrib/covering_opl.ipynb
+++ b/examples/notebook/contrib/covering_opl.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "9420fe6f",
+ "id": "7922493e",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "b95fee6b",
+ "id": "a857d619",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "7a6a0d30",
+ "id": "4aa2c8b8",
"metadata": {},
"source": [
"# covering_opl"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "293efa5d",
+ "id": "74e63b61",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "de6be4be",
+ "id": "c4a21b47",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "cf13bbc7",
+ "id": "8e5bd5bb",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "da634beb",
+ "id": "7c2fc260",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/crew.ipynb b/examples/notebook/contrib/crew.ipynb
index dc9eb6368a..c0af3160c5 100644
--- a/examples/notebook/contrib/crew.ipynb
+++ b/examples/notebook/contrib/crew.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "d62cd308",
+ "id": "a2cacb10",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "ebbb12ef",
+ "id": "cb847f67",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "ced2d864",
+ "id": "9ff7fd8c",
"metadata": {},
"source": [
"# crew"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "327b33af",
+ "id": "af45dbd3",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "6e20c1b7",
+ "id": "877d0e78",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "2896021c",
+ "id": "149636ec",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "bd4255bd",
+ "id": "e7fe3cf9",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/crossword2.ipynb b/examples/notebook/contrib/crossword2.ipynb
index 20fd3914d7..204af66d62 100644
--- a/examples/notebook/contrib/crossword2.ipynb
+++ b/examples/notebook/contrib/crossword2.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "7eb90e6a",
+ "id": "ea787fbc",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "4418cf38",
+ "id": "9c63726b",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "2bbdcbe6",
+ "id": "2be4669d",
"metadata": {},
"source": [
"# crossword2"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "97ea3404",
+ "id": "ba70cbcd",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "f8073279",
+ "id": "6dfb2ded",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "3fc19b08",
+ "id": "08dfe7c5",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "1222d231",
+ "id": "9ee4ba97",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/crypta.ipynb b/examples/notebook/contrib/crypta.ipynb
index b7854a7783..adb4cf3f32 100644
--- a/examples/notebook/contrib/crypta.ipynb
+++ b/examples/notebook/contrib/crypta.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "4d84ce57",
+ "id": "7ed094c7",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "c62821a6",
+ "id": "2f676b12",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "c1d0bf82",
+ "id": "a86c70d4",
"metadata": {},
"source": [
"# crypta"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "97851841",
+ "id": "aa1a1904",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "cf2d6f03",
+ "id": "8a356ff1",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "5e9f184e",
+ "id": "d2bd64ae",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "3d897f2d",
+ "id": "b9caa0fc",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/crypto.ipynb b/examples/notebook/contrib/crypto.ipynb
index a13943c3dd..cef8e15277 100644
--- a/examples/notebook/contrib/crypto.ipynb
+++ b/examples/notebook/contrib/crypto.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "be5b2e5e",
+ "id": "3a984f3f",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "4e16414e",
+ "id": "4133e902",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "360f1b28",
+ "id": "d67eaa7f",
"metadata": {},
"source": [
"# crypto"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "52a43697",
+ "id": "dde2639e",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "3df99053",
+ "id": "158c2f8c",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "4b3f5e31",
+ "id": "57b2fe60",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "e74968e3",
+ "id": "15d61912",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/curious_set_of_integers.ipynb b/examples/notebook/contrib/curious_set_of_integers.ipynb
index b32c2063f9..0620e5e5d4 100644
--- a/examples/notebook/contrib/curious_set_of_integers.ipynb
+++ b/examples/notebook/contrib/curious_set_of_integers.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "32d8094b",
+ "id": "0b772614",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "1997b1b3",
+ "id": "6012ad2b",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "49394352",
+ "id": "0184c2d0",
"metadata": {},
"source": [
"# curious_set_of_integers"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "d04ea86e",
+ "id": "3725ddba",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "f0188c58",
+ "id": "289c371c",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "d75abe64",
+ "id": "ad78cab3",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "011e088f",
+ "id": "c0c417c2",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/debruijn_binary.ipynb b/examples/notebook/contrib/debruijn_binary.ipynb
index 4cb2ea9d6a..dde37d6f88 100644
--- a/examples/notebook/contrib/debruijn_binary.ipynb
+++ b/examples/notebook/contrib/debruijn_binary.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "18db5f46",
+ "id": "a00e0953",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "6041e71d",
+ "id": "dadc5dbb",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "25dcefe7",
+ "id": "6b4617a8",
"metadata": {},
"source": [
"# debruijn_binary"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "8e364e1c",
+ "id": "55a463c6",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "d76ce221",
+ "id": "db386045",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "42d37a64",
+ "id": "c5d0eb38",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "88b72517",
+ "id": "cea54722",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/diet1.ipynb b/examples/notebook/contrib/diet1.ipynb
index 07f90507af..32e5322468 100644
--- a/examples/notebook/contrib/diet1.ipynb
+++ b/examples/notebook/contrib/diet1.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "c849dedb",
+ "id": "3bf5b348",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "52994c75",
+ "id": "e11349e5",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "03a20d1b",
+ "id": "74967537",
"metadata": {},
"source": [
"# diet1"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "81d3f8e5",
+ "id": "b808c874",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "9db21e4a",
+ "id": "ad5d7787",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "bab0c5ec",
+ "id": "8cf1ddb3",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "dbc65d50",
+ "id": "4dc15a72",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/diet1_b.ipynb b/examples/notebook/contrib/diet1_b.ipynb
index aa0cbb03c5..0f8ca5f102 100644
--- a/examples/notebook/contrib/diet1_b.ipynb
+++ b/examples/notebook/contrib/diet1_b.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "e0e35fd1",
+ "id": "53cacd47",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "99ba32e0",
+ "id": "8ece5ce4",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "b199d1cb",
+ "id": "80e0049a",
"metadata": {},
"source": [
"# diet1_b"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "f0a3c552",
+ "id": "eb2d5651",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "42199357",
+ "id": "32d66599",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "c5edf5a0",
+ "id": "a1e521f4",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "7a23d998",
+ "id": "8c5958ec",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/diet1_mip.ipynb b/examples/notebook/contrib/diet1_mip.ipynb
index fb71fb0776..793ec709fa 100644
--- a/examples/notebook/contrib/diet1_mip.ipynb
+++ b/examples/notebook/contrib/diet1_mip.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "4717d6e9",
+ "id": "d7563054",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "23f7d7d7",
+ "id": "d258616d",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "59cb9d2c",
+ "id": "2b71c34d",
"metadata": {},
"source": [
"# diet1_mip"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "da423c0a",
+ "id": "25be43a1",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "862e7018",
+ "id": "2598e80e",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "0649b075",
+ "id": "17bcd4a9",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "61210e2d",
+ "id": "fcbb1310",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/discrete_tomography.ipynb b/examples/notebook/contrib/discrete_tomography.ipynb
index 7704979adb..8740f55cec 100644
--- a/examples/notebook/contrib/discrete_tomography.ipynb
+++ b/examples/notebook/contrib/discrete_tomography.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "91bd9975",
+ "id": "652c825d",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "68169502",
+ "id": "08fab2d8",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "b67fdd53",
+ "id": "ac1b4df5",
"metadata": {},
"source": [
"# discrete_tomography"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "a33afd37",
+ "id": "b9e3a1fd",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "75e3adec",
+ "id": "aacd861c",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "6e85bc8d",
+ "id": "ddda2e54",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "7aeb8711",
+ "id": "bec97aa6",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/divisible_by_9_through_1.ipynb b/examples/notebook/contrib/divisible_by_9_through_1.ipynb
index a1291cc92a..6cfdec68c3 100644
--- a/examples/notebook/contrib/divisible_by_9_through_1.ipynb
+++ b/examples/notebook/contrib/divisible_by_9_through_1.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "f59b2c73",
+ "id": "b3d5dcea",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "4ee96540",
+ "id": "12425d6e",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "afac922f",
+ "id": "8a6dfd4e",
"metadata": {},
"source": [
"# divisible_by_9_through_1"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "fa97270b",
+ "id": "61cc17c5",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "d8876625",
+ "id": "24b251d4",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "8763875c",
+ "id": "b6fff564",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "87b61a1f",
+ "id": "d3c45136",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/dudeney.ipynb b/examples/notebook/contrib/dudeney.ipynb
index 18c1eb9c55..67a32352e8 100644
--- a/examples/notebook/contrib/dudeney.ipynb
+++ b/examples/notebook/contrib/dudeney.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "a27e7fe1",
+ "id": "9bfa3936",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "67c433c1",
+ "id": "918d40c7",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "2c14cfb3",
+ "id": "f294265a",
"metadata": {},
"source": [
"# dudeney"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "daf568cc",
+ "id": "7d96cb12",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "d8985d76",
+ "id": "a3bb2154",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "2288426d",
+ "id": "15042843",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "b10f3e8b",
+ "id": "476586a2",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/einav_puzzle.ipynb b/examples/notebook/contrib/einav_puzzle.ipynb
index a54ebb04df..96d1db70eb 100644
--- a/examples/notebook/contrib/einav_puzzle.ipynb
+++ b/examples/notebook/contrib/einav_puzzle.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "074fd36e",
+ "id": "f0a1340e",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "c08d86e2",
+ "id": "fd3b79f2",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "d08031bb",
+ "id": "2358575d",
"metadata": {},
"source": [
"# einav_puzzle"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "624d1e2d",
+ "id": "c2e8e6a8",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "b83b3754",
+ "id": "484683e3",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "b89b0a12",
+ "id": "583db086",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "a5f32c92",
+ "id": "ac004ad4",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/einav_puzzle2.ipynb b/examples/notebook/contrib/einav_puzzle2.ipynb
index 61f38c90c9..60acc82936 100644
--- a/examples/notebook/contrib/einav_puzzle2.ipynb
+++ b/examples/notebook/contrib/einav_puzzle2.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "95ca5792",
+ "id": "10a4030c",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "cf711f5c",
+ "id": "c8063be6",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "332dcf1c",
+ "id": "d944892d",
"metadata": {},
"source": [
"# einav_puzzle2"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "d8aaf663",
+ "id": "9aea505a",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "40778583",
+ "id": "346465b2",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "c3b80f4a",
+ "id": "16cfcb2d",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "7c59b1c5",
+ "id": "2542b5d4",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/eq10.ipynb b/examples/notebook/contrib/eq10.ipynb
index 01aa469e69..54f372981a 100644
--- a/examples/notebook/contrib/eq10.ipynb
+++ b/examples/notebook/contrib/eq10.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "bc143809",
+ "id": "86707ee7",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "6f09d024",
+ "id": "87e2c9e8",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "5e20be99",
+ "id": "ee35549b",
"metadata": {},
"source": [
"# eq10"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "f503b3ee",
+ "id": "d10345c7",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "6a8ad745",
+ "id": "5a9e1e02",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "47d910ef",
+ "id": "1c79aed1",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "16fb1551",
+ "id": "0a2952fc",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/eq20.ipynb b/examples/notebook/contrib/eq20.ipynb
index 808fcd68cc..3e3e09c259 100644
--- a/examples/notebook/contrib/eq20.ipynb
+++ b/examples/notebook/contrib/eq20.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "3b7e09b0",
+ "id": "2327aa72",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "28555152",
+ "id": "1b05cfc0",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "03803144",
+ "id": "e2da929c",
"metadata": {},
"source": [
"# eq20"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "ff4bcafb",
+ "id": "09ee0927",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "b60a9356",
+ "id": "2519e391",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "331fab4c",
+ "id": "b048e800",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "4aead1b3",
+ "id": "b05bac1b",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/fill_a_pix.ipynb b/examples/notebook/contrib/fill_a_pix.ipynb
index e279e09589..65c1e101a6 100644
--- a/examples/notebook/contrib/fill_a_pix.ipynb
+++ b/examples/notebook/contrib/fill_a_pix.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "13c415b5",
+ "id": "83926e0e",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "2672a50f",
+ "id": "c41795f1",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "0f2664dd",
+ "id": "34e921be",
"metadata": {},
"source": [
"# fill_a_pix"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "409db0cf",
+ "id": "12dd2a2c",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "0331dab4",
+ "id": "258ad8dd",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "38950ca2",
+ "id": "0d89e4e2",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "7fecab66",
+ "id": "3791556a",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/furniture_moving.ipynb b/examples/notebook/contrib/furniture_moving.ipynb
index 1b25584f75..3b8b37be54 100644
--- a/examples/notebook/contrib/furniture_moving.ipynb
+++ b/examples/notebook/contrib/furniture_moving.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "e8a2dbf1",
+ "id": "3d491e56",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "c7d4e154",
+ "id": "07d9d4c3",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "12c63c8d",
+ "id": "aa628cd8",
"metadata": {},
"source": [
"# furniture_moving"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "1d40716d",
+ "id": "717eb16f",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "fab4aefe",
+ "id": "55a33d3c",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "1d7d0112",
+ "id": "551f4a6a",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "a0127800",
+ "id": "9773e70e",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/futoshiki.ipynb b/examples/notebook/contrib/futoshiki.ipynb
index dc47daf057..84faed229c 100644
--- a/examples/notebook/contrib/futoshiki.ipynb
+++ b/examples/notebook/contrib/futoshiki.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "cc66a136",
+ "id": "08b45aef",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "672a796f",
+ "id": "bb78b08d",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "f6d4c7db",
+ "id": "ff962db7",
"metadata": {},
"source": [
"# futoshiki"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "18086334",
+ "id": "e9ba40a1",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "8b47993c",
+ "id": "220f8e7f",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "744ff51b",
+ "id": "c8dd47f0",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "c5e2558b",
+ "id": "ec171aba",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/game_theory_taha.ipynb b/examples/notebook/contrib/game_theory_taha.ipynb
index 30db0c7ff8..d52d4da17f 100644
--- a/examples/notebook/contrib/game_theory_taha.ipynb
+++ b/examples/notebook/contrib/game_theory_taha.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "894909c1",
+ "id": "22f6f334",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "c82063fb",
+ "id": "1ad04e8c",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "5237121e",
+ "id": "ec87b472",
"metadata": {},
"source": [
"# game_theory_taha"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "ceff80b8",
+ "id": "d56b67b6",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "ae6c5706",
+ "id": "1b1b5b41",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "b6d3ce06",
+ "id": "d9e929fc",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "8d908258",
+ "id": "25d58a8e",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/grocery.ipynb b/examples/notebook/contrib/grocery.ipynb
index 15b9d7591e..b002206518 100644
--- a/examples/notebook/contrib/grocery.ipynb
+++ b/examples/notebook/contrib/grocery.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "977151f9",
+ "id": "7a67890d",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "e823c584",
+ "id": "a485c1a4",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "832d4aef",
+ "id": "724b5b36",
"metadata": {},
"source": [
"# grocery"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "01c6c03b",
+ "id": "f78a601a",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "05544fb1",
+ "id": "db0b8e30",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "fc2bb415",
+ "id": "66006624",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "3c4e42ca",
+ "id": "8e5ba7d5",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/hidato.ipynb b/examples/notebook/contrib/hidato.ipynb
index 79ec3ca10d..3b7ed2779b 100644
--- a/examples/notebook/contrib/hidato.ipynb
+++ b/examples/notebook/contrib/hidato.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "5addc40c",
+ "id": "67eb5810",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "817e4096",
+ "id": "ac201a0e",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "74c4db89",
+ "id": "1d4d6f90",
"metadata": {},
"source": [
"# hidato"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "e59aa98c",
+ "id": "cc4cae50",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "dadbf026",
+ "id": "74da760a",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "be063cf9",
+ "id": "56dae106",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "e81d8862",
+ "id": "6538272d",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/just_forgotten.ipynb b/examples/notebook/contrib/just_forgotten.ipynb
index 325c8c4204..459816a158 100644
--- a/examples/notebook/contrib/just_forgotten.ipynb
+++ b/examples/notebook/contrib/just_forgotten.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "a8bb2a1e",
+ "id": "0226f4b4",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "69673cae",
+ "id": "e1a17902",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "4ba24ccb",
+ "id": "c58af21f",
"metadata": {},
"source": [
"# just_forgotten"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "08027b3b",
+ "id": "f96914e7",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "ff96a22a",
+ "id": "678368f5",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "3678e12d",
+ "id": "52b3258b",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "6a6d332a",
+ "id": "063bbef1",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/kakuro.ipynb b/examples/notebook/contrib/kakuro.ipynb
index 4756c92adb..0da01abbe7 100644
--- a/examples/notebook/contrib/kakuro.ipynb
+++ b/examples/notebook/contrib/kakuro.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "84fdfc40",
+ "id": "b2665fe3",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "a266942e",
+ "id": "c46080d5",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "53b0115a",
+ "id": "b2e268cb",
"metadata": {},
"source": [
"# kakuro"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "63d638d0",
+ "id": "3850ad8a",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "5d645435",
+ "id": "f7fc84a1",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "146d92f6",
+ "id": "80da00c7",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "14033a6c",
+ "id": "2aece645",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/kenken2.ipynb b/examples/notebook/contrib/kenken2.ipynb
index 3455c1b69c..1631ed312c 100644
--- a/examples/notebook/contrib/kenken2.ipynb
+++ b/examples/notebook/contrib/kenken2.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "973779b7",
+ "id": "615ad358",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "36fe4693",
+ "id": "cd752925",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "ab2b09f2",
+ "id": "6f11727e",
"metadata": {},
"source": [
"# kenken2"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "33472023",
+ "id": "ffa0a17a",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "3aad6a62",
+ "id": "be2f64d2",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "1ee59c44",
+ "id": "347f6339",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "ab2774e0",
+ "id": "b8a8cff0",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/killer_sudoku.ipynb b/examples/notebook/contrib/killer_sudoku.ipynb
index a526fa13d4..5b7c65358c 100644
--- a/examples/notebook/contrib/killer_sudoku.ipynb
+++ b/examples/notebook/contrib/killer_sudoku.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "98705fc8",
+ "id": "b391e22a",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "2ee9bce3",
+ "id": "124189f4",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "5e942023",
+ "id": "07fd5fb1",
"metadata": {},
"source": [
"# killer_sudoku"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "7aab71a5",
+ "id": "aeceb084",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "c18b3ef4",
+ "id": "a1bc7acb",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "469d4002",
+ "id": "8552857e",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "b1ad2623",
+ "id": "ab03fe52",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/knapsack_cp.ipynb b/examples/notebook/contrib/knapsack_cp.ipynb
index 0032725969..4e882b60d0 100644
--- a/examples/notebook/contrib/knapsack_cp.ipynb
+++ b/examples/notebook/contrib/knapsack_cp.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "8ca02cb6",
+ "id": "c7cc163b",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "9540d5d2",
+ "id": "fc0fbda0",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "c2500cb3",
+ "id": "5e7303e5",
"metadata": {},
"source": [
"# knapsack_cp"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "a0e41498",
+ "id": "20ac1cf6",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "09c90ba6",
+ "id": "ece02144",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "071197fb",
+ "id": "d6e41de0",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "100ba064",
+ "id": "b74a1e01",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/knapsack_mip.ipynb b/examples/notebook/contrib/knapsack_mip.ipynb
index 2d82b41f16..50144af91f 100644
--- a/examples/notebook/contrib/knapsack_mip.ipynb
+++ b/examples/notebook/contrib/knapsack_mip.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "5b6a4f99",
+ "id": "4043c5c5",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "fae9e560",
+ "id": "04424b4c",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "7184474c",
+ "id": "ad7191a8",
"metadata": {},
"source": [
"# knapsack_mip"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "fbd7abd5",
+ "id": "2a745482",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "b75d7e99",
+ "id": "396d4296",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "cbe9a468",
+ "id": "c3151df9",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "abc9a30f",
+ "id": "a75e3c7e",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/labeled_dice.ipynb b/examples/notebook/contrib/labeled_dice.ipynb
index c71f62b99b..48cab52903 100644
--- a/examples/notebook/contrib/labeled_dice.ipynb
+++ b/examples/notebook/contrib/labeled_dice.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "36cda83d",
+ "id": "72b2a213",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "2eade386",
+ "id": "e7aa1892",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "eb74ef61",
+ "id": "a5671350",
"metadata": {},
"source": [
"# labeled_dice"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "3390d00c",
+ "id": "282f7b99",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "a9b23a3b",
+ "id": "2eeee5f2",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "05999991",
+ "id": "422e876b",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "3cba5bff",
+ "id": "b04e2074",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/langford.ipynb b/examples/notebook/contrib/langford.ipynb
index 4ee58b0156..a9e1ef546e 100644
--- a/examples/notebook/contrib/langford.ipynb
+++ b/examples/notebook/contrib/langford.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "dcd1586e",
+ "id": "2129a4e7",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "12efbb56",
+ "id": "257d3d54",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "660d02aa",
+ "id": "77f7e3ac",
"metadata": {},
"source": [
"# langford"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "c6980ede",
+ "id": "5f3b2c6f",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "23f499bf",
+ "id": "ed905cbd",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "a47b10cf",
+ "id": "cc3d3521",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "3f32d6d0",
+ "id": "f7732fdd",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/least_diff.ipynb b/examples/notebook/contrib/least_diff.ipynb
index 70131de43a..7fcde3c728 100644
--- a/examples/notebook/contrib/least_diff.ipynb
+++ b/examples/notebook/contrib/least_diff.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "6b6609e3",
+ "id": "22121587",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "8219e20f",
+ "id": "e074d724",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "ae17af01",
+ "id": "5d748895",
"metadata": {},
"source": [
"# least_diff"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "a6c5a9cc",
+ "id": "cc2ebbb8",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "e1d11caa",
+ "id": "dbb27c8d",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "06546ca4",
+ "id": "a80601f2",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "35d29f76",
+ "id": "5381e602",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/least_square.ipynb b/examples/notebook/contrib/least_square.ipynb
index 857f0d2de4..64550ead59 100644
--- a/examples/notebook/contrib/least_square.ipynb
+++ b/examples/notebook/contrib/least_square.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "32c1dc73",
+ "id": "cbfe89fb",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "eb9500c5",
+ "id": "a9ccbd02",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "7c7dc35b",
+ "id": "73643615",
"metadata": {},
"source": [
"# least_square"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "03e3a466",
+ "id": "b4b620bb",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "3a17b71b",
+ "id": "b3605be8",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "97a5d1ad",
+ "id": "f3903ae3",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "2cd66437",
+ "id": "c929554d",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/lectures.ipynb b/examples/notebook/contrib/lectures.ipynb
index af2f5189cc..6c9d848bd5 100644
--- a/examples/notebook/contrib/lectures.ipynb
+++ b/examples/notebook/contrib/lectures.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "b318272d",
+ "id": "c134025c",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "c2030800",
+ "id": "6d4a8579",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "673946b2",
+ "id": "3dd81f0b",
"metadata": {},
"source": [
"# lectures"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "b563f7b0",
+ "id": "dc583b5b",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "574275a1",
+ "id": "02b8e39d",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "de18b9b6",
+ "id": "836f3ebd",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "94537a72",
+ "id": "992037a4",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/magic_sequence_sat.ipynb b/examples/notebook/contrib/magic_sequence_sat.ipynb
index c23d1f59f1..3d216d6d39 100644
--- a/examples/notebook/contrib/magic_sequence_sat.ipynb
+++ b/examples/notebook/contrib/magic_sequence_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "f188b4b2",
+ "id": "754ee77d",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "187e1a26",
+ "id": "460753d9",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "9e55bb71",
+ "id": "6890bdc1",
"metadata": {},
"source": [
"# magic_sequence_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "3b11dc1a",
+ "id": "4cbac971",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "2cc5dacf",
+ "id": "8aef22b9",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "fa1b9480",
+ "id": "18d5dc16",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "a037fec5",
+ "id": "f74f5227",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/magic_square.ipynb b/examples/notebook/contrib/magic_square.ipynb
index ebf7c766ff..039fae892c 100644
--- a/examples/notebook/contrib/magic_square.ipynb
+++ b/examples/notebook/contrib/magic_square.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "655c2fd6",
+ "id": "968518a5",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "85b075de",
+ "id": "ebadbb7c",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "7af109dc",
+ "id": "0d19f1d7",
"metadata": {},
"source": [
"# magic_square"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "eabff40f",
+ "id": "106e8c62",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "6545ccca",
+ "id": "2bb8be85",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "b460a28e",
+ "id": "219a12c7",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "aea4471c",
+ "id": "d28c77b8",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/magic_square_and_cards.ipynb b/examples/notebook/contrib/magic_square_and_cards.ipynb
index da0cda4e55..c30a448418 100644
--- a/examples/notebook/contrib/magic_square_and_cards.ipynb
+++ b/examples/notebook/contrib/magic_square_and_cards.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "669e45d3",
+ "id": "1c8de8bb",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "670719c4",
+ "id": "b652a9e5",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "6b1f25aa",
+ "id": "5c8ecfd6",
"metadata": {},
"source": [
"# magic_square_and_cards"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "afffad00",
+ "id": "8da07af1",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "40f53ada",
+ "id": "5d59556e",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "10fc06d2",
+ "id": "d0119d64",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "c0dbd248",
+ "id": "96e950b2",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/magic_square_mip.ipynb b/examples/notebook/contrib/magic_square_mip.ipynb
index 8ce6407ee9..c8ae45cd1a 100644
--- a/examples/notebook/contrib/magic_square_mip.ipynb
+++ b/examples/notebook/contrib/magic_square_mip.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "1ace564a",
+ "id": "531c3664",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "ad0b17c4",
+ "id": "054d0baf",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "fde8a136",
+ "id": "5fda8113",
"metadata": {},
"source": [
"# magic_square_mip"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "626db0aa",
+ "id": "ab6c6bd4",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "0c76b2bb",
+ "id": "c84f8c3b",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "3fce2c8d",
+ "id": "8c2abfd0",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "2969909e",
+ "id": "32ed943a",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/map.ipynb b/examples/notebook/contrib/map.ipynb
index 757b5eb560..961eca9635 100644
--- a/examples/notebook/contrib/map.ipynb
+++ b/examples/notebook/contrib/map.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "0cd8bc27",
+ "id": "35ac0335",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "7329ea0f",
+ "id": "01a3cf35",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "efbaa772",
+ "id": "8eb29411",
"metadata": {},
"source": [
"# map"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "6c9840d7",
+ "id": "d3ad2337",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "cf2534e6",
+ "id": "bf2c5a57",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "64d4fb9c",
+ "id": "fd4a0863",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "47160267",
+ "id": "99e65c3f",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/marathon2.ipynb b/examples/notebook/contrib/marathon2.ipynb
index 18963cbdfa..9136a7ff08 100644
--- a/examples/notebook/contrib/marathon2.ipynb
+++ b/examples/notebook/contrib/marathon2.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "6dca0a47",
+ "id": "89808d19",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "8fc936fc",
+ "id": "5101c359",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "d87afc51",
+ "id": "61673e64",
"metadata": {},
"source": [
"# marathon2"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "4bfa0597",
+ "id": "e18ffc12",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "9ee29a0e",
+ "id": "b7873495",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "19ce8f1d",
+ "id": "17ee80e7",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "903ab734",
+ "id": "b5324c64",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/max_flow_taha.ipynb b/examples/notebook/contrib/max_flow_taha.ipynb
index b1ab7e34db..231257908e 100644
--- a/examples/notebook/contrib/max_flow_taha.ipynb
+++ b/examples/notebook/contrib/max_flow_taha.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "63b922db",
+ "id": "1f969d4e",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "8e2d4817",
+ "id": "88cbc916",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "faf25b02",
+ "id": "251a0d93",
"metadata": {},
"source": [
"# max_flow_taha"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "df7ca055",
+ "id": "8a1165f4",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "c8026a2d",
+ "id": "a8f6b788",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "b5a9f16c",
+ "id": "56ac3444",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "dc66f803",
+ "id": "3e5f5585",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/max_flow_winston1.ipynb b/examples/notebook/contrib/max_flow_winston1.ipynb
index 538ae18562..807f08f129 100644
--- a/examples/notebook/contrib/max_flow_winston1.ipynb
+++ b/examples/notebook/contrib/max_flow_winston1.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "773f328f",
+ "id": "40f3ec1f",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "1cb11c70",
+ "id": "816310b3",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "9a0f60e0",
+ "id": "e88ace6f",
"metadata": {},
"source": [
"# max_flow_winston1"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "4f6ca1f1",
+ "id": "d9e9db7f",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "a102a8ca",
+ "id": "4e236992",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "2a52fcf6",
+ "id": "119aba3d",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "4fcb950c",
+ "id": "8d0bfc1f",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/minesweeper.ipynb b/examples/notebook/contrib/minesweeper.ipynb
index 9b2a199dcf..152d8eb0ea 100644
--- a/examples/notebook/contrib/minesweeper.ipynb
+++ b/examples/notebook/contrib/minesweeper.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "2ca1ca5e",
+ "id": "7fd45eb0",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "7f4a525c",
+ "id": "7d2b864f",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "de708f64",
+ "id": "0c5d772f",
"metadata": {},
"source": [
"# minesweeper"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "8f59977b",
+ "id": "4fe1cd30",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "2c044568",
+ "id": "b96f8c11",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "c4dd3c85",
+ "id": "a04f11c0",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "0b8ccbaf",
+ "id": "b0ddfd35",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/mr_smith.ipynb b/examples/notebook/contrib/mr_smith.ipynb
index 1bc6f7bb40..a89de5d4dd 100644
--- a/examples/notebook/contrib/mr_smith.ipynb
+++ b/examples/notebook/contrib/mr_smith.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "a88b2c17",
+ "id": "53e9e9c8",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "d687e50b",
+ "id": "c83c5e89",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "457cc492",
+ "id": "29d81096",
"metadata": {},
"source": [
"# mr_smith"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "1921c67d",
+ "id": "d5a1b940",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "b87caf3f",
+ "id": "77b2f83a",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "9a1f41a6",
+ "id": "7a177887",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "948a2fff",
+ "id": "683868a8",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/nonogram_default_search.ipynb b/examples/notebook/contrib/nonogram_default_search.ipynb
index a5966533a8..d376622841 100644
--- a/examples/notebook/contrib/nonogram_default_search.ipynb
+++ b/examples/notebook/contrib/nonogram_default_search.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "d6da48ee",
+ "id": "e93646e1",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "f4baf034",
+ "id": "dd8b7f2b",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "ec5c22ac",
+ "id": "8f6f318d",
"metadata": {},
"source": [
"# nonogram_default_search"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "f5fd9852",
+ "id": "bde5fe73",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "3e23679d",
+ "id": "811511e4",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "30c30a7a",
+ "id": "350c0e71",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "3d46a5fa",
+ "id": "235afee6",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/nonogram_regular.ipynb b/examples/notebook/contrib/nonogram_regular.ipynb
index 4d4c4fac44..924c3340a0 100644
--- a/examples/notebook/contrib/nonogram_regular.ipynb
+++ b/examples/notebook/contrib/nonogram_regular.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "39d63b71",
+ "id": "057c6382",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "f9a21c15",
+ "id": "ffb712d1",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "e817d76b",
+ "id": "0f720d08",
"metadata": {},
"source": [
"# nonogram_regular"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "f65c3852",
+ "id": "899f3a4c",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "dd42ad91",
+ "id": "4c62e62f",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "f75c8f2e",
+ "id": "73ebc650",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "46661ac0",
+ "id": "d87de50d",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/nonogram_table.ipynb b/examples/notebook/contrib/nonogram_table.ipynb
index 68627f6601..ffea47813b 100644
--- a/examples/notebook/contrib/nonogram_table.ipynb
+++ b/examples/notebook/contrib/nonogram_table.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "8328c727",
+ "id": "d86542fc",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "83330e9b",
+ "id": "f1dfe765",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "610ffb9e",
+ "id": "7d6f0d39",
"metadata": {},
"source": [
"# nonogram_table"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "9cc7989a",
+ "id": "6c6e3071",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "676d22a8",
+ "id": "de052992",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "c3d542dc",
+ "id": "b75a17eb",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "2c1fbc30",
+ "id": "dfbc9322",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/nonogram_table2.ipynb b/examples/notebook/contrib/nonogram_table2.ipynb
index da87ea1d63..277be83fd9 100644
--- a/examples/notebook/contrib/nonogram_table2.ipynb
+++ b/examples/notebook/contrib/nonogram_table2.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "a879d4ac",
+ "id": "65146b48",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "0030611f",
+ "id": "b499deb9",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "7bec39dc",
+ "id": "1fd56ec4",
"metadata": {},
"source": [
"# nonogram_table2"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "44a5af9a",
+ "id": "e1a385e4",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "90485284",
+ "id": "c24e32ed",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "0a65a565",
+ "id": "ea0ccc8d",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "5ca98000",
+ "id": "ee3ca1f9",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/nontransitive_dice.ipynb b/examples/notebook/contrib/nontransitive_dice.ipynb
index 24195f311e..ad6235493c 100644
--- a/examples/notebook/contrib/nontransitive_dice.ipynb
+++ b/examples/notebook/contrib/nontransitive_dice.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "676cad37",
+ "id": "03977bee",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "ef4c081d",
+ "id": "944daeab",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "6168517d",
+ "id": "2a5cd022",
"metadata": {},
"source": [
"# nontransitive_dice"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "08a9080e",
+ "id": "186b6154",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "62f22ad5",
+ "id": "c48b6a08",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "b41bc769",
+ "id": "9b143037",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "911b96bd",
+ "id": "94402f0a",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/nqueens.ipynb b/examples/notebook/contrib/nqueens.ipynb
index 447bf47c32..a5d19e7a13 100644
--- a/examples/notebook/contrib/nqueens.ipynb
+++ b/examples/notebook/contrib/nqueens.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "0b1ea7b7",
+ "id": "851f3412",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "50344d78",
+ "id": "dae00633",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "c66bd20c",
+ "id": "1a8e38dd",
"metadata": {},
"source": [
"# nqueens"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "fd5ac446",
+ "id": "8a54b022",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "69776e1f",
+ "id": "2007c583",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "e2a8b13f",
+ "id": "0ff97325",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "31b26f02",
+ "id": "8b935a0e",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/nqueens2.ipynb b/examples/notebook/contrib/nqueens2.ipynb
index 478bdc2028..2ff1b0137c 100644
--- a/examples/notebook/contrib/nqueens2.ipynb
+++ b/examples/notebook/contrib/nqueens2.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "3c866d58",
+ "id": "6e177054",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "e17e7aed",
+ "id": "d85ac537",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "b8698f5f",
+ "id": "290a664b",
"metadata": {},
"source": [
"# nqueens2"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "f2193979",
+ "id": "2fa9de52",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "04723a0a",
+ "id": "8b8d6a32",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "f7624cfd",
+ "id": "b26acdcf",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "5adc2d4d",
+ "id": "0b9e7a53",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/nqueens3.ipynb b/examples/notebook/contrib/nqueens3.ipynb
index de88fd5a8f..6be9edeab4 100644
--- a/examples/notebook/contrib/nqueens3.ipynb
+++ b/examples/notebook/contrib/nqueens3.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "290b9f2a",
+ "id": "1d0a0fca",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "2c0c6627",
+ "id": "794de2f0",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "90d13b80",
+ "id": "7acd6e2d",
"metadata": {},
"source": [
"# nqueens3"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "a672e825",
+ "id": "4bc0a6e1",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "8fb70796",
+ "id": "1447803d",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "359cd76f",
+ "id": "1bdf3972",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "05f7c9e4",
+ "id": "77e157fd",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/nurse_rostering.ipynb b/examples/notebook/contrib/nurse_rostering.ipynb
index 746a2ca9d9..47774ba347 100644
--- a/examples/notebook/contrib/nurse_rostering.ipynb
+++ b/examples/notebook/contrib/nurse_rostering.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "52e6f30a",
+ "id": "e3722c3b",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "a2ba60dc",
+ "id": "add12633",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "ed17015b",
+ "id": "dd120f0c",
"metadata": {},
"source": [
"# nurse_rostering"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "720cd694",
+ "id": "80ba5ed5",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "6f40a544",
+ "id": "de83cf71",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "0e3a41e5",
+ "id": "0dad4144",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "0494d8ed",
+ "id": "b0c7784b",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/nurses_cp.ipynb b/examples/notebook/contrib/nurses_cp.ipynb
index 71b9c72557..10660c3a59 100644
--- a/examples/notebook/contrib/nurses_cp.ipynb
+++ b/examples/notebook/contrib/nurses_cp.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "131e94a4",
+ "id": "1856d02c",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "92894356",
+ "id": "aea1eca1",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "24d06d1a",
+ "id": "69a27b9a",
"metadata": {},
"source": [
"# nurses_cp"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "48bc67a2",
+ "id": "71ee472b",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "457aa6a8",
+ "id": "a4787ba7",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "2fcc56c2",
+ "id": "b22adc1e",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "b9efd92a",
+ "id": "2828c09a",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/olympic.ipynb b/examples/notebook/contrib/olympic.ipynb
index 2ab4fac233..ebfa4807ca 100644
--- a/examples/notebook/contrib/olympic.ipynb
+++ b/examples/notebook/contrib/olympic.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "f0957ece",
+ "id": "8f6bfcf1",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "a72d0898",
+ "id": "df9d165f",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "076d68ca",
+ "id": "c8701a52",
"metadata": {},
"source": [
"# olympic"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "74a544dd",
+ "id": "f9268d0a",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "478dfcd3",
+ "id": "8fcb89a2",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "2c01e750",
+ "id": "e4155292",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "4ab83f4b",
+ "id": "c6ee1cb5",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/organize_day.ipynb b/examples/notebook/contrib/organize_day.ipynb
index 2966efbfe6..f2973d4c64 100644
--- a/examples/notebook/contrib/organize_day.ipynb
+++ b/examples/notebook/contrib/organize_day.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "9451d77c",
+ "id": "6b6490f5",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "e0b9821f",
+ "id": "bf6acb6f",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "650ce899",
+ "id": "e961d6c2",
"metadata": {},
"source": [
"# organize_day"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "e7d2013b",
+ "id": "f90ae5d9",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "2d55856d",
+ "id": "eb458306",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "8a7acb77",
+ "id": "804d00a6",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "37038c96",
+ "id": "1c414d32",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/p_median.ipynb b/examples/notebook/contrib/p_median.ipynb
index 5a8ac85b07..2ba208a7b9 100644
--- a/examples/notebook/contrib/p_median.ipynb
+++ b/examples/notebook/contrib/p_median.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "2165381e",
+ "id": "e3a60aea",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "74775efa",
+ "id": "80fbf6ac",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "0e503965",
+ "id": "fb3147d6",
"metadata": {},
"source": [
"# p_median"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "f28fe37b",
+ "id": "1a507378",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "b38b48fa",
+ "id": "d36a1f50",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "c1e43171",
+ "id": "efad5221",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "340d6586",
+ "id": "22635899",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/pandigital_numbers.ipynb b/examples/notebook/contrib/pandigital_numbers.ipynb
index 21dadb4d57..8c03ebf9a9 100644
--- a/examples/notebook/contrib/pandigital_numbers.ipynb
+++ b/examples/notebook/contrib/pandigital_numbers.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "b6a5b7d1",
+ "id": "1f1dc525",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "625196b3",
+ "id": "14450806",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "432260d7",
+ "id": "282644b6",
"metadata": {},
"source": [
"# pandigital_numbers"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "52cd1506",
+ "id": "8ebee098",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "f5b31c05",
+ "id": "e5fae93b",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "0bebb31a",
+ "id": "c8baafaf",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "38890bf7",
+ "id": "cf64ff82",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/photo_problem.ipynb b/examples/notebook/contrib/photo_problem.ipynb
index 37bdc9bfb9..ebc0ff78e0 100644
--- a/examples/notebook/contrib/photo_problem.ipynb
+++ b/examples/notebook/contrib/photo_problem.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "10076c88",
+ "id": "0cfce033",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "d88eeff8",
+ "id": "920f8a56",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "95c7ddc6",
+ "id": "d5c7311d",
"metadata": {},
"source": [
"# photo_problem"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "53790ef0",
+ "id": "43ed2c26",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "c7b105ec",
+ "id": "f568a373",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "adf6b3db",
+ "id": "9e550c29",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "234e7819",
+ "id": "fa50bdb1",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/place_number_puzzle.ipynb b/examples/notebook/contrib/place_number_puzzle.ipynb
index 2c3e5cb521..aaad2d2b80 100644
--- a/examples/notebook/contrib/place_number_puzzle.ipynb
+++ b/examples/notebook/contrib/place_number_puzzle.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "2d7133da",
+ "id": "f19e0622",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "57196e44",
+ "id": "3b5aa9ac",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "6ad70105",
+ "id": "74ae5d41",
"metadata": {},
"source": [
"# place_number_puzzle"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "0697566c",
+ "id": "e2e39e92",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "1f768dfb",
+ "id": "6fb61106",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "d1816616",
+ "id": "7d8e520e",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "61bac30a",
+ "id": "6fed34da",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/post_office_problem2.ipynb b/examples/notebook/contrib/post_office_problem2.ipynb
index d29a3196ee..9859bd326e 100644
--- a/examples/notebook/contrib/post_office_problem2.ipynb
+++ b/examples/notebook/contrib/post_office_problem2.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "02e7df57",
+ "id": "5d374ca2",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "c0d5b3c9",
+ "id": "ca43232c",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "1aa3158a",
+ "id": "f4786b5a",
"metadata": {},
"source": [
"# post_office_problem2"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "f851b3d2",
+ "id": "d9c46902",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "3d80cbf9",
+ "id": "0b8ab693",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "de5b9966",
+ "id": "9e6d35c0",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "76a15629",
+ "id": "0bcaaca5",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/production.ipynb b/examples/notebook/contrib/production.ipynb
index fbe2b8d86d..7732444672 100644
--- a/examples/notebook/contrib/production.ipynb
+++ b/examples/notebook/contrib/production.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "a84f2d6e",
+ "id": "3cae3829",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "024affc7",
+ "id": "10cc8f50",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "621d3417",
+ "id": "e704a4a3",
"metadata": {},
"source": [
"# production"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "9c2c9162",
+ "id": "21ea031b",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "d072ba12",
+ "id": "9550b578",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "53eded79",
+ "id": "986e6fb8",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "f2d5b716",
+ "id": "0b0187f3",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/project_scheduling_sat.ipynb b/examples/notebook/contrib/project_scheduling_sat.ipynb
index 8371e5b739..092f983ccc 100644
--- a/examples/notebook/contrib/project_scheduling_sat.ipynb
+++ b/examples/notebook/contrib/project_scheduling_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "4918a18b",
+ "id": "53793957",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "2214d19a",
+ "id": "537d393b",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "5ad016f9",
+ "id": "7819172e",
"metadata": {},
"source": [
"# project_scheduling_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "bf062025",
+ "id": "d8a2b9cc",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "8590600b",
+ "id": "986f8d4b",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "822217f7",
+ "id": "9e96c391",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "a5597c85",
+ "id": "392e3d74",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/pyls_api.ipynb b/examples/notebook/contrib/pyls_api.ipynb
index a8f869537c..c20a57b73a 100644
--- a/examples/notebook/contrib/pyls_api.ipynb
+++ b/examples/notebook/contrib/pyls_api.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "57e266f8",
+ "id": "4aed771f",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "c796d852",
+ "id": "b376ba32",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "3f945973",
+ "id": "05c5147f",
"metadata": {},
"source": [
"# pyls_api"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "505c80a3",
+ "id": "ef7cce71",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "8de26ab1",
+ "id": "62ca7abd",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "e5e31211",
+ "id": "275eb66a",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "427e3829",
+ "id": "ee2ad1c0",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/quasigroup_completion.ipynb b/examples/notebook/contrib/quasigroup_completion.ipynb
index 59481f1ebe..d39e90c739 100644
--- a/examples/notebook/contrib/quasigroup_completion.ipynb
+++ b/examples/notebook/contrib/quasigroup_completion.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "278c42b9",
+ "id": "f0634d8e",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "f5cda8c5",
+ "id": "2a5858a6",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "5e529ce8",
+ "id": "015bbf0b",
"metadata": {},
"source": [
"# quasigroup_completion"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "307df6c1",
+ "id": "b709b84f",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "4c817bc9",
+ "id": "315c42a5",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "89019bab",
+ "id": "cedfc30e",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "efdb9ce1",
+ "id": "d49a9f2a",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/regular.ipynb b/examples/notebook/contrib/regular.ipynb
index bc3009061a..2a4b89c693 100644
--- a/examples/notebook/contrib/regular.ipynb
+++ b/examples/notebook/contrib/regular.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "3a8cafc9",
+ "id": "ee556e75",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "46bf054e",
+ "id": "f5133bf8",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "676f9983",
+ "id": "2b16f83e",
"metadata": {},
"source": [
"# regular"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "12331557",
+ "id": "588c63e8",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "2e92f2df",
+ "id": "5e7ce2a3",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "2a1deede",
+ "id": "a2ebfb46",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "40950927",
+ "id": "9aff10be",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/regular_table.ipynb b/examples/notebook/contrib/regular_table.ipynb
index a85a7c849e..663094bca2 100644
--- a/examples/notebook/contrib/regular_table.ipynb
+++ b/examples/notebook/contrib/regular_table.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "7ef34fd7",
+ "id": "64c59bd8",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "0222dd27",
+ "id": "5a6faaf5",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "ae2152a6",
+ "id": "fcf7014d",
"metadata": {},
"source": [
"# regular_table"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "a678d346",
+ "id": "6b53aed3",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "de1c6fac",
+ "id": "82ece88f",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "76409072",
+ "id": "ed54b826",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "835b1027",
+ "id": "74722d81",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/regular_table2.ipynb b/examples/notebook/contrib/regular_table2.ipynb
index be681cdeb7..bc88133931 100644
--- a/examples/notebook/contrib/regular_table2.ipynb
+++ b/examples/notebook/contrib/regular_table2.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "e1cf98ed",
+ "id": "af5742cd",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "76034ed1",
+ "id": "e0a38cd4",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "0257d1e6",
+ "id": "f33f8a8e",
"metadata": {},
"source": [
"# regular_table2"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "50e29757",
+ "id": "1328475b",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "8e3be50c",
+ "id": "948da4b2",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "d7521d15",
+ "id": "beda5d63",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "db12be78",
+ "id": "4d4a81b5",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/rogo2.ipynb b/examples/notebook/contrib/rogo2.ipynb
index 7a574956de..af514d4321 100644
--- a/examples/notebook/contrib/rogo2.ipynb
+++ b/examples/notebook/contrib/rogo2.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "bf44adbf",
+ "id": "860498e8",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "a1d8e677",
+ "id": "b30ca7b7",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "a6a69f8d",
+ "id": "fcda9b3c",
"metadata": {},
"source": [
"# rogo2"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "efa56321",
+ "id": "986d1a8f",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "9270bee1",
+ "id": "57b3a2c4",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "a1e7e52e",
+ "id": "47b378bb",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "f8bce075",
+ "id": "ee40cc97",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/rostering_with_travel.ipynb b/examples/notebook/contrib/rostering_with_travel.ipynb
index 866ea48b76..c8710eddd0 100644
--- a/examples/notebook/contrib/rostering_with_travel.ipynb
+++ b/examples/notebook/contrib/rostering_with_travel.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "d7828d48",
+ "id": "cc28a853",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "dd3b4ed1",
+ "id": "18535df4",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "3aff2ec2",
+ "id": "172e55e7",
"metadata": {},
"source": [
"# rostering_with_travel"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "0ed3529b",
+ "id": "bd116339",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "7e92f7e1",
+ "id": "a9c7de18",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "e44905a3",
+ "id": "7a984229",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "5ebc7e33",
+ "id": "19dea44b",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/safe_cracking.ipynb b/examples/notebook/contrib/safe_cracking.ipynb
index 6e3a81312c..3eb6b3ba8e 100644
--- a/examples/notebook/contrib/safe_cracking.ipynb
+++ b/examples/notebook/contrib/safe_cracking.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "b643e794",
+ "id": "418f28d4",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "95d0f4b9",
+ "id": "8acdf794",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "9316a9d1",
+ "id": "822102d6",
"metadata": {},
"source": [
"# safe_cracking"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "69876a71",
+ "id": "b04e965f",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "5d2796df",
+ "id": "0368948b",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "a06ad36d",
+ "id": "a5bef479",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "f61b10ce",
+ "id": "37c09308",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/scheduling_speakers.ipynb b/examples/notebook/contrib/scheduling_speakers.ipynb
index 33a80403a7..c779a21fa2 100644
--- a/examples/notebook/contrib/scheduling_speakers.ipynb
+++ b/examples/notebook/contrib/scheduling_speakers.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "d4459848",
+ "id": "8151c263",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "ea99c28d",
+ "id": "912ab457",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "bb495970",
+ "id": "eebbb8e2",
"metadata": {},
"source": [
"# scheduling_speakers"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "0498eb69",
+ "id": "5daacf9d",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "0b010a6d",
+ "id": "3db06da1",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "5635f5ac",
+ "id": "9d0b2a9d",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "06e79a8d",
+ "id": "d5a397dd",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/scheduling_with_transitions_sat.ipynb b/examples/notebook/contrib/scheduling_with_transitions_sat.ipynb
index af13e4a026..ca7f4fd9d6 100644
--- a/examples/notebook/contrib/scheduling_with_transitions_sat.ipynb
+++ b/examples/notebook/contrib/scheduling_with_transitions_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "7f48d744",
+ "id": "488d5d17",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "81502619",
+ "id": "f1e2271d",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "a4294193",
+ "id": "ba69e817",
"metadata": {},
"source": [
"# scheduling_with_transitions_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "a5d9e408",
+ "id": "08139d1c",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "7c697108",
+ "id": "482a612a",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "2a6c8596",
+ "id": "0a182397",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "6f35bbf2",
+ "id": "f94f46a3",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/school_scheduling_sat.ipynb b/examples/notebook/contrib/school_scheduling_sat.ipynb
index ef7e888c07..51c92ffcd0 100644
--- a/examples/notebook/contrib/school_scheduling_sat.ipynb
+++ b/examples/notebook/contrib/school_scheduling_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "68cbcac3",
+ "id": "254aa6b1",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "ff0d867d",
+ "id": "6f0a236e",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "df81b96f",
+ "id": "b7632fd7",
"metadata": {},
"source": [
"# school_scheduling_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "c2a7e7b8",
+ "id": "50795752",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "29439aac",
+ "id": "13775a54",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "16c82ca7",
+ "id": "690010a4",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "ff5ad75f",
+ "id": "d23e8cf6",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/secret_santa.ipynb b/examples/notebook/contrib/secret_santa.ipynb
index 13fec4d0ae..fa31c6f39b 100644
--- a/examples/notebook/contrib/secret_santa.ipynb
+++ b/examples/notebook/contrib/secret_santa.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "eacc46f4",
+ "id": "6ae998ba",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "5b81ba07",
+ "id": "648a3066",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "77171772",
+ "id": "00258ce6",
"metadata": {},
"source": [
"# secret_santa"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "528fc19a",
+ "id": "04aeb36b",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "dd4e49a7",
+ "id": "523aa0a8",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "ab7dffb6",
+ "id": "c1dcace7",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "a23fce0d",
+ "id": "93b691cd",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/secret_santa2.ipynb b/examples/notebook/contrib/secret_santa2.ipynb
index abb43aeaf5..a22f89d640 100644
--- a/examples/notebook/contrib/secret_santa2.ipynb
+++ b/examples/notebook/contrib/secret_santa2.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "12b61637",
+ "id": "c31e913e",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "91c76976",
+ "id": "fb73f7cf",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "cd906aac",
+ "id": "231fa71d",
"metadata": {},
"source": [
"# secret_santa2"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "4a6fe735",
+ "id": "f55bcdbc",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "69d5cbc9",
+ "id": "47e967fc",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "e0263e36",
+ "id": "c962a1e3",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "a27e1aad",
+ "id": "fa5f847d",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/send_more_money_any_base.ipynb b/examples/notebook/contrib/send_more_money_any_base.ipynb
index 40555833d3..00fbc7d167 100644
--- a/examples/notebook/contrib/send_more_money_any_base.ipynb
+++ b/examples/notebook/contrib/send_more_money_any_base.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "de88fa5d",
+ "id": "14368999",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "c3174ec9",
+ "id": "c3b2fe06",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "af8d664a",
+ "id": "44eb605a",
"metadata": {},
"source": [
"# send_more_money_any_base"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "147df61d",
+ "id": "19234d46",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "d1e00d21",
+ "id": "862300f2",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "604d8ded",
+ "id": "70fe9fcf",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "446db3e2",
+ "id": "0847e82a",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/send_most_money.ipynb b/examples/notebook/contrib/send_most_money.ipynb
index 265a7dc651..d6f51e657d 100644
--- a/examples/notebook/contrib/send_most_money.ipynb
+++ b/examples/notebook/contrib/send_most_money.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "2c50fe32",
+ "id": "6142b3d0",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "f3c5618b",
+ "id": "3c2493ea",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "d9fe17e8",
+ "id": "d3c2b262",
"metadata": {},
"source": [
"# send_most_money"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "34935147",
+ "id": "1a1e9e57",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "622c30a2",
+ "id": "675cad32",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "bdd66c2d",
+ "id": "e923218e",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "4062ab05",
+ "id": "29041f73",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/seseman.ipynb b/examples/notebook/contrib/seseman.ipynb
index d51dbaaeed..b7db748620 100644
--- a/examples/notebook/contrib/seseman.ipynb
+++ b/examples/notebook/contrib/seseman.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "6c47e6f4",
+ "id": "aacb6611",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "29ace971",
+ "id": "e9801b9a",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "4107d0f8",
+ "id": "9d8260a6",
"metadata": {},
"source": [
"# seseman"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "b54deaad",
+ "id": "4c1f3feb",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "500c130a",
+ "id": "4fbf961a",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "ccb0d998",
+ "id": "dab4a554",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "d122866b",
+ "id": "8bd8daa8",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/seseman_b.ipynb b/examples/notebook/contrib/seseman_b.ipynb
index bddce84168..93d0c005d7 100644
--- a/examples/notebook/contrib/seseman_b.ipynb
+++ b/examples/notebook/contrib/seseman_b.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "af852675",
+ "id": "20f5fedb",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "b0b7628c",
+ "id": "89907694",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "ece1efdd",
+ "id": "96479743",
"metadata": {},
"source": [
"# seseman_b"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "63f50360",
+ "id": "992e7253",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "f6e95ec6",
+ "id": "9c33fe4d",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "93ba2166",
+ "id": "a8792580",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "af445400",
+ "id": "e3456c76",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/set_covering.ipynb b/examples/notebook/contrib/set_covering.ipynb
index 2fcc8fe8a3..9da3587d99 100644
--- a/examples/notebook/contrib/set_covering.ipynb
+++ b/examples/notebook/contrib/set_covering.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "757d6f54",
+ "id": "7fc74991",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "bf1963b2",
+ "id": "1cead56a",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "c3f12295",
+ "id": "d8cc3b7f",
"metadata": {},
"source": [
"# set_covering"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "0efebe6a",
+ "id": "5cb11875",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "46031377",
+ "id": "3d9251a6",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "1d0be20e",
+ "id": "4f76bf60",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "4cfb24d4",
+ "id": "c6bdf508",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/set_covering2.ipynb b/examples/notebook/contrib/set_covering2.ipynb
index b140eae0d9..afe21c80cb 100644
--- a/examples/notebook/contrib/set_covering2.ipynb
+++ b/examples/notebook/contrib/set_covering2.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "58f1808b",
+ "id": "cd98b557",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "38f3cdda",
+ "id": "01549e21",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "ff2ba5c2",
+ "id": "31f2d231",
"metadata": {},
"source": [
"# set_covering2"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "180a8e09",
+ "id": "74c36a00",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "407f7364",
+ "id": "0cf2dfa4",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "fdf88657",
+ "id": "05979c50",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "03424f44",
+ "id": "6ea965fd",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/set_covering3.ipynb b/examples/notebook/contrib/set_covering3.ipynb
index 88390686f5..438404d2e0 100644
--- a/examples/notebook/contrib/set_covering3.ipynb
+++ b/examples/notebook/contrib/set_covering3.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "79c6cae6",
+ "id": "ee93d33e",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "c13b385e",
+ "id": "38e72d96",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "05700f3c",
+ "id": "3349ba6a",
"metadata": {},
"source": [
"# set_covering3"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "b76fa464",
+ "id": "71b84361",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "44ce2e5b",
+ "id": "3764faed",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "6567c319",
+ "id": "2827c93d",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "b5248b18",
+ "id": "4333f2d1",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/set_covering4.ipynb b/examples/notebook/contrib/set_covering4.ipynb
index d5c7a27e2c..2607911c4f 100644
--- a/examples/notebook/contrib/set_covering4.ipynb
+++ b/examples/notebook/contrib/set_covering4.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "bc5c6f81",
+ "id": "ecb47463",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "4116c55f",
+ "id": "87a7a3d9",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "7b50f4d6",
+ "id": "5795b01e",
"metadata": {},
"source": [
"# set_covering4"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "02198f5c",
+ "id": "b773b07e",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "a494349d",
+ "id": "9cd214e3",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "1460c3e4",
+ "id": "dffb3ea5",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "d5903bde",
+ "id": "d723eef8",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/set_covering_deployment.ipynb b/examples/notebook/contrib/set_covering_deployment.ipynb
index 4ab419c37a..39a6df25ae 100644
--- a/examples/notebook/contrib/set_covering_deployment.ipynb
+++ b/examples/notebook/contrib/set_covering_deployment.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "3638b03a",
+ "id": "6e429812",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "4f08d889",
+ "id": "cd82f90e",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "e2ec9c59",
+ "id": "962d29f6",
"metadata": {},
"source": [
"# set_covering_deployment"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "67a3dd17",
+ "id": "f79bb98f",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "f7331301",
+ "id": "8e428cc1",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "b7c5e58a",
+ "id": "3a612a45",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "2a2c1ada",
+ "id": "33f08509",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/set_covering_skiena.ipynb b/examples/notebook/contrib/set_covering_skiena.ipynb
index 5679733946..39f84914f1 100644
--- a/examples/notebook/contrib/set_covering_skiena.ipynb
+++ b/examples/notebook/contrib/set_covering_skiena.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "5d71e647",
+ "id": "26b278ad",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "1d20699d",
+ "id": "b9cc56aa",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "8c32481e",
+ "id": "d49014ad",
"metadata": {},
"source": [
"# set_covering_skiena"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "21f81df2",
+ "id": "1a16a3b9",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "fbdb6c89",
+ "id": "5afecb12",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "124569ed",
+ "id": "3003a092",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "ab160e62",
+ "id": "0957bbfe",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/set_partition.ipynb b/examples/notebook/contrib/set_partition.ipynb
index 7996f503c0..bcce75079b 100644
--- a/examples/notebook/contrib/set_partition.ipynb
+++ b/examples/notebook/contrib/set_partition.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "0897245f",
+ "id": "c6130ac3",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "d2fde52e",
+ "id": "8aecdee8",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "04ad6e01",
+ "id": "c8d7fb08",
"metadata": {},
"source": [
"# set_partition"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "83846a60",
+ "id": "00ebc088",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "7c736911",
+ "id": "c8409034",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "ed1f8f0a",
+ "id": "642010ae",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "3dd101bb",
+ "id": "9411f56a",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/sicherman_dice.ipynb b/examples/notebook/contrib/sicherman_dice.ipynb
index 91d2179289..3563d61289 100644
--- a/examples/notebook/contrib/sicherman_dice.ipynb
+++ b/examples/notebook/contrib/sicherman_dice.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "3dcc5060",
+ "id": "4b7dc336",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "7bd13389",
+ "id": "91a3da95",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "8b9bd81c",
+ "id": "dc41dad4",
"metadata": {},
"source": [
"# sicherman_dice"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "42855625",
+ "id": "077c75dd",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "4762ec42",
+ "id": "248607d9",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "bd3e2126",
+ "id": "50d4bbd5",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "bad7d594",
+ "id": "29a67d89",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/ski_assignment.ipynb b/examples/notebook/contrib/ski_assignment.ipynb
index a62e1967cc..beb1595549 100644
--- a/examples/notebook/contrib/ski_assignment.ipynb
+++ b/examples/notebook/contrib/ski_assignment.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "73330147",
+ "id": "8d05f856",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "143bf795",
+ "id": "ff50ffc6",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "23ed7760",
+ "id": "ea67edc9",
"metadata": {},
"source": [
"# ski_assignment"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "e11cd3fb",
+ "id": "f79751a4",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "02d4f3ff",
+ "id": "434a9166",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "d60f6767",
+ "id": "a6cacd60",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "7b35e3a8",
+ "id": "7fd74e0b",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/slitherlink.ipynb b/examples/notebook/contrib/slitherlink.ipynb
index 1e86acb82d..af233d924d 100644
--- a/examples/notebook/contrib/slitherlink.ipynb
+++ b/examples/notebook/contrib/slitherlink.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "bedd5cc3",
+ "id": "7482c378",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "fa360075",
+ "id": "b6cccbe5",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "46894549",
+ "id": "ebe0a203",
"metadata": {},
"source": [
"# slitherlink"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "c1ba20ae",
+ "id": "4edcc2e3",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "9444e6d7",
+ "id": "6d6feb7e",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "596c9892",
+ "id": "2c3db607",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "539c6735",
+ "id": "2376527b",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/sports_schedule_sat.ipynb b/examples/notebook/contrib/sports_schedule_sat.ipynb
index b11abe0cab..364c1312e9 100644
--- a/examples/notebook/contrib/sports_schedule_sat.ipynb
+++ b/examples/notebook/contrib/sports_schedule_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "69b2f8df",
+ "id": "58d5b746",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "3c71ee5f",
+ "id": "08de21d5",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "0a947dbf",
+ "id": "58efff9f",
"metadata": {},
"source": [
"# sports_schedule_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "b0f46b32",
+ "id": "8c2073b2",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "acab6123",
+ "id": "704a595e",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "b2ee5d0f",
+ "id": "38a204c9",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "9cf1241b",
+ "id": "0b20a569",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/stable_marriage.ipynb b/examples/notebook/contrib/stable_marriage.ipynb
index 20b8efe6cb..61b9929d56 100644
--- a/examples/notebook/contrib/stable_marriage.ipynb
+++ b/examples/notebook/contrib/stable_marriage.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "5c29b390",
+ "id": "d00c7d60",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "27acf1f3",
+ "id": "1ce8a013",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "996ac708",
+ "id": "70550de1",
"metadata": {},
"source": [
"# stable_marriage"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "9e0ecbb4",
+ "id": "85101767",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "3f79a1cb",
+ "id": "7e976eee",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "14eebcf0",
+ "id": "c9f30287",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "e3e5db2c",
+ "id": "6d159002",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/stable_marriage_sat.ipynb b/examples/notebook/contrib/stable_marriage_sat.ipynb
index 1786a908da..5a346bee80 100644
--- a/examples/notebook/contrib/stable_marriage_sat.ipynb
+++ b/examples/notebook/contrib/stable_marriage_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "bbdbe7f5",
+ "id": "71547122",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "fe098ac4",
+ "id": "00674ac2",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "2d243e3e",
+ "id": "4f996c47",
"metadata": {},
"source": [
"# stable_marriage_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "7d2df820",
+ "id": "53f48df3",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "3d6775c6",
+ "id": "88babbcd",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "b1256131",
+ "id": "64e41d0d",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "13778ee5",
+ "id": "f4878595",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/steel.ipynb b/examples/notebook/contrib/steel.ipynb
index 920e928d97..0435f64e6c 100644
--- a/examples/notebook/contrib/steel.ipynb
+++ b/examples/notebook/contrib/steel.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "8bd56890",
+ "id": "a93a61f1",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "0094b0c6",
+ "id": "0eab4e81",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "9ca9b5a1",
+ "id": "504edc64",
"metadata": {},
"source": [
"# steel"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "26da709f",
+ "id": "9d186064",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "a6997151",
+ "id": "27441a0a",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "3a098206",
+ "id": "6dd27af6",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "d879ed9c",
+ "id": "920ce613",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/steel_lns.ipynb b/examples/notebook/contrib/steel_lns.ipynb
index ba8a4c7187..a862cb6bb5 100644
--- a/examples/notebook/contrib/steel_lns.ipynb
+++ b/examples/notebook/contrib/steel_lns.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "f1f150ea",
+ "id": "800526f3",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "78c9a955",
+ "id": "5cd02754",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "6c8bb740",
+ "id": "fd949ccc",
"metadata": {},
"source": [
"# steel_lns"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "92646f45",
+ "id": "38e79bf4",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "03f16cf1",
+ "id": "c04ece3d",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "d8221162",
+ "id": "eca1c3bf",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "1bbd95dd",
+ "id": "7d15baa6",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/stigler_contrib.ipynb b/examples/notebook/contrib/stigler_contrib.ipynb
index 69c67851cc..82fda25769 100644
--- a/examples/notebook/contrib/stigler_contrib.ipynb
+++ b/examples/notebook/contrib/stigler_contrib.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "94b5559c",
+ "id": "ed792c95",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "5575aefc",
+ "id": "0d85b8f8",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "6bead37a",
+ "id": "78e92a87",
"metadata": {},
"source": [
"# stigler_contrib"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "08c2102e",
+ "id": "6ec26fc3",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "71228876",
+ "id": "8a49fdd0",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "896b91e3",
+ "id": "82867e03",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "8234fda7",
+ "id": "bccfec36",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/strimko2.ipynb b/examples/notebook/contrib/strimko2.ipynb
index 763fa73a72..0e7f0d87e5 100644
--- a/examples/notebook/contrib/strimko2.ipynb
+++ b/examples/notebook/contrib/strimko2.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "0c29be5f",
+ "id": "e827b473",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "422d5368",
+ "id": "e8a0477f",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "ea92ea1a",
+ "id": "a228de3c",
"metadata": {},
"source": [
"# strimko2"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "9df2dfd1",
+ "id": "11ad5260",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "f677863b",
+ "id": "2cabde1a",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "533336ca",
+ "id": "3abaf948",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "67f8dd3c",
+ "id": "18323f2c",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/subset_sum.ipynb b/examples/notebook/contrib/subset_sum.ipynb
index d9553a9734..79b5e7b43c 100644
--- a/examples/notebook/contrib/subset_sum.ipynb
+++ b/examples/notebook/contrib/subset_sum.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "6cbdbb86",
+ "id": "f30355a6",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "b261cba9",
+ "id": "ffae3d21",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "db6d3772",
+ "id": "d8f46bbf",
"metadata": {},
"source": [
"# subset_sum"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "968f7800",
+ "id": "f691373d",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "d09c557c",
+ "id": "214897a0",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "9286a3c3",
+ "id": "276314aa",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "df83a24d",
+ "id": "32f5675a",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/survo_puzzle.ipynb b/examples/notebook/contrib/survo_puzzle.ipynb
index 6adaa98af5..d2cdf41eb4 100644
--- a/examples/notebook/contrib/survo_puzzle.ipynb
+++ b/examples/notebook/contrib/survo_puzzle.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "a84214f1",
+ "id": "801dc4e0",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "9ff3e079",
+ "id": "572131c7",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "28d1d2c5",
+ "id": "9ef4739f",
"metadata": {},
"source": [
"# survo_puzzle"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "2206e708",
+ "id": "14d36fd7",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "9c51d539",
+ "id": "4a3a3f78",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "92862fee",
+ "id": "6a550a46",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "5cb32803",
+ "id": "0b04e385",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/toNum.ipynb b/examples/notebook/contrib/toNum.ipynb
index f07101da4f..5fe00ce60b 100644
--- a/examples/notebook/contrib/toNum.ipynb
+++ b/examples/notebook/contrib/toNum.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "ebe7f498",
+ "id": "7a085205",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "06ef2c3c",
+ "id": "cee789f9",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "2eacaa0c",
+ "id": "4105a677",
"metadata": {},
"source": [
"# toNum"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "fe3cd6fb",
+ "id": "c0731e54",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "fa838146",
+ "id": "1e869742",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "6b8b5fd6",
+ "id": "59b15431",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "2f86d13b",
+ "id": "801fa348",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/traffic_lights.ipynb b/examples/notebook/contrib/traffic_lights.ipynb
index 2849e0c445..f74455b6dc 100644
--- a/examples/notebook/contrib/traffic_lights.ipynb
+++ b/examples/notebook/contrib/traffic_lights.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "e68a79cd",
+ "id": "1eef062a",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "27a60eb1",
+ "id": "5bc9cdfa",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "e5851d01",
+ "id": "6b966dd7",
"metadata": {},
"source": [
"# traffic_lights"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "4182ae07",
+ "id": "aa096483",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "b0d3afa9",
+ "id": "cc8a6c63",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "7b9e5d5b",
+ "id": "047ff683",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "1b9891c6",
+ "id": "2ffc8d2c",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/vendor_scheduling.ipynb b/examples/notebook/contrib/vendor_scheduling.ipynb
index 0421e5c567..57332fe7c6 100644
--- a/examples/notebook/contrib/vendor_scheduling.ipynb
+++ b/examples/notebook/contrib/vendor_scheduling.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "9c65c41c",
+ "id": "cf1a05cf",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "46111c1c",
+ "id": "85d2d682",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "c116b56c",
+ "id": "93684e58",
"metadata": {},
"source": [
"# vendor_scheduling"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "2e49e13a",
+ "id": "e6b4b016",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "44806e0d",
+ "id": "773c2841",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "cb38d05a",
+ "id": "7a97facd",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "f02115ee",
+ "id": "3eefbdad",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/volsay.ipynb b/examples/notebook/contrib/volsay.ipynb
index be32161e70..d11fd38ee0 100644
--- a/examples/notebook/contrib/volsay.ipynb
+++ b/examples/notebook/contrib/volsay.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "11ab0dd2",
+ "id": "7edfadec",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "b2ff149f",
+ "id": "2e755750",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "759f9abf",
+ "id": "4d777d97",
"metadata": {},
"source": [
"# volsay"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "2bc3bb9d",
+ "id": "bca6a243",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "2ad39cad",
+ "id": "9982eae0",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "d9fe202c",
+ "id": "8aceffd4",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "6371fc0f",
+ "id": "dcc77bf2",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/volsay2.ipynb b/examples/notebook/contrib/volsay2.ipynb
index 54fa981ba7..259ea0d0ef 100644
--- a/examples/notebook/contrib/volsay2.ipynb
+++ b/examples/notebook/contrib/volsay2.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "68146ec9",
+ "id": "b1fef96d",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "305a4f50",
+ "id": "d46ab39e",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "3568c609",
+ "id": "31d66a44",
"metadata": {},
"source": [
"# volsay2"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "19122335",
+ "id": "bcfca2b9",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "97af819f",
+ "id": "54008e18",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "65009446",
+ "id": "8250cb6a",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "b57c1e13",
+ "id": "d57a0be1",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/volsay3.ipynb b/examples/notebook/contrib/volsay3.ipynb
index 122850d931..c3c9e5e1f5 100644
--- a/examples/notebook/contrib/volsay3.ipynb
+++ b/examples/notebook/contrib/volsay3.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "9c1ffbbd",
+ "id": "ddb65b0a",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "a2a2b114",
+ "id": "252f076d",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "4f7253ef",
+ "id": "8057537a",
"metadata": {},
"source": [
"# volsay3"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "5cd1884c",
+ "id": "6e261219",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "cee2e460",
+ "id": "52f31336",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "98c709e9",
+ "id": "39695912",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "a7e3bef7",
+ "id": "e9e52809",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/wedding_optimal_chart.ipynb b/examples/notebook/contrib/wedding_optimal_chart.ipynb
index 36357feb83..14e3748e4e 100644
--- a/examples/notebook/contrib/wedding_optimal_chart.ipynb
+++ b/examples/notebook/contrib/wedding_optimal_chart.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "9f1f1338",
+ "id": "0900ddda",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "acea91fa",
+ "id": "12f1d787",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "a4e97738",
+ "id": "3de282bf",
"metadata": {},
"source": [
"# wedding_optimal_chart"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "933e8ddb",
+ "id": "e5f1d2b4",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "cba13e63",
+ "id": "c1d21659",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "644d678c",
+ "id": "8bbff8d1",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "c3958c0f",
+ "id": "56be8a83",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/who_killed_agatha.ipynb b/examples/notebook/contrib/who_killed_agatha.ipynb
index a6955022e1..e1e2bcf2e9 100644
--- a/examples/notebook/contrib/who_killed_agatha.ipynb
+++ b/examples/notebook/contrib/who_killed_agatha.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "d84049c4",
+ "id": "1234c962",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "170deef0",
+ "id": "485fce08",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "f5ba87de",
+ "id": "159195d2",
"metadata": {},
"source": [
"# who_killed_agatha"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "780933d3",
+ "id": "fff96297",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "63e7d41b",
+ "id": "29b9817f",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "30c5f122",
+ "id": "34ff8953",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "27cb3d84",
+ "id": "c74e0ba5",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/xkcd.ipynb b/examples/notebook/contrib/xkcd.ipynb
index 300fbefd0c..0516737dc8 100644
--- a/examples/notebook/contrib/xkcd.ipynb
+++ b/examples/notebook/contrib/xkcd.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "0ce45647",
+ "id": "f140bfcc",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "83cee493",
+ "id": "32a6308a",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "5db57b5d",
+ "id": "1724cb62",
"metadata": {},
"source": [
"# xkcd"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "45eced72",
+ "id": "fca37e70",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "2e891ca3",
+ "id": "399adb82",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "c0051e37",
+ "id": "1e9d9ffa",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "4b9255c7",
+ "id": "2d41b9d4",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/contrib/young_tableaux.ipynb b/examples/notebook/contrib/young_tableaux.ipynb
index 467a189489..5c61a700f4 100644
--- a/examples/notebook/contrib/young_tableaux.ipynb
+++ b/examples/notebook/contrib/young_tableaux.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "9b72bc65",
+ "id": "835717c6",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "e4e07f7d",
+ "id": "c372f542",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "c9bc82a9",
+ "id": "41681235",
"metadata": {},
"source": [
"# young_tableaux"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "4f24e415",
+ "id": "99de1b3c",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "446c3ec9",
+ "id": "7d77d9d6",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "67fd260f",
+ "id": "52b40c2b",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "e536c0e2",
+ "id": "0a8d2f98",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/appointments.ipynb b/examples/notebook/examples/appointments.ipynb
index a66d1377de..ac3f1f877f 100644
--- a/examples/notebook/examples/appointments.ipynb
+++ b/examples/notebook/examples/appointments.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "b60be6e2",
+ "id": "cfe15e84",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "eed780ee",
+ "id": "9600de1b",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "84d1a77d",
+ "id": "d9250e8f",
"metadata": {},
"source": [
"# appointments"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "df0159d7",
+ "id": "f42f0d3c",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "fcad2279",
+ "id": "5946d7fa",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "79812b5c",
+ "id": "b2cb12e3",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "4d8601ad",
+ "id": "42c050bf",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/arc_flow_cutting_stock_sat.ipynb b/examples/notebook/examples/arc_flow_cutting_stock_sat.ipynb
index 69b7273791..2de486d108 100644
--- a/examples/notebook/examples/arc_flow_cutting_stock_sat.ipynb
+++ b/examples/notebook/examples/arc_flow_cutting_stock_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "fa608bc5",
+ "id": "eaa71405",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "41764a95",
+ "id": "3637f2cc",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "2c3f14a5",
+ "id": "a69a7bb6",
"metadata": {},
"source": [
"# arc_flow_cutting_stock_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "6a5a2d71",
+ "id": "c8d3db2f",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "cf98c962",
+ "id": "3e63dedb",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "f96d96a2",
+ "id": "336131a1",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "04459f01",
+ "id": "895f98c2",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/assignment2_sat.ipynb b/examples/notebook/examples/assignment2_sat.ipynb
index 1dc5b337b9..8fb8ebe823 100644
--- a/examples/notebook/examples/assignment2_sat.ipynb
+++ b/examples/notebook/examples/assignment2_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "c137b895",
+ "id": "e8079fe0",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "5fd1cc83",
+ "id": "3cdd3991",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "eae4614d",
+ "id": "e6d4b47a",
"metadata": {},
"source": [
"# assignment2_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "d3ac2eff",
+ "id": "00d6e784",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "35b25d20",
+ "id": "a331261f",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "95f2cf97",
+ "id": "1115e0fc",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "f68049e6",
+ "id": "aa323cca",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/assignment_with_constraints_sat.ipynb b/examples/notebook/examples/assignment_with_constraints_sat.ipynb
index 54ad0c58a2..00d5115fd8 100644
--- a/examples/notebook/examples/assignment_with_constraints_sat.ipynb
+++ b/examples/notebook/examples/assignment_with_constraints_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "5bed6451",
+ "id": "035c9c6b",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "69285f1a",
+ "id": "6442fc39",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "06a76097",
+ "id": "7e0006e9",
"metadata": {},
"source": [
"# assignment_with_constraints_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "02d80a4b",
+ "id": "aca7a1a6",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "a1f8140f",
+ "id": "81c31f9b",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "c9784243",
+ "id": "200f0a58",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "6d6f62ed",
+ "id": "3bd51bf2",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/balance_group_sat.ipynb b/examples/notebook/examples/balance_group_sat.ipynb
index 0f7aa8f584..62609d85a6 100644
--- a/examples/notebook/examples/balance_group_sat.ipynb
+++ b/examples/notebook/examples/balance_group_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "6dc39a89",
+ "id": "e7b97a42",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "db152fe6",
+ "id": "1212496b",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "d4f5eb73",
+ "id": "87bf89f2",
"metadata": {},
"source": [
"# balance_group_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "985aeb2e",
+ "id": "54d86f89",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "e48c961b",
+ "id": "efec109a",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "52059c66",
+ "id": "4055bfdd",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "6f3c9000",
+ "id": "16111b30",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/bus_driver_scheduling_flow_sat.ipynb b/examples/notebook/examples/bus_driver_scheduling_flow_sat.ipynb
index d0eb689d5f..436402c51d 100644
--- a/examples/notebook/examples/bus_driver_scheduling_flow_sat.ipynb
+++ b/examples/notebook/examples/bus_driver_scheduling_flow_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "98ae0bd9",
+ "id": "5ef708bf",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "d9aa9721",
+ "id": "f73fed05",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "212d7dfb",
+ "id": "4cff186e",
"metadata": {},
"source": [
"# bus_driver_scheduling_flow_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "966375d1",
+ "id": "386f2ead",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "1ba45993",
+ "id": "7fd8ee06",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "bb22f313",
+ "id": "ce85da46",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "6f24d834",
+ "id": "10565628",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/bus_driver_scheduling_sat.ipynb b/examples/notebook/examples/bus_driver_scheduling_sat.ipynb
index d0a3fad4c5..0ee1801799 100644
--- a/examples/notebook/examples/bus_driver_scheduling_sat.ipynb
+++ b/examples/notebook/examples/bus_driver_scheduling_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "8865ddca",
+ "id": "0d1f94eb",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "9920e968",
+ "id": "98462932",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "a61f84bf",
+ "id": "73363631",
"metadata": {},
"source": [
"# bus_driver_scheduling_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "6af01346",
+ "id": "d6642e6e",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "5b8882c6",
+ "id": "47e49abc",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "44770565",
+ "id": "324e0c08",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "e4400988",
+ "id": "385ea508",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/chemical_balance_lp.ipynb b/examples/notebook/examples/chemical_balance_lp.ipynb
index 84860194eb..6a6161005d 100644
--- a/examples/notebook/examples/chemical_balance_lp.ipynb
+++ b/examples/notebook/examples/chemical_balance_lp.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "0163e280",
+ "id": "9ac1b7e2",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "fdf4dc0c",
+ "id": "d4f67489",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "574b369a",
+ "id": "fbc19cef",
"metadata": {},
"source": [
"# chemical_balance_lp"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "0dc22bf5",
+ "id": "8e7dc255",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "e2b8b266",
+ "id": "27b6430c",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "cadccfbe",
+ "id": "45733a57",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "dc4c5117",
+ "id": "69cec16c",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/chemical_balance_sat.ipynb b/examples/notebook/examples/chemical_balance_sat.ipynb
index 380d42104f..29427992fd 100644
--- a/examples/notebook/examples/chemical_balance_sat.ipynb
+++ b/examples/notebook/examples/chemical_balance_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "64f7568d",
+ "id": "abf085b8",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "be0c0701",
+ "id": "1bd288fa",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "5f4e1233",
+ "id": "39778652",
"metadata": {},
"source": [
"# chemical_balance_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "07215c9e",
+ "id": "4b7cd290",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "1a0c8b90",
+ "id": "ca1e0fe2",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "8fa19c71",
+ "id": "9b3ce1a7",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "87f00a26",
+ "id": "e8f67173",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/clustering_sat.ipynb b/examples/notebook/examples/clustering_sat.ipynb
index e21c197398..fd6e6ed3ad 100644
--- a/examples/notebook/examples/clustering_sat.ipynb
+++ b/examples/notebook/examples/clustering_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "898e854f",
+ "id": "2238b4d5",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "4962209c",
+ "id": "8ad01a89",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "5a7eaa51",
+ "id": "9ccbf45c",
"metadata": {},
"source": [
"# clustering_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "3d1b5b42",
+ "id": "76a173b2",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "ebd48fda",
+ "id": "9a13cd02",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "2d8900f0",
+ "id": "1edeb19d",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "2c27a898",
+ "id": "957d30ff",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/cover_rectangle_sat.ipynb b/examples/notebook/examples/cover_rectangle_sat.ipynb
index 6666124419..7b2e0b702d 100644
--- a/examples/notebook/examples/cover_rectangle_sat.ipynb
+++ b/examples/notebook/examples/cover_rectangle_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "23296165",
+ "id": "60d38dd6",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "333e6c86",
+ "id": "fdc3f104",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "c3130695",
+ "id": "5757210c",
"metadata": {},
"source": [
"# cover_rectangle_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "43f2e952",
+ "id": "77af9d76",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "e9f86f76",
+ "id": "e70dd8e5",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "085c108e",
+ "id": "cb0abc3a",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "725ea7cf",
+ "id": "0c315844",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/cvrptw_plot.ipynb b/examples/notebook/examples/cvrptw_plot.ipynb
index d72b251f4b..fff2843a20 100644
--- a/examples/notebook/examples/cvrptw_plot.ipynb
+++ b/examples/notebook/examples/cvrptw_plot.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "966cde06",
+ "id": "ec97bbd7",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "4bc9baac",
+ "id": "5c866a7a",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "6bcd2920",
+ "id": "2aa03a2b",
"metadata": {},
"source": [
"# cvrptw_plot"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "dd588b20",
+ "id": "81bb38d5",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "39f75ff7",
+ "id": "3f5d27fe",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "063def19",
+ "id": "4309ec63",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "10fbaa74",
+ "id": "3ee8116b",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/flexible_job_shop_sat.ipynb b/examples/notebook/examples/flexible_job_shop_sat.ipynb
index 02a7e3c16c..661abda263 100644
--- a/examples/notebook/examples/flexible_job_shop_sat.ipynb
+++ b/examples/notebook/examples/flexible_job_shop_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "5b8c6cbe",
+ "id": "f29929d9",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "3b5fff6b",
+ "id": "709bc011",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "4487f038",
+ "id": "025862b8",
"metadata": {},
"source": [
"# flexible_job_shop_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "e58752ba",
+ "id": "7993720b",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "07d9b87e",
+ "id": "e656f5df",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "4396b69c",
+ "id": "92fbc3e2",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "d80952e9",
+ "id": "20da3096",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/gate_scheduling_sat.ipynb b/examples/notebook/examples/gate_scheduling_sat.ipynb
index 35406d0004..950ee2faef 100644
--- a/examples/notebook/examples/gate_scheduling_sat.ipynb
+++ b/examples/notebook/examples/gate_scheduling_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "8e9b81f1",
+ "id": "24356629",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "d71065ed",
+ "id": "4252d115",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "7f563346",
+ "id": "78859d9e",
"metadata": {},
"source": [
"# gate_scheduling_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "f6d1d601",
+ "id": "1a28c6e9",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "8f74402f",
+ "id": "da0d3e7b",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "93b05e37",
+ "id": "11b24e41",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "537cfaad",
+ "id": "184ca11b",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/golomb8.ipynb b/examples/notebook/examples/golomb8.ipynb
index b9258289d1..75fa7e75a6 100644
--- a/examples/notebook/examples/golomb8.ipynb
+++ b/examples/notebook/examples/golomb8.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "b3f46e1e",
+ "id": "d765b20b",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "2fb6ab58",
+ "id": "e884cef9",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "146d4ded",
+ "id": "277e18e1",
"metadata": {},
"source": [
"# golomb8"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "af20ef3c",
+ "id": "79243fe1",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "698cf8d0",
+ "id": "ac6c950d",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "0a6e0e85",
+ "id": "c2dcf4ea",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "6f5a40e6",
+ "id": "94ad4ac6",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/hidato_sat.ipynb b/examples/notebook/examples/hidato_sat.ipynb
index 50d1e95d7e..54de14dfaa 100644
--- a/examples/notebook/examples/hidato_sat.ipynb
+++ b/examples/notebook/examples/hidato_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "7a17a7e8",
+ "id": "582b4a03",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "f589e47a",
+ "id": "ca938e7e",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "098161f8",
+ "id": "35cb5ff4",
"metadata": {},
"source": [
"# hidato_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "683cb099",
+ "id": "f2fd8413",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "e77f0b02",
+ "id": "9027a641",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "def42050",
+ "id": "0e7dfeca",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "0af96f1e",
+ "id": "b1a0f7fd",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/integer_programming.ipynb b/examples/notebook/examples/integer_programming.ipynb
index dea98860fa..69b3f223ef 100644
--- a/examples/notebook/examples/integer_programming.ipynb
+++ b/examples/notebook/examples/integer_programming.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "84e25753",
+ "id": "ebe97e19",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "967b1d1b",
+ "id": "905559ce",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "84fc5c93",
+ "id": "1cee80f3",
"metadata": {},
"source": [
"# integer_programming"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "b78bad66",
+ "id": "278f7c06",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "0240be1b",
+ "id": "4bab1eb1",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "6ccb15ea",
+ "id": "49857acf",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "2eaf8fab",
+ "id": "b09c6868",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/jobshop_ft06_distance_sat.ipynb b/examples/notebook/examples/jobshop_ft06_distance_sat.ipynb
index 51f3fb0538..773af19034 100644
--- a/examples/notebook/examples/jobshop_ft06_distance_sat.ipynb
+++ b/examples/notebook/examples/jobshop_ft06_distance_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "c95d0d5b",
+ "id": "d989222b",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "b9284b70",
+ "id": "9665650b",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "6e11375b",
+ "id": "45c8bcac",
"metadata": {},
"source": [
"# jobshop_ft06_distance_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "f0c71a91",
+ "id": "8381980b",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "de081855",
+ "id": "0f57b1a8",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "4ef651c7",
+ "id": "c32eb304",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "462b8917",
+ "id": "26ed15f2",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/jobshop_ft06_sat.ipynb b/examples/notebook/examples/jobshop_ft06_sat.ipynb
index 97de4d244c..1d77acb693 100644
--- a/examples/notebook/examples/jobshop_ft06_sat.ipynb
+++ b/examples/notebook/examples/jobshop_ft06_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "d29d6fd6",
+ "id": "fabc5e95",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "5340ee96",
+ "id": "055801b1",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "82edfc01",
+ "id": "d24af93d",
"metadata": {},
"source": [
"# jobshop_ft06_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "3b285911",
+ "id": "3761e1e9",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "5c642495",
+ "id": "2586166c",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "13970905",
+ "id": "149ec941",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "7b303437",
+ "id": "0eae3f4f",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/jobshop_with_maintenance_sat.ipynb b/examples/notebook/examples/jobshop_with_maintenance_sat.ipynb
index cbc1601a36..e9843da7d3 100644
--- a/examples/notebook/examples/jobshop_with_maintenance_sat.ipynb
+++ b/examples/notebook/examples/jobshop_with_maintenance_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "4f00b636",
+ "id": "d8555d19",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "812e6377",
+ "id": "810d239d",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "3058c186",
+ "id": "6c242854",
"metadata": {},
"source": [
"# jobshop_with_maintenance_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "f5d6dbb5",
+ "id": "6a2ae99c",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "7b392d56",
+ "id": "c342c7a8",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "8197b832",
+ "id": "424b63dc",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "c83b6576",
+ "id": "95d63739",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/knapsack_2d_sat.ipynb b/examples/notebook/examples/knapsack_2d_sat.ipynb
new file mode 100644
index 0000000000..88177bd974
--- /dev/null
+++ b/examples/notebook/examples/knapsack_2d_sat.ipynb
@@ -0,0 +1,359 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "id": "775d8ce2",
+ "metadata": {},
+ "source": [
+ "##### Copyright 2021 Google LLC."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "5a39bdfe",
+ "metadata": {},
+ "source": [
+ "Licensed under the Apache License, Version 2.0 (the \"License\");\n",
+ "you may not use this file except in compliance with the License.\n",
+ "You may obtain a copy of the License at\n",
+ "\n",
+ " http://www.apache.org/licenses/LICENSE-2.0\n",
+ "\n",
+ "Unless required by applicable law or agreed to in writing, software\n",
+ "distributed under the License is distributed on an \"AS IS\" BASIS,\n",
+ "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"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "efc6e092",
+ "metadata": {},
+ "source": [
+ "# knapsack_2d_sat"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "edd3e64c",
+ "metadata": {},
+ "source": [
+ ""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "04f38e99",
+ "metadata": {},
+ "source": [
+ "First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "28cf1909",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "!pip install ortools"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "5c198d38",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "#!/usr/bin/env python3\n",
+ "# Copyright 2010-2021 Google LLC\n",
+ "# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
+ "# you may not use this file except in compliance with the License.\n",
+ "# You may obtain a copy of the License at\n",
+ "#\n",
+ "# http://www.apache.org/licenses/LICENSE-2.0\n",
+ "#\n",
+ "# Unless required by applicable law or agreed to in writing, software\n",
+ "# distributed under the License is distributed on an \"AS IS\" BASIS,\n",
+ "# 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",
+ "\"\"\"Solver a 2D rectangle knapsack problem.\n",
+ "\n",
+ "This code is adapted from\n",
+ "https://yetanothermathprogrammingconsultant.blogspot.com/2021/10/2d-knapsack-problem.html\n",
+ "\"\"\"\n",
+ "\n",
+ "import io\n",
+ "\n",
+ "from absl import app\n",
+ "from absl import flags\n",
+ "import numpy as np\n",
+ "import pandas as pd\n",
+ "\n",
+ "from google.protobuf import text_format\n",
+ "\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:16,log_search_progress:true',\n",
+ " 'Sat solver parameters.')\n",
+ "flags.DEFINE_string('model', 'rotation', '\\'duplicate\\' or \\'rotation\\'')\n",
+ "\n",
+ "\n",
+ "def build_data():\n",
+ " \"\"\"Build the data frame.\"\"\"\n",
+ " data = \"\"\"\n",
+ " item width height available value color\n",
+ " k1 20 4 2 338.984 blue\n",
+ " k2 12 17 6 849.246 orange\n",
+ " k3 20 12 2 524.022 green\n",
+ " k4 16 7 9 263.303 red\n",
+ " k5 3 6 3 113.436 purple\n",
+ " k6 13 5 3 551.072 brown\n",
+ " k7 4 7 6 86.166 pink\n",
+ " k8 6 18 8 755.094 grey\n",
+ " k9 14 2 7 223.516 olive\n",
+ " k10 9 11 5 369.560 cyan\n",
+ " \"\"\"\n",
+ "\n",
+ " data = pd.read_table(io.StringIO(data), sep=r'\\s+')\n",
+ " print('Input data')\n",
+ " print(data)\n",
+ "\n",
+ " max_height = 20\n",
+ " max_width = 30\n",
+ "\n",
+ " print(f'Container max_width:{max_width} max_height:{max_height}')\n",
+ " print(f'#Items: {len(data.index)}')\n",
+ " return (data, max_height, max_width)\n",
+ "\n",
+ "\n",
+ "def solve_with_duplicate_items(data, max_height, max_width):\n",
+ " \"\"\"Solve the problem by building 2 items (rotated or not) for each item.\"\"\"\n",
+ " # Derived data (expanded to individual items).\n",
+ " data_widths = data['width'].to_numpy()\n",
+ " data_heights = data['height'].to_numpy()\n",
+ " data_availability = data['available'].to_numpy()\n",
+ " data_values = data['value'].to_numpy()\n",
+ "\n",
+ " # Non duplicated items data.\n",
+ " base_item_widths = np.repeat(data_widths, data_availability)\n",
+ " base_item_heights = np.repeat(data_heights, data_availability)\n",
+ " base_item_values = np.repeat(data_values, data_availability)\n",
+ " num_data_items = len(base_item_values)\n",
+ "\n",
+ " # Create rotated items by duplicating.\n",
+ " item_widths = np.concatenate((base_item_widths, base_item_heights))\n",
+ " item_heights = np.concatenate((base_item_heights, base_item_widths))\n",
+ " item_values = np.concatenate((base_item_values, base_item_values))\n",
+ "\n",
+ " num_items = len(item_values)\n",
+ "\n",
+ " # OR-Tools model\n",
+ " model = cp_model.CpModel()\n",
+ "\n",
+ " # Variables\n",
+ " x_starts = []\n",
+ " x_ends = []\n",
+ " y_starts = []\n",
+ " y_ends = []\n",
+ " is_used = []\n",
+ " x_intervals = []\n",
+ " y_intervals = []\n",
+ "\n",
+ " for i in range(num_items):\n",
+ " ## Is the item used?\n",
+ " is_used.append(model.NewBoolVar(f'is_used{i}'))\n",
+ "\n",
+ " ## Item coordinates.\n",
+ " x_starts.append(model.NewIntVar(0, max_width, f'x_start{i}'))\n",
+ " x_ends.append(model.NewIntVar(0, max_width, f'x_end{i}'))\n",
+ " y_starts.append(model.NewIntVar(0, max_height, f'y_start{i}'))\n",
+ " y_ends.append(model.NewIntVar(0, max_height, f'y_end{i}'))\n",
+ "\n",
+ " ## Interval variables.\n",
+ " x_intervals.append(\n",
+ " model.NewIntervalVar(x_starts[i], item_widths[i] * is_used[i],\n",
+ " x_ends[i], f'x_interval{i}'))\n",
+ " y_intervals.append(\n",
+ " model.NewIntervalVar(y_starts[i], item_heights[i] * is_used[i],\n",
+ " y_ends[i], f'y_interval{i}'))\n",
+ "\n",
+ " # Constraints.\n",
+ "\n",
+ " ## Only one of non-rotated/rotated pair can be used.\n",
+ " for i in range(num_data_items):\n",
+ " model.Add(is_used[i] + is_used[i + num_data_items] <= 1)\n",
+ "\n",
+ " ## 2D no overlap.\n",
+ " model.AddNoOverlap2D(x_intervals, y_intervals)\n",
+ "\n",
+ " ## Objective.\n",
+ " model.Maximize(cp_model.DoubleLinearExpr.ScalProd(is_used, item_values))\n",
+ "\n",
+ " # Output proto to file.\n",
+ " if 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",
+ " if FLAGS.params:\n",
+ " text_format.Parse(FLAGS.params, solver.parameters)\n",
+ "\n",
+ " status = solver.Solve(model)\n",
+ "\n",
+ " # Report solution.\n",
+ " if status == cp_model.OPTIMAL:\n",
+ " used = {i for i in range(num_items) if solver.BooleanValue(is_used[i])}\n",
+ " data = pd.DataFrame({\n",
+ " 'x_start': [solver.Value(x_starts[i]) for i in used],\n",
+ " 'y_start': [solver.Value(y_starts[i]) for i in used],\n",
+ " 'item_width': [item_widths[i] for i in used],\n",
+ " 'item_height': [item_heights[i] for i in used],\n",
+ " 'x_end': [solver.Value(x_ends[i]) for i in used],\n",
+ " 'y_end': [solver.Value(y_ends[i]) for i in used],\n",
+ " 'item_value': [item_values[i] for i in used]\n",
+ " })\n",
+ " print(data)\n",
+ "\n",
+ "\n",
+ "def solve_with_rotations(data, max_height, max_width):\n",
+ " \"\"\"Solve the problem by rotating items.\"\"\"\n",
+ " # Derived data (expanded to individual items).\n",
+ " data_widths = data['width'].to_numpy()\n",
+ " data_heights = data['height'].to_numpy()\n",
+ " data_availability = data['available'].to_numpy()\n",
+ " data_values = data['value'].to_numpy()\n",
+ "\n",
+ " item_widths = np.repeat(data_widths, data_availability)\n",
+ " item_heights = np.repeat(data_heights, data_availability)\n",
+ " item_values = np.repeat(data_values, data_availability)\n",
+ "\n",
+ " num_items = len(item_widths)\n",
+ "\n",
+ " # OR-Tools model.\n",
+ " model = cp_model.CpModel()\n",
+ "\n",
+ " # Coordinate variables for each rectangle.\n",
+ " x_starts = []\n",
+ " x_sizes = []\n",
+ " x_ends = []\n",
+ " y_starts = []\n",
+ " y_sizes = []\n",
+ " y_ends = []\n",
+ " x_intervals = []\n",
+ " y_intervals = []\n",
+ "\n",
+ " for i in range(num_items):\n",
+ " sizes = [0, int(item_widths[i]), int(item_heights[i])]\n",
+ " # X coordinates.\n",
+ " x_starts.append(model.NewIntVar(0, max_width, f'x_start{i}'))\n",
+ " x_sizes.append(\n",
+ " model.NewIntVarFromDomain(cp_model.Domain.FromValues(sizes),\n",
+ " f'x_size{i}'))\n",
+ " x_ends.append(model.NewIntVar(0, max_width, f'x_end{i}'))\n",
+ "\n",
+ " # Y coordinates.\n",
+ " y_starts.append(model.NewIntVar(0, max_height, f'y_start{i}'))\n",
+ " y_sizes.append(\n",
+ " model.NewIntVarFromDomain(cp_model.Domain.FromValues(sizes),\n",
+ " f'y_size{i}'))\n",
+ " y_ends.append(model.NewIntVar(0, max_height, f'y_end{i}'))\n",
+ "\n",
+ " ## Interval variables\n",
+ " x_intervals.append(\n",
+ " model.NewIntervalVar(x_starts[i], x_sizes[i], x_ends[i],\n",
+ " f'x_interval{i}'))\n",
+ " y_intervals.append(\n",
+ " model.NewIntervalVar(y_starts[i], y_sizes[i], y_ends[i],\n",
+ " f'y_interval{i}'))\n",
+ "\n",
+ " # is_used[i] == True if and only if item i is selected.\n",
+ " is_used = []\n",
+ "\n",
+ " # Constraints.\n",
+ "\n",
+ " ## for each item, decide is unselected, no_rotation, rotated.\n",
+ " for i in range(num_items):\n",
+ " not_selected = model.NewBoolVar(f'not_selected_{i}')\n",
+ " no_rotation = model.NewBoolVar(f'no_rotation_{i}')\n",
+ " rotated = model.NewBoolVar(f'rotated_{i}')\n",
+ "\n",
+ " ### Exactly one state must be chosen.\n",
+ " model.Add(not_selected + no_rotation + rotated == 1)\n",
+ "\n",
+ " ### Define height and width according to the state.\n",
+ " dim1 = item_widths[i]\n",
+ " dim2 = item_heights[i]\n",
+ " model.Add(x_sizes[i] == 0).OnlyEnforceIf(not_selected)\n",
+ " model.Add(y_sizes[i] == 0).OnlyEnforceIf(not_selected)\n",
+ " model.Add(x_sizes[i] == dim1).OnlyEnforceIf(no_rotation)\n",
+ " model.Add(y_sizes[i] == dim2).OnlyEnforceIf(no_rotation)\n",
+ " model.Add(x_sizes[i] == dim2).OnlyEnforceIf(rotated)\n",
+ " model.Add(y_sizes[i] == dim1).OnlyEnforceIf(rotated)\n",
+ "\n",
+ " is_used.append(not_selected.Not())\n",
+ "\n",
+ " ## 2D no overlap.\n",
+ " model.AddNoOverlap2D(x_intervals, y_intervals)\n",
+ "\n",
+ " # Objective.\n",
+ " model.Maximize(cp_model.DoubleLinearExpr.ScalProd(is_used, item_values))\n",
+ "\n",
+ " # Output proto to file.\n",
+ " if 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",
+ " if FLAGS.params:\n",
+ " text_format.Parse(FLAGS.params, solver.parameters)\n",
+ "\n",
+ " status = solver.Solve(model)\n",
+ "\n",
+ " # Report solution.\n",
+ " if status == cp_model.OPTIMAL:\n",
+ " used = {i for i in range(num_items) if solver.BooleanValue(is_used[i])}\n",
+ " data = pd.DataFrame({\n",
+ " 'x_start': [solver.Value(x_starts[i]) for i in used],\n",
+ " 'y_start': [solver.Value(y_starts[i]) for i in used],\n",
+ " 'item_width': [solver.Value(x_sizes[i]) for i in used],\n",
+ " 'item_height': [solver.Value(y_sizes[i]) for i in used],\n",
+ " 'x_end': [solver.Value(x_ends[i]) for i in used],\n",
+ " 'y_end': [solver.Value(y_ends[i]) for i in used],\n",
+ " 'item_value': [item_values[i] for i in used]\n",
+ " })\n",
+ " print(data)\n",
+ "\n",
+ "\n",
+ "\"\"\"Solve the problem with all models.\"\"\"\n",
+ "data, max_height, max_width = build_data()\n",
+ "if FLAGS.model == 'duplicate':\n",
+ " solve_with_duplicate_items(data, max_height, max_width)\n",
+ "else:\n",
+ " solve_with_rotations(data, max_height, max_width)\n",
+ "\n"
+ ]
+ }
+ ],
+ "metadata": {},
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/examples/notebook/examples/linear_assignment_api.ipynb b/examples/notebook/examples/linear_assignment_api.ipynb
index 1726f2e558..d66aee8358 100644
--- a/examples/notebook/examples/linear_assignment_api.ipynb
+++ b/examples/notebook/examples/linear_assignment_api.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "7083f343",
+ "id": "05fd85c0",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "05394b78",
+ "id": "bc47f1d9",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "f75038c7",
+ "id": "d14b4191",
"metadata": {},
"source": [
"# linear_assignment_api"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "1d9af76e",
+ "id": "0e3c87e4",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "26f66a6f",
+ "id": "f61b332a",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "e1ee4517",
+ "id": "b8dbb0ba",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "32c4b1df",
+ "id": "9504d427",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/linear_programming.ipynb b/examples/notebook/examples/linear_programming.ipynb
index ebcb7bba45..e4381bed8b 100644
--- a/examples/notebook/examples/linear_programming.ipynb
+++ b/examples/notebook/examples/linear_programming.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "65c49d36",
+ "id": "79c33e0c",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "d55be839",
+ "id": "ea6cc552",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "3c7fa36b",
+ "id": "ddab3628",
"metadata": {},
"source": [
"# linear_programming"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "fac77fe9",
+ "id": "7a0082ed",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "9faab5d7",
+ "id": "d63e13af",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "94a29ccf",
+ "id": "e424f8c1",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "77dceb13",
+ "id": "de9485e2",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/magic_sequence_distribute.ipynb b/examples/notebook/examples/magic_sequence_distribute.ipynb
index 0623bc0813..e6da6d3467 100644
--- a/examples/notebook/examples/magic_sequence_distribute.ipynb
+++ b/examples/notebook/examples/magic_sequence_distribute.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "d1c47060",
+ "id": "4bc5201c",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "83f9a2f8",
+ "id": "c78ac4d9",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "d30d1e38",
+ "id": "0b7d0715",
"metadata": {},
"source": [
"# magic_sequence_distribute"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "5db4082a",
+ "id": "8fd5b932",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "87f36b8f",
+ "id": "d404a74e",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "a3a6b42d",
+ "id": "970b1154",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "8979f2f5",
+ "id": "842a25c4",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/maze_escape_sat.ipynb b/examples/notebook/examples/maze_escape_sat.ipynb
index 4dda150d97..0ea2d7d396 100644
--- a/examples/notebook/examples/maze_escape_sat.ipynb
+++ b/examples/notebook/examples/maze_escape_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "9c26a684",
+ "id": "6e3f8bbe",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "d6b1abc7",
+ "id": "51d1abee",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "e267e2f6",
+ "id": "c729769d",
"metadata": {},
"source": [
"# maze_escape_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "906d5faa",
+ "id": "b4cd80a3",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "8cbcfe4b",
+ "id": "267f5f7a",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "8b127c3b",
+ "id": "6692005c",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "4ae91c3c",
+ "id": "75ab2f69",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/prize_collecting_tsp_sat.ipynb b/examples/notebook/examples/prize_collecting_tsp_sat.ipynb
index 57f0803fd2..ed130792b1 100644
--- a/examples/notebook/examples/prize_collecting_tsp_sat.ipynb
+++ b/examples/notebook/examples/prize_collecting_tsp_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "0e46b3dd",
+ "id": "868807eb",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "2da3bca0",
+ "id": "5eded886",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "68e3dad1",
+ "id": "4c5501ef",
"metadata": {},
"source": [
"# prize_collecting_tsp_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "6425e7da",
+ "id": "bc14f925",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "0863dbeb",
+ "id": "b95d2117",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "8575ab60",
+ "id": "d9a0ca18",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "894ee780",
+ "id": "782218ca",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/pyflow_example.ipynb b/examples/notebook/examples/pyflow_example.ipynb
index 2e21f3f644..ac625127f2 100644
--- a/examples/notebook/examples/pyflow_example.ipynb
+++ b/examples/notebook/examples/pyflow_example.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "5bbb1e47",
+ "id": "1ca71169",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "cd83a797",
+ "id": "4e7d6a4d",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "e2695618",
+ "id": "58e6877c",
"metadata": {},
"source": [
"# pyflow_example"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "fd2ba145",
+ "id": "9412a455",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "0edb5ac0",
+ "id": "a191b5f7",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "2549c3d5",
+ "id": "ba79f748",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "b503e2fb",
+ "id": "cf12f4cf",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/qubo_sat.ipynb b/examples/notebook/examples/qubo_sat.ipynb
index 74bac8691c..9077763f4d 100644
--- a/examples/notebook/examples/qubo_sat.ipynb
+++ b/examples/notebook/examples/qubo_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "1da3b578",
+ "id": "921a1cbe",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "1c3e8cdd",
+ "id": "599ece58",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "f87ac604",
+ "id": "33873259",
"metadata": {},
"source": [
"# qubo_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "ab8947d9",
+ "id": "fa630f80",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "8ec95cf0",
+ "id": "e5590a1f",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "ddb576f4",
+ "id": "ca579c9f",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "6ae7c960",
+ "id": "ccded208",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/random_tsp.ipynb b/examples/notebook/examples/random_tsp.ipynb
index 1c4eef7a78..62cf3c877c 100644
--- a/examples/notebook/examples/random_tsp.ipynb
+++ b/examples/notebook/examples/random_tsp.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "30dfb2c1",
+ "id": "579c75ed",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "519266bc",
+ "id": "688e03a2",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "580e89ca",
+ "id": "31162901",
"metadata": {},
"source": [
"# random_tsp"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "51b9ebae",
+ "id": "7a078d90",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "e68a6fd5",
+ "id": "4b32c2ce",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "51efb64b",
+ "id": "399af645",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "6d2e302a",
+ "id": "3af605e3",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/rcpsp_sat.ipynb b/examples/notebook/examples/rcpsp_sat.ipynb
index a8d3d6b12a..1fea9455aa 100644
--- a/examples/notebook/examples/rcpsp_sat.ipynb
+++ b/examples/notebook/examples/rcpsp_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "25e15f52",
+ "id": "938ee4d9",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "4e8eb715",
+ "id": "52b3bc4f",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "f91a9176",
+ "id": "f29bfccd",
"metadata": {},
"source": [
"# rcpsp_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "5d7b25f2",
+ "id": "c07e9bf3",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "4bd055b9",
+ "id": "5de1efd9",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "dfe95a75",
+ "id": "f42f75c0",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "199b49e8",
+ "id": "0611f01b",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/reallocate_sat.ipynb b/examples/notebook/examples/reallocate_sat.ipynb
index 85b5dcd0b2..fc12273cc3 100644
--- a/examples/notebook/examples/reallocate_sat.ipynb
+++ b/examples/notebook/examples/reallocate_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "6cd9efb0",
+ "id": "f0cfba6d",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "34a31c9a",
+ "id": "0476abf1",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "1b417608",
+ "id": "c2e9714e",
"metadata": {},
"source": [
"# reallocate_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "55e5a373",
+ "id": "5ac54f31",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "7207adea",
+ "id": "25ebe27f",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "80348ef7",
+ "id": "3632c397",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "8ac0fc75",
+ "id": "777c6be7",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/shift_scheduling_sat.ipynb b/examples/notebook/examples/shift_scheduling_sat.ipynb
index 1fae480398..34c15c004e 100644
--- a/examples/notebook/examples/shift_scheduling_sat.ipynb
+++ b/examples/notebook/examples/shift_scheduling_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "d2a21e40",
+ "id": "6aec99c6",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "1449d885",
+ "id": "36815e61",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "ce23f0fd",
+ "id": "27a1ded3",
"metadata": {},
"source": [
"# shift_scheduling_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "7ee60122",
+ "id": "32cd71da",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "0a876903",
+ "id": "cb818515",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "4e3d2a35",
+ "id": "9bd27c91",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "8d69e5a7",
+ "id": "eb44b7e9",
"metadata": {},
"outputs": [],
"source": [
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 3947fd49c1..e13760edbd 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
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "b298ab6d",
+ "id": "6295ab74",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "ada2393c",
+ "id": "a78e4949",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "fbcb3446",
+ "id": "2fabe3de",
"metadata": {},
"source": [
"# single_machine_scheduling_with_setup_release_due_dates_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "31973f84",
+ "id": "e758d70f",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "21668d54",
+ "id": "c2f9e120",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "875c4515",
+ "id": "b9ae0eb6",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "a517c9e8",
+ "id": "de94aaf1",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/steel_mill_slab_sat.ipynb b/examples/notebook/examples/steel_mill_slab_sat.ipynb
index 9a5d05d521..d68308e2d3 100644
--- a/examples/notebook/examples/steel_mill_slab_sat.ipynb
+++ b/examples/notebook/examples/steel_mill_slab_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "6bb49eea",
+ "id": "c6895b8c",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "a5ac7788",
+ "id": "dd6418a3",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "941534d8",
+ "id": "c265e113",
"metadata": {},
"source": [
"# steel_mill_slab_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "24d7dc31",
+ "id": "89253806",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "daad8def",
+ "id": "b5e6d70e",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "c01da83b",
+ "id": "43a567eb",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "a2ac9974",
+ "id": "9c5119de",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/sudoku_sat.ipynb b/examples/notebook/examples/sudoku_sat.ipynb
index cabe54fda3..6375862b5a 100644
--- a/examples/notebook/examples/sudoku_sat.ipynb
+++ b/examples/notebook/examples/sudoku_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "0ac5d400",
+ "id": "07031e7e",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "0f878742",
+ "id": "feb51927",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "0777224d",
+ "id": "532a0a25",
"metadata": {},
"source": [
"# sudoku_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "b0fb83e6",
+ "id": "f3f28129",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "c1b59986",
+ "id": "81eae230",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "a7d85d3f",
+ "id": "163ab9d5",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "73b0cbd3",
+ "id": "90435baa",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/task_allocation_sat.ipynb b/examples/notebook/examples/task_allocation_sat.ipynb
index 7fb411978f..e4a26a555a 100644
--- a/examples/notebook/examples/task_allocation_sat.ipynb
+++ b/examples/notebook/examples/task_allocation_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "5a43e32f",
+ "id": "cfdc2476",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "6ea4b7c6",
+ "id": "fcd45cba",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "98f6097c",
+ "id": "759c5221",
"metadata": {},
"source": [
"# task_allocation_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "999221ae",
+ "id": "19ff0cff",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "ad3b0cb0",
+ "id": "86100212",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "cd050b87",
+ "id": "21e3ab7e",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "c0769f29",
+ "id": "b11e4bf8",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/tasks_and_workers_assignment_sat.ipynb b/examples/notebook/examples/tasks_and_workers_assignment_sat.ipynb
index dc32f42e7d..a03817a3c6 100644
--- a/examples/notebook/examples/tasks_and_workers_assignment_sat.ipynb
+++ b/examples/notebook/examples/tasks_and_workers_assignment_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "1eb9b2c9",
+ "id": "1f58d680",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "d2ac085e",
+ "id": "d0f2f46f",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "ff76907b",
+ "id": "b13c005f",
"metadata": {},
"source": [
"# tasks_and_workers_assignment_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "b70c0438",
+ "id": "b9ea5f3f",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "d1b9b4fa",
+ "id": "d124db41",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "a174af5b",
+ "id": "6fecab06",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "9e1338eb",
+ "id": "5e48dd60",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/transit_time.ipynb b/examples/notebook/examples/transit_time.ipynb
index 184c19e443..0c82f3838d 100644
--- a/examples/notebook/examples/transit_time.ipynb
+++ b/examples/notebook/examples/transit_time.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "dd5a957f",
+ "id": "8d739cbe",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "987f23e5",
+ "id": "5594b1ff",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "36827783",
+ "id": "60d8d128",
"metadata": {},
"source": [
"# transit_time"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "4a374714",
+ "id": "8c7d4866",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "74300289",
+ "id": "3d249e68",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "94b2471d",
+ "id": "5c725e6d",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "04be34c5",
+ "id": "7a9b1fdd",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/tsp_sat.ipynb b/examples/notebook/examples/tsp_sat.ipynb
index df0edca090..bd1f111526 100644
--- a/examples/notebook/examples/tsp_sat.ipynb
+++ b/examples/notebook/examples/tsp_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "61d4fad7",
+ "id": "e8fae4c5",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "1bf6f8e8",
+ "id": "1f08bbde",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "c470140f",
+ "id": "acabd76f",
"metadata": {},
"source": [
"# tsp_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "a15f33fd",
+ "id": "057cca3a",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "86070fc5",
+ "id": "f692ebe4",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "14729648",
+ "id": "ec891bd0",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "3fc3fd15",
+ "id": "864dc7ae",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/vendor_scheduling_sat.ipynb b/examples/notebook/examples/vendor_scheduling_sat.ipynb
index 979503266a..8fef029144 100644
--- a/examples/notebook/examples/vendor_scheduling_sat.ipynb
+++ b/examples/notebook/examples/vendor_scheduling_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "1f3f2988",
+ "id": "918246bf",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "65f5dc35",
+ "id": "e9cad84f",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "ad3da3f2",
+ "id": "00725174",
"metadata": {},
"source": [
"# vendor_scheduling_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "d0371aff",
+ "id": "d354476d",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "4b468d49",
+ "id": "294825ce",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "e675da62",
+ "id": "553fea1e",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "fadd59ef",
+ "id": "f4138743",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/wedding_optimal_chart_sat.ipynb b/examples/notebook/examples/wedding_optimal_chart_sat.ipynb
index 4096f0a712..2b11b3840b 100644
--- a/examples/notebook/examples/wedding_optimal_chart_sat.ipynb
+++ b/examples/notebook/examples/wedding_optimal_chart_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "d607072f",
+ "id": "cc691287",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "1eb2c385",
+ "id": "6c667918",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "90e2bc8c",
+ "id": "a27ca560",
"metadata": {},
"source": [
"# wedding_optimal_chart_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "df7068f6",
+ "id": "2a0e1c39",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "879971b2",
+ "id": "0c948773",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "616b0233",
+ "id": "afe0ca53",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "4f27c38c",
+ "id": "5a4eddd6",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/worker_schedule_sat.ipynb b/examples/notebook/examples/worker_schedule_sat.ipynb
index ee8696eec0..eb5f984274 100644
--- a/examples/notebook/examples/worker_schedule_sat.ipynb
+++ b/examples/notebook/examples/worker_schedule_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "ce1720c6",
+ "id": "c4439c45",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "ba9416fd",
+ "id": "e8d9387a",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "7fafc242",
+ "id": "23c7bd13",
"metadata": {},
"source": [
"# worker_schedule_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "b157193f",
+ "id": "d56458a1",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "5622fb17",
+ "id": "35f05a79",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "3fedba1b",
+ "id": "54295299",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "5df7bd39",
+ "id": "7819b131",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/zebra_sat.ipynb b/examples/notebook/examples/zebra_sat.ipynb
index 1bc1433d99..c23fb20973 100644
--- a/examples/notebook/examples/zebra_sat.ipynb
+++ b/examples/notebook/examples/zebra_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "09ca1c5f",
+ "id": "447d9ab8",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "f7e52536",
+ "id": "25422171",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "696f71c5",
+ "id": "232afdd0",
"metadata": {},
"source": [
"# zebra_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "0486932a",
+ "id": "aa93f2b0",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "fb9c681e",
+ "id": "da88c113",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "f74be95a",
+ "id": "d3f1db20",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "9f642fe5",
+ "id": "9dd8a310",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/graph/assignment_linear_assignment.ipynb b/examples/notebook/graph/assignment_linear_assignment.ipynb
new file mode 100644
index 0000000000..6583d254be
--- /dev/null
+++ b/examples/notebook/graph/assignment_linear_assignment.ipynb
@@ -0,0 +1,143 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "id": "864533b2",
+ "metadata": {},
+ "source": [
+ "##### Copyright 2021 Google LLC."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "1a7c5cdc",
+ "metadata": {},
+ "source": [
+ "Licensed under the Apache License, Version 2.0 (the \"License\");\n",
+ "you may not use this file except in compliance with the License.\n",
+ "You may obtain a copy of the License at\n",
+ "\n",
+ " http://www.apache.org/licenses/LICENSE-2.0\n",
+ "\n",
+ "Unless required by applicable law or agreed to in writing, software\n",
+ "distributed under the License is distributed on an \"AS IS\" BASIS,\n",
+ "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"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "0b189f3b",
+ "metadata": {},
+ "source": [
+ "# assignment_linear_assignment"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "2c0a4294",
+ "metadata": {},
+ "source": [
+ ""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "a5afaeea",
+ "metadata": {},
+ "source": [
+ "First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "03440dda",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "!pip install ortools"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "1c35d019",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "#!/usr/bin/env python3\n",
+ "# Copyright 2010-2021 Google LLC\n",
+ "# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
+ "# you may not use this file except in compliance with the License.\n",
+ "# You may obtain a copy of the License at\n",
+ "#\n",
+ "# http://www.apache.org/licenses/LICENSE-2.0\n",
+ "#\n",
+ "# Unless required by applicable law or agreed to in writing, software\n",
+ "# distributed under the License is distributed on an \"AS IS\" BASIS,\n",
+ "# 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",
+ "# [START program]\n",
+ "\"\"\"Solve assignment problem using linear assignment solver.\"\"\"\n",
+ "# [START import]\n",
+ "from ortools.graph import pywrapgraph\n",
+ "# [END import]\n",
+ "\n",
+ "\n",
+ "\"\"\"Linear Sum Assignment example.\"\"\"\n",
+ "# [START solver]\n",
+ "assignment = pywrapgraph.LinearSumAssignment()\n",
+ "# [END solver]\n",
+ "\n",
+ "# [START data]\n",
+ "costs = [\n",
+ " [90, 76, 75, 70],\n",
+ " [35, 85, 55, 65],\n",
+ " [125, 95, 90, 105],\n",
+ " [45, 110, 95, 115],\n",
+ "]\n",
+ "num_workers = len(costs)\n",
+ "num_tasks = len(costs[0])\n",
+ "# [END data]\n",
+ "\n",
+ "# [START constraints]\n",
+ "for worker in range(num_workers):\n",
+ " for task in range(num_tasks):\n",
+ " if costs[worker][task]:\n",
+ " assignment.AddArcWithCost(worker, task, costs[worker][task])\n",
+ "# [END constraints]\n",
+ "\n",
+ "# [START solve]\n",
+ "status = assignment.Solve()\n",
+ "# [END solve]\n",
+ "\n",
+ "# [START print_solution]\n",
+ "if status == assignment.OPTIMAL:\n",
+ " print(f'Total cost = {assignment.OptimalCost()}\\n')\n",
+ " for i in range(0, assignment.NumNodes()):\n",
+ " print(f'Worker {i} assigned to task {assignment.RightMate(i)}.' +\n",
+ " f' Cost = {assignment.AssignmentCost(i)}')\n",
+ "elif status == assignment.INFEASIBLE:\n",
+ " print('No assignment is possible.')\n",
+ "elif status == assignment.POSSIBLE_OVERFLOW:\n",
+ " print(\n",
+ " 'Some input costs are too large and may cause an integer overflow.')\n",
+ "# [END print_solution]\n",
+ "\n"
+ ]
+ }
+ ],
+ "metadata": {},
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/examples/notebook/graph/assignment_min_flow.ipynb b/examples/notebook/graph/assignment_min_flow.ipynb
new file mode 100644
index 0000000000..4ce8f4a4b4
--- /dev/null
+++ b/examples/notebook/graph/assignment_min_flow.ipynb
@@ -0,0 +1,166 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "id": "981fd9e1",
+ "metadata": {},
+ "source": [
+ "##### Copyright 2021 Google LLC."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "74b3e95d",
+ "metadata": {},
+ "source": [
+ "Licensed under the Apache License, Version 2.0 (the \"License\");\n",
+ "you may not use this file except in compliance with the License.\n",
+ "You may obtain a copy of the License at\n",
+ "\n",
+ " http://www.apache.org/licenses/LICENSE-2.0\n",
+ "\n",
+ "Unless required by applicable law or agreed to in writing, software\n",
+ "distributed under the License is distributed on an \"AS IS\" BASIS,\n",
+ "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"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "198ffa63",
+ "metadata": {},
+ "source": [
+ "# assignment_min_flow"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "6e991c13",
+ "metadata": {},
+ "source": [
+ ""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "2e100055",
+ "metadata": {},
+ "source": [
+ "First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "0be3b731",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "!pip install ortools"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "d21bf459",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "#!/usr/bin/env python3\n",
+ "# Copyright 2010-2021 Google LLC\n",
+ "# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
+ "# you may not use this file except in compliance with the License.\n",
+ "# You may obtain a copy of the License at\n",
+ "#\n",
+ "# http://www.apache.org/licenses/LICENSE-2.0\n",
+ "#\n",
+ "# Unless required by applicable law or agreed to in writing, software\n",
+ "# distributed under the License is distributed on an \"AS IS\" BASIS,\n",
+ "# 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",
+ "# [START program]\n",
+ "\"\"\"Linear assignment example.\"\"\"\n",
+ "# [START import]\n",
+ "from ortools.graph import pywrapgraph\n",
+ "# [END import]\n",
+ "\n",
+ "\n",
+ "\"\"\"Solving an Assignment Problem with MinCostFlow.\"\"\"\n",
+ "# [START solver]\n",
+ "# Instantiate a SimpleMinCostFlow solver.\n",
+ "min_cost_flow = pywrapgraph.SimpleMinCostFlow()\n",
+ "# [END solver]\n",
+ "\n",
+ "# [START data]\n",
+ "# Define the directed graph for the flow.\n",
+ "start_nodes = [0, 0, 0, 0] + [\n",
+ " 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4\n",
+ "] + [5, 6, 7, 8]\n",
+ "end_nodes = [1, 2, 3, 4] + [5, 6, 7, 8, 5, 6, 7, 8, 5, 6, 7, 8, 5, 6, 7, 8\n",
+ " ] + [9, 9, 9, 9]\n",
+ "capacities = [1, 1, 1, 1] + [\n",
+ " 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n",
+ "] + [1, 1, 1, 1]\n",
+ "costs = (\n",
+ " [0, 0, 0, 0] +\n",
+ " [90, 76, 75, 70, 35, 85, 55, 65, 125, 95, 90, 105, 45, 110, 95, 115] +\n",
+ " [0, 0, 0, 0])\n",
+ "\n",
+ "source = 0\n",
+ "sink = 9\n",
+ "tasks = 4\n",
+ "supplies = [tasks, 0, 0, 0, 0, 0, 0, 0, 0, -tasks]\n",
+ "# [END data]\n",
+ "\n",
+ "# [START constraints]\n",
+ "# Add each arc.\n",
+ "for i in range(len(start_nodes)):\n",
+ " min_cost_flow.AddArcWithCapacityAndUnitCost(start_nodes[i],\n",
+ " end_nodes[i], capacities[i],\n",
+ " costs[i])\n",
+ "# Add node supplies.\n",
+ "for i in range(len(supplies)):\n",
+ " min_cost_flow.SetNodeSupply(i, supplies[i])\n",
+ "# [END constraints]\n",
+ "\n",
+ "# [START solve]\n",
+ "# Find the minimum cost flow between node 0 and node 10.\n",
+ "status = min_cost_flow.Solve()\n",
+ "# [END solve]\n",
+ "\n",
+ "# [START print_solution]\n",
+ "if status == min_cost_flow.OPTIMAL:\n",
+ " print('Total cost = ', min_cost_flow.OptimalCost())\n",
+ " print()\n",
+ " for arc in range(min_cost_flow.NumArcs()):\n",
+ " # Can ignore arcs leading out of source or into sink.\n",
+ " if min_cost_flow.Tail(arc) != source and min_cost_flow.Head(\n",
+ " arc) != sink:\n",
+ "\n",
+ " # Arcs in the solution have a flow value of 1. Their start and end nodes\n",
+ " # give an assignment of worker to task.\n",
+ " if min_cost_flow.Flow(arc) > 0:\n",
+ " print('Worker %d assigned to task %d. Cost = %d' %\n",
+ " (min_cost_flow.Tail(arc), min_cost_flow.Head(arc),\n",
+ " min_cost_flow.UnitCost(arc)))\n",
+ "else:\n",
+ " print('There was an issue with the min cost flow input.')\n",
+ " print(f'Status: {status}')\n",
+ "# [END print_solution]\n",
+ "\n"
+ ]
+ }
+ ],
+ "metadata": {},
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/examples/notebook/graph/balance_min_flow.ipynb b/examples/notebook/graph/balance_min_flow.ipynb
new file mode 100644
index 0000000000..6ec31e5aac
--- /dev/null
+++ b/examples/notebook/graph/balance_min_flow.ipynb
@@ -0,0 +1,175 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "id": "3428c9a9",
+ "metadata": {},
+ "source": [
+ "##### Copyright 2021 Google LLC."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "2be137e6",
+ "metadata": {},
+ "source": [
+ "Licensed under the Apache License, Version 2.0 (the \"License\");\n",
+ "you may not use this file except in compliance with the License.\n",
+ "You may obtain a copy of the License at\n",
+ "\n",
+ " http://www.apache.org/licenses/LICENSE-2.0\n",
+ "\n",
+ "Unless required by applicable law or agreed to in writing, software\n",
+ "distributed under the License is distributed on an \"AS IS\" BASIS,\n",
+ "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"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "9b3b2a72",
+ "metadata": {},
+ "source": [
+ "# balance_min_flow"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "be0daab2",
+ "metadata": {},
+ "source": [
+ ""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "5232c307",
+ "metadata": {},
+ "source": [
+ "First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "02ae9020",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "!pip install ortools"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "e668f0e8",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "#!/usr/bin/env python3\n",
+ "# Copyright 2010-2021 Google LLC\n",
+ "# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
+ "# you may not use this file except in compliance with the License.\n",
+ "# You may obtain a copy of the License at\n",
+ "#\n",
+ "# http://www.apache.org/licenses/LICENSE-2.0\n",
+ "#\n",
+ "# Unless required by applicable law or agreed to in writing, software\n",
+ "# distributed under the License is distributed on an \"AS IS\" BASIS,\n",
+ "# 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",
+ "# [START program]\n",
+ "\"\"\"Assignment with teams of workers.\"\"\"\n",
+ "# [START import]\n",
+ "from ortools.graph import pywrapgraph\n",
+ "# [END import]\n",
+ "\n",
+ "\n",
+ "\"\"\"Solving an Assignment with teams of worker.\"\"\"\n",
+ "# [START solver]\n",
+ "min_cost_flow = pywrapgraph.SimpleMinCostFlow()\n",
+ "# [END solver]\n",
+ "\n",
+ "# [START data]\n",
+ "# Define the directed graph for the flow.\n",
+ "team_a = [1, 3, 5]\n",
+ "team_b = [2, 4, 6]\n",
+ "\n",
+ "start_nodes = ([0, 0] + [11, 11, 11] + [12, 12, 12] + [\n",
+ " 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6\n",
+ "] + [7, 8, 9, 10])\n",
+ "end_nodes = ([11, 12] + team_a + team_b + [\n",
+ " 7, 8, 9, 10, 7, 8, 9, 10, 7, 8, 9, 10, 7, 8, 9, 10, 7, 8, 9, 10, 7, 8,\n",
+ " 9, 10\n",
+ "] + [13, 13, 13, 13])\n",
+ "capacities = ([2, 2] + [1, 1, 1] + [1, 1, 1] + [\n",
+ " 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n",
+ "] + [1, 1, 1, 1])\n",
+ "costs = ([0, 0] + [0, 0, 0] + [0, 0, 0] + [\n",
+ " 90, 76, 75, 70, 35, 85, 55, 65, 125, 95, 90, 105, 45, 110, 95, 115, 60,\n",
+ " 105, 80, 75, 45, 65, 110, 95\n",
+ "] + [0, 0, 0, 0])\n",
+ "\n",
+ "source = 0\n",
+ "sink = 13\n",
+ "tasks = 4\n",
+ "# Define an array of supplies at each node.\n",
+ "supplies = [tasks, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -tasks]\n",
+ "# [END data]\n",
+ "\n",
+ "# [START constraints]\n",
+ "# Add each arc.\n",
+ "for i in range(0, len(start_nodes)):\n",
+ " min_cost_flow.AddArcWithCapacityAndUnitCost(start_nodes[i],\n",
+ " end_nodes[i], capacities[i],\n",
+ " costs[i])\n",
+ "\n",
+ "# Add node supplies.\n",
+ "for i in range(0, len(supplies)):\n",
+ " min_cost_flow.SetNodeSupply(i, supplies[i])\n",
+ "# [END constraints]\n",
+ "\n",
+ "# [START solve]\n",
+ "# Find the minimum cost flow between node 0 and node 10.\n",
+ "status = min_cost_flow.Solve()\n",
+ "# [END solve]\n",
+ "\n",
+ "# [START print_solution]\n",
+ "if status == min_cost_flow.OPTIMAL:\n",
+ " min_cost_flow.Solve()\n",
+ " print('Total cost = ', min_cost_flow.OptimalCost())\n",
+ " print()\n",
+ " for arc in range(min_cost_flow.NumArcs()):\n",
+ " # Can ignore arcs leading out of source or intermediate, or into sink.\n",
+ " if (min_cost_flow.Tail(arc) != source and\n",
+ " min_cost_flow.Tail(arc) != 11 and\n",
+ " min_cost_flow.Tail(arc) != 12 and\n",
+ " min_cost_flow.Head(arc) != sink):\n",
+ "\n",
+ " # Arcs in the solution will have a flow value of 1.\n",
+ " # There start and end nodes give an assignment of worker to task.\n",
+ " if min_cost_flow.Flow(arc) > 0:\n",
+ " print('Worker %d assigned to task %d. Cost = %d' %\n",
+ " (min_cost_flow.Tail(arc), min_cost_flow.Head(arc),\n",
+ " min_cost_flow.UnitCost(arc)))\n",
+ "else:\n",
+ " print('There was an issue with the min cost flow input.')\n",
+ " print(f'Status: {status}')\n",
+ "# [END print_solution]\n",
+ "\n"
+ ]
+ }
+ ],
+ "metadata": {},
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/examples/notebook/graph/simple_max_flow_program.ipynb b/examples/notebook/graph/simple_max_flow_program.ipynb
index 980aeaeb9a..635faeeba7 100644
--- a/examples/notebook/graph/simple_max_flow_program.ipynb
+++ b/examples/notebook/graph/simple_max_flow_program.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "2bf9b567",
+ "id": "18a3f79d",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "7be013fd",
+ "id": "7a932855",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "5557bcfd",
+ "id": "55cdfccb",
"metadata": {},
"source": [
"# simple_max_flow_program"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "8351f994",
+ "id": "b2f3a9e5",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "9db72a49",
+ "id": "00ac5383",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "c56ffb9c",
+ "id": "3d88e57a",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "4a75ec9d",
+ "id": "8f0c4a47",
"metadata": {},
"outputs": [],
"source": [
@@ -95,20 +95,21 @@
"\n",
"\n",
"\"\"\"MaxFlow simple interface example.\"\"\"\n",
+ "# [START solver]\n",
+ "# Instantiate a SimpleMaxFlow solver.\n",
+ "max_flow = pywrapgraph.SimpleMaxFlow()\n",
+ "# [END solver]\n",
"\n",
"# [START data]\n",
"# Define three parallel arrays: start_nodes, end_nodes, and the capacities\n",
"# between each pair. For instance, the arc from node 0 to node 1 has a\n",
"# capacity of 20.\n",
- "\n",
"start_nodes = [0, 0, 0, 1, 1, 2, 2, 3, 3]\n",
"end_nodes = [1, 2, 3, 2, 4, 3, 4, 2, 4]\n",
"capacities = [20, 30, 10, 40, 30, 10, 20, 5, 20]\n",
"# [END data]\n",
"\n",
- "# Instantiate a SimpleMaxFlow solver.\n",
"# [START constraints]\n",
- "max_flow = pywrapgraph.SimpleMaxFlow()\n",
"# Add each arc.\n",
"for arc in zip(start_nodes, end_nodes, capacities):\n",
" max_flow.AddArcWithCapacity(arc[0], arc[1], arc[2])\n",
@@ -116,19 +117,24 @@
"\n",
"# [START solve]\n",
"# Find the maximum flow between node 0 and node 4.\n",
- "if max_flow.Solve(0, 4) == max_flow.OPTIMAL:\n",
- " print('Max flow:', max_flow.OptimalFlow())\n",
- " print('')\n",
- " print(' Arc Flow / Capacity')\n",
- " for i in range(max_flow.NumArcs()):\n",
- " print('%1s -> %1s %3s / %3s' %\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",
- " print('There was an issue with the max flow input.')\n",
+ "status = max_flow.Solve(0, 4)\n",
"# [END solve]\n",
+ "\n",
+ "# [START print_solution]\n",
+ "if status != max_flow.OPTIMAL:\n",
+ " print('There was an issue with the max flow input.')\n",
+ " print(f'Status: {status}')\n",
+ " exit(1)\n",
+ "print('Max flow:', max_flow.OptimalFlow())\n",
+ "print('')\n",
+ "print(' Arc Flow / Capacity')\n",
+ "for i in range(max_flow.NumArcs()):\n",
+ " print('%1s -> %1s %3s / %3s' %\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",
+ "# [END print_solution]\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 a2451f6abf..8204488722 100644
--- a/examples/notebook/graph/simple_min_cost_flow_program.ipynb
+++ b/examples/notebook/graph/simple_min_cost_flow_program.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "548055c9",
+ "id": "6ecdbdef",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "78e3c68d",
+ "id": "203490ab",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "eb074b2a",
+ "id": "34841db6",
"metadata": {},
"source": [
"# simple_min_cost_flow_program"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "2f4c8a44",
+ "id": "c976ad61",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "880541ef",
+ "id": "bdb0b306",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "1b3b1dd5",
+ "id": "fe956f50",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "ecd66125",
+ "id": "6492b611",
"metadata": {},
"outputs": [],
"source": [
@@ -88,13 +88,18 @@
"# See the License for the specific language governing permissions and\n",
"# limitations under the License.\n",
"# [START program]\n",
- "\"\"\"From Bradley, H. and M., 'Applied Mathematical Programming', figure 8.1.\"\"\"\n",
+ "\"\"\"From Bradley, Hax and Maganti, 'Applied Mathematical Programming', figure 8.1.\"\"\"\n",
"# [START import]\n",
"from ortools.graph import pywrapgraph\n",
"# [END import]\n",
"\n",
"\n",
"\"\"\"MinCostFlow simple interface example.\"\"\"\n",
+ "# [START solver]\n",
+ "# Instantiate a SimpleMinCostFlow solver.\n",
+ "min_cost_flow = pywrapgraph.SimpleMinCostFlow()\n",
+ "# [END solver]\n",
+ "\n",
"# [START data]\n",
"# Define four parallel arrays: sources, destinations, capacities,\n",
"# and unit costs between each pair. For instance, the arc from node 0\n",
@@ -109,37 +114,34 @@
"# [END data]\n",
"\n",
"# [START constraints]\n",
- "# Instantiate a SimpleMinCostFlow solver.\n",
- "min_cost_flow = pywrapgraph.SimpleMinCostFlow()\n",
- "\n",
"# Add each arc.\n",
"for arc in zip(start_nodes, end_nodes, capacities, unit_costs):\n",
" min_cost_flow.AddArcWithCapacityAndUnitCost(arc[0], arc[1], arc[2],\n",
" arc[3])\n",
"\n",
- "# Add node supplies.\n",
+ "# Add node supply.\n",
"for count, supply in enumerate(supplies):\n",
" min_cost_flow.SetNodeSupply(count, supply)\n",
"# [END constraints]\n",
"\n",
"# [START solve]\n",
"# Find the min cost flow.\n",
- "solve_status = min_cost_flow.Solve()\n",
+ "status = min_cost_flow.Solve()\n",
"# [END solve]\n",
"\n",
"# [START print_solution]\n",
- "if solve_status == min_cost_flow.OPTIMAL:\n",
- " print('Minimum cost: ', min_cost_flow.OptimalCost())\n",
- " print('')\n",
- " print(' Arc Flow / Capacity Cost')\n",
- " for i in range(min_cost_flow.NumArcs()):\n",
- " cost = min_cost_flow.Flow(i) * min_cost_flow.UnitCost(i)\n",
- " print('%1s -> %1s %3s / %3s %3s' %\n",
- " (min_cost_flow.Tail(i), min_cost_flow.Head(i),\n",
- " min_cost_flow.Flow(i), min_cost_flow.Capacity(i), cost))\n",
- "else:\n",
- " print('Solving the min cost flow problem failed. Solver status: ',\n",
- " solve_status)\n",
+ "if status != min_cost_flow.OPTIMAL:\n",
+ " print('There was an issue with the min cost flow input.')\n",
+ " print(f'Status: {status}')\n",
+ " exit(1)\n",
+ "print('Minimum cost: ', min_cost_flow.OptimalCost())\n",
+ "print('')\n",
+ "print(' Arc Flow / Capacity Cost')\n",
+ "for i in range(min_cost_flow.NumArcs()):\n",
+ " cost = min_cost_flow.Flow(i) * min_cost_flow.UnitCost(i)\n",
+ " print('%1s -> %1s %3s / %3s %3s' %\n",
+ " (min_cost_flow.Tail(i), min_cost_flow.Head(i),\n",
+ " min_cost_flow.Flow(i), min_cost_flow.Capacity(i), cost))\n",
"# [END print_solution]\n",
"\n"
]
diff --git a/examples/notebook/linear_solver/assignment_groups_mip.ipynb b/examples/notebook/linear_solver/assignment_groups_mip.ipynb
new file mode 100644
index 0000000000..f67a347b9a
--- /dev/null
+++ b/examples/notebook/linear_solver/assignment_groups_mip.ipynb
@@ -0,0 +1,234 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "id": "408a7040",
+ "metadata": {},
+ "source": [
+ "##### Copyright 2021 Google LLC."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "1a76cac9",
+ "metadata": {},
+ "source": [
+ "Licensed under the Apache License, Version 2.0 (the \"License\");\n",
+ "you may not use this file except in compliance with the License.\n",
+ "You may obtain a copy of the License at\n",
+ "\n",
+ " http://www.apache.org/licenses/LICENSE-2.0\n",
+ "\n",
+ "Unless required by applicable law or agreed to in writing, software\n",
+ "distributed under the License is distributed on an \"AS IS\" BASIS,\n",
+ "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"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "a94ef0e4",
+ "metadata": {},
+ "source": [
+ "# assignment_groups_mip"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "77e471f0",
+ "metadata": {},
+ "source": [
+ ""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "6f4db2f2",
+ "metadata": {},
+ "source": [
+ "First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "e9575cb8",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "!pip install ortools"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "754869c9",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "#!/usr/bin/env python3\n",
+ "# Copyright 2010-2021 Google LLC\n",
+ "# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
+ "# you may not use this file except in compliance with the License.\n",
+ "# You may obtain a copy of the License at\n",
+ "#\n",
+ "# http://www.apache.org/licenses/LICENSE-2.0\n",
+ "#\n",
+ "# Unless required by applicable law or agreed to in writing, software\n",
+ "# distributed under the License is distributed on an \"AS IS\" BASIS,\n",
+ "# 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",
+ "# [START program]\n",
+ "\"\"\"Solve assignment problem for given group of workers.\"\"\"\n",
+ "# [START import]\n",
+ "from ortools.linear_solver import pywraplp\n",
+ "# [END import]\n",
+ "\n",
+ "\n",
+ "# Data\n",
+ "# [START data]\n",
+ "costs = [\n",
+ " [90, 76, 75, 70, 50, 74],\n",
+ " [35, 85, 55, 65, 48, 101],\n",
+ " [125, 95, 90, 105, 59, 120],\n",
+ " [45, 110, 95, 115, 104, 83],\n",
+ " [60, 105, 80, 75, 59, 62],\n",
+ " [45, 65, 110, 95, 47, 31],\n",
+ " [38, 51, 107, 41, 69, 99],\n",
+ " [47, 85, 57, 71, 92, 77],\n",
+ " [39, 63, 97, 49, 118, 56],\n",
+ " [47, 101, 71, 60, 88, 109],\n",
+ " [17, 39, 103, 64, 61, 92],\n",
+ " [101, 45, 83, 59, 92, 27],\n",
+ "]\n",
+ "# [END data]\n",
+ "\n",
+ "# Allowed groups of workers:\n",
+ "# [START allowed_groups]\n",
+ "group1 = [ # Subgroups of workers 0 - 3\n",
+ " [2, 3],\n",
+ " [1, 3],\n",
+ " [1, 2],\n",
+ " [0, 1],\n",
+ " [0, 2],\n",
+ "]\n",
+ "\n",
+ "group2 = [ # Subgroups of workers 4 - 7\n",
+ " [6, 7],\n",
+ " [5, 7],\n",
+ " [5, 6],\n",
+ " [4, 5],\n",
+ " [4, 7],\n",
+ "]\n",
+ "\n",
+ "group3 = [ # Subgroups of workers 8 - 11\n",
+ " [10, 11],\n",
+ " [9, 11],\n",
+ " [9, 10],\n",
+ " [8, 10],\n",
+ " [8, 11],\n",
+ "]\n",
+ "\n",
+ "allowed_groups = []\n",
+ "for workers_g1 in group1:\n",
+ " for workers_g2 in group2:\n",
+ " for workers_g3 in group3:\n",
+ " allowed_groups.append(workers_g1 + workers_g2 + workers_g3)\n",
+ "# [END allowed_groups]\n",
+ "\n",
+ "# [START solves]\n",
+ "min_val = 1e6\n",
+ "total_time = 0\n",
+ "for group in allowed_groups:\n",
+ " res = assignment(costs, group)\n",
+ " status_tmp = res[0]\n",
+ " solver_tmp = res[1]\n",
+ " x_tmp = res[2]\n",
+ " if status_tmp == pywraplp.Solver.OPTIMAL or status_tmp == pywraplp.Solver.FEASIBLE:\n",
+ " if solver_tmp.Objective().Value() < min_val:\n",
+ " min_val = solver_tmp.Objective().Value()\n",
+ " min_group = group\n",
+ " min_solver = solver_tmp\n",
+ " min_x = x_tmp\n",
+ " total_time += solver_tmp.WallTime()\n",
+ "# [END solves]\n",
+ "\n",
+ "# Print best solution.\n",
+ "# [START print_solution]\n",
+ "if min_val < 1e6:\n",
+ " print(f'Total cost = {min_solver.Objective().Value()}\\n')\n",
+ " num_tasks = len(costs[0])\n",
+ " for worker in min_group:\n",
+ " for task in range(num_tasks):\n",
+ " if min_x[worker, task].solution_value() > 0.5:\n",
+ " print(f'Worker {worker} assigned to task {task}.' +\n",
+ " f' Cost = {costs[worker][task]}')\n",
+ "else:\n",
+ " print('No solution found.')\n",
+ "print(f'Time = {total_time} ms')\n",
+ "# [END print_solution]\n",
+ "\n",
+ "def assignment(costs, group):\n",
+ " \"\"\"Solve the assignment problem for one allowed group combinaison.\"\"\"\n",
+ " num_tasks = len(costs[1])\n",
+ " # Solver\n",
+ " # [START solver]\n",
+ " # Create the mip solver with the SCIP backend.\n",
+ " solver = pywraplp.Solver.CreateSolver('SCIP')\n",
+ " # [END solver]\n",
+ "\n",
+ " # Variables\n",
+ " # [START variables]\n",
+ " # x[worker, task] is an array of 0-1 variables, which will be 1\n",
+ " # if the worker is assigned to the task.\n",
+ " x = {}\n",
+ " for worker in group:\n",
+ " for task in range(num_tasks):\n",
+ " x[worker, task] = solver.BoolVar(f'x[{worker},{task}]')\n",
+ " # [END variables]\n",
+ "\n",
+ " # Constraints\n",
+ " # [START constraints]\n",
+ " # The total size of the tasks each worker takes on is at most total_size_max.\n",
+ " for worker in group:\n",
+ " solver.Add(\n",
+ " solver.Sum([x[worker, task] for task in range(num_tasks)]) <= 1)\n",
+ "\n",
+ " # Each task is assigned to exactly one worker.\n",
+ " for task in range(num_tasks):\n",
+ " solver.Add(solver.Sum([x[worker, task] for worker in group]) == 1)\n",
+ " # [END constraints]\n",
+ "\n",
+ " # Objective\n",
+ " # [START objective]\n",
+ " objective_terms = []\n",
+ " for worker in group:\n",
+ " for task in range(num_tasks):\n",
+ " objective_terms.append(costs[worker][task] * x[worker, task])\n",
+ " solver.Minimize(solver.Sum(objective_terms))\n",
+ " # [END objective]\n",
+ "\n",
+ " # Solve\n",
+ " # [START solve]\n",
+ " status = solver.Solve()\n",
+ " # [END solve]\n",
+ "\n",
+ " return [status, solver, x]\n",
+ "\n",
+ "\n"
+ ]
+ }
+ ],
+ "metadata": {},
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/examples/notebook/linear_solver/assignment_mip.ipynb b/examples/notebook/linear_solver/assignment_mip.ipynb
index 6c8b9f4d5f..a728548b4d 100644
--- a/examples/notebook/linear_solver/assignment_mip.ipynb
+++ b/examples/notebook/linear_solver/assignment_mip.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "8863072b",
+ "id": "9d631090",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "66634500",
+ "id": "7d68ce48",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "1cd92bce",
+ "id": "a9b3f9fb",
"metadata": {},
"source": [
"# assignment_mip"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "bb648d0b",
+ "id": "eca9b1db",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "24ffc70c",
+ "id": "20b4b251",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "8e32f403",
+ "id": "73570ffd",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "fb61ffff",
+ "id": "e1216bfc",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/linear_solver/assignment_task_sizes_mip.ipynb b/examples/notebook/linear_solver/assignment_task_sizes_mip.ipynb
new file mode 100644
index 0000000000..4c4b198c61
--- /dev/null
+++ b/examples/notebook/linear_solver/assignment_task_sizes_mip.ipynb
@@ -0,0 +1,184 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "id": "d2f3e5c0",
+ "metadata": {},
+ "source": [
+ "##### Copyright 2021 Google LLC."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "085bef3f",
+ "metadata": {},
+ "source": [
+ "Licensed under the Apache License, Version 2.0 (the \"License\");\n",
+ "you may not use this file except in compliance with the License.\n",
+ "You may obtain a copy of the License at\n",
+ "\n",
+ " http://www.apache.org/licenses/LICENSE-2.0\n",
+ "\n",
+ "Unless required by applicable law or agreed to in writing, software\n",
+ "distributed under the License is distributed on an \"AS IS\" BASIS,\n",
+ "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"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "9b67a67f",
+ "metadata": {},
+ "source": [
+ "# assignment_task_sizes_mip"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "0885f6d9",
+ "metadata": {},
+ "source": [
+ ""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "6c15397c",
+ "metadata": {},
+ "source": [
+ "First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "4e710bd0",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "!pip install ortools"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "ec7fb934",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "#!/usr/bin/env python3\n",
+ "# Copyright 2010-2021 Google LLC\n",
+ "# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
+ "# you may not use this file except in compliance with the License.\n",
+ "# You may obtain a copy of the License at\n",
+ "#\n",
+ "# http://www.apache.org/licenses/LICENSE-2.0\n",
+ "#\n",
+ "# Unless required by applicable law or agreed to in writing, software\n",
+ "# distributed under the License is distributed on an \"AS IS\" BASIS,\n",
+ "# 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",
+ "# [START program]\n",
+ "\"\"\"MIP example that solves an assignment problem.\"\"\"\n",
+ "# [START import]\n",
+ "from ortools.linear_solver import pywraplp\n",
+ "# [END import]\n",
+ "\n",
+ "\n",
+ "# Data\n",
+ "# [START data]\n",
+ "costs = [\n",
+ " [90, 76, 75, 70, 50, 74, 12, 68],\n",
+ " [35, 85, 55, 65, 48, 101, 70, 83],\n",
+ " [125, 95, 90, 105, 59, 120, 36, 73],\n",
+ " [45, 110, 95, 115, 104, 83, 37, 71],\n",
+ " [60, 105, 80, 75, 59, 62, 93, 88],\n",
+ " [45, 65, 110, 95, 47, 31, 81, 34],\n",
+ " [38, 51, 107, 41, 69, 99, 115, 48],\n",
+ " [47, 85, 57, 71, 92, 77, 109, 36],\n",
+ " [39, 63, 97, 49, 118, 56, 92, 61],\n",
+ " [47, 101, 71, 60, 88, 109, 52, 90],\n",
+ "]\n",
+ "num_workers = len(costs)\n",
+ "num_tasks = len(costs[0])\n",
+ "\n",
+ "task_sizes = [10, 7, 3, 12, 15, 4, 11, 5]\n",
+ "# Maximum total of task sizes for any worker\n",
+ "total_size_max = 15\n",
+ "# [END data]\n",
+ "\n",
+ "# Solver\n",
+ "# [START solver]\n",
+ "# Create the mip solver with the SCIP backend.\n",
+ "solver = pywraplp.Solver.CreateSolver('SCIP')\n",
+ "\n",
+ "# [END solver]\n",
+ "\n",
+ "# Variables\n",
+ "# [START variables]\n",
+ "# x[i, j] is an array of 0-1 variables, which will be 1\n",
+ "# if worker i is assigned to task j.\n",
+ "x = {}\n",
+ "for worker in range(num_workers):\n",
+ " for task in range(num_tasks):\n",
+ " x[worker, task] = solver.IntVar(0, 1, f'x[{worker},{task}]')\n",
+ "# [END variables]\n",
+ "\n",
+ "# Constraints\n",
+ "# [START constraints]\n",
+ "# The total size of the tasks each worker takes on is at most total_size_max.\n",
+ "for worker in range(num_workers):\n",
+ " solver.Add(\n",
+ " solver.Sum([\n",
+ " task_sizes[task] * x[worker, task] for task in range(num_tasks)\n",
+ " ]) <= total_size_max)\n",
+ "\n",
+ "# Each task is assigned to exactly one worker.\n",
+ "for task in range(num_tasks):\n",
+ " solver.Add(\n",
+ " solver.Sum([x[worker, task] for worker in range(num_workers)]) == 1)\n",
+ "# [END constraints]\n",
+ "\n",
+ "# Objective\n",
+ "# [START objective]\n",
+ "objective_terms = []\n",
+ "for worker in range(num_workers):\n",
+ " for task in range(num_tasks):\n",
+ " objective_terms.append(costs[worker][task] * x[worker, task])\n",
+ "solver.Minimize(solver.Sum(objective_terms))\n",
+ "# [END objective]\n",
+ "\n",
+ "# Solve\n",
+ "# [START solve]\n",
+ "status = solver.Solve()\n",
+ "# [END solve]\n",
+ "\n",
+ "# Print solution.\n",
+ "# [START print_solution]\n",
+ "if status == pywraplp.Solver.OPTIMAL or status == pywraplp.Solver.FEASIBLE:\n",
+ " print(f'Total cost = {solver.Objective().Value()}\\n')\n",
+ " for worker in range(num_workers):\n",
+ " for task in range(num_tasks):\n",
+ " if x[worker, task].solution_value() > 0.5:\n",
+ " print(f'Worker {worker} assigned to task {task}.' +\n",
+ " f' Cost = {costs[worker][task]}')\n",
+ "else:\n",
+ " print('No solution found.')\n",
+ "# [END print_solution]\n",
+ "\n"
+ ]
+ }
+ ],
+ "metadata": {},
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/examples/notebook/linear_solver/assignment_teams_mip.ipynb b/examples/notebook/linear_solver/assignment_teams_mip.ipynb
new file mode 100644
index 0000000000..296ff2918e
--- /dev/null
+++ b/examples/notebook/linear_solver/assignment_teams_mip.ipynb
@@ -0,0 +1,192 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "id": "12b6aff9",
+ "metadata": {},
+ "source": [
+ "##### Copyright 2021 Google LLC."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "401f7f1e",
+ "metadata": {},
+ "source": [
+ "Licensed under the Apache License, Version 2.0 (the \"License\");\n",
+ "you may not use this file except in compliance with the License.\n",
+ "You may obtain a copy of the License at\n",
+ "\n",
+ " http://www.apache.org/licenses/LICENSE-2.0\n",
+ "\n",
+ "Unless required by applicable law or agreed to in writing, software\n",
+ "distributed under the License is distributed on an \"AS IS\" BASIS,\n",
+ "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"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "17302846",
+ "metadata": {},
+ "source": [
+ "# assignment_teams_mip"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "315452ca",
+ "metadata": {},
+ "source": [
+ ""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "bbfcdbab",
+ "metadata": {},
+ "source": [
+ "First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "ed2a5599",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "!pip install ortools"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "0323efae",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "#!/usr/bin/env python3\n",
+ "# Copyright 2010-2021 Google LLC\n",
+ "# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
+ "# you may not use this file except in compliance with the License.\n",
+ "# You may obtain a copy of the License at\n",
+ "#\n",
+ "# http://www.apache.org/licenses/LICENSE-2.0\n",
+ "#\n",
+ "# Unless required by applicable law or agreed to in writing, software\n",
+ "# distributed under the License is distributed on an \"AS IS\" BASIS,\n",
+ "# 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",
+ "# [START program]\n",
+ "\"\"\"MIP example that solves an assignment problem.\"\"\"\n",
+ "# [START import]\n",
+ "from ortools.linear_solver import pywraplp\n",
+ "# [END import]\n",
+ "\n",
+ "\n",
+ "# Data\n",
+ "# [START data]\n",
+ "costs = [\n",
+ " [90, 76, 75, 70],\n",
+ " [35, 85, 55, 65],\n",
+ " [125, 95, 90, 105],\n",
+ " [45, 110, 95, 115],\n",
+ " [60, 105, 80, 75],\n",
+ " [45, 65, 110, 95],\n",
+ "]\n",
+ "num_workers = len(costs)\n",
+ "num_tasks = len(costs[0])\n",
+ "\n",
+ "team1 = [0, 2, 4]\n",
+ "team2 = [1, 3, 5]\n",
+ "# Maximum total of tasks for any team\n",
+ "team_max = 2\n",
+ "# [END data]\n",
+ "\n",
+ "# Solver\n",
+ "# [START solver]\n",
+ "# Create the mip solver with the SCIP backend.\n",
+ "solver = pywraplp.Solver.CreateSolver('SCIP')\n",
+ "# [END solver]\n",
+ "\n",
+ "# Variables\n",
+ "# [START variables]\n",
+ "# x[i, j] is an array of 0-1 variables, which will be 1\n",
+ "# if worker i is assigned to task j.\n",
+ "x = {}\n",
+ "for worker in range(num_workers):\n",
+ " for task in range(num_tasks):\n",
+ " x[worker, task] = solver.BoolVar(f'x[{worker},{task}]')\n",
+ "# [END variables]\n",
+ "\n",
+ "# Constraints\n",
+ "# [START constraints]\n",
+ "# Each worker is assigned at most 1 task.\n",
+ "for worker in range(num_workers):\n",
+ " solver.Add(\n",
+ " solver.Sum([x[worker, task] for task in range(num_tasks)]) <= 1)\n",
+ "\n",
+ "# Each task is assigned to exactly one worker.\n",
+ "for task in range(num_tasks):\n",
+ " solver.Add(\n",
+ " solver.Sum([x[worker, task] for worker in range(num_workers)]) == 1)\n",
+ "\n",
+ "# Each team takes at most two tasks.\n",
+ "team1_tasks = []\n",
+ "for worker in team1:\n",
+ " for task in range(num_tasks):\n",
+ " team1_tasks.append(x[worker, task])\n",
+ "solver.Add(solver.Sum(team1_tasks) <= team_max)\n",
+ "\n",
+ "team2_tasks = []\n",
+ "for worker in team2:\n",
+ " for task in range(num_tasks):\n",
+ " team2_tasks.append(x[worker, task])\n",
+ "solver.Add(solver.Sum(team2_tasks) <= team_max)\n",
+ "# [END constraints]\n",
+ "\n",
+ "# Objective\n",
+ "# [START objective]\n",
+ "objective_terms = []\n",
+ "for worker in range(num_workers):\n",
+ " for task in range(num_tasks):\n",
+ " objective_terms.append(costs[worker][task] * x[worker, task])\n",
+ "solver.Minimize(solver.Sum(objective_terms))\n",
+ "# [END objective]\n",
+ "\n",
+ "# Solve\n",
+ "# [START solve]\n",
+ "status = solver.Solve()\n",
+ "# [END solve]\n",
+ "\n",
+ "# Print solution.\n",
+ "# [START print_solution]\n",
+ "if status == pywraplp.Solver.OPTIMAL or status == pywraplp.Solver.FEASIBLE:\n",
+ " print(f'Total cost = {solver.Objective().Value()}\\n')\n",
+ " for worker in range(num_workers):\n",
+ " for task in range(num_tasks):\n",
+ " if x[worker, task].solution_value() > 0.5:\n",
+ " print(f'Worker {worker} assigned to task {task}.' +\n",
+ " f' Cost = {costs[worker][task]}')\n",
+ "else:\n",
+ " print('No solution found.')\n",
+ "print(f'Time = {solver.WallTime()} ms')\n",
+ "# [END print_solution]\n",
+ "\n"
+ ]
+ }
+ ],
+ "metadata": {},
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/examples/notebook/linear_solver/basic_example.ipynb b/examples/notebook/linear_solver/basic_example.ipynb
index f23ee95b1e..32c5413346 100644
--- a/examples/notebook/linear_solver/basic_example.ipynb
+++ b/examples/notebook/linear_solver/basic_example.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "e2db61a1",
+ "id": "8c0972a0",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "53210247",
+ "id": "43493966",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "f9e18100",
+ "id": "ccc8c294",
"metadata": {},
"source": [
"# basic_example"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "e29d4987",
+ "id": "91eaa5bd",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "67efeee7",
+ "id": "591a0725",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "2036f745",
+ "id": "a8029f18",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "07e41281",
+ "id": "b712a816",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/linear_solver/bin_packing_mip.ipynb b/examples/notebook/linear_solver/bin_packing_mip.ipynb
index e92b36cf52..4a89f1981f 100644
--- a/examples/notebook/linear_solver/bin_packing_mip.ipynb
+++ b/examples/notebook/linear_solver/bin_packing_mip.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "02bb2dfb",
+ "id": "07eb9c18",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "12f2aa4c",
+ "id": "95d92bec",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "33bb835a",
+ "id": "4a240970",
"metadata": {},
"source": [
"# bin_packing_mip"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "eee9e4ae",
+ "id": "c7d367a6",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "25d1537b",
+ "id": "86653aab",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "4a95d2ce",
+ "id": "f6976654",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "a7c796fb",
+ "id": "73623976",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/linear_solver/integer_programming_example.ipynb b/examples/notebook/linear_solver/integer_programming_example.ipynb
index f8314edcb5..85712e2980 100644
--- a/examples/notebook/linear_solver/integer_programming_example.ipynb
+++ b/examples/notebook/linear_solver/integer_programming_example.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "b7b7d560",
+ "id": "fd3017c4",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "ba5fb09e",
+ "id": "582e7da9",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "79eaa890",
+ "id": "f4061fe7",
"metadata": {},
"source": [
"# integer_programming_example"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "28e78003",
+ "id": "d578fdc4",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "efbc8d2e",
+ "id": "c4b8d234",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "fb72e63a",
+ "id": "9f1cb762",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "00c7d8a3",
+ "id": "2ccae1ba",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/linear_solver/linear_programming_example.ipynb b/examples/notebook/linear_solver/linear_programming_example.ipynb
index 1bc94f5d7d..3b4f631dde 100644
--- a/examples/notebook/linear_solver/linear_programming_example.ipynb
+++ b/examples/notebook/linear_solver/linear_programming_example.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "9d800b9a",
+ "id": "61072ec7",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "5d3e35d6",
+ "id": "85ee326d",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "1878efc0",
+ "id": "181ff574",
"metadata": {},
"source": [
"# linear_programming_example"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "99fc1f55",
+ "id": "6b2ea382",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "18dce096",
+ "id": "b63d73c1",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "1f7a97c6",
+ "id": "413684e1",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "d5366e89",
+ "id": "5d25c9d1",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/linear_solver/mip_var_array.ipynb b/examples/notebook/linear_solver/mip_var_array.ipynb
index b8e1f6956e..c0196b2dcc 100644
--- a/examples/notebook/linear_solver/mip_var_array.ipynb
+++ b/examples/notebook/linear_solver/mip_var_array.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "baa490fa",
+ "id": "0179d9b8",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "fa0e1ad5",
+ "id": "276952b9",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "ec772168",
+ "id": "51ed7f4e",
"metadata": {},
"source": [
"# mip_var_array"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "962e2b78",
+ "id": "ffc34328",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "99e6a688",
+ "id": "ceccf19e",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "85f6ab45",
+ "id": "d9276f56",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "a7c0dbe8",
+ "id": "166660e4",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/linear_solver/multiple_knapsack_mip.ipynb b/examples/notebook/linear_solver/multiple_knapsack_mip.ipynb
index 3ce14b1b57..27f61d65fe 100644
--- a/examples/notebook/linear_solver/multiple_knapsack_mip.ipynb
+++ b/examples/notebook/linear_solver/multiple_knapsack_mip.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "d48f7b62",
+ "id": "8de5c0f2",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "07473411",
+ "id": "8020e33a",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "ce26d582",
+ "id": "a4d4c873",
"metadata": {},
"source": [
"# multiple_knapsack_mip"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "44a38de8",
+ "id": "656e5a93",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "4e1e8ec9",
+ "id": "fdf2c94c",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "c27f4a62",
+ "id": "eba8d1e1",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "206c9ae4",
+ "id": "733ec3fd",
"metadata": {},
"outputs": [],
"source": [
@@ -87,71 +87,67 @@
"# 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",
- "\"\"\"Solve a multiple knapsack problem using a MIP solver.\"\"\"\n",
"# [START program]\n",
+ "\"\"\"Solve a multiple knapsack problem using a MIP solver.\"\"\"\n",
"# [START import]\n",
"from ortools.linear_solver import pywraplp\n",
"# [END import]\n",
"\n",
"\n",
- "# [START program_part1]\n",
- "# [START data_model]\n",
- "def create_data_model():\n",
- " \"\"\"Create the data for the example.\"\"\"\n",
- " data = {}\n",
- " weights = [48, 30, 42, 36, 36, 48, 42, 42, 36, 24, 30, 30, 42, 36, 36]\n",
- " values = [10, 30, 25, 50, 35, 30, 15, 40, 30, 35, 45, 10, 20, 30, 25]\n",
- " data['weights'] = weights\n",
- " data['values'] = values\n",
- " data['items'] = list(range(len(weights)))\n",
- " data['num_items'] = len(weights)\n",
- " num_bins = 5\n",
- " data['bins'] = list(range(num_bins))\n",
- " data['bin_capacities'] = [100, 100, 100, 100, 100]\n",
- " return data\n",
- "\n",
- "# [END data_model]\n",
- "\n",
- "\n",
"# [START data]\n",
- "data = create_data_model()\n",
- "# [END data]\n",
- "# [END program_part1]\n",
+ "data = {}\n",
+ "data['weights'] = [\n",
+ " 48, 30, 42, 36, 36, 48, 42, 42, 36, 24, 30, 30, 42, 36, 36\n",
+ "]\n",
+ "data['values'] = [\n",
+ " 10, 30, 25, 50, 35, 30, 15, 40, 30, 35, 45, 10, 20, 30, 25\n",
+ "]\n",
+ "assert len(data['weights']) == len(data['values'])\n",
+ "data['num_items'] = len(data['weights'])\n",
+ "data['all_items'] = range(data['num_items'])\n",
+ "\n",
+ "data['bin_capacities'] = [100, 100, 100, 100, 100]\n",
+ "data['num_bins'] = len(data['bin_capacities'])\n",
+ "data['all_bins'] = range(data['num_bins'])\n",
+ "# [END data]\n",
"\n",
- "# [START solver]\n",
"# Create the mip solver with the SCIP backend.\n",
+ "# [START solver]\n",
"solver = pywraplp.Solver.CreateSolver('SCIP')\n",
+ "if solver is None:\n",
+ " print('SCIP solver unavailable.')\n",
+ " return\n",
"# [END solver]\n",
"\n",
- "# [START program_part2]\n",
+ "# Variables.\n",
"# [START variables]\n",
- "# Variables\n",
- "# x[i, j] = 1 if item i is packed in bin j.\n",
+ "# x[i, b] = 1 if item i is packed in bin b.\n",
"x = {}\n",
- "for i in data['items']:\n",
- " for j in data['bins']:\n",
- " x[(i, j)] = solver.IntVar(0, 1, 'x_%i_%i' % (i, j))\n",
+ "for i in data['all_items']:\n",
+ " for b in data['all_bins']:\n",
+ " x[i, b] = solver.BoolVar(f'x_{i}_{b}')\n",
"# [END variables]\n",
"\n",
+ "# Constraints.\n",
"# [START constraints]\n",
- "# Constraints\n",
- "# Each item can be in at most one bin.\n",
- "for i in data['items']:\n",
- " solver.Add(sum(x[i, j] for j in data['bins']) <= 1)\n",
+ "# Each item is assigned to at most one bin.\n",
+ "for i in data['all_items']:\n",
+ " solver.Add(sum(x[i, b] for b in data['all_bins']) <= 1)\n",
+ "\n",
"# The amount packed in each bin cannot exceed its capacity.\n",
- "for j in data['bins']:\n",
+ "for b in data['all_bins']:\n",
" solver.Add(\n",
- " sum(x[(i, j)] * data['weights'][i]\n",
- " for i in data['items']) <= data['bin_capacities'][j])\n",
+ " sum(x[i, b] * data['weights'][i]\n",
+ " for i in data['all_items']) <= data['bin_capacities'][b])\n",
"# [END constraints]\n",
"\n",
+ "# Objective.\n",
"# [START objective]\n",
- "# Objective\n",
+ "# Maximize total value of packed items.\n",
"objective = solver.Objective()\n",
- "\n",
- "for i in data['items']:\n",
- " for j in data['bins']:\n",
- " objective.SetCoefficient(x[(i, j)], data['values'][i])\n",
+ "for i in data['all_items']:\n",
+ " for b in data['all_bins']:\n",
+ " objective.SetCoefficient(x[i, b], data['values'][i])\n",
"objective.SetMaximization()\n",
"# [END objective]\n",
"\n",
@@ -161,23 +157,23 @@
"\n",
"# [START print_solution]\n",
"if status == pywraplp.Solver.OPTIMAL:\n",
- " print('Total packed value:', objective.Value())\n",
+ " print(f'Total packed value: {objective.Value()}')\n",
" total_weight = 0\n",
- " for j in data['bins']:\n",
+ " for b in data['all_bins']:\n",
+ " print(f'Bin {b}')\n",
" bin_weight = 0\n",
" bin_value = 0\n",
- " print('Bin ', j, '\\n')\n",
- " for i in data['items']:\n",
- " if x[i, j].solution_value() > 0:\n",
- " print('Item', i, '- weight:', data['weights'][i], ' value:',\n",
- " data['values'][i])\n",
+ " for i in data['all_items']:\n",
+ " if x[i, b].solution_value() > 0:\n",
+ " print(\n",
+ " f\"Item {i} weight: {data['weights'][i]} value: {data['values'][i]}\"\n",
+ " )\n",
" bin_weight += data['weights'][i]\n",
" bin_value += data['values'][i]\n",
- " print('Packed bin weight:', bin_weight)\n",
- " print('Packed bin value:', bin_value)\n",
- " print()\n",
+ " print(f'Packed bin weight: {bin_weight}')\n",
+ " print(f'Packed bin value: {bin_value}\\n')\n",
" total_weight += bin_weight\n",
- " print('Total packed weight:', total_weight)\n",
+ " print(f'Total packed weight: {total_weight}')\n",
"else:\n",
" print('The problem does not have an optimal solution.')\n",
"# [END print_solution]\n",
diff --git a/examples/notebook/linear_solver/simple_lp_program.ipynb b/examples/notebook/linear_solver/simple_lp_program.ipynb
index 06f5a8dc06..3ba6f6f4fe 100644
--- a/examples/notebook/linear_solver/simple_lp_program.ipynb
+++ b/examples/notebook/linear_solver/simple_lp_program.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "9326d197",
+ "id": "11385674",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "f4a76e3e",
+ "id": "b2649840",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "0e081af2",
+ "id": "7b90d990",
"metadata": {},
"source": [
"# simple_lp_program"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "d825cebc",
+ "id": "9715916b",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "d4bde988",
+ "id": "557869cc",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "6052317f",
+ "id": "488e8e30",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "70d7141e",
+ "id": "fb10dc5f",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/linear_solver/simple_mip_program.ipynb b/examples/notebook/linear_solver/simple_mip_program.ipynb
index f0609e2a2c..0ed58873b5 100644
--- a/examples/notebook/linear_solver/simple_mip_program.ipynb
+++ b/examples/notebook/linear_solver/simple_mip_program.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "e9ad09d4",
+ "id": "5be8f3aa",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "38f6c789",
+ "id": "83ad9145",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "fef1187b",
+ "id": "47c0599d",
"metadata": {},
"source": [
"# simple_mip_program"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "7f9f922a",
+ "id": "10fdeadf",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "f8348803",
+ "id": "44563a2b",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "e3126a7f",
+ "id": "a9233e68",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "77173d83",
+ "id": "0b1f64b5",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/linear_solver/stigler_diet.ipynb b/examples/notebook/linear_solver/stigler_diet.ipynb
index 0156cb6656..6dc81ef812 100644
--- a/examples/notebook/linear_solver/stigler_diet.ipynb
+++ b/examples/notebook/linear_solver/stigler_diet.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "c54a04f5",
+ "id": "d8719ba7",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "26f87725",
+ "id": "85a21730",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "ffdb021a",
+ "id": "fd8c062d",
"metadata": {},
"source": [
"# stigler_diet"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "194de7d9",
+ "id": "14fd2557",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "8465af45",
+ "id": "e1d7887d",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "723d83c3",
+ "id": "950155e5",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "090d0f7e",
+ "id": "8b304758",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/sat/assignment_groups_sat.ipynb b/examples/notebook/sat/assignment_groups_sat.ipynb
new file mode 100644
index 0000000000..4f63422f94
--- /dev/null
+++ b/examples/notebook/sat/assignment_groups_sat.ipynb
@@ -0,0 +1,219 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "id": "be201470",
+ "metadata": {},
+ "source": [
+ "##### Copyright 2021 Google LLC."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "e3803804",
+ "metadata": {},
+ "source": [
+ "Licensed under the Apache License, Version 2.0 (the \"License\");\n",
+ "you may not use this file except in compliance with the License.\n",
+ "You may obtain a copy of the License at\n",
+ "\n",
+ " http://www.apache.org/licenses/LICENSE-2.0\n",
+ "\n",
+ "Unless required by applicable law or agreed to in writing, software\n",
+ "distributed under the License is distributed on an \"AS IS\" BASIS,\n",
+ "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"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "c54bc54c",
+ "metadata": {},
+ "source": [
+ "# assignment_groups_sat"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "fd3f9a16",
+ "metadata": {},
+ "source": [
+ ""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "5c2119e2",
+ "metadata": {},
+ "source": [
+ "First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "ca65dd32",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "!pip install ortools"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "b6bc35ee",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "#!/usr/bin/env python3\n",
+ "# Copyright 2010-2021 Google LLC\n",
+ "# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
+ "# you may not use this file except in compliance with the License.\n",
+ "# You may obtain a copy of the License at\n",
+ "#\n",
+ "# http://www.apache.org/licenses/LICENSE-2.0\n",
+ "#\n",
+ "# Unless required by applicable law or agreed to in writing, software\n",
+ "# distributed under the License is distributed on an \"AS IS\" BASIS,\n",
+ "# 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",
+ "# [START program]\n",
+ "\"\"\"Solve assignment problem for given group of workers.\"\"\"\n",
+ "# [START import]\n",
+ "from ortools.sat.python import cp_model\n",
+ "# [END import]\n",
+ "\n",
+ "\n",
+ "# Data\n",
+ "# [START data]\n",
+ "costs = [\n",
+ " [90, 76, 75, 70, 50, 74],\n",
+ " [35, 85, 55, 65, 48, 101],\n",
+ " [125, 95, 90, 105, 59, 120],\n",
+ " [45, 110, 95, 115, 104, 83],\n",
+ " [60, 105, 80, 75, 59, 62],\n",
+ " [45, 65, 110, 95, 47, 31],\n",
+ " [38, 51, 107, 41, 69, 99],\n",
+ " [47, 85, 57, 71, 92, 77],\n",
+ " [39, 63, 97, 49, 118, 56],\n",
+ " [47, 101, 71, 60, 88, 109],\n",
+ " [17, 39, 103, 64, 61, 92],\n",
+ " [101, 45, 83, 59, 92, 27],\n",
+ "]\n",
+ "num_workers = len(costs)\n",
+ "num_tasks = len(costs[0])\n",
+ "# [END data]\n",
+ "\n",
+ "# Allowed groups of workers:\n",
+ "# [START allowed_groups]\n",
+ "group1 = [\n",
+ " [0, 0, 1, 1], # Workers 2, 3\n",
+ " [0, 1, 0, 1], # Workers 1, 3\n",
+ " [0, 1, 1, 0], # Workers 1, 2\n",
+ " [1, 1, 0, 0], # Workers 0, 1\n",
+ " [1, 0, 1, 0], # Workers 0, 2\n",
+ "]\n",
+ "\n",
+ "group2 = [\n",
+ " [0, 0, 1, 1], # Workers 6, 7\n",
+ " [0, 1, 0, 1], # Workers 5, 7\n",
+ " [0, 1, 1, 0], # Workers 5, 6\n",
+ " [1, 1, 0, 0], # Workers 4, 5\n",
+ " [1, 0, 0, 1], # Workers 4, 7\n",
+ "]\n",
+ "\n",
+ "group3 = [\n",
+ " [0, 0, 1, 1], # Workers 10, 11\n",
+ " [0, 1, 0, 1], # Workers 9, 11\n",
+ " [0, 1, 1, 0], # Workers 9, 10\n",
+ " [1, 0, 1, 0], # Workers 8, 10\n",
+ " [1, 0, 0, 1], # Workers 8, 11\n",
+ "]\n",
+ "# [END allowed_groups]\n",
+ "\n",
+ "# Model\n",
+ "# [START model]\n",
+ "model = cp_model.CpModel()\n",
+ "# [END model]\n",
+ "\n",
+ "# Variables\n",
+ "# [START variables]\n",
+ "x = {}\n",
+ "for worker in range(num_workers):\n",
+ " for task in range(num_tasks):\n",
+ " x[worker, task] = model.NewBoolVar(f'x[{worker},{task}]')\n",
+ "# [END variables]\n",
+ "\n",
+ "# Constraints\n",
+ "# [START constraints]\n",
+ "# Each worker is assigned to at most one task.\n",
+ "for worker in range(num_workers):\n",
+ " model.Add(sum(x[worker, task] for task in range(num_tasks)) <= 1)\n",
+ "\n",
+ "# Each task is assigned to exactly one worker.\n",
+ "for task in range(num_tasks):\n",
+ " model.Add(sum(x[worker, task] for worker in range(num_workers)) == 1)\n",
+ "# [END constraints]\n",
+ "\n",
+ "# [START assignments]\n",
+ "# Create variables for each worker, indicating whether they work on some task.\n",
+ "work = {}\n",
+ "for worker in range(num_workers):\n",
+ " work[worker] = model.NewBoolVar(f'work[{worker}]')\n",
+ "\n",
+ "for worker in range(num_workers):\n",
+ " for task in range(num_tasks):\n",
+ " model.Add(work[worker] == sum(\n",
+ " x[worker, task] for task in range(num_tasks)))\n",
+ "\n",
+ "# Define the allowed groups of worders\n",
+ "model.AddAllowedAssignments([work[0], work[1], work[2], work[3]], group1)\n",
+ "model.AddAllowedAssignments([work[4], work[5], work[6], work[7]], group2)\n",
+ "model.AddAllowedAssignments([work[8], work[9], work[10], work[11]], group3)\n",
+ "# [END assignments]\n",
+ "\n",
+ "# Objective\n",
+ "# [START objective]\n",
+ "objective_terms = []\n",
+ "for worker in range(num_workers):\n",
+ " for task in range(num_tasks):\n",
+ " objective_terms.append(costs[worker][task] * x[worker, task])\n",
+ "model.Minimize(sum(objective_terms))\n",
+ "# [END objective]\n",
+ "\n",
+ "# Solve\n",
+ "# [START solve]\n",
+ "solver = cp_model.CpSolver()\n",
+ "status = solver.Solve(model)\n",
+ "# [END solve]\n",
+ "\n",
+ "# Print solution.\n",
+ "# [START print_solution]\n",
+ "if status == cp_model.OPTIMAL or status == cp_model.FEASIBLE:\n",
+ " print(f'Total cost = {solver.ObjectiveValue()}\\n')\n",
+ " for worker in range(num_workers):\n",
+ " for task in range(num_tasks):\n",
+ " if solver.BooleanValue(x[worker, task]):\n",
+ " print(f'Worker {worker} assigned to task {task}.' +\n",
+ " f' Cost = {costs[worker][task]}')\n",
+ "else:\n",
+ " print('No solution found.')\n",
+ "# [END print_solution]\n",
+ "\n"
+ ]
+ }
+ ],
+ "metadata": {},
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/examples/notebook/sat/assignment_sat.ipynb b/examples/notebook/sat/assignment_sat.ipynb
index b6a49d701e..e2fa27dc40 100644
--- a/examples/notebook/sat/assignment_sat.ipynb
+++ b/examples/notebook/sat/assignment_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "518295ec",
+ "id": "9d597284",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "5ca5df90",
+ "id": "244d1ed0",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "121542e7",
+ "id": "6e42e51a",
"metadata": {},
"source": [
"# assignment_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "c0ce0422",
+ "id": "bce40f4d",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "6b1692be",
+ "id": "84132cfb",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "dd371cf1",
+ "id": "19eefc46",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "cc9fd99c",
+ "id": "25cc200b",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/sat/assignment_task_sizes_sat.ipynb b/examples/notebook/sat/assignment_task_sizes_sat.ipynb
new file mode 100644
index 0000000000..efced7b9aa
--- /dev/null
+++ b/examples/notebook/sat/assignment_task_sizes_sat.ipynb
@@ -0,0 +1,179 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "id": "91326bdb",
+ "metadata": {},
+ "source": [
+ "##### Copyright 2021 Google LLC."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "0f84e977",
+ "metadata": {},
+ "source": [
+ "Licensed under the Apache License, Version 2.0 (the \"License\");\n",
+ "you may not use this file except in compliance with the License.\n",
+ "You may obtain a copy of the License at\n",
+ "\n",
+ " http://www.apache.org/licenses/LICENSE-2.0\n",
+ "\n",
+ "Unless required by applicable law or agreed to in writing, software\n",
+ "distributed under the License is distributed on an \"AS IS\" BASIS,\n",
+ "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"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "02310d7a",
+ "metadata": {},
+ "source": [
+ "# assignment_task_sizes_sat"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "7c2896f9",
+ "metadata": {},
+ "source": [
+ ""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "741270b2",
+ "metadata": {},
+ "source": [
+ "First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "6377ebc2",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "!pip install ortools"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "ee271aa9",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "#!/usr/bin/env python3\n",
+ "# Copyright 2010-2021 Google LLC\n",
+ "# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
+ "# you may not use this file except in compliance with the License.\n",
+ "# You may obtain a copy of the License at\n",
+ "#\n",
+ "# http://www.apache.org/licenses/LICENSE-2.0\n",
+ "#\n",
+ "# Unless required by applicable law or agreed to in writing, software\n",
+ "# distributed under the License is distributed on an \"AS IS\" BASIS,\n",
+ "# 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",
+ "# [START program]\n",
+ "\"\"\"Solve a simple assignment problem.\"\"\"\n",
+ "# [START import]\n",
+ "from ortools.sat.python import cp_model\n",
+ "# [END import]\n",
+ "\n",
+ "\n",
+ "# Data\n",
+ "# [START data]\n",
+ "costs = [\n",
+ " [90, 76, 75, 70, 50, 74, 12, 68],\n",
+ " [35, 85, 55, 65, 48, 101, 70, 83],\n",
+ " [125, 95, 90, 105, 59, 120, 36, 73],\n",
+ " [45, 110, 95, 115, 104, 83, 37, 71],\n",
+ " [60, 105, 80, 75, 59, 62, 93, 88],\n",
+ " [45, 65, 110, 95, 47, 31, 81, 34],\n",
+ " [38, 51, 107, 41, 69, 99, 115, 48],\n",
+ " [47, 85, 57, 71, 92, 77, 109, 36],\n",
+ " [39, 63, 97, 49, 118, 56, 92, 61],\n",
+ " [47, 101, 71, 60, 88, 109, 52, 90],\n",
+ "]\n",
+ "num_workers = len(costs)\n",
+ "num_tasks = len(costs[0])\n",
+ "\n",
+ "task_sizes = [10, 7, 3, 12, 15, 4, 11, 5]\n",
+ "# Maximum total of task sizes for any worker\n",
+ "total_size_max = 15\n",
+ "# [END data]\n",
+ "\n",
+ "# Model\n",
+ "# [START model]\n",
+ "model = cp_model.CpModel()\n",
+ "# [END model]\n",
+ "\n",
+ "# Variables\n",
+ "# [START variables]\n",
+ "x = {}\n",
+ "for worker in range(num_workers):\n",
+ " for task in range(num_tasks):\n",
+ " x[worker, task] = model.NewBoolVar(f'x[{worker},{task}]')\n",
+ "# [END variables]\n",
+ "\n",
+ "# Constraints\n",
+ "# [START constraints]\n",
+ "# Each worker is assigned to at most one task.\n",
+ "for worker in range(num_workers):\n",
+ " model.Add(\n",
+ " sum(task_sizes[task] * x[worker, task]\n",
+ " for task in range(num_tasks)) <= total_size_max)\n",
+ "\n",
+ "# Each task is assigned to exactly one worker.\n",
+ "for task in range(num_tasks):\n",
+ " model.Add(sum(x[worker, task] for worker in range(num_workers)) == 1)\n",
+ "# [END constraints]\n",
+ "\n",
+ "# Objective\n",
+ "# [START objective]\n",
+ "objective_terms = []\n",
+ "for worker in range(num_workers):\n",
+ " for task in range(num_tasks):\n",
+ " objective_terms.append(costs[worker][task] * x[worker, task])\n",
+ "model.Minimize(sum(objective_terms))\n",
+ "# [END objective]\n",
+ "\n",
+ "# Solve\n",
+ "# [START solve]\n",
+ "solver = cp_model.CpSolver()\n",
+ "status = solver.Solve(model)\n",
+ "# [END solve]\n",
+ "\n",
+ "# Print solution.\n",
+ "# [START print_solution]\n",
+ "if status == cp_model.OPTIMAL or status == cp_model.FEASIBLE:\n",
+ " print(f'Total cost = {solver.ObjectiveValue()}\\n')\n",
+ " for worker in range(num_workers):\n",
+ " for task in range(num_tasks):\n",
+ " if solver.BooleanValue(x[worker, task]):\n",
+ " print(f'Worker {worker} assigned to task {task}.' +\n",
+ " f' Cost = {costs[worker][task]}')\n",
+ "else:\n",
+ " print('No solution found.')\n",
+ "# [END print_solution]\n",
+ "\n"
+ ]
+ }
+ ],
+ "metadata": {},
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/examples/notebook/sat/assignment_teams_sat.ipynb b/examples/notebook/sat/assignment_teams_sat.ipynb
new file mode 100644
index 0000000000..edbea2d6ae
--- /dev/null
+++ b/examples/notebook/sat/assignment_teams_sat.ipynb
@@ -0,0 +1,187 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "id": "ceec9310",
+ "metadata": {},
+ "source": [
+ "##### Copyright 2021 Google LLC."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "658d8353",
+ "metadata": {},
+ "source": [
+ "Licensed under the Apache License, Version 2.0 (the \"License\");\n",
+ "you may not use this file except in compliance with the License.\n",
+ "You may obtain a copy of the License at\n",
+ "\n",
+ " http://www.apache.org/licenses/LICENSE-2.0\n",
+ "\n",
+ "Unless required by applicable law or agreed to in writing, software\n",
+ "distributed under the License is distributed on an \"AS IS\" BASIS,\n",
+ "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"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "d205a49a",
+ "metadata": {},
+ "source": [
+ "# assignment_teams_sat"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "d0549437",
+ "metadata": {},
+ "source": [
+ ""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "76ecdf2c",
+ "metadata": {},
+ "source": [
+ "First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "ef6ff145",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "!pip install ortools"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "16f0a44c",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "#!/usr/bin/env python3\n",
+ "# Copyright 2010-2021 Google LLC\n",
+ "# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
+ "# you may not use this file except in compliance with the License.\n",
+ "# You may obtain a copy of the License at\n",
+ "#\n",
+ "# http://www.apache.org/licenses/LICENSE-2.0\n",
+ "#\n",
+ "# Unless required by applicable law or agreed to in writing, software\n",
+ "# distributed under the License is distributed on an \"AS IS\" BASIS,\n",
+ "# 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",
+ "# [START program]\n",
+ "\"\"\"Solve a simple assignment problem.\"\"\"\n",
+ "# [START import]\n",
+ "from ortools.sat.python import cp_model\n",
+ "# [END import]\n",
+ "\n",
+ "\n",
+ "# Data\n",
+ "# [START data]\n",
+ "costs = [\n",
+ " [90, 76, 75, 70],\n",
+ " [35, 85, 55, 65],\n",
+ " [125, 95, 90, 105],\n",
+ " [45, 110, 95, 115],\n",
+ " [60, 105, 80, 75],\n",
+ " [45, 65, 110, 95],\n",
+ "]\n",
+ "num_workers = len(costs)\n",
+ "num_tasks = len(costs[0])\n",
+ "\n",
+ "team1 = [0, 2, 4]\n",
+ "team2 = [1, 3, 5]\n",
+ "# Maximum total of tasks for any team\n",
+ "team_max = 2\n",
+ "# [END data]\n",
+ "\n",
+ "# Model\n",
+ "# [START model]\n",
+ "model = cp_model.CpModel()\n",
+ "# [END model]\n",
+ "\n",
+ "# Variables\n",
+ "# [START variables]\n",
+ "x = {}\n",
+ "for worker in range(num_workers):\n",
+ " for task in range(num_tasks):\n",
+ " x[worker, task] = model.NewBoolVar(f'x[{worker},{task}]')\n",
+ "# [END variables]\n",
+ "\n",
+ "# Constraints\n",
+ "# [START constraints]\n",
+ "# Each worker is assigned to at most one task.\n",
+ "for worker in range(num_workers):\n",
+ " model.Add(sum(x[worker, task] for task in range(num_tasks)) <= 1)\n",
+ "\n",
+ "# Each task is assigned to exactly one worker.\n",
+ "for task in range(num_tasks):\n",
+ " model.Add(sum(x[worker, task] for worker in range(num_workers)) == 1)\n",
+ "\n",
+ "# Each team takes at most two tasks.\n",
+ "team1_tasks = []\n",
+ "for worker in team1:\n",
+ " for task in range(num_tasks):\n",
+ " team1_tasks.append(x[worker, task])\n",
+ "model.Add(sum(team1_tasks) <= team_max)\n",
+ "\n",
+ "team2_tasks = []\n",
+ "for worker in team2:\n",
+ " for task in range(num_tasks):\n",
+ " team2_tasks.append(x[worker, task])\n",
+ "model.Add(sum(team2_tasks) <= team_max)\n",
+ "# [END constraints]\n",
+ "\n",
+ "# Objective\n",
+ "# [START objective]\n",
+ "objective_terms = []\n",
+ "for worker in range(num_workers):\n",
+ " for task in range(num_tasks):\n",
+ " objective_terms.append(costs[worker][task] * x[worker, task])\n",
+ "model.Minimize(sum(objective_terms))\n",
+ "# [END objective]\n",
+ "\n",
+ "# Solve\n",
+ "# [START solve]\n",
+ "solver = cp_model.CpSolver()\n",
+ "status = solver.Solve(model)\n",
+ "# [END solve]\n",
+ "\n",
+ "# Print solution.\n",
+ "# [START print_solution]\n",
+ "if status == cp_model.OPTIMAL or status == cp_model.FEASIBLE:\n",
+ " print(f'Total cost = {solver.ObjectiveValue()}\\n')\n",
+ " for worker in range(num_workers):\n",
+ " for task in range(num_tasks):\n",
+ " if solver.BooleanValue(x[worker, task]):\n",
+ " print(f'Worker {worker} assigned to task {task}.' +\n",
+ " f' Cost = {costs[worker][task]}')\n",
+ "else:\n",
+ " print('No solution found.')\n",
+ "# [END print_solution]\n",
+ "\n"
+ ]
+ }
+ ],
+ "metadata": {},
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/examples/notebook/sat/assumptions_sample_sat.ipynb b/examples/notebook/sat/assumptions_sample_sat.ipynb
index 96ae7d9ecd..169c412b43 100644
--- a/examples/notebook/sat/assumptions_sample_sat.ipynb
+++ b/examples/notebook/sat/assumptions_sample_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "737b0378",
+ "id": "3d784377",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "46e3161e",
+ "id": "14d69a53",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "7b2f9b29",
+ "id": "17598de8",
"metadata": {},
"source": [
"# assumptions_sample_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "a3a60fd4",
+ "id": "1f143539",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "d87f5284",
+ "id": "424a6bb3",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "a4ffaa0e",
+ "id": "34f20189",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "fe880d96",
+ "id": "30d770df",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/sat/binpacking_problem_sat.ipynb b/examples/notebook/sat/binpacking_problem_sat.ipynb
index 13cab429df..96b11c1cb8 100644
--- a/examples/notebook/sat/binpacking_problem_sat.ipynb
+++ b/examples/notebook/sat/binpacking_problem_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "07da76e9",
+ "id": "0b8cc2ff",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "a160d0ff",
+ "id": "dc0941d7",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "7e42a6f1",
+ "id": "679a3a19",
"metadata": {},
"source": [
"# binpacking_problem_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "687a3270",
+ "id": "b52b76fd",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "fcf1f9fb",
+ "id": "82cae962",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "3045ff6e",
+ "id": "5eef032a",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "7598932f",
+ "id": "3384b6e1",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/sat/bool_or_sample_sat.ipynb b/examples/notebook/sat/bool_or_sample_sat.ipynb
index 237f8b049d..e2a38ac643 100644
--- a/examples/notebook/sat/bool_or_sample_sat.ipynb
+++ b/examples/notebook/sat/bool_or_sample_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "e541101b",
+ "id": "b2d5be27",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "baa64c02",
+ "id": "205f1e18",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "ba40fe39",
+ "id": "ed50392d",
"metadata": {},
"source": [
"# bool_or_sample_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "a06c6d02",
+ "id": "896ab685",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "f128b9d6",
+ "id": "46eae298",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "f36a93df",
+ "id": "ae1a1e0a",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "777ba9b7",
+ "id": "a13e763d",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/sat/boolean_product_sample_sat.ipynb b/examples/notebook/sat/boolean_product_sample_sat.ipynb
index 9c63fc521d..6574abb79d 100644
--- a/examples/notebook/sat/boolean_product_sample_sat.ipynb
+++ b/examples/notebook/sat/boolean_product_sample_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "11775d97",
+ "id": "7a23eb71",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "48d22bff",
+ "id": "5d538f21",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "ac3abbda",
+ "id": "0766907e",
"metadata": {},
"source": [
"# boolean_product_sample_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "7d615038",
+ "id": "ee520aa0",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "6edede74",
+ "id": "31cc690d",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "0534f755",
+ "id": "bf3f6535",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "eb00e586",
+ "id": "cc69f6da",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/sat/channeling_sample_sat.ipynb b/examples/notebook/sat/channeling_sample_sat.ipynb
index 55f021150f..b8b9129770 100644
--- a/examples/notebook/sat/channeling_sample_sat.ipynb
+++ b/examples/notebook/sat/channeling_sample_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "7fade1c4",
+ "id": "7d95317c",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "f3ab51ae",
+ "id": "67094baf",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "04da741f",
+ "id": "11256263",
"metadata": {},
"source": [
"# channeling_sample_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "b7a57522",
+ "id": "bb2709b0",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "47c274bf",
+ "id": "0d05aa28",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "59c8a6c0",
+ "id": "7f8d7afd",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "255d6873",
+ "id": "e6547be6",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/sat/copy_model_sample_sat.ipynb b/examples/notebook/sat/copy_model_sample_sat.ipynb
index f5eff23e87..da6488aa4e 100644
--- a/examples/notebook/sat/copy_model_sample_sat.ipynb
+++ b/examples/notebook/sat/copy_model_sample_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "47c17526",
+ "id": "5c6e364d",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "1e449303",
+ "id": "3a2ed69e",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "7b474533",
+ "id": "fe288a3a",
"metadata": {},
"source": [
"# copy_model_sample_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "cbda6ddb",
+ "id": "68056be8",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "4584edc4",
+ "id": "421a5403",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "bc80cdbb",
+ "id": "26d8ac78",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "12949857",
+ "id": "7d4871ea",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/sat/cp_is_fun_sat.ipynb b/examples/notebook/sat/cp_is_fun_sat.ipynb
index 1d8f27c8cc..2bc20147d1 100644
--- a/examples/notebook/sat/cp_is_fun_sat.ipynb
+++ b/examples/notebook/sat/cp_is_fun_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "865ad32f",
+ "id": "d7f2838a",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "d697f61d",
+ "id": "5ffe7b5d",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "661501fd",
+ "id": "f89a962e",
"metadata": {},
"source": [
"# cp_is_fun_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "121cc8fa",
+ "id": "4d8fe887",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "bf576245",
+ "id": "4f30d950",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "de1f615b",
+ "id": "a9a4d352",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "b6c09301",
+ "id": "9c4f5d96",
"metadata": {},
"outputs": [],
"source": [
@@ -95,13 +95,12 @@
"\n",
"This problem has 72 different solutions in base 10.\n",
"\"\"\"\n",
- "\n",
- "# [START program]\n",
- "\n",
+ "# [START import]\n",
"from ortools.sat.python import cp_model\n",
+ "# [END import]\n",
"\n",
"\n",
- "# [START solution_printing]\n",
+ "# [START solution_printer]\n",
"class VarArraySolutionPrinter(cp_model.CpSolverSolutionCallback):\n",
" \"\"\"Print intermediate solutions.\"\"\"\n",
"\n",
@@ -118,62 +117,64 @@
"\n",
" def solution_count(self):\n",
" return self.__solution_count\n",
- " # [END solution_printing]\n",
+ " # [END solution_printer]\n",
"\n",
"\n",
- "def CPIsFunSat():\n",
- " \"\"\"Solve the CP+IS+FUN==TRUE cryptarithm.\"\"\"\n",
- " # Constraint programming engine\n",
- " model = cp_model.CpModel()\n",
+ "\"\"\"Solve the CP+IS+FUN==TRUE cryptarithm.\"\"\"\n",
+ "# Constraint programming engine\n",
+ "# [START model]\n",
+ "model = cp_model.CpModel()\n",
+ "# [END model]\n",
"\n",
- " # [START variables]\n",
- " base = 10\n",
+ "# [START variables]\n",
+ "base = 10\n",
"\n",
- " c = model.NewIntVar(1, base - 1, 'C')\n",
- " p = model.NewIntVar(0, base - 1, 'P')\n",
- " i = model.NewIntVar(1, base - 1, 'I')\n",
- " s = model.NewIntVar(0, base - 1, 'S')\n",
- " f = model.NewIntVar(1, base - 1, 'F')\n",
- " u = model.NewIntVar(0, base - 1, 'U')\n",
- " n = model.NewIntVar(0, base - 1, 'N')\n",
- " t = model.NewIntVar(1, base - 1, 'T')\n",
- " r = model.NewIntVar(0, base - 1, 'R')\n",
- " e = model.NewIntVar(0, base - 1, 'E')\n",
+ "c = model.NewIntVar(1, base - 1, 'C')\n",
+ "p = model.NewIntVar(0, base - 1, 'P')\n",
+ "i = model.NewIntVar(1, base - 1, 'I')\n",
+ "s = model.NewIntVar(0, base - 1, 'S')\n",
+ "f = model.NewIntVar(1, base - 1, 'F')\n",
+ "u = model.NewIntVar(0, base - 1, 'U')\n",
+ "n = model.NewIntVar(0, base - 1, 'N')\n",
+ "t = model.NewIntVar(1, base - 1, 'T')\n",
+ "r = model.NewIntVar(0, base - 1, 'R')\n",
+ "e = model.NewIntVar(0, base - 1, 'E')\n",
"\n",
- " # We need to group variables in a list to use the constraint AllDifferent.\n",
- " letters = [c, p, i, s, f, u, n, t, r, e]\n",
+ "# We need to group variables in a list to use the constraint AllDifferent.\n",
+ "letters = [c, p, i, s, f, u, n, t, r, e]\n",
"\n",
- " # Verify that we have enough digits.\n",
- " assert base >= len(letters)\n",
- " # [END variables]\n",
+ "# Verify that we have enough digits.\n",
+ "assert base >= len(letters)\n",
+ "# [END variables]\n",
"\n",
- " # [START constraints]\n",
- " # Define constraints.\n",
- " model.AddAllDifferent(letters)\n",
+ "# Define constraints.\n",
+ "# [START constraints]\n",
+ "model.AddAllDifferent(letters)\n",
"\n",
- " # CP + IS + FUN = TRUE\n",
- " model.Add(c * base + p + i * base + s + f * base * base + u * base +\n",
- " n == t * base * base * base + r * base * base + u * base + e)\n",
- " # [END constraints]\n",
+ "# CP + IS + FUN = TRUE\n",
+ "model.Add(c * base + p + i * base + s + f * base * base + u * base +\n",
+ " n == t * base * base * base + r * base * base + u * base + e)\n",
+ "# [END constraints]\n",
"\n",
- " # [START solve]\n",
- " ### Solve model.\n",
- " solver = cp_model.CpSolver()\n",
- " solution_printer = VarArraySolutionPrinter(letters)\n",
- " # Enumerate all solutions.\n",
- " solver.parameters.enumerate_all_solutions = True\n",
- " # Solve.\n",
- " status = solver.Solve(model, solution_printer)\n",
- " # [END solve]\n",
- "\n",
- " print()\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",
- " print(' - solutions found : %i' % solution_printer.solution_count())\n",
+ "# Creates a solver and solves the model.\n",
+ "# [START solve]\n",
+ "solver = cp_model.CpSolver()\n",
+ "solution_printer = VarArraySolutionPrinter(letters)\n",
+ "# Enumerate all solutions.\n",
+ "solver.parameters.enumerate_all_solutions = True\n",
+ "# Solve.\n",
+ "status = solver.Solve(model, solution_printer)\n",
+ "# [END solve]\n",
"\n",
+ "# Statistics.\n",
+ "# [START statistics]\n",
+ "print('\\nStatistics')\n",
+ "print(f' status : {solver.StatusName(status)}')\n",
+ "print(f' conflicts: {solver.NumConflicts()}')\n",
+ "print(f' branches : {solver.NumBranches()}')\n",
+ "print(f' wall time: {solver.WallTime()} s')\n",
+ "print(f' sol found: {solution_printer.solution_count()}')\n",
+ "# [END statistics]\n",
"\n"
]
}
diff --git a/examples/notebook/sat/cp_sat_example.ipynb b/examples/notebook/sat/cp_sat_example.ipynb
new file mode 100644
index 0000000000..22466f222b
--- /dev/null
+++ b/examples/notebook/sat/cp_sat_example.ipynb
@@ -0,0 +1,153 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "id": "98c9ccd2",
+ "metadata": {},
+ "source": [
+ "##### Copyright 2021 Google LLC."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "5894a941",
+ "metadata": {},
+ "source": [
+ "Licensed under the Apache License, Version 2.0 (the \"License\");\n",
+ "you may not use this file except in compliance with the License.\n",
+ "You may obtain a copy of the License at\n",
+ "\n",
+ " http://www.apache.org/licenses/LICENSE-2.0\n",
+ "\n",
+ "Unless required by applicable law or agreed to in writing, software\n",
+ "distributed under the License is distributed on an \"AS IS\" BASIS,\n",
+ "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"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "9baa0b65",
+ "metadata": {},
+ "source": [
+ "# cp_sat_example"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "44139296",
+ "metadata": {},
+ "source": [
+ ""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "0aa4425b",
+ "metadata": {},
+ "source": [
+ "First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "c149ddfc",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "!pip install ortools"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "88c3eab0",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "#!/usr/bin/env python3\n",
+ "# Copyright 2010-2021 Google LLC\n",
+ "# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
+ "# you may not use this file except in compliance with the License.\n",
+ "# You may obtain a copy of the License at\n",
+ "#\n",
+ "# http://www.apache.org/licenses/LICENSE-2.0\n",
+ "#\n",
+ "# Unless required by applicable law or agreed to in writing, software\n",
+ "# distributed under the License is distributed on an \"AS IS\" BASIS,\n",
+ "# 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",
+ "# [START program]\n",
+ "\"\"\"Simple solve.\"\"\"\n",
+ "# [START import]\n",
+ "from ortools.sat.python import cp_model\n",
+ "# [END import]\n",
+ "\n",
+ "\n",
+ "\"\"\"Minimal CP-SAT example to showcase calling the solver.\"\"\"\n",
+ "# Creates the model.\n",
+ "# [START model]\n",
+ "model = cp_model.CpModel()\n",
+ "# [END model]\n",
+ "\n",
+ "# Creates the variables.\n",
+ "# [START variables]\n",
+ "var_upper_bound = max(50, 45, 37)\n",
+ "x = model.NewIntVar(0, var_upper_bound, 'x')\n",
+ "y = model.NewIntVar(0, var_upper_bound, 'y')\n",
+ "z = model.NewIntVar(0, var_upper_bound, 'z')\n",
+ "# [END variables]\n",
+ "\n",
+ "# Creates the constraints.\n",
+ "# [START constraints]\n",
+ "model.Add(2 * x + 7 * y + 3 * z <= 50)\n",
+ "model.Add(3 * x - 5 * y + 7 * z <= 45)\n",
+ "model.Add(5 * x + 2 * y - 6 * z <= 37)\n",
+ "# [END constraints]\n",
+ "\n",
+ "# [START objective]\n",
+ "model.Maximize(2 * x + 2 * y + 3 * z)\n",
+ "# [END objective]\n",
+ "\n",
+ "# Creates a solver and solves the model.\n",
+ "# [START solve]\n",
+ "solver = cp_model.CpSolver()\n",
+ "status = solver.Solve(model)\n",
+ "# [END solve]\n",
+ "\n",
+ "# [START print_solution]\n",
+ "if status == cp_model.OPTIMAL or status == cp_model.FEASIBLE:\n",
+ " print(f'Maximum of objective function: {solver.ObjectiveValue()}\\n')\n",
+ " print(f'x = {solver.Value(x)}')\n",
+ " print(f'y = {solver.Value(y)}')\n",
+ " print(f'z = {solver.Value(z)}')\n",
+ "else:\n",
+ " print('No solution found.')\n",
+ "# [END print_solution]\n",
+ "\n",
+ "# Statistics.\n",
+ "# [START statistics]\n",
+ "print('\\nStatistics')\n",
+ "print(f' status : {solver.StatusName(status)}')\n",
+ "print(f' conflicts: {solver.NumConflicts()}')\n",
+ "print(f' branches : {solver.NumBranches()}')\n",
+ "print(f' wall time: {solver.WallTime()} s')\n",
+ "# [END statistics]\n",
+ "\n"
+ ]
+ }
+ ],
+ "metadata": {},
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/examples/notebook/sat/earliness_tardiness_cost_sample_sat.ipynb b/examples/notebook/sat/earliness_tardiness_cost_sample_sat.ipynb
index 160fd732b5..9cc53f8f92 100644
--- a/examples/notebook/sat/earliness_tardiness_cost_sample_sat.ipynb
+++ b/examples/notebook/sat/earliness_tardiness_cost_sample_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "28ec5e44",
+ "id": "cc4d8d69",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "fe5ed73b",
+ "id": "207d6003",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "5f3653a4",
+ "id": "e06e5bfc",
"metadata": {},
"source": [
"# earliness_tardiness_cost_sample_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "9b9d4d99",
+ "id": "f453eb21",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "7a526274",
+ "id": "5efbe2d8",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "d6d647f6",
+ "id": "652d9c3c",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "d415ef0b",
+ "id": "85915b9b",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/sat/interval_sample_sat.ipynb b/examples/notebook/sat/interval_sample_sat.ipynb
index f9053289b3..c44da9f422 100644
--- a/examples/notebook/sat/interval_sample_sat.ipynb
+++ b/examples/notebook/sat/interval_sample_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "7de56c46",
+ "id": "e824ff08",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "b6da4334",
+ "id": "d6818e20",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "21d73185",
+ "id": "c1a4081b",
"metadata": {},
"source": [
"# interval_sample_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "965ec5fe",
+ "id": "a8cb2a1a",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "325ca12c",
+ "id": "83b2bb73",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "43c50b26",
+ "id": "00b9f97c",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "abafb433",
+ "id": "5bdbb3f1",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/sat/literal_sample_sat.ipynb b/examples/notebook/sat/literal_sample_sat.ipynb
index b030af9453..918e628402 100644
--- a/examples/notebook/sat/literal_sample_sat.ipynb
+++ b/examples/notebook/sat/literal_sample_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "e85a0def",
+ "id": "9616cc97",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "e7f66c5f",
+ "id": "1abf032f",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "bcbf98a7",
+ "id": "6daaac24",
"metadata": {},
"source": [
"# literal_sample_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "988f9ba1",
+ "id": "ba9bac0b",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "7f222768",
+ "id": "d6225857",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "e483fcbc",
+ "id": "e5cd8331",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "e24bf39e",
+ "id": "0889f773",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/sat/minimal_jobshop_sat.ipynb b/examples/notebook/sat/minimal_jobshop_sat.ipynb
index 2c6aea7b5f..1c21f87028 100644
--- a/examples/notebook/sat/minimal_jobshop_sat.ipynb
+++ b/examples/notebook/sat/minimal_jobshop_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "4d33a923",
+ "id": "7e794cbe",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "04965ad9",
+ "id": "dc603e6c",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "a1f7bed3",
+ "id": "829e6eaa",
"metadata": {},
"source": [
"# minimal_jobshop_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "bf78b777",
+ "id": "746eded1",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "71d9d09a",
+ "id": "26b5f4fb",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "9e8d0fe6",
+ "id": "5b3d6bf0",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "2e240a87",
+ "id": "160f3f3d",
"metadata": {},
"outputs": [],
"source": [
@@ -87,136 +87,142 @@
"# 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",
- "\"\"\"Minimal jobshop example.\"\"\"\n",
- "\n",
"# [START program]\n",
+ "\"\"\"Minimal jobshop example.\"\"\"\n",
+ "# [START import]\n",
"import collections\n",
- "\n",
- "# [START model]\n",
- "# Import Python wrapper for or-tools CP-SAT solver.\n",
"from ortools.sat.python import cp_model\n",
+ "# [END import]\n",
"\n",
"\n",
- "def MinimalJobshopSat():\n",
- " \"\"\"Minimal jobshop problem.\"\"\"\n",
- " # Create the model.\n",
- " model = cp_model.CpModel()\n",
- " # [END model]\n",
+ "\"\"\"Minimal jobshop problem.\"\"\"\n",
+ "# Data.\n",
+ "# [START data]\n",
+ "jobs_data = [ # task = (machine_id, processing_time).\n",
+ " [(0, 3), (1, 2), (2, 2)], # Job0\n",
+ " [(0, 2), (2, 1), (1, 4)], # Job1\n",
+ " [(1, 4), (2, 3)] # Job2\n",
+ "]\n",
"\n",
- " # [START data]\n",
- " jobs_data = [ # task = (machine_id, processing_time).\n",
- " [(0, 3), (1, 2), (2, 2)], # Job0\n",
- " [(0, 2), (2, 1), (1, 4)], # Job1\n",
- " [(1, 4), (2, 3)] # Job2\n",
- " ]\n",
+ "machines_count = 1 + max(task[0] for job in jobs_data for task in job)\n",
+ "all_machines = range(machines_count)\n",
+ "# Computes horizon dynamically as the sum of all durations.\n",
+ "horizon = sum(task[1] for job in jobs_data for task in job)\n",
+ "# [END data]\n",
"\n",
- " machines_count = 1 + max(task[0] for job in jobs_data for task in job)\n",
- " all_machines = range(machines_count)\n",
- " # [END data]\n",
+ "# Create the model.\n",
+ "# [START model]\n",
+ "model = cp_model.CpModel()\n",
+ "# [END model]\n",
"\n",
- " # Computes horizon dynamically as the sum of all durations.\n",
- " horizon = sum(task[1] for job in jobs_data for task in job)\n",
+ "# [START variables]\n",
+ "# Named tuple to store information about created variables.\n",
+ "task_type = collections.namedtuple('task_type', 'start end interval')\n",
+ "# Named tuple to manipulate solution information.\n",
+ "assigned_task_type = collections.namedtuple('assigned_task_type',\n",
+ " 'start job index duration')\n",
"\n",
- " # [START variables]\n",
- " # Named tuple to store information about created variables.\n",
- " task_type = collections.namedtuple('task_type', 'start end interval')\n",
- " # Named tuple to manipulate solution information.\n",
- " assigned_task_type = collections.namedtuple('assigned_task_type',\n",
- " 'start job index duration')\n",
+ "# Creates job intervals and add to the corresponding machine lists.\n",
+ "all_tasks = {}\n",
+ "machine_to_intervals = collections.defaultdict(list)\n",
"\n",
- " # Creates job intervals and add to the corresponding machine lists.\n",
- " all_tasks = {}\n",
- " machine_to_intervals = collections.defaultdict(list)\n",
+ "for job_id, job in enumerate(jobs_data):\n",
+ " for task_id, task in enumerate(job):\n",
+ " machine = task[0]\n",
+ " duration = task[1]\n",
+ " suffix = '_%i_%i' % (job_id, task_id)\n",
+ " start_var = model.NewIntVar(0, horizon, 'start' + suffix)\n",
+ " end_var = model.NewIntVar(0, horizon, 'end' + suffix)\n",
+ " interval_var = model.NewIntervalVar(start_var, duration, end_var,\n",
+ " 'interval' + suffix)\n",
+ " all_tasks[job_id, task_id] = task_type(start=start_var,\n",
+ " end=end_var,\n",
+ " interval=interval_var)\n",
+ " machine_to_intervals[machine].append(interval_var)\n",
+ "# [END variables]\n",
"\n",
+ "# [START constraints]\n",
+ "# Create and add disjunctive constraints.\n",
+ "for machine in all_machines:\n",
+ " model.AddNoOverlap(machine_to_intervals[machine])\n",
+ "\n",
+ "# Precedences inside a job.\n",
+ "for job_id, job in enumerate(jobs_data):\n",
+ " for task_id in range(len(job) - 1):\n",
+ " model.Add(all_tasks[job_id, task_id +\n",
+ " 1].start >= all_tasks[job_id, task_id].end)\n",
+ "# [END constraints]\n",
+ "\n",
+ "# [START objective]\n",
+ "# Makespan objective.\n",
+ "obj_var = model.NewIntVar(0, horizon, 'makespan')\n",
+ "model.AddMaxEquality(obj_var, [\n",
+ " all_tasks[job_id, len(job) - 1].end\n",
+ " for job_id, job in enumerate(jobs_data)\n",
+ "])\n",
+ "model.Minimize(obj_var)\n",
+ "# [END objective]\n",
+ "\n",
+ "# Creates the solver and solve.\n",
+ "# [START solve]\n",
+ "solver = cp_model.CpSolver()\n",
+ "status = solver.Solve(model)\n",
+ "# [END solve]\n",
+ "\n",
+ "# [START print_solution]\n",
+ "if status == cp_model.OPTIMAL or status == cp_model.FEASIBLE:\n",
+ " print('Solution:')\n",
+ " # Create one list of assigned tasks per machine.\n",
+ " assigned_jobs = collections.defaultdict(list)\n",
" for job_id, job in enumerate(jobs_data):\n",
" for task_id, task in enumerate(job):\n",
" machine = task[0]\n",
- " duration = task[1]\n",
- " suffix = '_%i_%i' % (job_id, task_id)\n",
- " start_var = model.NewIntVar(0, horizon, 'start' + suffix)\n",
- " end_var = model.NewIntVar(0, horizon, 'end' + suffix)\n",
- " interval_var = model.NewIntervalVar(start_var, duration, end_var,\n",
- " 'interval' + suffix)\n",
- " all_tasks[job_id, task_id] = task_type(start=start_var,\n",
- " end=end_var,\n",
- " interval=interval_var)\n",
- " machine_to_intervals[machine].append(interval_var)\n",
- " # [END variables]\n",
+ " assigned_jobs[machine].append(\n",
+ " assigned_task_type(start=solver.Value(\n",
+ " all_tasks[job_id, task_id].start),\n",
+ " job=job_id,\n",
+ " index=task_id,\n",
+ " duration=task[1]))\n",
"\n",
- " # [START constraints]\n",
- " # Create and add disjunctive constraints.\n",
+ " # Create per machine output lines.\n",
+ " output = ''\n",
" for machine in all_machines:\n",
- " model.AddNoOverlap(machine_to_intervals[machine])\n",
+ " # Sort by starting time.\n",
+ " assigned_jobs[machine].sort()\n",
+ " sol_line_tasks = 'Machine ' + str(machine) + ': '\n",
+ " sol_line = ' '\n",
"\n",
- " # Precedences inside a job.\n",
- " for job_id, job in enumerate(jobs_data):\n",
- " for task_id in range(len(job) - 1):\n",
- " model.Add(all_tasks[job_id, task_id +\n",
- " 1].start >= all_tasks[job_id, task_id].end)\n",
- " # [END constraints]\n",
+ " for assigned_task in assigned_jobs[machine]:\n",
+ " name = 'job_%i_task_%i' % (assigned_task.job,\n",
+ " assigned_task.index)\n",
+ " # Add spaces to output to align columns.\n",
+ " sol_line_tasks += '%-15s' % name\n",
"\n",
- " # [START objective]\n",
- " # Makespan objective.\n",
- " obj_var = model.NewIntVar(0, horizon, 'makespan')\n",
- " model.AddMaxEquality(obj_var, [\n",
- " all_tasks[job_id, len(job) - 1].end\n",
- " for job_id, job in enumerate(jobs_data)\n",
- " ])\n",
- " model.Minimize(obj_var)\n",
- " # [END objective]\n",
+ " start = assigned_task.start\n",
+ " duration = assigned_task.duration\n",
+ " sol_tmp = '[%i,%i]' % (start, start + duration)\n",
+ " # Add spaces to output to align columns.\n",
+ " sol_line += '%-15s' % sol_tmp\n",
"\n",
- " # [START solver]\n",
- " # Solve model.\n",
- " solver = cp_model.CpSolver()\n",
- " status = solver.Solve(model)\n",
- " # [END solver]\n",
+ " sol_line += '\\n'\n",
+ " sol_line_tasks += '\\n'\n",
+ " output += sol_line_tasks\n",
+ " output += sol_line\n",
"\n",
- " if status == cp_model.OPTIMAL:\n",
- " # [START solution_printing]\n",
- " # Create one list of assigned tasks per machine.\n",
- " assigned_jobs = collections.defaultdict(list)\n",
- " for job_id, job in enumerate(jobs_data):\n",
- " for task_id, task in enumerate(job):\n",
- " machine = task[0]\n",
- " assigned_jobs[machine].append(\n",
- " assigned_task_type(start=solver.Value(\n",
- " all_tasks[job_id, task_id].start),\n",
- " job=job_id,\n",
- " index=task_id,\n",
- " duration=task[1]))\n",
+ " # Finally print the solution found.\n",
+ " print(f'Optimal Schedule Length: {solver.ObjectiveValue()}')\n",
+ " print(output)\n",
+ "else:\n",
+ " print('No solution found.')\n",
+ "# [END print_solution]\n",
"\n",
- " # Create per machine output lines.\n",
- " output = ''\n",
- " for machine in all_machines:\n",
- " # Sort by starting time.\n",
- " assigned_jobs[machine].sort()\n",
- " sol_line_tasks = 'Machine ' + str(machine) + ': '\n",
- " sol_line = ' '\n",
- "\n",
- " for assigned_task in assigned_jobs[machine]:\n",
- " name = 'job_%i_%i' % (assigned_task.job, assigned_task.index)\n",
- " # Add spaces to output to align columns.\n",
- " sol_line_tasks += '%-10s' % name\n",
- "\n",
- " start = assigned_task.start\n",
- " duration = assigned_task.duration\n",
- " sol_tmp = '[%i,%i]' % (start, start + duration)\n",
- " # Add spaces to output to align columns.\n",
- " sol_line += '%-10s' % sol_tmp\n",
- "\n",
- " sol_line += '\\n'\n",
- " sol_line_tasks += '\\n'\n",
- " output += sol_line_tasks\n",
- " output += sol_line\n",
- "\n",
- " # Finally print the solution found.\n",
- " print('Optimal Schedule Length: %i' % solver.ObjectiveValue())\n",
- " print(output)\n",
- " # [END solution_printing]\n",
- "\n",
- "\n",
- "MinimalJobshopSat()\n",
- "# [END program]\n",
+ "# Statistics.\n",
+ "# [START statistics]\n",
+ "print('\\nStatistics')\n",
+ "print(' - conflicts: %i' % solver.NumConflicts())\n",
+ "print(' - branches : %i' % solver.NumBranches())\n",
+ "print(' - wall time: %f s' % solver.WallTime())\n",
+ "# [END statistics]\n",
"\n"
]
}
diff --git a/examples/notebook/sat/multiple_knapsack_sat.ipynb b/examples/notebook/sat/multiple_knapsack_sat.ipynb
index d84cac0e80..1699b4b4b6 100644
--- a/examples/notebook/sat/multiple_knapsack_sat.ipynb
+++ b/examples/notebook/sat/multiple_knapsack_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "32eeeca1",
+ "id": "efa08c7f",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "298f5392",
+ "id": "4d86b6cf",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "8e9b0803",
+ "id": "9845a768",
"metadata": {},
"source": [
"# multiple_knapsack_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "8f021f82",
+ "id": "e03eb475",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "0bcc8606",
+ "id": "88228b50",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "c8371b5f",
+ "id": "c9396320",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "7cab4ca5",
+ "id": "44176cc8",
"metadata": {},
"outputs": [],
"source": [
@@ -89,108 +89,92 @@
"# limitations under the License.\n",
"# [START program]\n",
"\"\"\"Solves a multiple knapsack problem using the CP-SAT solver.\"\"\"\n",
- "\n",
"# [START import]\n",
"from ortools.sat.python import cp_model\n",
"# [END import]\n",
"\n",
"\n",
- "# [START data_model]\n",
- "def create_data_model():\n",
- " \"\"\"Create the data for the example.\"\"\"\n",
- " data = {}\n",
- " weights = [48, 30, 42, 36, 36, 48, 42, 42, 36, 24, 30, 30, 42, 36, 36]\n",
- " values = [10, 30, 25, 50, 35, 30, 15, 40, 30, 35, 45, 10, 20, 30, 25]\n",
- " data['num_items'] = len(weights)\n",
- " data['all_items'] = range(data['num_items'])\n",
- " data['weights'] = weights\n",
- " data['values'] = values\n",
- " data['bin_capacities'] = [100, 100, 100, 100, 100]\n",
- " data['num_bins'] = len(data['bin_capacities'])\n",
- " data['all_bins'] = range(data['num_bins'])\n",
- " return data\n",
- "\n",
- "# [END data_model]\n",
- "\n",
- "\n",
- "# [START solution_printer]\n",
- "def print_solutions(data, solver, x):\n",
- " \"\"\"Display the solution.\"\"\"\n",
- " total_weight = 0\n",
- " total_value = 0\n",
- " for b in data['all_bins']:\n",
- " print('Bin', b, '\\n')\n",
- " bin_weight = 0\n",
- " bin_value = 0\n",
- " for idx, val in enumerate(data['weights']):\n",
- " if solver.Value(x[(idx, b)]) > 0:\n",
- " print('Item', idx, '- Weight:', val, ' Value:',\n",
- " data['values'][idx])\n",
- " bin_weight += val\n",
- " bin_value += data['values'][idx]\n",
- " print('Packed bin weight:', bin_weight)\n",
- " print('Packed bin value:', bin_value, '\\n')\n",
- " total_weight += bin_weight\n",
- " total_value += bin_value\n",
- " print('Total packed weight:', total_weight)\n",
- " print('Total packed value:', total_value)\n",
- "\n",
- "# [END solution_printer]\n",
- "\n",
- "\n",
"# [START data]\n",
- "data = create_data_model()\n",
+ "data = {}\n",
+ "data['weights'] = [\n",
+ " 48, 30, 42, 36, 36, 48, 42, 42, 36, 24, 30, 30, 42, 36, 36\n",
+ "]\n",
+ "data['values'] = [\n",
+ " 10, 30, 25, 50, 35, 30, 15, 40, 30, 35, 45, 10, 20, 30, 25\n",
+ "]\n",
+ "assert len(data['weights']) == len(data['values'])\n",
+ "data['num_items'] = len(data['weights'])\n",
+ "data['all_items'] = range(data['num_items'])\n",
+ "\n",
+ "data['bin_capacities'] = [100, 100, 100, 100, 100]\n",
+ "data['num_bins'] = len(data['bin_capacities'])\n",
+ "data['all_bins'] = range(data['num_bins'])\n",
"# [END data]\n",
"\n",
"# [START model]\n",
"model = cp_model.CpModel()\n",
"# [END model]\n",
"\n",
- "# Main variables.\n",
+ "# Variables.\n",
"# [START variables]\n",
+ "# x[i, b] = 1 if item i is packed in bin b.\n",
"x = {}\n",
- "for idx in data['all_items']:\n",
+ "for i in data['all_items']:\n",
" for b in data['all_bins']:\n",
- " x[(idx, b)] = model.NewIntVar(0, 1, 'x_%i_%i' % (idx, b))\n",
- "max_value = sum(data['values'])\n",
- "# value[b] is the value of bin b when packed.\n",
- "value = [\n",
- " model.NewIntVar(0, max_value, 'value_%i' % b) for b in data['all_bins']\n",
- "]\n",
- "for b in data['all_bins']:\n",
- " model.Add(value[b] == sum(\n",
- " x[(i, b)] * data['values'][i] for i in data['all_items']))\n",
+ " x[i, b] = model.NewBoolVar(f'x_{i}_{b}')\n",
"# [END variables]\n",
"\n",
+ "# Constraints.\n",
"# [START constraints]\n",
- "# Each item can be in at most one bin.\n",
- "for idx in data['all_items']:\n",
- " model.Add(sum(x[idx, b] for b in data['all_bins']) <= 1)\n",
+ "# Each item is assigned to at most one bin.\n",
+ "for i in data['all_items']:\n",
+ " model.Add(sum(x[i, b] for b in data['all_bins']) <= 1)\n",
"\n",
"# The amount packed in each bin cannot exceed its capacity.\n",
"for b in data['all_bins']:\n",
" model.Add(\n",
- " sum(x[(i, b)] * data['weights'][i]\n",
+ " sum(x[i, b] * data['weights'][i]\n",
" for i in data['all_items']) <= data['bin_capacities'][b])\n",
"# [END constraints]\n",
"\n",
+ "# Objective.\n",
"# [START objective]\n",
"# Maximize total value of packed items.\n",
- "model.Maximize(sum(value))\n",
+ "objective = []\n",
+ "for i in data['all_items']:\n",
+ " for b in data['all_bins']:\n",
+ " objective.append(\n",
+ " cp_model.LinearExpr.Term(x[i, b], data['values'][i]))\n",
+ "model.Maximize(cp_model.LinearExpr.Sum(objective))\n",
"# [END objective]\n",
"\n",
- "# [START solver]\n",
- "solver = cp_model.CpSolver()\n",
- "# [END solver]\n",
- "\n",
"# [START solve]\n",
+ "solver = cp_model.CpSolver()\n",
"status = solver.Solve(model)\n",
"# [END solve]\n",
"\n",
"# [START print_solution]\n",
"if status == cp_model.OPTIMAL:\n",
- " print_solutions(data, solver, x)\n",
- "# [END solutions_printer]\n",
+ " print(f'Total packed value: {solver.ObjectiveValue()}')\n",
+ " total_weight = 0\n",
+ " for b in data['all_bins']:\n",
+ " print(f'Bin {b}')\n",
+ " bin_weight = 0\n",
+ " bin_value = 0\n",
+ " for i in data['all_items']:\n",
+ " if solver.Value(x[i, b]) > 0:\n",
+ " print(\n",
+ " f\"Item {i} weight: {data['weights'][i]} value: {data['values'][i]}\"\n",
+ " )\n",
+ " bin_weight += data['weights'][i]\n",
+ " bin_value += data['values'][i]\n",
+ " print(f'Packed bin weight: {bin_weight}')\n",
+ " print(f'Packed bin value: {bin_value}\\n')\n",
+ " total_weight += bin_weight\n",
+ " print(f'Total packed weight: {total_weight}')\n",
+ "else:\n",
+ " print('The problem does not have an optimal solution.')\n",
+ "# [END print_solution]\n",
"\n"
]
}
diff --git a/examples/notebook/sat/no_overlap_sample_sat.ipynb b/examples/notebook/sat/no_overlap_sample_sat.ipynb
index 654e01bc9a..959a6cb296 100644
--- a/examples/notebook/sat/no_overlap_sample_sat.ipynb
+++ b/examples/notebook/sat/no_overlap_sample_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "746e2e68",
+ "id": "999a2ed9",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "a9a7a709",
+ "id": "2fedcf2a",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "846c47e2",
+ "id": "6d7e1e43",
"metadata": {},
"source": [
"# no_overlap_sample_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "2da826b0",
+ "id": "558d3402",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "769f9953",
+ "id": "f76718f5",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "fa084f09",
+ "id": "5b455ad5",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "967d46e1",
+ "id": "f4fbf549",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/examples/nqueens_sat.ipynb b/examples/notebook/sat/nqueens_sat.ipynb
similarity index 72%
rename from examples/notebook/examples/nqueens_sat.ipynb
rename to examples/notebook/sat/nqueens_sat.ipynb
index 6ce90b2e3b..48fc0c22ca 100644
--- a/examples/notebook/examples/nqueens_sat.ipynb
+++ b/examples/notebook/sat/nqueens_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "6f16318d",
+ "id": "d21ef67f",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "df632354",
+ "id": "34634653",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "a6cd1144",
+ "id": "2c3c04d0",
"metadata": {},
"source": [
"# nqueens_sat"
@@ -36,22 +36,22 @@
},
{
"cell_type": "markdown",
- "id": "c87bd208",
+ "id": "45091530",
"metadata": {},
"source": [
""
]
},
{
"cell_type": "markdown",
- "id": "b95beb23",
+ "id": "6ede89b9",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "bcc0cc62",
+ "id": "e7e5af81",
"metadata": {},
"outputs": [],
"source": [
@@ -70,10 +70,11 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "c53c21f3",
+ "id": "12389f9e",
"metadata": {},
"outputs": [],
"source": [
+ "#!/usr/bin/env python3\n",
"# Copyright 2010-2021 Google LLC\n",
"# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
"# you may not use this file except in compliance with the License.\n",
@@ -86,12 +87,16 @@
"# 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",
+ "# [START program]\n",
"\"\"\"OR-Tools solution to the N-queens problem.\"\"\"\n",
- "import time\n",
+ "# [START import]\n",
"import sys\n",
+ "import time\n",
"from ortools.sat.python import cp_model\n",
+ "# [END import]\n",
"\n",
"\n",
+ "# [START solution_printer]\n",
"class NQueenSolutionPrinter(cp_model.CpSolverSolutionCallback):\n",
" \"\"\"Print intermediate solutions.\"\"\"\n",
"\n",
@@ -106,8 +111,8 @@
"\n",
" def on_solution_callback(self):\n",
" current_time = time.time()\n",
- " print('Solution %i, time = %f s' % (self.__solution_count,\n",
- " current_time - self.__start_time))\n",
+ " print('Solution %i, time = %f s' %\n",
+ " (self.__solution_count, current_time - self.__start_time))\n",
" self.__solution_count += 1\n",
"\n",
" all_queens = range(len(self.__queens))\n",
@@ -121,16 +126,24 @@
" print()\n",
" print()\n",
"\n",
+ "# [END solution_printer]\n",
+ "\n",
"\n",
"# Creates the solver.\n",
+ "# [START model]\n",
"model = cp_model.CpModel()\n",
+ "# [END model]\n",
+ "\n",
"# Creates the variables.\n",
+ "# [START variables]\n",
"# The array index is the column, and the value is the row.\n",
"queens = [\n",
" model.NewIntVar(0, board_size - 1, 'x%i' % i) for i in range(board_size)\n",
"]\n",
- "# Creates the constraints.\n",
+ "# [END variables]\n",
"\n",
+ "# Creates the constraints.\n",
+ "# [START constraints]\n",
"# All rows must be different.\n",
"model.AddAllDifferent(queens)\n",
"\n",
@@ -138,33 +151,26 @@
"# different.\n",
"\n",
"# No two queens can be on the same diagonal.\n",
- "diag1 = []\n",
- "diag2 = []\n",
- "for i in range(board_size):\n",
- " q1 = model.NewIntVar(0, 2 * board_size, 'diag1_%i' % i)\n",
- " q2 = model.NewIntVar(-board_size, board_size, 'diag2_%i' % i)\n",
- " diag1.append(q1)\n",
- " diag2.append(q2)\n",
- " model.Add(q1 == queens[i] + i)\n",
- " model.Add(q2 == queens[i] - i)\n",
- "model.AddAllDifferent(diag1)\n",
- "model.AddAllDifferent(diag2)\n",
+ "model.AddAllDifferent([queens[i] + i for i in range(board_size)])\n",
+ "model.AddAllDifferent([queens[i] - i for i in range(board_size)])\n",
+ "# [END constraints]\n",
"\n",
- "### Solve model.\n",
+ "# Solve the model.\n",
+ "# [START solve]\n",
"solver = cp_model.CpSolver()\n",
"solution_printer = NQueenSolutionPrinter(queens)\n",
"solver.parameters.enumerate_all_solutions = True\n",
- "status = solver.Solve(model, solution_printer)\n",
+ "solver.Solve(model, solution_printer)\n",
+ "# [END solve]\n",
"\n",
- "print()\n",
- "print('Statistics')\n",
- "print(' - conflicts : %i' % solver.NumConflicts())\n",
- "print(' - branches : %i' % solver.NumBranches())\n",
- "print(' - wall time : %f s' % solver.WallTime())\n",
- "print(' - solutions found : %i' % solution_printer.solution_count())\n",
- "\n",
- "\n",
- "# By default, solve the 8x8 problem.board_size = 8\n",
+ "# Statistics.\n",
+ "# [START statistics]\n",
+ "print('\\nStatistics')\n",
+ "print(f' conflicts : {solver.NumConflicts()}')\n",
+ "print(f' branches : {solver.NumBranches()}')\n",
+ "print(f' wall time : {solver.WallTime()} s')\n",
+ "print(f' solutions found: {solution_printer.solution_count()}')\n",
+ "# [END statistics]\n",
"\n"
]
}
diff --git a/examples/notebook/sat/nurses_sat.ipynb b/examples/notebook/sat/nurses_sat.ipynb
index c09c48ab73..0587064f3b 100644
--- a/examples/notebook/sat/nurses_sat.ipynb
+++ b/examples/notebook/sat/nurses_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "d2405253",
+ "id": "d590cad6",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "c0ca4981",
+ "id": "28198f39",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "50bb4108",
+ "id": "59fffd4c",
"metadata": {},
"source": [
"# nurses_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "b63272a6",
+ "id": "21adca68",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "e7df951c",
+ "id": "ce96fe46",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "16ccee04",
+ "id": "889db991",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "b9273d8c",
+ "id": "2b6305d9",
"metadata": {},
"outputs": [],
"source": [
@@ -87,49 +87,13 @@
"# 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",
- "\"\"\"Example of a simple nurse scheduling problem.\"\"\"\n",
- "\n",
"# [START program]\n",
+ "\"\"\"Example of a simple nurse scheduling problem.\"\"\"\n",
"# [START import]\n",
"from ortools.sat.python import cp_model\n",
"# [END import]\n",
"\n",
"\n",
- "# [START solution_printer]\n",
- "class NursesPartialSolutionPrinter(cp_model.CpSolverSolutionCallback):\n",
- " \"\"\"Print intermediate solutions.\"\"\"\n",
- "\n",
- " def __init__(self, shifts, num_nurses, num_days, num_shifts, sols):\n",
- " cp_model.CpSolverSolutionCallback.__init__(self)\n",
- " self._shifts = shifts\n",
- " self._num_nurses = num_nurses\n",
- " self._num_days = num_days\n",
- " self._num_shifts = num_shifts\n",
- " self._solutions = set(sols)\n",
- " self._solution_count = 0\n",
- "\n",
- " def on_solution_callback(self):\n",
- " if self._solution_count in self._solutions:\n",
- " print('Solution %i' % self._solution_count)\n",
- " for d in range(self._num_days):\n",
- " print('Day %i' % d)\n",
- " for n in range(self._num_nurses):\n",
- " is_working = False\n",
- " for s in range(self._num_shifts):\n",
- " if self.Value(self._shifts[(n, d, s)]):\n",
- " is_working = True\n",
- " print(' Nurse %i works shift %i' % (n, s))\n",
- " if not is_working:\n",
- " print(' Nurse {} does not work'.format(n))\n",
- " print()\n",
- " self._solution_count += 1\n",
- "\n",
- " def solution_count(self):\n",
- " return self._solution_count\n",
- "\n",
- "# [END solution_printer]\n",
- "\n",
- "\n",
"# Data.\n",
"# [START data]\n",
"num_nurses = 4\n",
@@ -139,6 +103,7 @@
"all_shifts = range(num_shifts)\n",
"all_days = range(num_days)\n",
"# [END data]\n",
+ "\n",
"# Creates the model.\n",
"# [START model]\n",
"model = cp_model.CpModel()\n",
@@ -180,35 +145,75 @@
"else:\n",
" max_shifts_per_nurse = min_shifts_per_nurse + 1\n",
"for n in all_nurses:\n",
- " num_shifts_worked = 0\n",
+ " num_shifts_worked = []\n",
" for d in all_days:\n",
" for s in all_shifts:\n",
- " num_shifts_worked += shifts[(n, d, s)]\n",
- " model.Add(min_shifts_per_nurse <= num_shifts_worked)\n",
- " model.Add(num_shifts_worked <= max_shifts_per_nurse)\n",
+ " num_shifts_worked.append(shifts[(n, d, s)])\n",
+ " model.Add(min_shifts_per_nurse <= sum(num_shifts_worked))\n",
+ " model.Add(sum(num_shifts_worked) <= max_shifts_per_nurse)\n",
"# [END assign_nurses_evenly]\n",
"\n",
"# Creates the solver and solve.\n",
- "# [START solve]\n",
+ "# [START parameters]\n",
"solver = cp_model.CpSolver()\n",
"solver.parameters.linearization_level = 0\n",
"# Enumerate all solutions.\n",
"solver.parameters.enumerate_all_solutions = True\n",
+ "\n",
+ "# [END parameters]\n",
+ "\n",
+ "# [START solution_printer]\n",
+ "class NursesPartialSolutionPrinter(cp_model.CpSolverSolutionCallback):\n",
+ " \"\"\"Print intermediate solutions.\"\"\"\n",
+ "\n",
+ " def __init__(self, shifts, num_nurses, num_days, num_shifts, limit):\n",
+ " cp_model.CpSolverSolutionCallback.__init__(self)\n",
+ " self._shifts = shifts\n",
+ " self._num_nurses = num_nurses\n",
+ " self._num_days = num_days\n",
+ " self._num_shifts = num_shifts\n",
+ " self._solution_count = 0\n",
+ " self._solution_limit = limit\n",
+ "\n",
+ " def on_solution_callback(self):\n",
+ " self._solution_count += 1\n",
+ " print('Solution %i' % self._solution_count)\n",
+ " for d in range(self._num_days):\n",
+ " print('Day %i' % d)\n",
+ " for n in range(self._num_nurses):\n",
+ " is_working = False\n",
+ " for s in range(self._num_shifts):\n",
+ " if self.Value(self._shifts[(n, d, s)]):\n",
+ " is_working = True\n",
+ " print(' Nurse %i works shift %i' % (n, s))\n",
+ " if not is_working:\n",
+ " print(' Nurse {} does not work'.format(n))\n",
+ " if self._solution_count >= self._solution_limit:\n",
+ " print('Stop search after %i solutions' % self._solution_limit)\n",
+ " self.StopSearch()\n",
+ "\n",
+ " def solution_count(self):\n",
+ " return self._solution_count\n",
+ "\n",
"# Display the first five solutions.\n",
- "a_few_solutions = range(5)\n",
+ "solution_limit = 5\n",
"solution_printer = NursesPartialSolutionPrinter(shifts, num_nurses,\n",
" num_days, num_shifts,\n",
- " a_few_solutions)\n",
+ " solution_limit)\n",
+ "# [END solution_printer]\n",
+ "\n",
+ "# [START solve]\n",
"solver.Solve(model, solution_printer)\n",
"# [END solve]\n",
"\n",
"# Statistics.\n",
- "print()\n",
- "print('Statistics')\n",
- "print(' - conflicts : %i' % solver.NumConflicts())\n",
- "print(' - branches : %i' % solver.NumBranches())\n",
- "print(' - wall time : %f s' % solver.WallTime())\n",
- "print(' - solutions found : %i' % solution_printer.solution_count())\n",
+ "# [START statistics]\n",
+ "print('\\nStatistics')\n",
+ "print(' - conflicts : %i' % solver.NumConflicts())\n",
+ "print(' - branches : %i' % solver.NumBranches())\n",
+ "print(' - wall time : %f s' % solver.WallTime())\n",
+ "print(' - solutions found: %i' % solution_printer.solution_count())\n",
+ "# [END statistics]\n",
"\n"
]
}
diff --git a/examples/notebook/sat/optional_interval_sample_sat.ipynb b/examples/notebook/sat/optional_interval_sample_sat.ipynb
index df89ff0f52..b09bc7c043 100644
--- a/examples/notebook/sat/optional_interval_sample_sat.ipynb
+++ b/examples/notebook/sat/optional_interval_sample_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "96f9de3a",
+ "id": "a2180177",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "0c8006b0",
+ "id": "c083530a",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "bc3d16d0",
+ "id": "db4f4314",
"metadata": {},
"source": [
"# optional_interval_sample_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "43cc195b",
+ "id": "1b0fdb55",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "d916846a",
+ "id": "a04af044",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "cf0c18a1",
+ "id": "bae5bf5f",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "1280d064",
+ "id": "ee3f8ed3",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/sat/overlapping_intervals_sample_sat.ipynb b/examples/notebook/sat/overlapping_intervals_sample_sat.ipynb
index b0352bfca0..cd91c6eee1 100644
--- a/examples/notebook/sat/overlapping_intervals_sample_sat.ipynb
+++ b/examples/notebook/sat/overlapping_intervals_sample_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "9e5ce052",
+ "id": "37f2d324",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "93e06371",
+ "id": "3106bb15",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "4f4008aa",
+ "id": "ef60eecd",
"metadata": {},
"source": [
"# overlapping_intervals_sample_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "8acaf1ce",
+ "id": "ff1350d5",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "e763473b",
+ "id": "212b1030",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "b2e52ec4",
+ "id": "8c75623d",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "ed0c08f8",
+ "id": "8051a5a2",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/sat/rabbits_and_pheasants_sat.ipynb b/examples/notebook/sat/rabbits_and_pheasants_sat.ipynb
index 2f3a064bc9..82a870ea6b 100644
--- a/examples/notebook/sat/rabbits_and_pheasants_sat.ipynb
+++ b/examples/notebook/sat/rabbits_and_pheasants_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "074f6801",
+ "id": "1be56943",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "7d32efd4",
+ "id": "aa29716b",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "e8e79aa9",
+ "id": "c4b42bd7",
"metadata": {},
"source": [
"# rabbits_and_pheasants_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "75817e60",
+ "id": "6334a8a4",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "7fd7ee27",
+ "id": "0f2b259c",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "e1c0abf8",
+ "id": "aef17181",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "6510c017",
+ "id": "5e6637a1",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/sat/ranking_sample_sat.ipynb b/examples/notebook/sat/ranking_sample_sat.ipynb
index 08fe81af7d..f12323ea3c 100644
--- a/examples/notebook/sat/ranking_sample_sat.ipynb
+++ b/examples/notebook/sat/ranking_sample_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "9627cd12",
+ "id": "fd6294e5",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "b4aa115d",
+ "id": "1de1d878",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "4ccc944d",
+ "id": "ce5059c0",
"metadata": {},
"source": [
"# ranking_sample_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "1de48bc4",
+ "id": "2a034989",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "6958deb4",
+ "id": "780cc305",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "45dfe097",
+ "id": "d33190e3",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "671e2304",
+ "id": "d06b5540",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/sat/reified_sample_sat.ipynb b/examples/notebook/sat/reified_sample_sat.ipynb
index bf8770625d..403431d41d 100644
--- a/examples/notebook/sat/reified_sample_sat.ipynb
+++ b/examples/notebook/sat/reified_sample_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "27a2abba",
+ "id": "8925b971",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "3b376ced",
+ "id": "b7b9202f",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "64ce76ae",
+ "id": "2ffab66f",
"metadata": {},
"source": [
"# reified_sample_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "a4a263bd",
+ "id": "05d5c36c",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "20585a4f",
+ "id": "5b0ba121",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "7da8b38e",
+ "id": "adb48c6a",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "4ffcfb39",
+ "id": "446f0e45",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/sat/schedule_requests_sat.ipynb b/examples/notebook/sat/schedule_requests_sat.ipynb
index 0168f780c3..83038023c1 100644
--- a/examples/notebook/sat/schedule_requests_sat.ipynb
+++ b/examples/notebook/sat/schedule_requests_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "04cab0e4",
+ "id": "e45faa15",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "9a54d655",
+ "id": "4de9dda0",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "4c552e2f",
+ "id": "21e9417b",
"metadata": {},
"source": [
"# schedule_requests_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "925224fe",
+ "id": "03246e3b",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "18841afc",
+ "id": "115ba20e",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "e9f304da",
+ "id": "324fa46a",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "970ad6a5",
+ "id": "1697dcda",
"metadata": {},
"outputs": [],
"source": [
@@ -87,9 +87,8 @@
"# 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",
- "\"\"\"Nurse scheduling problem with shift requests.\"\"\"\n",
- "\n",
"# [START program]\n",
+ "\"\"\"Nurse scheduling problem with shift requests.\"\"\"\n",
"# [START import]\n",
"from ortools.sat.python import cp_model\n",
"# [END import]\n",
@@ -117,6 +116,7 @@
" [[0, 0, 0], [0, 0, 1], [0, 1, 0], [0, 0, 0], [1, 0, 0],\n",
" [0, 1, 0], [0, 0, 0]]]\n",
"# [END data]\n",
+ "\n",
"# Creates the model.\n",
"# [START model]\n",
"model = cp_model.CpModel()\n",
@@ -172,30 +172,40 @@
" sum(shift_requests[n][d][s] * shifts[(n, d, s)] for n in all_nurses\n",
" for d in all_days for s in all_shifts))\n",
"# [END objective]\n",
+ "\n",
"# Creates the solver and solve.\n",
"# [START solve]\n",
"solver = cp_model.CpSolver()\n",
- "solver.Solve(model)\n",
- "for d in all_days:\n",
- " print('Day', d)\n",
- " for n in all_nurses:\n",
- " for s in all_shifts:\n",
- " if solver.Value(shifts[(n, d, s)]) == 1:\n",
- " if shift_requests[n][d][s] == 1:\n",
- " print('Nurse', n, 'works shift', s, '(requested).')\n",
- " else:\n",
- " print('Nurse', n, 'works shift', s, '(not requested).')\n",
- " print()\n",
+ "status = solver.Solve(model)\n",
"# [END solve]\n",
"\n",
- "# Statistics.\n",
"# [START print_solution]\n",
- "print()\n",
- "print('Statistics')\n",
- "print(' - Number of shift requests met = %i' % solver.ObjectiveValue(),\n",
- " '(out of', num_nurses * min_shifts_per_nurse, ')')\n",
- "print(' - wall time : %f s' % solver.WallTime())\n",
+ "if status == cp_model.OPTIMAL:\n",
+ " print('Solution:')\n",
+ " for d in all_days:\n",
+ " print('Day', d)\n",
+ " for n in all_nurses:\n",
+ " for s in all_shifts:\n",
+ " if solver.Value(shifts[(n, d, s)]) == 1:\n",
+ " if shift_requests[n][d][s] == 1:\n",
+ " print('Nurse', n, 'works shift', s, '(requested).')\n",
+ " else:\n",
+ " print('Nurse', n, 'works shift', s,\n",
+ " '(not requested).')\n",
+ " print()\n",
+ " print(f'Number of shift requests met = {solver.ObjectiveValue()}',\n",
+ " f'(out of {num_nurses * min_shifts_per_nurse})')\n",
+ "else:\n",
+ " print('No optimal solution found !')\n",
"# [END print_solution]\n",
+ "\n",
+ "# Statistics.\n",
+ "# [START statistics]\n",
+ "print('\\nStatistics')\n",
+ "print(' - conflicts: %i' % solver.NumConflicts())\n",
+ "print(' - branches : %i' % solver.NumBranches())\n",
+ "print(' - wall time: %f s' % solver.WallTime())\n",
+ "# [END statistics]\n",
"\n"
]
}
diff --git a/examples/notebook/sat/scheduling_with_calendar_sample_sat.ipynb b/examples/notebook/sat/scheduling_with_calendar_sample_sat.ipynb
index e48055c633..ac8ea3d67e 100644
--- a/examples/notebook/sat/scheduling_with_calendar_sample_sat.ipynb
+++ b/examples/notebook/sat/scheduling_with_calendar_sample_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "7c86e264",
+ "id": "f09d3062",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "2044cae6",
+ "id": "63237aae",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "da6501e4",
+ "id": "25c35b32",
"metadata": {},
"source": [
"# scheduling_with_calendar_sample_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "07036a56",
+ "id": "ed8734f0",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "1814d422",
+ "id": "b8359da1",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "91936f97",
+ "id": "82309b1d",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "be77fb1d",
+ "id": "b4313e26",
"metadata": {},
"outputs": [],
"source": [
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 d4b537709b..6e86bcc2e0 100644
--- a/examples/notebook/sat/search_for_all_solutions_sample_sat.ipynb
+++ b/examples/notebook/sat/search_for_all_solutions_sample_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "5ed08609",
+ "id": "f7395e6b",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "ccb1bcad",
+ "id": "1da4a075",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "59370e1f",
+ "id": "e62fb656",
"metadata": {},
"source": [
"# search_for_all_solutions_sample_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "52f8c7dc",
+ "id": "fab19ed7",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "677cf0e4",
+ "id": "3e00a648",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "1dc3cd90",
+ "id": "63ef17b1",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "78d1bffa",
+ "id": "e9128ba4",
"metadata": {},
"outputs": [],
"source": [
diff --git a/examples/notebook/sat/simple_sat_program.ipynb b/examples/notebook/sat/simple_sat_program.ipynb
index abd9237be8..d8a1c3fc4f 100644
--- a/examples/notebook/sat/simple_sat_program.ipynb
+++ b/examples/notebook/sat/simple_sat_program.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "5c6b52fd",
+ "id": "fa489351",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "9d2f1bf8",
+ "id": "05870721",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "c21a4804",
+ "id": "656a3202",
"metadata": {},
"source": [
"# simple_sat_program"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "8977604b",
+ "id": "7cd9e353",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "d1f8a24e",
+ "id": "4a849781",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "40400e8c",
+ "id": "c05f2326",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "5f9dafe8",
+ "id": "d81bbcf2",
"metadata": {},
"outputs": [],
"source": [
@@ -87,10 +87,11 @@
"# 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",
- "\"\"\"Simple solve.\"\"\"\n",
- "\n",
"# [START program]\n",
+ "\"\"\"Simple solve.\"\"\"\n",
+ "# [START import]\n",
"from ortools.sat.python import cp_model\n",
+ "# [END import]\n",
"\n",
"\n",
"def SimpleSatProgram():\n",
@@ -119,10 +120,14 @@
" status = solver.Solve(model)\n",
" # [END solve]\n",
"\n",
- " if status == cp_model.OPTIMAL:\n",
+ " # [START print_solution]\n",
+ " if status == cp_model.OPTIMAL or status == cp_model.FEASIBLE:\n",
" print('x = %i' % solver.Value(x))\n",
" print('y = %i' % solver.Value(y))\n",
" print('z = %i' % solver.Value(z))\n",
+ " else:\n",
+ " print('No solution found.')\n",
+ " # [END print_solution]\n",
"\n",
"\n",
"SimpleSatProgram()\n",
diff --git a/examples/notebook/sat/solution_hinting_sample_sat.ipynb b/examples/notebook/sat/solution_hinting_sample_sat.ipynb
index bd3041c42f..f59c8eaaca 100644
--- a/examples/notebook/sat/solution_hinting_sample_sat.ipynb
+++ b/examples/notebook/sat/solution_hinting_sample_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "510c896f",
+ "id": "6c824045",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "3cc8818a",
+ "id": "c0bcd9a8",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "a8139cf5",
+ "id": "cd479f6e",
"metadata": {},
"source": [
"# solution_hinting_sample_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "354a2735",
+ "id": "6b9bdcb0",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "006ee0eb",
+ "id": "18805a9f",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "fe02c19b",
+ "id": "ca009d32",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "262d3934",
+ "id": "f5d3f8e5",
"metadata": {},
"outputs": [],
"source": [
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 f9ee3d227a..c00cb12796 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
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "5e747b25",
+ "id": "66e0a47d",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "0c3e573e",
+ "id": "0ffd559f",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "48748e7f",
+ "id": "a6840c40",
"metadata": {},
"source": [
"# solve_and_print_intermediate_solutions_sample_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "1ba51cad",
+ "id": "fe0d60fb",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "c085221e",
+ "id": "9a61b165",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "3a9f6aa7",
+ "id": "4a806fce",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "173b8951",
+ "id": "96a742cd",
"metadata": {},
"outputs": [],
"source": [
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 5da9ed312f..0aec076fb6 100644
--- a/examples/notebook/sat/solve_with_time_limit_sample_sat.ipynb
+++ b/examples/notebook/sat/solve_with_time_limit_sample_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "0cc5ea9d",
+ "id": "3a10e223",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "672049a2",
+ "id": "91fc15d1",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "d32cbd5e",
+ "id": "25751550",
"metadata": {},
"source": [
"# solve_with_time_limit_sample_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "6d9219f3",
+ "id": "8ce42bd1",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "df180d71",
+ "id": "4216a673",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "ab2e9984",
+ "id": "0e7b43ff",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "5b790fc0",
+ "id": "a72b49ed",
"metadata": {},
"outputs": [],
"source": [
@@ -87,6 +87,7 @@
"# 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",
+ "# [START program]\n",
"\"\"\"Solves a problem with a time limit.\"\"\"\n",
"\n",
"from ortools.sat.python import cp_model\n",
@@ -119,6 +120,7 @@
"\n",
"\n",
"SolveWithTimeLimitSampleSat()\n",
+ "# [END program]\n",
"\n"
]
}
diff --git a/examples/notebook/sat/step_function_sample_sat.ipynb b/examples/notebook/sat/step_function_sample_sat.ipynb
index 291a91a362..6b27bf70cb 100644
--- a/examples/notebook/sat/step_function_sample_sat.ipynb
+++ b/examples/notebook/sat/step_function_sample_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "bbff3de2",
+ "id": "534f6e8d",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "b23f26e4",
+ "id": "9858cb13",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "280bfa22",
+ "id": "cd279ac0",
"metadata": {},
"source": [
"# step_function_sample_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "ec3350e2",
+ "id": "8b6a91d9",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "b0e1fc99",
+ "id": "b07410c9",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "0a497a08",
+ "id": "3d6bf05f",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "b141aa8b",
+ "id": "c8facab4",
"metadata": {},
"outputs": [],
"source": [
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 573bf602c8..c6f4f74f50 100644
--- a/examples/notebook/sat/stop_after_n_solutions_sample_sat.ipynb
+++ b/examples/notebook/sat/stop_after_n_solutions_sample_sat.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "f05022bd",
+ "id": "70bee2d9",
"metadata": {},
"source": [
"##### Copyright 2021 Google LLC."
@@ -10,7 +10,7 @@
},
{
"cell_type": "markdown",
- "id": "2bc98591",
+ "id": "781ec62e",
"metadata": {},
"source": [
"Licensed under the Apache License, Version 2.0 (the \"License\");\n",
@@ -28,7 +28,7 @@
},
{
"cell_type": "markdown",
- "id": "8375d1e2",
+ "id": "6919d793",
"metadata": {},
"source": [
"# stop_after_n_solutions_sample_sat"
@@ -36,7 +36,7 @@
},
{
"cell_type": "markdown",
- "id": "79e1d206",
+ "id": "a65e09f9",
"metadata": {},
"source": [
"\n",
@@ -51,7 +51,7 @@
},
{
"cell_type": "markdown",
- "id": "04495d5c",
+ "id": "93bc7b97",
"metadata": {},
"source": [
"First, you must install [ortools](https://pypi.org/project/ortools/) package in this colab."
@@ -60,7 +60,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "8366f502",
+ "id": "0b6545ba",
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "333e014c",
+ "id": "e70de919",
"metadata": {},
"outputs": [],
"source": [
@@ -87,6 +87,7 @@
"# 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",
+ "# [START program]\n",
"\"\"\"Code sample that solves a model and displays a small number of solutions.\"\"\"\n",
"\n",
"from ortools.sat.python import cp_model\n",
@@ -137,6 +138,7 @@
"\n",
"\n",
"StopAfterNSolutionsSampleSat()\n",
+ "# [END program]\n",
"\n"
]
}