Column generation algorithms: Difference between revisions

From Cornell University Computational Optimization Open Textbook - Optimization Wiki
Jump to navigation Jump to search
No edit summary
(Finished all updates except for numerical example)
Line 82: Line 82:
Or in other words, the next step is to find the solution of the following integer linear programming problem (called subproblem or slave problem) with |K| variables and one constraint:  
Or in other words, the next step is to find the solution of the following integer linear programming problem (called subproblem or slave problem) with |K| variables and one constraint:  


<math>\begin{matrix} \\ \max(z)\sum_{k=1}^K u_k*z_k  \\        \      s.t. \sum_kL_2y_s\geq J_k    \forall    k\in K \\ y_s\in \Zeta_+\forall s\in S \end{matrix}
<math>\begin{matrix} \\ \max(z)\sum_{k=1}^K u_k*z_k  \\        \      s.t. \sum_kL_kz_k \leq M  \\ z_k\in \Zeta_+\forall k\in K \end{matrix}
   
   
</math>
</math>
For this problem, the optimal solution would be:
<math>\begin{matrix}  \\z^*\in \Zeta_+\end{matrix}
</math>
Step 3: optimality check
As it was previously highlighted, it is necessary to conduct an optimality check in order to decide if the optimal solution has been reached or not. Below is the condition:
If...
<math>\begin{matrix} \\\sum_Kz_k(optimal)u_k(optimal) \leq 1,  \end{matrix}
</math>
then STOP.
'''''y∗''''' is an ''optimal solution'' of the full continuous relaxation (including all patterns in '''S'''). Otherwise, ''update the master problem'' by including in '''''S′''''' the pattern γ defined by Nks= z∗k (this means that column '''''z∗''''' has to be included in the constraint matrix) and go to Step 1.
Finally, one has to go from the optimal solution of the continuous relaxation to a heuristic (i.e., not necessarily optimal but hopefully good) solution of the original problem with integrality constraints. This can be done in at least two different ways:
By rounding up the entries of '''''y∗''''' (this is a good choice if these entries are large: 335.4 is not very different from 336...); Is worth noticing that rounding down is not allowed due to the fact that it would provide infeasible integer solution;
By applying an integer linear programming method (for instance the Branch-and Bound) to the last master problem that was generated; we are taking a step which is equivalent to solving the original problem (with integrality constraints)but restricted to the “good” patterns (those in '''''S′''''' ) found in the above steps
= '''Numerical example: The Cutting Stock problem''' =
Suppose we want to solve a numerical example of the cutting stock problem that we have discussed during the theory section of this wiki, specifically a one-dimensional cutting stock problem
<nowiki>**************</nowiki>PENDING UPDATE******************
'''''Algorithm discussion'''''
The column generation subproblem is the critical part of the method is Step 2, i.e., generating the new columns. It is not reasonable to compute the reduced costs of all variables xj for j = 1, . . . , n, otherwise this procedure would reduce to the simplex method. In fact, n can be very large (as in the cutting-stock problem) or, for some reason, it might not be possible or convenient to enumerate all decision variables. It is then necessary to study a specific column generation algorithm for each problem; ''only if such an algorithm exists (and is efficient)'', the method can be fully developed. In the one-dimensional cutting stock problem, we transformed the column generation subproblem into an easily solvable integer linear programming problem. In other cases, the computational effort required to solve the subproblem may be so high as to make the full procedure unpractical.
= '''Applications''' =
As previously mentioned, column generation techniques are most relevant when the problem that we are trying to solve has a high ratio of number of variables with respect to the number of constraints. As such some common applications are:
·       Network design
·       Logistics – for example to determine an optimal path/routing for vehicles
·       Column generation algorithms are used for large delivery networks, often in combination with other methods, helping to implement real-time solutions for om-demand logistics.
·       Supply Chain scheduling problems
= '''Conclusions''' =
Column generation is a way of beginning with a small, manageable parts of a problem (specifically, a few of the variables), solving that part, analyzing that partial solution to discover the next part of the problem (specifically, one or more variables) to add to the model, and then resolving the extended model. Column generation repeats the algorithm steps until it achieves a optimal solution to entire problem.
More formally, column generation is a way of solving a linear programming problem that adds columns (corresponding to constrained variables) during the pricing phase of the simplex method of solving the problem. In gross terms, generating a column in the primal simplex formulation of a linear programming problem corresponds to adding a constraint in its dual formulation.
Column generation provides an advantage to the simplex method as the solvers (when computing the solution with software) will not need to access all the variables of the problem simultaneously. In fact, a solver could begin work with only the basis (a particular subset of the constrained variables) and then use reduced cost to decide which other variables to access as needed.

Revision as of 20:57, 16 November 2020

Author: Lorena Garcia Fernandez (lgf572)

Introduction

Column Generation techniques have the scope of setting up your Mixed integer Programming (MIP) problem by generating only the variables that will have an influence on the objective function. This is important for big problems with many variables where the formulation with these techniques would simplify the problem formulation, since not all the possibilities need to be listed.

Theory, methodology, and algorithmic discussions

Theory

The way this method work is as follows; first, the original problem that is being solved needs to be split into two problems: the master problem and the sub-problem.

  • The master problem is the original column-wise (i.e: one column at a time) formulation of the problem with only a subset of variables being considered.
  • The sub-problem is a new problem created to identify a new promising variable. The objective function of the sub-problem is the reduced cost of the new variable with respect to the current dual variables, and the constraints require that the variable obeys the naturally occurring constraints. The subproblem is also referred to as the RMP or “restricted master problem”. From this we can infer that this method will be a good fit for problems whose constraint set admit a natural breakdown (i.e: decomposition) into sub-systems representing a well understood combinatorial structure.

To execute that decomposition from the original problem into Master and subproblems there are different techniques. The theory behind this method relies on the Dantzig-Wolfe decomposition.

In summary, when the master problem is solved, we are able to obtain dual prices for each of the constraints in the master problem. This information is then utilized in the objective function of the subproblem. The subproblem is solved. If the objective value of the subproblem is negative, a variable with negative reduced cost has been identified. This variable is then added to the master problem, and the master problem is re-solved. Re-solving the master problem will generate a new set of dual values, and the process is repeated until no negative reduced cost variables are identified. The subproblem returns a solution with non-negative reduced cost, we can conclude that the solution to the master problem is optimal.


Methodology in detail

To illustrate the algorithm, we will use a common example: an algorithm for one-dimensional cutting stock problem.

Problem Overview

Given:

A set of item types I,

For every item type i ∈ I, its length Li and the number of pieces to be produced Ri ,

The length W of the starting objects to be cut,

Objective:

To find the minimum number of objects needed to satisfy the demand of all item types.

Model:

The problem can be modeled as follows:

where:

S: set of all possible cutting patterns that can be used to obtain item types in I from the original objects of length W;

Nks : number of pieces of type k ∈ K in the cutting pattern s ∈ S .

ys : number of original objects to be cut with pattern s ∈ S.


The algorithm to solve this problem is built on the solution of the continuous relaxation of the above model, i.e., the model obtained by replacing constraints

with constraints...

Sometimes |S| could be so large that enumerating all patterns would not be practical. For this purpose, the column generation below can be used:

Step 0: initialize the problem

Generate a subset of patterns S ′ for which the problem has a solution that is feasible (a typical initialization is that of starting with the |I| single-item cutting patterns).

Step 1: formulation and solution of the master problem

Solve the master problem (restricted to the patterns (i.e: variables) ysj with s ∈ S ′ )

By solving this problem one can obtain first a primal optimal solution y∗ and then a dual optimal solution u such that y∗ and u satisfy the complementary slackness condition (for example, this could be done with the simplex method).

Step 2: solution of the subproblem  

Or in other words, the next step is to find the solution of the following integer linear programming problem (called subproblem or slave problem) with |K| variables and one constraint:


For this problem, the optimal solution would be:

Step 3: optimality check 

As it was previously highlighted, it is necessary to conduct an optimality check in order to decide if the optimal solution has been reached or not. Below is the condition:

If...


then STOP.

y∗ is an optimal solution of the full continuous relaxation (including all patterns in S). Otherwise, update the master problem by including in S′ the pattern γ defined by Nks= z∗k (this means that column z∗ has to be included in the constraint matrix) and go to Step 1.

Finally, one has to go from the optimal solution of the continuous relaxation to a heuristic (i.e., not necessarily optimal but hopefully good) solution of the original problem with integrality constraints. This can be done in at least two different ways:

By rounding up the entries of y∗ (this is a good choice if these entries are large: 335.4 is not very different from 336...); Is worth noticing that rounding down is not allowed due to the fact that it would provide infeasible integer solution;

By applying an integer linear programming method (for instance the Branch-and Bound) to the last master problem that was generated; we are taking a step which is equivalent to solving the original problem (with integrality constraints)but restricted to the “good” patterns (those in S′ ) found in the above steps


Numerical example: The Cutting Stock problem

Suppose we want to solve a numerical example of the cutting stock problem that we have discussed during the theory section of this wiki, specifically a one-dimensional cutting stock problem


**************PENDING UPDATE******************


Algorithm discussion

The column generation subproblem is the critical part of the method is Step 2, i.e., generating the new columns. It is not reasonable to compute the reduced costs of all variables xj for j = 1, . . . , n, otherwise this procedure would reduce to the simplex method. In fact, n can be very large (as in the cutting-stock problem) or, for some reason, it might not be possible or convenient to enumerate all decision variables. It is then necessary to study a specific column generation algorithm for each problem; only if such an algorithm exists (and is efficient), the method can be fully developed. In the one-dimensional cutting stock problem, we transformed the column generation subproblem into an easily solvable integer linear programming problem. In other cases, the computational effort required to solve the subproblem may be so high as to make the full procedure unpractical.

Applications

As previously mentioned, column generation techniques are most relevant when the problem that we are trying to solve has a high ratio of number of variables with respect to the number of constraints. As such some common applications are:

·       Network design

·       Logistics – for example to determine an optimal path/routing for vehicles

·       Column generation algorithms are used for large delivery networks, often in combination with other methods, helping to implement real-time solutions for om-demand logistics.

·       Supply Chain scheduling problems

Conclusions

Column generation is a way of beginning with a small, manageable parts of a problem (specifically, a few of the variables), solving that part, analyzing that partial solution to discover the next part of the problem (specifically, one or more variables) to add to the model, and then resolving the extended model. Column generation repeats the algorithm steps until it achieves a optimal solution to entire problem.

More formally, column generation is a way of solving a linear programming problem that adds columns (corresponding to constrained variables) during the pricing phase of the simplex method of solving the problem. In gross terms, generating a column in the primal simplex formulation of a linear programming problem corresponds to adding a constraint in its dual formulation.

Column generation provides an advantage to the simplex method as the solvers (when computing the solution with software) will not need to access all the variables of the problem simultaneously. In fact, a solver could begin work with only the basis (a particular subset of the constrained variables) and then use reduced cost to decide which other variables to access as needed.