Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions Material/Dynamic Exercises/colloc_matrix.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,25 @@
"#### Collocation Matrix"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "79e395ef",
"metadata": {
"tags": [
"colab-setup"
]
},
"outputs": [],
"source": [
"import importlib.util\n",
"import subprocess\n",
"import sys\n",
"\n",
"if \"google.colab\" in sys.modules and importlib.util.find_spec(\"pyomo\") is None:\n",
" subprocess.check_call([sys.executable, \"-m\", \"pip\", \"install\", \"pyomo\"])\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down
19 changes: 19 additions & 0 deletions Material/Dynamic Exercises/param_est1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,25 @@
"$$t_{f} = 6$$"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "4a772ab4",
"metadata": {
"tags": [
"colab-setup"
]
},
"outputs": [],
"source": [
"import importlib.util\n",
"import subprocess\n",
"import sys\n",
"\n",
"if \"google.colab\" in sys.modules and importlib.util.find_spec(\"pyomo\") is None:\n",
" subprocess.check_call([sys.executable, \"-m\", \"pip\", \"install\", \"pyomo\"])\n"
]
},
{
"cell_type": "code",
"execution_count": 4,
Expand Down
19 changes: 19 additions & 0 deletions Material/Dynamic Exercises/param_est2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,25 @@
"First we simulate the kinematic behaviour"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "bee78606",
"metadata": {
"tags": [
"colab-setup"
]
},
"outputs": [],
"source": [
"import importlib.util\n",
"import subprocess\n",
"import sys\n",
"\n",
"if \"google.colab\" in sys.modules and importlib.util.find_spec(\"pyomo\") is None:\n",
" subprocess.check_call([sys.executable, \"-m\", \"pip\", \"install\", \"pyomo\"])\n"
]
},
{
"cell_type": "code",
"execution_count": 3,
Expand Down
19 changes: 19 additions & 0 deletions Material/Dynamic Exercises/small_colloc.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,25 @@
"- Learn when collocation is most effective"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9512a2c1",
"metadata": {
"tags": [
"colab-setup"
]
},
"outputs": [],
"source": [
"import importlib.util\n",
"import subprocess\n",
"import sys\n",
"\n",
"if \"google.colab\" in sys.modules and importlib.util.find_spec(\"pyomo\") is None:\n",
" subprocess.check_call([sys.executable, \"-m\", \"pip\", \"install\", \"pyomo\"])\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down
19 changes: 19 additions & 0 deletions Material/Dynamic Exercises/small_dae.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,25 @@
"- See discretization methods for continuous-time problems"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2638ac38",
"metadata": {
"tags": [
"colab-setup"
]
},
"outputs": [],
"source": [
"import importlib.util\n",
"import subprocess\n",
"import sys\n",
"\n",
"if \"google.colab\" in sys.modules and importlib.util.find_spec(\"pyomo\") is None:\n",
" subprocess.check_call([sys.executable, \"-m\", \"pip\", \"install\", \"pyomo\"])\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down
19 changes: 19 additions & 0 deletions Material/Dynamic Exercises/small_findiff.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,25 @@
"- See practical implementation in Pyomo.DAE"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "54d4eded",
"metadata": {
"tags": [
"colab-setup"
]
},
"outputs": [],
"source": [
"import importlib.util\n",
"import subprocess\n",
"import sys\n",
"\n",
"if \"google.colab\" in sys.modules and importlib.util.find_spec(\"pyomo\") is None:\n",
" subprocess.check_call([sys.executable, \"-m\", \"pip\", \"install\", \"pyomo\"])\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down
19 changes: 19 additions & 0 deletions Material/GDP Exercises/strip_packing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,25 @@
"This is a Strip-packing example from http://minlp.org/library/lib.php?lib=GDP"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "6bf6071a",
"metadata": {
"tags": [
"colab-setup"
]
},
"outputs": [],
"source": [
"import importlib.util\n",
"import subprocess\n",
"import sys\n",
"\n",
"if \"google.colab\" in sys.modules and importlib.util.find_spec(\"pyomo\") is None:\n",
" subprocess.check_call([sys.executable, \"-m\", \"pip\", \"install\", \"pyomo\"])\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down
19 changes: 19 additions & 0 deletions Material/Nonlinear Exercises/1.1 Alternative Initialization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,25 @@
"and numerical difficulties. Below we solve the Rosenbrock example using different initial values for the x variables. We write a loop that varies the initial value from 2.0 to 6.0, solves the problem, and prints the solution for each iteration of the loop."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8dab4cdf",
"metadata": {
"tags": [
"colab-setup"
]
},
"outputs": [],
"source": [
"import importlib.util\n",
"import subprocess\n",
"import sys\n",
"\n",
"if \"google.colab\" in sys.modules and importlib.util.find_spec(\"pyomo\") is None:\n",
" subprocess.check_call([sys.executable, \"-m\", \"pip\", \"install\", \"pyomo\"])\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down
19 changes: 19 additions & 0 deletions Material/Nonlinear Exercises/1.2 Evaluation errors.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,25 @@
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "ee65ab82",
"metadata": {
"tags": [
"colab-setup"
]
},
"outputs": [],
"source": [
"import importlib.util\n",
"import subprocess\n",
"import sys\n",
"\n",
"if \"google.colab\" in sys.modules and importlib.util.find_spec(\"pyomo\") is None:\n",
" subprocess.check_call([sys.executable, \"-m\", \"pip\", \"install\", \"pyomo\"])\n"
]
},
{
"cell_type": "code",
"execution_count": 3,
Expand Down
19 changes: 19 additions & 0 deletions Material/Nonlinear Exercises/1.3 Alternative Formulations.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,25 @@
"$$s.t \\;\\;\\;\\; \\frac{x-1}{y} = 1$$"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5fa1815f",
"metadata": {
"tags": [
"colab-setup"
]
},
"outputs": [],
"source": [
"import importlib.util\n",
"import subprocess\n",
"import sys\n",
"\n",
"if \"google.colab\" in sys.modules and importlib.util.find_spec(\"pyomo\") is None:\n",
" subprocess.check_call([sys.executable, \"-m\", \"pip\", \"install\", \"pyomo\"])\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down
19 changes: 19 additions & 0 deletions Material/Nonlinear Exercises/1.4 Reactor design problem.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,25 @@
"the space-velocity $SV$. "
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e711e8bd",
"metadata": {
"tags": [
"colab-setup"
]
},
"outputs": [],
"source": [
"import importlib.util\n",
"import subprocess\n",
"import sys\n",
"\n",
"if \"google.colab\" in sys.modules and importlib.util.find_spec(\"pyomo\") is None:\n",
" subprocess.check_call([sys.executable, \"-m\", \"pip\", \"install\", \"pyomo\"])\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down
19 changes: 19 additions & 0 deletions Material/Pyomo Fundamentals/1.1 Knapsack Example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,25 @@
"- Interpret optimization results"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "db93f8d6",
"metadata": {
"tags": [
"colab-setup"
]
},
"outputs": [],
"source": [
"import importlib.util\n",
"import subprocess\n",
"import sys\n",
"\n",
"if \"google.colab\" in sys.modules and importlib.util.find_spec(\"pyomo\") is None:\n",
" subprocess.check_call([sys.executable, \"-m\", \"pip\", \"install\", \"pyomo\"])\n"
]
},
{
"cell_type": "code",
"execution_count": 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,25 @@
"- See better formatting for solution output"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1d4b2e6b",
"metadata": {
"tags": [
"colab-setup"
]
},
"outputs": [],
"source": [
"import importlib.util\n",
"import subprocess\n",
"import sys\n",
"\n",
"if \"google.colab\" in sys.modules and importlib.util.find_spec(\"pyomo\") is None:\n",
" subprocess.check_call([sys.executable, \"-m\", \"pip\", \"install\", \"pyomo\"])\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down
19 changes: 19 additions & 0 deletions Material/Pyomo Fundamentals/1.3 Changing data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,25 @@
"- Explore the concept of shadow prices and breakpoints"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "38383b88",
"metadata": {
"tags": [
"colab-setup"
]
},
"outputs": [],
"source": [
"import importlib.util\n",
"import subprocess\n",
"import sys\n",
"\n",
"if \"google.colab\" in sys.modules and importlib.util.find_spec(\"pyomo\") is None:\n",
" subprocess.check_call([sys.executable, \"-m\", \"pip\", \"install\", \"pyomo\"])\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down
19 changes: 19 additions & 0 deletions Material/Pyomo Fundamentals/1.4 Loading data from Excel.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,25 @@
"- See how to make models more flexible and reusable"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "ce6c7ffc",
"metadata": {
"tags": [
"colab-setup"
]
},
"outputs": [],
"source": [
"import importlib.util\n",
"import subprocess\n",
"import sys\n",
"\n",
"if \"google.colab\" in sys.modules and importlib.util.find_spec(\"pyomo\") is None:\n",
" subprocess.check_call([sys.executable, \"-m\", \"pip\", \"install\", \"pyomo\"])\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down
Loading