@@ -30,14 +30,29 @@ begin
3030 using Ipopt # Solver for NLPs
3131end
3232
33- # ╔═╡ 0df8b65a-0527-4545-bf11-00e9912bced0
33+ # ╔═╡ b879c4bf-8292-45a0-87d0-b1f0fa456585
3434md """
35-
3635| | | |
3736|-----------:|:--|:------------------|
3837| Lecturer | : | Rosemberg, Andrew |
3938| Date | : | 28 of July, 2025 |
4039
40+ """
41+
42+ # ╔═╡ eeceb82e-abfb-4502-bcfb-6c9f76a0879d
43+ md """
44+ ## Prelude
45+
46+ Research and make sure you understand the following concepts/questions:
47+ - What is a convex maximization optimziation problem? and a minimization one? Why are convex problems desirable (compared to non-convex ones)?
48+ - What is a linear program?
49+ - What are Lagrangian multipliers?
50+ - What are Integer problems? and Mixed-Integer problems?
51+ - What is duality? Can you construct the dual of at least a linear program?
52+ """
53+
54+ # ╔═╡ 0df8b65a-0527-4545-bf11-00e9912bced0
55+ md """
4156# Background – Modeling Optimization Problems in JuMP 🏗️
4257
4358This short Pluto notebook walks you through three small optimisation models of increasing
@@ -253,9 +268,60 @@ replace the quadratic constraint by a sequence of cutting planes
2532683. **Add Cut**
254269 * Add cut & repeat.
255270
256- 2
271+ At any point in the solution process, the current LP solution looks like (for a given set of cuts indexed by $j$):
272+ ```math
273+ \b egin{aligned}
274+ \m in_{m,c} \q uad & 200\, m + 80\, c \\
275+ \t ext{s.t.}\q uad & 0 \l e m \l e 12, \\
276+ & 0 \l e c \l e 12, \\
277+ & 2\,\b ar m_j\, (m - \b ar m_j) + 2\,\b ar c_j\, (c - \b ar c_j) \l e 100 - \b ar m_j^{2} - \b ar c_j^{2}, \q uad j=1,\d ots,J.
278+ \e nd{aligned}
279+ ```
280+
281+ Your tasks
282+
283+ 1. **Implement** the iterative procedure in JuMP + HiGHS:
284+ - master model with variables `m`, `c`;
285+ - a loop that solves, checks feasibility, and adds cuts when needed.
286+
287+ 2. **Record** and (optionally) plot the objective value after each iteration.
288+
257289"""
258290
291+ # ╔═╡ 7d855c60-41dd-40af-b00a-60b3e779ad13
292+ question_box (md " How can you check your answer?" )
293+
294+ # ╔═╡ ae263aac-1668-4f18-8104-ac25953a4503
295+ question_box (md """
296+ ### How do you solve two-stage problems?
297+
298+ How can you use cutting planes to solve a linear Two--Stage problem
299+
300+ ```math
301+ \b egin{aligned}
302+ \m in_{x}\; & c^{\t op}x
303+ \; +\;
304+ \m athbb{E}_{\x i}\!\B igl[
305+ \m in_{y(\x i)} \; q^{\t op}y(\x i)
306+ \B igr] \\ [6pt]
307+ \t ext{s.t.}\; & A\, x = b, \q uad x \g e 0
308+ \q quad\q quad\t ext{(first-stage decisions)}
309+ \e nd{aligned}
310+ ```
311+
312+ For each realisation $\x i = \b igl(h(\x i),\, T(\x i)\b igr)$ of the uncertain data,
313+ the **second-stage (recourse) problem** is
314+
315+ ```math
316+ \b egin{aligned}
317+ \m in_{y(\x i)}\; & q^{\t op}y(\x i) \\ [4pt]
318+ \t ext{s.t.}\; & T(\x i)\, y(\x i) = h(\x i) - W\, x, \\
319+ & y(\x i) \g e 0
320+ \q quad\q quad\t ext{(second-stage decisions)}
321+ \e nd{aligned}
322+ ```
323+ """ )
324+
259325# ╔═╡ 808c505d-e10d-42e3-9fb1-9c6f384b2c3c
260326md """
261327---
709775# ╔═╡ Cell order:
710776# ╟─881eed45-e7f0-4785-bde8-530e378d7050
711777# ╟─9f5675a3-07df-4fb1-b683-4c5fd2a85002
778+ # ╟─b879c4bf-8292-45a0-87d0-b1f0fa456585
779+ # ╟─eeceb82e-abfb-4502-bcfb-6c9f76a0879d
712780# ╟─0df8b65a-0527-4545-bf11-00e9912bced0
713781# ╠═9ce52307-bc22-4f66-a4af-a4e4ac382212
714782# ╟─6f67ca7c-1391-4cb9-b692-cd818e037587
721789# ╠═c369ab46-b416-4c12-83fe-65040a0c47c8
722790# ╟─20aef3e9-47b5-4f60-9726-7db77f7c3e47
723791# ╟─b13f9775-68c2-4646-9b67-c69ee23a4ea0
724- # ╠═ea3ea95a-58cb-4d0d-a167-aa68b8bc2645
792+ # ╟─ea3ea95a-58cb-4d0d-a167-aa68b8bc2645
793+ # ╟─7d855c60-41dd-40af-b00a-60b3e779ad13
794+ # ╟─ae263aac-1668-4f18-8104-ac25953a4503
725795# ╟─808c505d-e10d-42e3-9fb1-9c6f384b2c3c
726796# ╠═39617561-bbbf-4ef6-91e2-358dfe76581c
727797# ╟─01367096-3971-4e79-ace2-83600672fbde
0 commit comments