Вы находитесь на странице: 1из 44

Integer Linear Programming

Integer Linear Programming

For many LP models, Decision Variables should be restricted to integer values.(for example, number of airplanes to be purchased should be integer) These kinds of models are called Integer Linear Programming Models.

Integer Linear Programming


Integer LP models can be classified as follows: 1- All-integer LP models (AILP); All decision variables are integer. 2- Mixed-integer LP models (MILP); Some variables are integer, some are non-integer. 3- Binary LP models; All variables are 0 or 1.

Integer Linear Programming An Example All-integer LP model


Boxcar burger company plans to expand its locations at suburban areas and at downtown area. The company has 2.7 million dollars available for this expansion. Each suburban location requires a 200,000 dollars investment. And, Each downtown location requires a 600,000 dollars investment. Suburban locations will generate an average 1,200 dollars profit per week. And, downtown locations will generate an average 2,000 dollars profit per week.

Integer Linear Programming

The company wishes to open at least two restaurants downtown. Currently there are 19 managers available to run the new restaurants. Each suburban location requires 3 managers to operate, And, Each downtown location requires only 1 manager to operate. Problem: Boxcar burger Company wants to determine how many restaurants it should open in suburban and downtown locations in order to maximize its weekly profit.

Integer Linear Programming


Decision Variables: X1: number of suburban restaurants to be opened. X2: number of downtown restaurants to be opened. Maximize z = 1200x1 + 2000x2 2x1 + 6x2 27 x2 2 3x1 + x2 19 x1, x2 0 and integer

Integer Linear Programming

This is an example All-integer LP model because all variables in the model are integer. How do we solve these type of problems? Can we apply regular solution methods when we face Integer constraints? We may solve this problem first by ignoring integer constraints.

Integer Linear Programming


Optimal LP solution shows that the solution values are not integer. Therefore, we should take some additional steps because we cannot accept non-integer solutions.

Why not simply round the values? If the values are Rounded UP, the solution becomes x1=6 and x2=3.

Integer Linear Programming


If the values are Rounded OFF to the nearest whole number, we get x1=5, and x2=3. Again this point is not in the feasible region:

If we Round DOWN the values, we get x1=5 and x2=2. This point is in the feasible region, But Is it Optimum?

Integer Linear Programming


X1 X2 0 2 1 2 2 2 3 2 4 2 5 2 0 3 1 3 2 3 3 3 4 3 0 4 1 4 Objective Function Value 4000 dollars 5200 dollars 6400 dollars 7600 dollars 8800 dollars 10000 dollars 6000 dollars 7200 dollars 8400 dollars 9600 dollars 10800 dollars 8000 dollars 9200 dollars

According to this table optimum point is x1=4, and x2=3, and z=10,800 dollars. Therefore, the Rounded OFF solution is feasible but it is not optimum.

Integer Linear Programming


We can end up with the following conclusion: The possible outcomes of Rounding to integer values are as follows: 1- The rounded point may be infeasible. 2- The rounded point may be feasible but not optimal. 3- The rounded point may be the optimal point. (But we may not be sure about this).

Integer Linear Programming An Example Mixed Integer LP Model

Shelley Mednick decided to give the Stock Market a try. She heard that the stock of TCS telecommunication Company is being sold at 55 dollars per share, AND it is projected to sell at 68 dollars per share in a year. She is also considering a Mutual fund, MFI, which is predicted to yield a 9% return over the next year.

Integer Linear Programming

Shelley wants to invest just to have a return of 250 dollars for one year. She also set the following restriction for her investment: - Since Stock Market is a little more risky than the Mutual Fund, The maximum amount invested in TCS stocks should not exceed 40% of her total investment. Or, the maximum amount invested in TCS stocks should not exceed 750 dollars. (Whichever is smaller)

Integer Linear Programming


Problem: What is the minimum combination of shares of TCS and investment in MFI that would be necessary to meet 250 dollars earning for one year. Decision Variables: X1 = Number of shares of TCS that Shelly should purchase (integer) X2= the amount of money that Shelly should invest in MFI (non-integer)

Integer Linear Programming

We are interested in minimizing the total amount of money that should be invested by Shelly in order to achieve 250 dollars. Therefore, Minimize 55x1 + x2 (Selling price of one stock of TCS is 55 dollars) Yearly return must be at least 250 dollars: 13x1 + .09x2 250 (In one year, 13 dollars is gained from each TCS, and .09 dollars return for each MFI)

Integer Linear Programming


Amount invesed in TCS must be no more than 40% of total investment: 55x1 0.40(55x1 + x2), OR 55x1 22X1 + 0.40X2, OR 33x1 0.40x2 0 and 55x1 750 x1, x2 0, and x1 integer

Integer Linear Programming

To solve the problem, again first we ignore the integer restriction for x1. Optimum solution is x1=12.24, and x2=1009.79, Total investment = 1683 dollars: Since x1 should be integer, this optimum point is not acceptable.

Integer Linear Programming


Note that, only x1 is restricted to be integer. Therefore, the set of feasible points for this MILP model is the Series of parallel lines corresponding to all possible x1 values (see below).

Integer Linear Programming

After some trials, We will see that the real optimum point is x1=12, and x2=1044.44. In this case, Rounding DOWN would help. Shelly should purchase 12 shares of TCS and invest 1044.44 dollars in MFI. This investment results in a total investment of 1704.44 dollars.

Solving Integer LP Models

Algorithms incorporated in computer software for solving Integer LP models are:

1- Cutting Plane algorithms, and 2- Branch-and-Bound algorithms.

Cutting Plane Approach

- Integer constraints are initially ignored, And the problem is solved using normal LP. - If the solution fails to provide Integer values Then - A new constraint is added that will make the current solution infeasible But will not Eliminate any feasible point that provides Integer values. - The problem is then re-solved again by using normal LP method (simplex). - This process (adding new constraints) is repeated until the Optimum is reached.

Cutting Plane Approach


For example, In the following graphic, a new constraint is added to the current solution:

Cutting Plane Approach Example

We will illustrate The concept of the cutting plane by a simple example. Consider the following integer linear programming problem:

Maximize z = 7x1 + 9x2 -x1 + 3x2 6 7x1 + x2 35 x1, x2 non-negative integers

Cutting Plane Approach Example

The idea of Cutting plane algorithm is to make changes to the current feasible solution without slicing off any of the feasible integer solutions. We will make these changes by adding new (secondary) constraints to the original model.

Cutting Plane Approach Example


For AILP models, we use a Cutting plane approach called Fractional Algorithm. In this algorithm, a basic requirement is that all coefficients And the right hand side values of each constraint MUST be integer. For example, x1 + 1/3x2 13/2 must be transformed to 6x1 + 2x2 39

Cutting Plane Approach Example


Now we can start to explain the details of the algorithm. First, disregarding the integer constraints, the problem is solved as a regular linear programming problem. In our example, we see that the optimal solution does not satisfy any of the integer constraints. Therefore, the new constraints will be added in the following manner:

Cutting Plane Approach Example

Since the solution is non-integer, we will add a Fractional Cut to the Table. As its name indicates, this method takes the fractional part of any value. For example the value of 9/2 in the table can be represented as 4 and . Therefore, 9/2 is equal to 4 + . Here, 4 is the integer part, and is the fractional part.

Cutting Plane Approach Example

Now, In order to generate the cut, we will select one of the variables that should be integer But not found to be integer in the current solution. In this case, both x1 and x2 are found to be noninteger. But they should be integer. Generally, any of the constraint equations corresponding to a non-integer solution can be selected to generate the cut. However, as a rule of thumb, we usually choose the equation corresponding to the maximum fractional part.

Cutting Plane Approach Example

In this case, fractional parts of x1 and x2 are the same (1/2). Therefore we select x2 arbitrarily. X2-equation can be read from the above table as follows: x2 + 7/22 x3 + 1/22 x4 = 7/2 = 3 and

Cutting Plane Approach Example

Now, for the sake of fractional cutting method, we will apart the fractional part of each noninteger value from its integer part: x2 + (0 + 7/22)x3 + (0 + 1/22)x4 = (3 + ) The corresponding fractional cut is formed by taking the fractional parts as follows: S1 7/22 x3 1/22 x4 = - Here S1 is non-negative integer slack variable.

Cutting Plane Approach Example

Cutting Plane Approach Example

Since there is a negative right hand side value in the table, We employ the Dual Simplex Method to solve this problem. Dual simplex method yields the following solution:(x3 enters the solution)

Cutting Plane Approach Example

At this stage, x2 becomes integer, but x1 is still non-integer. Therefore, we should continue the cutting process. In the current table, x1-equation is written as follows: x1 + 1/7 x4 - 1/7 S1 = 4 and 4/7

Cutting Plane Approach Example

Now, for the sake of fractional cutting method, we will apart the fractional part of each noninteger value from its integer part: x1 + (0 + 1/7)x4 + (-1 + 6/7)S1 = (4 + 4/7) The corresponding fractional cut is formed by taking the fractional parts as follows: S2 1/7 x4 6/7 S1 = - 4/7 Here S2 is non-negative integer slack variable.

Cutting Plane Approach Example

The dual simplex method yields the following solution, which is Optimum:

Cutting Plane Approach Example

The optimal solution is x1 = 4, x2 = 3, and z = 55. By using the graphic representation, We can verify that the addition of the developed cuts will result in the same integer solution, as well.

Cutting Plane Approach Example


For example, consider the first cut, which was as follows: S1 7/22 x3 1/22 x4 = - This can be expressed in terms of x1 and x2 If we substitute the corresponding values in their places: x3 = (6 + x1 3x2), and x4 = (35 7x1 x2) S1 7/22 (6 + x1 3x2) 1/22 (35 7x1 x2) = - This equality can be shortened as: S1 + x2 = 3

Cutting Plane Approach Example

Since the original constraint is a type constraint, the above equality is actually set as x2 3. Similarly, the second cut S2 1/7 x4 6/7 S1 = - 4/7

can be represented as x1 + x2 7.

Cutting Plane Approach Example


The following figure shows that the addition of these two constraints will result in the new optimal solution (4, 3):

Branch and Bound Algorithm


In this approach, first again the problem is solved ignoring the integer constraint. If integer values are not integer in the solution, Then - One of the variables not having an integer value is selected and two new constraints are formed:

1) Selected Variable integer part of its value, and 2) Selected Variable integer part of its value + 1

Branch and Bound Algorithm


If x1 = 5.2, the first constraint is x1 5, and the second constraint is x1 6. Then, two new linear programs are created: One with the upper bound (e.g., x1 5) added and one with the lower bound (e.g., x1 6) added. As an example, consider the Boxcar burger problem: x1 = 5 7/16, x2 = 2 11/16. We first select x1 for adding a new constraint. The two new constraints are: x1 5 and x1 6.

Branch and Bound Algorithm

For the model that we add x1 5 as a new constraint we get the following result:

Branch and Bound Algorithm

However, For the model that we add (x1 6) as a new constraint we get no feasible solution:

Branch and Bound Algorithm


Therefore, we exclude the option of (x1 6) from further considerations. We continue with the new LP optimum x1=5, and X2=2 5/6. Since x2 is not integer, the process is repeated for x2: That is we add (x2 2) and (x2 3) as the two new constraints. And next, we create two new models and solve them for these two modifications. This process continues until an optimal integer solution that satisfies all integer constraints is attained.

Вам также может понравиться