Homework - 4 - 2023

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

DIIIO06 – Optimización lineal avanzada – Homework #7

1. (Column generation to solve the LP relaxation of the Cutting Stock problem – 30 pts.)
In this problem you will use column generation in order to solve the LP version of the Cutting
Stock problem, that is, the LP problem we obtain after removing all the integrality require-
ments on the variables (this LP is called the LP relaxation of the Cutting Stock problem, as we
“relax” the integrality constraints).

(a) Read the website:


https://www.juliaopt.org/notebooks/Chiwei%20Yan%20-%20Cutting%20Stock.html
Do not put much attention to the specifics of the code as the website uses an out-
dated version of Julia/JuMP. An updated version of the code can be found in the file
HW4 CuttingStock.jl.
Do try to understand the logic of the column generation algorithm and why it is useful.
You can also look at Chapter 15 in the textbook Linear Programming, V. Chvátal (page
195), and/or the Wikipedia article on the Cutting Stock Problem in you want more in-
formation on the problem (a link is given on part (d)).
(b) Modify the code in HW4 CuttingStock.jl so that the initial Restricted Master Problem
has four variables, where the ith variable represents the number of paper rolls cut using
the pattern corresponding to cut just one roll of the ith order width (in other words, the
matrix of the LP is the 4×4 identity matrix). How does this new initial restricted master
problem effect the convergence of the algorithm (number of total columns generated,
number of iterations, optimal solution)?
(c) Modify the code in HW4 CuttingStock.jl so that the initial Restricted Master Problem
has four variables, where the ith variable represents the number of paper rolls cut using
the pattern corresponding to cut as many as possible rolls of the ith order width (in
other words, each column of matrix of this LP is a scaled column of the 4 × 4 identity
matrix). How does this new master problem effect the convergence of the algorithm
(number of total columns generated, number of iterations, optimal solution)?
(d) Solve the Cutting Stock problem that appears in the section Illustration of one-dimensional
cutting-stock problem of the website:
https://en.wikipedia.org/wiki/Cutting_stock_problem
In order to do this adapt the code in HW4 CuttingStock.jl to this new situation and
use an initial master problem similar to the one used in (b), that is, the one whose
matrix is the 13 × 13 identity matrix. Compare this solution to the solution described
in the website.

2. (Trying to solve the Cutting stock problem – 30 pts.)


In class (and in the previous problem) we learned how to use the column generation ap-
proach in order to solve the LP relaxation of the cutting stock problem. Unfortunately, this
method only solves the LP relaxation and unless all the variables in the optimal solution
to the (final) Master problem take integer values, then this solution is not an optimal solu-
tion to the cutting stock problem (why?). The column generation approach can be combined
with Branch-and-bound (a method to solve integer optimization problems that we will see
in Lecture 9) in order to find an exact solution to the cutting stock problem, in a methodology
called Branch-and-price, but learning this topic is out of the scope of this class.
In this problem we will use two different ways to use the column generation approach in
order to find an approximate (integer) solution to the cutting stock problem:

1
• Method 1: Rounding the LP relaxation solution. In this approach, the idea is to take
the fractional solution found by using column generation and rounding down the
values of the fractional variables. Then any residual demand is satisfied by adding an
appropriate number of extra rolls. See the example in Chapter 15 in the textbook Linear
Programming, V. Chvátal (page 195).
• Method 2: Solving a reduced MIP. In this approach, we take the columns/patterns
generated in the column generation procedure (let’s say that this patterns are the
ones in the set I ∗ ), and then formulate and solve the problem:
X
min xi
i∈I ∗
X
s.t. aij xi ≥ dj , for all j = 1, . . . , m
i∈I ∗
xi ∈ Z for all i ∈ I ∗
xi ≥ 0 for all i ∈ I ∗ ,

that is, the ‘integer programming’ version of the (final) Master problem solved by the
column generation approach.

In the following three questions, you need to use the data of the cutting stock problem in the
(original) file HW4 CuttingStock.jl (where the initial set of patterns is given by A=[1 0; 1
0; 0 2; 1 0]).

(a) Use Method 1. What is the optimal solution? What is the optimal value?
(b) Use Method 2 (formulate and solve the corresponding integer program in Julia/JuMP).
What is the optimal solution? What is the optimal value?
(c) The two methods described above are heuristics and therefore, they may not give the
optimal solution of the cutting stock problem. Find the real/exact optimal solution by
formulating and solving the (Bad) Integer Optimization model in slide 6 of Lecture 8b.
Compare to the solutions found in the previous parts. HINT: Do not use N = m
P
j=1 dj ,
find a better one.

Instructions.

• All files should be submitted through the link available in Webcursos. You can write your
solution in a single Jupyter notebook or a combination of a single PDF file and a Julia
script (so at most two files in your submission).

• On every assignment you must list the names of all the students you discussed a particular
problem and you must cite all the references you used in order to achieve your solution (pa-
pers, websites, AIs, etc.). Failing to report cooperation or to cite the corresponding sources
is considered cheating/plagiarism.

• The homework is due Sunday, June 04 at 11:59pm.

You might also like