Activating project at `~/Teaching/BEE4750/fall2023/slides`
Lecture 21
October 23, 2023
Activating project at `~/Teaching/BEE4750/fall2023/slides`
Text: VSRIKRISH to 22333
Economic dispatch: Assumed we had a fleet of online generators.
What if we had to decide if generators should be on/off to avoid causing additional expense from minimum power/ramping constraints?
These types of decisions are common for infrastructure operations or investment problems.
A key consideration when deciding whether to operate something are fixed costs.
A discontinuous cost function is one way to violate the principles of linear programming!
The potential decision to not operate means that we need to introduce new indicator variables, which flag on/off status:
\[ \mathbb{I}_g = \begin{cases} 0 & \text{off} \\ 1 & \text{on} \end{cases} \]
When we include variables which are binary or, more generally, integer, we now have a mixed-integer linear program.
x = 2:0.1:10.75
f1(x) = 4.5 .* x
f2(x) = -x .+ 16
f3(x) = -1.5 .* x .+ 12
f4(x) = 0.5 .* x
p = plot(x, max.(f3(x), f4(x)), fillrange=min.(f1(x), f2(x)), color=:lightblue, grid=true, legend=false, xlabel=L"x", ylabel=L"y", xlims=(0, 12), framestyle=:origin, ylims=(0, 15), minorticks=2, guidefontsize=16, tickfontsize=14)
plot!(-2:0.1:20, f1.(-2:0.1:20), color=:green, linewidth=3)
plot!(-2:0.1:20, f2.(-2:0.1:20), color=:red, linewidth=3)
plot!(-2:0.1:20, f3.(-2:0.1:20), color=:brown, linewidth=3)
plot!(-2:0.1:20, f4.(-2:0.1:20), color=:purple, linewidth=3)
plot!(gridlinewidth=1, gridalpha=0.75)
plot!(xticks=round(Int,xlims(p)[1]):round(Int,xlims(p)[2]), yticks=round(Int,ylims(p)[1]):round(Int,ylims(p)[2]))
plot!(size=(600, 500))
Recall that for LPs, solutions must occur at corners of the feasible polyhedra.
x = 2:0.1:10.75
f1(x) = 4.5 .* x
f2(x) = -x .+ 16
f3(x) = -1.5 .* x .+ 12
f4(x) = 0.5 .* x
p = plot(x, max.(f3(x), f4(x)), fillrange=min.(f1(x), f2(x)), color=:lightblue, grid=true, legend=false, xlabel=L"x", ylabel=L"y", xlims=(0, 12), framestyle=:origin, ylims=(0, 15), minorticks=2, guidefontsize=16, tickfontsize=14)
plot!(-2:0.1:20, f1.(-2:0.1:20), color=:green, linewidth=3)
plot!(-2:0.1:20, f2.(-2:0.1:20), color=:red, linewidth=3)
plot!(-2:0.1:20, f3.(-2:0.1:20), color=:brown, linewidth=3)
plot!(-2:0.1:20, f4.(-2:0.1:20), color=:purple, linewidth=3)
plot!(gridlinewidth=1, gridalpha=0.75)
plot!(xticks=round(Int,xlims(p)[1]):round(Int,xlims(p)[2]), yticks=round(Int,ylims(p)[1]):round(Int,ylims(p)[2]))
scatter!(collect(Iterators.product(2:10, 3:13))[:], color=:black, markersize=5)
plot!(size=(600, 500))
Mixed-integer LPs: corners may not exist at integer points.
\[ \begin{align} \max \quad & 3x_1 + 4x_2 \\[0.5em] \text{subject to:} \quad & 2x_1 + 6x_2 \leq 27 \\[0.5em] & x_2 \geq 2 \\[0.5em] & 3x_1 + x_2 \leq 19 \\[0.5em] & x_1, x_2 \geq 0 \\[0.5em] & x_1, x_2 \quad \text{integers} \end{align} \]
Solution to linear relaxation (relax integer constraint to turn into an LP) is an upper bound on the mixed-integer solution (why?).
Starting from this, test new problems “bounding” LP solution with integer constraints.
Continue until integer solution found.
This is the branch and bound algorithm.
Branch and Bound Node 1
Branch and Bound Node 1
\[ \begin{align} \max \quad & 3x_1 + 4x_2 \\[0.5em] \text{subject to:} \quad & 2x_1 + 6x_2 \leq 27 \\ & x_2 \geq 2 \\ & 3x_1 + x_2 \leq 19 \\ & x_1, x_2 \geq 0 \\ & {\color{red}x_2 \leq 2} \qquad (\text{node}\, 2) \\ & {\color{blue}x_2 \geq 3} \qquad (\text{node}\, 3) \\ \end{align} \]
Branch and Bound Node 1
Branch and Bound Node 1
Branch and Bound Node 1
Branch and Bound Node 1
Branch and Bound Node 1
Branch and Bound Node 1
Branch and Bound Node 1
Wednesday/Friday: Applications of MILP to solid waste management and maybe unit commitment.
HW4/Regulatory Report: Due Friday by 9pm on Gradescope.