Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
adowling2 committed Nov 19, 2024
1 parent 0d312de commit 41ef2f3
Show file tree
Hide file tree
Showing 79 changed files with 282 additions and 275 deletions.
39 changes: 21 additions & 18 deletions _sources/notebooks/7/Convexity.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -174,25 +174,26 @@
"metadata": {},
"source": [
"**Theorem 4.2** If $g(x)$ is convex and $h(x)$ is linear, then the region \n",
"\n",
"$$\n",
"\\mathcal{F} = \\{ x \\,|\\, g(x) \\leq 0, h(x) = 0 \\}\n",
"$$ \n",
"\n",
"is convex, i.e., \n",
"\n",
"$$\n",
"\\alpha x^a + (1 - \\alpha)x^b \\in \\mathcal{F} \\quad \\text{for all } \\alpha \\in (0, 1) \\text{ and } x^a, x^b \\in \\mathcal{F}.\n",
"$$\n",
"\n",
"\n",
"**Proof** \n",
"\n",
"1. **Consider two points** $x^a, x^b \\in \\mathcal{F}$ and \n",
" \n",
" $$\n",
" \\bar{x} = \\alpha x^a + (1 - \\alpha)x^b \\quad \\text{for some } \\alpha \\in (0, 1).\n",
" $$\n",
"\n",
"2. **If** $\\bar{x} \\not\\in \\mathcal{F}$, **then either** \n",
" - $g(\\bar{x}) > 0$, or \n",
" - $h(\\bar{x}) \\neq 0$.\n",
"2. **If** $\\bar{x} \\not\\in \\mathcal{F}$, **then** (i) $g(\\bar{x}) > 0$ or (ii) $h(\\bar{x}) \\neq 0$ or both.\n",
"\n",
" - **Case (i):** Recall $g(x)$ is convex, and $g(x^a) \\leq 0$ and $g(x^b) \\leq 0$ (both $x^a$ and $x^b$ are feasible). \n",
" $$\n",
Expand All @@ -201,12 +202,10 @@
" Thus, $g(\\bar{x}) \\leq 0$.\n",
"\n",
" - **Case (ii):** Recall $h(x)$ is linear, and $h(x^a) = 0$ and $h(x^b) = 0$. \n",
" $$\n",
" 0 = \\alpha h(x^a) + (1 - \\alpha)h(x^b) \\quad \\text{(property of linear functions)}\n",
" $$ \n",
" $$\n",
" = h(\\alpha x^a + (1 - \\alpha)x^b) = h(\\bar{x}) \\quad \\text{(definition of } \\bar{x} \\text{)}.\n",
" $$ \n",
" \\begin{align*}\n",
" 0 & = \\alpha h(x^a) + (1 - \\alpha)h(x^b) \\quad \\text{(property of linear functions)} \\\\\n",
" & = h(\\alpha x^a + (1 - \\alpha)x^b) = h(\\bar{x}) \\quad \\text{(definition of } \\bar{x} \\text{)}.\n",
" \\end{align*}\n",
" Thus, $g(\\bar{x}) \\leq 0$ and $h(\\bar{x}) = 0$. \n",
"\n",
"This leads to a **contradiction.**\n"
Expand All @@ -227,8 +226,7 @@
"\n",
"**Proof: Convexity Claim**\n",
"\n",
"1. **Assumption:** \n",
" Assume there are two local minima $x^a, x^b \\in \\mathcal{F}$ with $f(x^a) > f(x^b)$. Seek contradiction.\n",
"1. **Assumption:** There are two local minima $x^a, x^b \\in \\mathcal{F}$ with $f(x^a) > f(x^b)$. Seek contradiction.\n",
"\n",
"2. **Definition of Local Minimum:** \n",
" - $f(x^a) \\leq f(x), \\, x \\in \\mathcal{N}(x^a) \\cap \\mathcal{F}$ \n",
Expand All @@ -238,18 +236,23 @@
" - $(1 - \\alpha)x^a + \\alpha x^b \\in \\mathcal{F}$ \n",
" - $f((1 - \\alpha)x^a + \\alpha x^b) \\leq (1 - \\alpha)f(x^a) + \\alpha f(x^b), \\, \\forall \\alpha \\in (0, 1)$ \n",
"\n",
"4. **Choose $\\alpha$ such that:** \n",
"4. **Choose $\\alpha$ such that:**\n",
"\n",
" $$\n",
" \\bar{x} = (1 - \\alpha)x^a + \\alpha x^b \\in \\mathcal{N}(x^a) \\cap \\mathcal{F}.\n",
" $$ \n",
" $$\n",
"\n",
" Thus, \n",
" $$\n",
" f(\\bar{x}) \\leq f(x^a) + \\alpha (f(x^b) - f(x^a)).\n",
" $$ \n",
" \n",
" Recall $f(x^b) < f(x^a)$, so \n",
" \n",
" $$\n",
" f(\\bar{x}) < f(x^a).\n",
" $$ \n",
" \n",
" This is a contradiction, as $x^a$ cannot be a local minimizer.\n",
"\n",
"**Proof: Stricty Convexity Claim**. Same idea as above. Assume $f(x^a) \\geq f(x^b)$ in (1). Use strict inequality (from the strict convexity definition) in (3) and (4).\n"
Expand Down Expand Up @@ -303,10 +306,10 @@
"The following optimization model is given in Biegler (2010) and [adapted to use set notation](../1/NP.ipynb).\n",
"\n",
"\\begin{align*}\n",
"\\min_{x,y,A,B} \\quad & 2(A + B) & \\text{perimeter}, \\\\\n",
"\\text{s.t.} \\quad & A \\geq 0, \\quad B \\geq 0 & \\text{non-negative bounds}, \\\\\n",
"& x_i, y_i, \\geq R_i, \\quad x_i \\leq B - R_i, \\quad y_i \\leq A - R_i, \\forall i \\in \\mathcal{C} & \\text{circles cannot overlap with perimeter}, \\\\\n",
"& (x_i - x_j)^2 + (y_i - y_j)^2 \\geq (R_i + R_j)^2, \\forall i,j \\in \\{i \\in \\mathcal{C}, j \\in \\mathcal{C}: i < j\\} & \\text{circles cannot overlap with each other}.\n",
"\\min_{x,y,A,B} \\quad & 2(A + B) \\\\\n",
"\\text{s.t.} \\quad & A \\geq 0, \\quad B \\geq 0 \\\\\n",
"& x_i, y_i, \\geq R_i, \\quad x_i \\leq B - R_i, \\quad y_i \\leq A - R_i, \\quad \\forall i \\in \\mathcal{C} \\\\\n",
"& (x_i - x_j)^2 + (y_i - y_j)^2 \\geq (R_i + R_j)^2, \\quad \\forall i,j \\in \\{i \\in \\mathcal{C}, j \\in \\mathcal{C}: i < j\\}\n",
"\\end{align*}"
]
},
Expand Down
2 changes: 1 addition & 1 deletion genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<link rel="stylesheet" type="text/css" href="_static/styles/sphinx-book-theme.css?v=384b581d" />
<link rel="stylesheet" type="text/css" href="_static/togglebutton.css?v=13237357" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css?v=be8a1c11" />
<link rel="stylesheet" type="text/css" href="_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css" />
<link rel="stylesheet" type="text/css" href="_static/sphinx-thebe.css?v=4fa983c6" />
<link rel="stylesheet" type="text/css" href="_static/design-style.1e8bd061cd6da7fc9cf755528e8ffc24.min.css?v=0a3b3ea7" />

Expand Down
2 changes: 1 addition & 1 deletion intro.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<link rel="stylesheet" type="text/css" href="_static/styles/sphinx-book-theme.css?v=384b581d" />
<link rel="stylesheet" type="text/css" href="_static/togglebutton.css?v=13237357" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css?v=be8a1c11" />
<link rel="stylesheet" type="text/css" href="_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css" />
<link rel="stylesheet" type="text/css" href="_static/sphinx-thebe.css?v=4fa983c6" />
<link rel="stylesheet" type="text/css" href="_static/design-style.1e8bd061cd6da7fc9cf755528e8ffc24.min.css?v=0a3b3ea7" />

Expand Down
2 changes: 1 addition & 1 deletion notebooks/1/IP.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<link rel="stylesheet" type="text/css" href="../../_static/styles/sphinx-book-theme.css?v=384b581d" />
<link rel="stylesheet" type="text/css" href="../../_static/togglebutton.css?v=13237357" />
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../../_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css?v=be8a1c11" />
<link rel="stylesheet" type="text/css" href="../../_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css" />
<link rel="stylesheet" type="text/css" href="../../_static/sphinx-thebe.css?v=4fa983c6" />
<link rel="stylesheet" type="text/css" href="../../_static/design-style.1e8bd061cd6da7fc9cf755528e8ffc24.min.css?v=0a3b3ea7" />

Expand Down
2 changes: 1 addition & 1 deletion notebooks/1/LP.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<link rel="stylesheet" type="text/css" href="../../_static/styles/sphinx-book-theme.css?v=384b581d" />
<link rel="stylesheet" type="text/css" href="../../_static/togglebutton.css?v=13237357" />
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../../_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css?v=be8a1c11" />
<link rel="stylesheet" type="text/css" href="../../_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css" />
<link rel="stylesheet" type="text/css" href="../../_static/sphinx-thebe.css?v=4fa983c6" />
<link rel="stylesheet" type="text/css" href="../../_static/design-style.1e8bd061cd6da7fc9cf755528e8ffc24.min.css?v=0a3b3ea7" />

Expand Down
2 changes: 1 addition & 1 deletion notebooks/1/Local-Install.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<link rel="stylesheet" type="text/css" href="../../_static/styles/sphinx-book-theme.css?v=384b581d" />
<link rel="stylesheet" type="text/css" href="../../_static/togglebutton.css?v=13237357" />
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../../_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css?v=be8a1c11" />
<link rel="stylesheet" type="text/css" href="../../_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css" />
<link rel="stylesheet" type="text/css" href="../../_static/sphinx-thebe.css?v=4fa983c6" />
<link rel="stylesheet" type="text/css" href="../../_static/design-style.1e8bd061cd6da7fc9cf755528e8ffc24.min.css?v=0a3b3ea7" />

Expand Down
2 changes: 1 addition & 1 deletion notebooks/1/NLP.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<link rel="stylesheet" type="text/css" href="../../_static/styles/sphinx-book-theme.css?v=384b581d" />
<link rel="stylesheet" type="text/css" href="../../_static/togglebutton.css?v=13237357" />
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../../_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css?v=be8a1c11" />
<link rel="stylesheet" type="text/css" href="../../_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css" />
<link rel="stylesheet" type="text/css" href="../../_static/sphinx-thebe.css?v=4fa983c6" />
<link rel="stylesheet" type="text/css" href="../../_static/design-style.1e8bd061cd6da7fc9cf755528e8ffc24.min.css?v=0a3b3ea7" />

Expand Down
2 changes: 1 addition & 1 deletion notebooks/1/Optimization-Modeling.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<link rel="stylesheet" type="text/css" href="../../_static/styles/sphinx-book-theme.css?v=384b581d" />
<link rel="stylesheet" type="text/css" href="../../_static/togglebutton.css?v=13237357" />
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../../_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css?v=be8a1c11" />
<link rel="stylesheet" type="text/css" href="../../_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css" />
<link rel="stylesheet" type="text/css" href="../../_static/sphinx-thebe.css?v=4fa983c6" />
<link rel="stylesheet" type="text/css" href="../../_static/design-style.1e8bd061cd6da7fc9cf755528e8ffc24.min.css?v=0a3b3ea7" />

Expand Down
2 changes: 1 addition & 1 deletion notebooks/1/Pyomo-Introduction.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<link rel="stylesheet" type="text/css" href="../../_static/styles/sphinx-book-theme.css?v=384b581d" />
<link rel="stylesheet" type="text/css" href="../../_static/togglebutton.css?v=13237357" />
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../../_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css?v=be8a1c11" />
<link rel="stylesheet" type="text/css" href="../../_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css" />
<link rel="stylesheet" type="text/css" href="../../_static/sphinx-thebe.css?v=4fa983c6" />
<link rel="stylesheet" type="text/css" href="../../_static/design-style.1e8bd061cd6da7fc9cf755528e8ffc24.min.css?v=0a3b3ea7" />

Expand Down
2 changes: 1 addition & 1 deletion notebooks/1/Pyomo-Nuts-and-Bolts.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<link rel="stylesheet" type="text/css" href="../../_static/styles/sphinx-book-theme.css?v=384b581d" />
<link rel="stylesheet" type="text/css" href="../../_static/togglebutton.css?v=13237357" />
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../../_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css?v=be8a1c11" />
<link rel="stylesheet" type="text/css" href="../../_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css" />
<link rel="stylesheet" type="text/css" href="../../_static/sphinx-thebe.css?v=4fa983c6" />
<link rel="stylesheet" type="text/css" href="../../_static/design-style.1e8bd061cd6da7fc9cf755528e8ffc24.min.css?v=0a3b3ea7" />

Expand Down
2 changes: 1 addition & 1 deletion notebooks/1/getting-started.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<link rel="stylesheet" type="text/css" href="../../_static/styles/sphinx-book-theme.css?v=384b581d" />
<link rel="stylesheet" type="text/css" href="../../_static/togglebutton.css?v=13237357" />
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../../_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css?v=be8a1c11" />
<link rel="stylesheet" type="text/css" href="../../_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css" />
<link rel="stylesheet" type="text/css" href="../../_static/sphinx-thebe.css?v=4fa983c6" />
<link rel="stylesheet" type="text/css" href="../../_static/design-style.1e8bd061cd6da7fc9cf755528e8ffc24.min.css?v=0a3b3ea7" />

Expand Down
Loading

0 comments on commit 41ef2f3

Please sign in to comment.