integer programming (ip)contents.kocw.net/kocw/document/2016/chungang/seoyongwon/... · 2017. 1....

33
Integer Programming (IP) Prof. Yongwon Seo ([email protected]) College of Business Administration, CAU

Upload: others

Post on 25-Jan-2021

21 views

Category:

Documents


0 download

TRANSCRIPT

  • Integer Programming (IP)

    Prof. Yongwon Seo

    ([email protected])

    College of Business Administration, CAU

  • Types of Integer Programming(IP) Problems

    2

    Total Integer Model: All decision variables required to have

    integer solution values.

    0-1 Integer Model: All decision variables required to have

    integer values of zero or one.

    Mixed Integer Model: Some of the decision variables (but not all) required to have integer values.

  • Total Integer Model

    • Machine shop obtaining new presses and lathes.

    • Marginal profitability: each press $100/day; each lathe $150/day.

    • Resource constraints: $40,000 budget, 200 sq. ft. floor space.

    • Machine purchase prices and space requirements:

    3

    Machine

    Required Floor Space (ft.2)

    Purchase Price

    Press Lathe

    15

    30

    $8,000

    4,000

  • Total Integer Model

    4

    Maximize Z = $100x1 + $150x2

    subject to:

    $8,000x1 + 4,000x2 $40,000

    15x1 + 30x2 200 ft2

    x1, x2 0 and integer

  • 0-1 Integer Model

    • Recreation facilities selection to maximize daily usage by residents.

    • Resource constraints: $120,000 budget; 12 acres of land.

    • Selection constraint: either swimming pool or tennis center (not both).

    5

    Recreation

    Facility

    Expected Usage (people/day)

    Cost ($)

    Land Requirement (acres)

    Swimming pool Tennis Center Athletic field Gymnasium

    300 90 400 150

    35,000 10,000 25,000 90,000

    4 2 7 3

  • 0-1 Integer Model

    6

    x1 = construction of a swimming pool

    x2 = construction of a tennis center

    x3 = construction of an athletic field

    x4 = construction of a gymnasium

    Maximize Z = 300x1 + 90x2 + 400x3 + 150x4

    subject to:

    $35,000x1 + 10,000x2 + 25,000x3 + 90,000x4 $120,000

    4x1 + 2x2 + 7x3 + 3x4 12 acres

    x1 + x2 1 facility

    x1, x2, x3, x4 = 0 or 1

  • Mixed Integer Model

    • $250,000 available for investments providing greatest return after one year.

    • Data: – Condominium cost $50,000/unit; $9,000 profit if sold after one

    year.

    – Land cost $12,000/ acre; $1,500 profit if sold after one year.

    – Municipal bond cost $8,000/bond; $1,000 profit if sold after one year.

    – Only 4 condominiums, 15 acres of land, and 20 municipal bonds available.

    7

  • Mixed Integer Model

    8

    x1 = condominiums purchased

    x2 = acres of land purchased

    x3 = bonds purchased

    Maximize Z = $9,000x1 + 1,500x2 + 1,000x3

    subject to:

    50,000x1 + 12,000x2 + 8,000x3 $250,000

    x1 4 condominiums

    x2 15 acres

    x3 20 bonds

    x2 0

    x1, x3 0 and integer

  • Why Integer Programming Complex

    • Rounding non-integer solution values up to the nearest integer value can result in an infeasible solution.

    • A feasible solution by rounding down non-integer solution values may result in a less than optimal (sub-optimal) solution.

    9

  • Example of IP solution

    10

    Maximize Z = $100x1 + $150x2subject to:

    8,000x1 + 4,000x2 $40,000

    15x1 + 30x2 200 ft2

    x1, x2 0 and integer

    LP Optimal Solution:

    Z = $1,055.56

    x1 = 2.22 presses

    x2 = 5.55 lathes

  • How to solve?

    • Branch-and-Bound Method– Traditional approach to solving integer programming problems.

    – Feasible solutions can be partitioned into smaller subsets

    – Smaller subsets evaluated until best solution is found.

    – Method is a tedious and complex mathematical process

    11

  • 0-1 Model with Excel

    12

    Recreational Facilities Example:

    Maximize Z = 300x1 + 90x2 + 400x3 + 150x4

    subject to:

    $35,000x1 + 10,000x2 + 25,000x3 + 90,000x4 $120,000

    4x1 + 2x2 + 7x3 + 3x4 12 acres

    x1 + x2 1 facility

    x1, x2, x3, x4 = 0 or 1

  • 0-1 Model with Excel

    13

  • 0-1 Model with Excel

    14

    Restricts variables, C12:C15, to integer

    and 0-1 values

  • 0-1 Model with Excel

    15

    Click on “bin” for 0-1.

  • 0-1 Model with Excel

    16

    Deactivate

    Return to solver

    window

  • Total Integer Model with Excel

    17

    Integer Programming Model of Machine Shop:

    Maximize Z = $100x1 + $150x2

    subject to:

    8,000x1 + 4,000x2 $40,000

    15x1 + 30x2 200 ft2

    x1, x2 0 and integer

  • Total Integer Model with Excel

    18

    Objective function

    Slack, =G6-E6

    =C6*B10+D6*B11Decision variables—B10:B11

  • Total Integer Model with Excel

    19

    Integer variables

  • Total Integer Model with Excel

    20

    Click on “int”

  • Mixed Integer Model with Excel: Try!

    21

    Integer Programming Model for Investments Problem:

    Maximize Z = $9,000x1 + 1,500x2 + 1,000x3

    subject to:

    50,000x1 + 12,000x2 + 8,000x3 $250,000

    x1 4 condominiums

    x2 15 acres

    x3 20 bonds

    x2 0

    x1, x3 0 and integer

  • Integer Programming Problems and Sensitivity Analysis

    • Integer programming problems do not readily lend themselves to sensitivity analysis.– Small changes in the problem result in completely different

    solutions.

    – Because only a relatively few of the infinite solution possibilities in a feasible solution space will meet integer requirements.

    • Completely solving each modified problem is required.

    22

  • FORMULATION TECHNIQUES

    Integer Programming

    23

  • Formulating 0-1 IP

    • Either-Or Alternatives– two alternatives x1, x2 (for example, backup machine)

    • x1+x2 = 1, x1, x2=0 or 1

    – if it is allowed to use neither machine

    • x1+x2 1, x1, x2=0 or 1

    • k-Out-of-n Alternatives– for example, choosing 2 machines out of 5

    • x1+x2+x3+x4+x5 = 2, all xj=0 or 1

    – at least 2 machines are required out of 5

    • x1+x2+x3+x4+x5 2, all xj=0 or 1

    – no more than 2 machines are required out of 5

    • x1+x2+x3+x4+x5 2, all xj=0 or 1

    – 2~4 machines?

    24

  • Formulating 0-1 IP (cont’d)

    • If-Then Alternatives– If you buy x2, you should also buy x1.

    • x1 x2 , x1, x2=0 or 1

    – If the purchase of either machine requires the purchase of the other,

    • x1 = x2 , x1, x2=0 or 1

    25

  • Formulating 0-1 IP (cont’d)

    • Either-Or Constraints (Activating or De-activating certain constraints)– If you use machine x8, 5x4+3x5 100 should be hold. (Turn on

    the constraint 5x4+3x5 100)

    • 5x4+3x5 100x8 , x8=0 or 1

    – If you use machine x8, 5x4+3x5 >=100. If not, 5x4+3x5 50

    • 5x4+3x5 100x8• 5x4+3x5 50(1-x8) , x8=0 or 1

    – ( case, different) If you execute project y1, 2x1+x2 16. If not, 4x1+8x2 40.

    • 2x1+x2 16+M(1-y1)

    • 4x1+8x2 40+My1 , y1=0 or 1, M is a very large number

    26

  • Formulating 0-1 IP (cont’d)

    • Variables That Have Minimum Level Requirements– If you decide to buy x1, the minimum quantity is 200 units.

    • x1 200y1• My1 x1 , y1=0 or 1

    • Note that,

    – x1=0 y1=0

    – x1>0 y1=1 x1>=200

    27

  • Capital Budgeting

    • University bookstore expansion project.

    • Not enough space available for both a computer department and a clothing department.

    28

    Project NPV Return

    ($1,000s) Project Costs per Year ($1000)

    1 2 3

    1. Web site 2. Warehouse 3. Clothing department 4. Computer department 5. ATMs Available funds per year

    $120 85

    105 140

    75

    $55 45 60 50 30

    150

    $40 35 25 35 30

    110

    $25 20 --

    30 --

    60

  • Capital Budgeting

    29

    x1 = selection of web site project

    x2 = selection of warehouse project

    x3 = selection clothing department project

    x4 = selection of computer department project

    x5 = selection of ATM project

    xi = 1 if project “i” is selected, 0 if project “i” is not selected

    Maximize Z = $120x1 + $85x2 + $105x3 + $140x4 + $70x5subject to:

    55x1 + 45x2 + 60x3 + 50x4 + 30x5 150

    40x1 + 35x2 + 25x3 + 35x4 + 30x5 110

    25x1 + 20x2 + 30x4 60

    x3 + x4 1

    xi = 0 or 1

  • Fixed Charge and Facility

    • Which of six farms should be purchased that will meet current production capacity at minimum total cost, including annual fixed costs and shipping costs?

    30

    Plant

    Available Capacity

    (tons,1000s)

    A B C

    12 10 14

    Farms Annual Fixed Costs

    ($1000)

    Projected Annual Harvest (tons, 1000s)

    1 2 3 4 5 6

    405 390 450 368 520 465

    11.2 10.5 12.8 9.3 10.8 9.6

    Farm

    Plant ($/ton shipped)

    A B C

    1 2 3 4 5 6

    18 15 12 13 10 17 16 14 18 19 15 16 17 19 12 14 16 12

  • Fixed Charge and Facility

    31

    yi = 0 if farm i is not selected, and 1 if farm i is selected; i = 1,2,3,4,5,6

    xij = potatoes (1000 tons) shipped from farm I to plant j; j = A,B,C.

    Minimize Z = 18x1A+ 15x1B+ 12x1C+ 13x2A+ 10x2B+ 17x2C+ 16x3+ 14x3B

    +18x3C+ 19x4A+ 15x4b+ 16x4C+ 17x5A+ 19x5B+12x5C+ 14x6A

    + 16x6B+ 12x6C+ 405y1+ 390y2+ 450y3+ 368y4+ 520y5+ 465y6subject to:

    x1A + x1B + x1B - 11.2y1 ≤ 0 x2A + x2B + x2C -10.5y2 ≤ 0

    x3A + x3A + x3C - 12.8y3 ≤ 0 x4A + x4b + x4C - 9.3y4 ≤ 0

    x5A + x5B + x5B - 10.8y5 ≤ 0 x6A + x6B + X6C - 9.6y6 ≤ 0

    x1A + x2A + x3A + x4A + x5A + x6A = 12

    x1B + x2B + x3B + x4B + x5B + x6B = 10

    x1C + x2C + x3C + x4C + x5C + x6C = 14

    xij ≥ 0 yi = 0 or 1

  • Set Covering

    • Deciding on which nodes provide coverage so that all areas are served.

    • A telecommunication company is considering 7 location nodes to reach all 10 neighborhoods. – The cost of opening 7 nodes are : 125, 85, 70, 60, 90, 100, 110

    – The coverage of 7 nodes are

    • node 1: neighborhoods 1,3,4,6,9,10

    • node 2: neighborhoods 2,4,6,8

    • node 3: neighborhoods 1,2,5

    • node 4: neighborhoods 3,6,7,10

    • node 5: neighborhoods 2,3,7,9

    • node 6: neighborhoods 4,5,8,10

    • node 7: neighborhoods 1,5,7,8,9

    • Determine which nodes should be opened to provide coverage to all neighborhoods at a minimum cost.

    32

  • Set Covering

    Min 125X1 + 85X2 + 70X3 + 60X4 + 90X5 + 100X6 + 110X7

    ST

    X1+X3+X7>=1

    X2+X3+X5>=1

    X1+X4+X5>=1

    X1+X2+X6>=1

    X3+X6+X7>=1

    X1+X2+X4>=1

    X4+X5+X7>=1

    X2+X6+X7>=1

    X1+X5+X7>=1

    X1+X4+X6>=1

    Xj = 0 or 1

    33