yöneylem 5

Upload: nisbith

Post on 07-Apr-2018

243 views

Category:

Documents


3 download

TRANSCRIPT

  • 8/4/2019 Yneylem 5

    1/44

    Integer Linear

    Programming

  • 8/4/2019 Yneylem 5

    2/44

    Integer Linear Programming

    For many LP models, Decision Variables shouldbe restricted to integer values.(for example,number of airplanes to be purchased should be

    integer)

    These kinds of models are called Integer LinearProgramming Models.

  • 8/4/2019 Yneylem 5

    3/44

    Integer Linear Programming

    Integer LP models can be classified as follows:

    1- All-integer LP models (AILP); All decisionvariables are integer.

    2- Mixed-integer LP models (MILP); Somevariables are integer, some are non-integer.

    3- Binary LP models; All variables are 0 or 1.

  • 8/4/2019 Yneylem 5

    4/44

    Integer Linear Programming An

    Example All-integer LP model

    Boxcar burger company plans to expand its locations atsuburban areas and at downtown area.

    The company has 2.7 million dollars available for thisexpansion.

    Each suburban location requires a 200,000 dollarsinvestment.

    And, Each downtown location requires a 600,000dollars investment.

    Suburban locations will generate an average 1,200dollars profit per week.

    And, downtown locations will generate an average2,000 dollars profit per week.

  • 8/4/2019 Yneylem 5

    5/44

    Integer Linear Programming

    The company wishes to open at least two restaurantsdowntown.

    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 anddowntown locations in order to maximize its weekly

    profit.

  • 8/4/2019 Yneylem 5

    6/44

    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

  • 8/4/2019 Yneylem 5

    7/44

    Integer Linear Programming

    This is an example All-integer LP model becauseall variables in the model are integer.

    How do we solve these type of problems?

    Can we apply regular solution methods when weface Integer constraints?

    We may solve this problem first by ignoringinteger constraints.

  • 8/4/2019 Yneylem 5

    8/44

    Integer Linear Programming

    Optimal LP solutionshows that the solution

    values are not integer.

    Therefore, we shouldtake some additionalsteps because we cannotaccept non-integer

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

  • 8/4/2019 Yneylem 5

    9/44

    Integer Linear Programming

    If the values areRounded OFF to thenearest whole number,

    we get x1=5, and x2=3.Again this point is notin the feasible region:

    If we Round DOWN the values, we getx1=5 and x2=2.

    This point is in the feasible region,

    But Is it Optimum?

  • 8/4/2019 Yneylem 5

    10/44

    Integer Linear Programming

    X1 X2 Objective Function Value0 2 4000 dollars1 2 5200 dollars2 2 6400 dollars3 2 7600 dollars

    4 2 8800 dollars5 2 10000 dollars0 3 6000 dollars1 3 7200 dollars2 3 8400 dollars

    3 3 9600 dollars4 3 10800 dollars0 4 8000 dollars1 4 9200 dollars

    According to this tableoptimum point isx1=4, and x2=3, andz=10,800 dollars.

    Therefore, theRounded OFF solution

    is feasible but it is notoptimum.

  • 8/4/2019 Yneylem 5

    11/44

    Integer Linear Programming

    We can end up with the following conclusion:

    The possible outcomes of Rounding to integervalues 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).

  • 8/4/2019 Yneylem 5

    12/44

    Integer Linear Programming An

    Example Mixed Integer LP Model

    Shelley Mednick decided to give the StockMarket a try.

    She heard that the stock of TCStelecommunication Company is being sold at 55dollars per share, AND it is projected to sell at68 dollars per share in a year.

    She is also considering a Mutual fund, MFI,which is predicted to yield a 9% return over thenext year.

  • 8/4/2019 Yneylem 5

    13/44

    Integer Linear Programming

    Shelley wants to invest just to have a return of 250dollars for one year.

    She also set the following restriction for her investment:

    - Since Stock Market is a little more risky than theMutual Fund, The maximum amount invested in TCSstocks should not exceed 40% of her total investment.

    Or, the maximum amount invested in TCS stocksshould not exceed 750 dollars. (Whichever is smaller)

  • 8/4/2019 Yneylem 5

    14/44

    Integer Linear Programming

    Problem: What is the minimum combination ofshares of TCSand investment in MFIthat would benecessary 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)

  • 8/4/2019 Yneylem 5

    15/44

    Integer Linear Programming

    We are interested in minimizing the total amountof money that should be invested by Shelly inorder to achieve 250 dollars. Therefore,

    Minimize 55x1 + x2 (Selling price of onestock of TCS is 55 dollars)

    Yearly return must be at least 250 dollars:

    13x1 + .09x2 250 (In one year, 13 dollars isgained from each TCS, and .09 dollars return foreach MFI)

  • 8/4/2019 Yneylem 5

    16/44

    Integer Linear Programming

    Amount invesed in TCS must be no more than40% of total investment:

    55x1 0.40(55x1 + x2), OR

    55x1 22X1 + 0.40X2, OR

    33x10.40x2 0

    and

    55x1 750

    x1, x2 0, and x1 integer

  • 8/4/2019 Yneylem 5

    17/44

    Integer Linear Programming

    To solve the problem,again first we ignore theinteger restriction for x1.

    Optimum solution isx1=12.24, andx2=1009.79, Totalinvestment = 1683

    dollars:

    Since x1 should be integer,this optimum point is not

    acceptable.

  • 8/4/2019 Yneylem 5

    18/44

    Integer Linear Programming

    Note that, only x1 isrestricted to be integer.

    Therefore, the set of

    feasible points for thisMILP model is the Seriesof parallel linescorresponding to all

    possible x1 values (seebelow).

  • 8/4/2019 Yneylem 5

    19/44

    Integer Linear Programming

    After some trials, We will see that the realoptimum point is x1=12, and x2=1044.44.

    In this case, Rounding DOWN would help.

    Shelly should purchase 12 shares of TCS andinvest 1044.44 dollars in MFI.

    This investment results in a total investment of1704.44 dollars.

  • 8/4/2019 Yneylem 5

    20/44

    Solving Integer LP Models

    Algorithms incorporated in computer softwarefor solving Integer LP models are:

    1- Cutting Plane algorithms, and

    2- Branch-and-Bound algorithms.

  • 8/4/2019 Yneylem 5

    21/44

    Cutting Plane Approach

    - Integer constraints are initially ignored, And theproblem is solved using normal LP.

    - If the solution fails to provide Integer values Then

    - A new constraint is added that will make the currentsolution infeasibleBut will not Eliminateany feasible pointthat provides Integer values.

    - The problem is then re-solved again by using normalLP method (simplex).

    - This process (adding new constraints) is repeated untilthe Optimum is reached.

  • 8/4/2019 Yneylem 5

    22/44

    Cutting Plane Approach

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

  • 8/4/2019 Yneylem 5

    23/44

    Cutting Plane Approach Example

    We will illustrate The concept of the cuttingplane by a simple example. Consider thefollowing integer linear programming problem:

    Maximize z = 7x1 + 9x2

    -x1 + 3x2

    67x1 + x2 35

    x1, x2 non-negative integers

  • 8/4/2019 Yneylem 5

    24/44

    Cutting Plane Approach Example

    The idea of Cutting plane algorithm is to make changes to

    the current feasible solution without slicing off any ofthe feasible integer solutions.We will make these changes by adding new (secondary)constraints to the original model.

  • 8/4/2019 Yneylem 5

    25/44

    Cutting Plane Approach Example

    For AILP models, we use a Cutting planeapproach called Fractional Algorithm.

    In this algorithm, a basic requirement is that all

    coefficients And the right hand side values ofeach constraint MUST be integer.

    For example,

    x1 + 1/3x2 13/2must be transformed to

    6x1 + 2x2 39

  • 8/4/2019 Yneylem 5

    26/44

    Cutting Plane Approach Example

    Now we can start to explain the details of thealgorithm.

    First, disregarding the integer constraints, the

    problem is solved as a regular linearprogramming 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 inthe following manner:

  • 8/4/2019 Yneylem 5

    27/44

    Cutting Plane Approach Example

    Since the solution is non-integer, we will add a FractionalCutto 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 berepresented as 4 and .

    Therefore, 9/2 is equal to 4 + .

    Here, 4 is the integer part, and is the fractional part.

  • 8/4/2019 Yneylem 5

    28/44

    Cutting Plane Approach Example

    Now, In order to generate the cut, we will select one ofthe variables that should be integer But not found to beinteger in the current solution.

    In this case, both x1 and x2 are found to be non-

    integer. But they should be integer. Generally, any of the constraint equations

    corresponding to a non-integer solution can be selectedto generate the cut.

    However, as a rule of thumb, we usually choose theequation corresponding to the maximum fractionalpart.

  • 8/4/2019 Yneylem 5

    29/44

    Cutting Plane Approach Example

    In this case, fractional parts of x1 and x2 are thesame (1/2). Therefore we select x2 arbitrarily.

    X2-equation can be read from the above table asfollows:

    x2 + 7/22 x3 + 1/22 x4 = 7/2 = 3 and

  • 8/4/2019 Yneylem 5

    30/44

    Cutting Plane Approach Example

    Now, for the sake of fractional cutting method,we will apart the fractional part of each non-integer value from its integer part:

    x2 + (0 + 7/22)x3 + (0 + 1/22)x4 = (3 + )

    The corresponding fractional cut is formed bytaking the fractional parts as follows:

    S17/22 x31/22 x4 = -

    Here S1 is non-negative integer slack variable.

  • 8/4/2019 Yneylem 5

    31/44

    Cutting Plane Approach Example

  • 8/4/2019 Yneylem 5

    32/44

    Cutting Plane Approach Example

    Since there is a negative right hand side value inthe table, We employ the Dual Simplex Method tosolve this problem. Dual simplex method yields

    the following solution:(x3 enters the solution)

  • 8/4/2019 Yneylem 5

    33/44

    Cutting Plane Approach Example

    At this stage, x2 becomes integer, but x1 is stillnon-integer. Therefore, we should continue thecutting process.

    In the current table, x1-equation is written asfollows:

    x1 + 1/7 x4 - 1/7 S1 = 4 and 4/7

  • 8/4/2019 Yneylem 5

    34/44

    Cutting Plane Approach Example

    Now, for the sake of fractional cutting method,we will apart the fractional part of each non-integer 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:S21/7 x46/7 S1 = - 4/7

    Here S2 is non-negative integer slack variable.

  • 8/4/2019 Yneylem 5

    35/44

    Cutting Plane Approach Example

    The dual simplex method yields the following solution, whichis Optimum:

  • 8/4/2019 Yneylem 5

    36/44

    Cutting Plane Approach Example

    The optimal solution is x1 = 4, x2 = 3, and z =55.

    By using the graphic representation, We canverify that the addition of the developed cutswill result in the same integer solution, as well.

  • 8/4/2019 Yneylem 5

    37/44

    Cutting Plane Approach Example

    For example, consider the first cut, which was asfollows:

    S17/22 x31/22 x4 = -

    This can be expressed in terms of x1 and x2 If wesubstitute the corresponding values in their places:

    x3 = (6 + x13x2), and x4 = (357x1x2)

    S17/22 (6 + x13x2)1/22 (357x1x2) = - This equality can be shortened as:

    S1 + x2 = 3

  • 8/4/2019 Yneylem 5

    38/44

    Cutting Plane Approach Example

    Since the original constraint is a typeconstraint, the above equality is actually set as x2

    3. Similarly, the second cut

    S21/7 x46/7 S1 = - 4/7

    can be represented as x1 + x2 7.

  • 8/4/2019 Yneylem 5

    39/44

    Cutting Plane Approach Example

    The following figure shows that the addition ofthese two constraints will result in the new

    optimal solution (4, 3):

  • 8/4/2019 Yneylem 5

    40/44

    Branch and Bound Algorithm

    In this approach, first again the problem is solvedignoring 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

  • 8/4/2019 Yneylem 5

    41/44

    Branch and Bound Algorithm

    If x1 = 5.2, the first constraint is x1 5, and the secondconstraint is x1 6.

    Then, two new linear programs are created: One withthe upper bound (e.g., x1 5) added and one with thelower 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 twonew constraints are:

    x1 5 and x1 6.

  • 8/4/2019 Yneylem 5

    42/44

    Branch and Bound Algorithm

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

  • 8/4/2019 Yneylem 5

    43/44

    Branch and Bound Algorithm

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

  • 8/4/2019 Yneylem 5

    44/44

    Branch and Bound Algorithm

    Therefore, we exclude the option of (x1 6) fromfurther considerations.

    We continue with the new LP optimum x1=5, andX2=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 constraintsis attained.