Top Banner
Process Optimization Mixed Integer Programming Professor Dr. Saibal Ganguly Universiti Teknologi PETRONAS 1 Lecture Set 8: September 2014 CCB 4333: Professor Saibal Ganguly
34

CCB4333=lectureSet8 (1)

Nov 10, 2015

Download

Documents

lecture
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • Process Optimization

    Mixed Integer Programming

    Professor Dr. Saibal Ganguly

    Universiti Teknologi PETRONAS

    1

    Lecture Set 8:

    September 2014

    CCB 4333: Professor Saibal Ganguly

  • Mixed Integer Programming

    At the end of the topic, students should be able to:

    Understand, discuss and solve the concepts of mixed

    integer programming

    Formulate and solve simple mixed integer programming

    based engineering optimization problems

    Understand the overview of MILP, MINLP and MI

    problems

    Understand branch and bound methods

    Understand depth and breadth based strategies.

    2

    Lecture Set 8:

    CCB 4333: Professor Saibal Ganguly

  • What is Mixed Integer Programming?

    The objective function depends on two sets of

    variables, x and y where

    X represents vector of continuous variables

    Y represents vector of integer variables

    Minimize f(x,y)

    Subject to g(x,y) 0

    h(x,y) = 0

    xi 0 for i = 1, 2, .., n and

    yj = [0,1] for j = 1, 2, .., m

    3

    CCB 4333: Professor Saibal Ganguly

  • Introduction to Integer Variables

    In chemical plant design and operation, there are

    many variables which have integer values

    Examples:

    Number of distillation columns or reactors

    Type of separator or reactor

    Decisions in time to keep or replace an equipment

    Catalyst and promoters types

    Sequence of heat exchangers or distillation

    columns

    etc.

    4

    CCB 4333: Professor Saibal Ganguly

  • Introduction to Integer Variables

    Some integer variables can only assume (0 or 1)

    values, such as decision variables:

    Whether to Install a new piece of equipment

    Whether to Accept a new source of raw material

    Whether to Mix the streams

    Whether to Use the bypass connection

    Such integer variables, y, are called binary

    integer variables and y = [ 0 , 1 ]

    5

    CCB 4333: Professor Saibal Ganguly

  • Types of Mixed Integer Programming

    Problems

    If the objective function or at least one

    of the constraints are nonlinear MINLP

    If the objective function and all the

    constraints are linear MILP

    If there are no continuous variables

    involved IP

    6

    CCB 4333: Professor Saibal Ganguly

  • Mixed Integer Problems: Classical

    Formulations

    (1) Blending problem: A given list of

    possible inputs with known properties have

    to be blended into products or outputs with

    given properties and limits.

    (2) Traveling salesman problem: A

    salesman or a delivery system moves from

    one delivery point to the next in an optimal

    way and returns to the original point.

    7

    CCB 4333: Professor Saibal Ganguly

  • Mixed Integer Problems: Classical Formulations

    (Continued)

    (3) Knapsack problem: A series of objects

    with known weights and values need to be

    optimally selected in subsets so that the

    total weight does not exceed the limit but the

    maximum profit is obtained.

    (4) Plant Location problem: A production

    demand versus time is available. The way to

    take or generate the items from a known

    common source with distributed properties.

    8

    CCB 4333: Professor Saibal Ganguly

  • Continuous vs. Integer programming

    Sometimes the integer variables can be treated as if they

    were continuous, and round the optimal solution to the

    nearest integer value.

    Example 1:

    Maximize f(x) = 3x1 + 4x

    2

    Subject to 3x1 - x

    2 12

    3x1 + 11x

    2 66

    where xi 0 for i = 1, 2

    and x1 & x

    2 are integers

    9

    CCB 4333: Professor Saibal Ganguly

  • Yaxis: x2 & X axis: x

    1

    : Actual Optimal point (IP) : [5, 4] with f = 31

    -20

    -10

    0

    10

    20

    30

    40

    50

    60

    0 22

    Constraint2 Constraint1

    LP Optimal point (5.5, 4.5)

    with f = 34.5

    CCB 4333: Professor Saibal Ganguly

  • Truncation of fractional part of an LP problem

    does not always give the solution of the integer

    LP problem

    Example 2: Replace 3x1 + 11x

    2 66 by 7x

    1 + 11x

    2 88

    Maximize f(x) = 3x1 + 4x

    2

    Subject to 3x1 - x

    2 12

    7x1 + 11x

    2 88

    where xi 0 for i = 1, 2

    and x1 & x

    2 are integers

    11

    CCB 4333: Professor Saibal Ganguly

  • In this case: the optimal LP point remains the

    same as before [ 5.5, 4.5] with f = 34.5

    The truncated solution remains at

    [5, 4] with f = 31

    However: Actual IP solution is obtained at:

    [0, 8] with f = 32 (different from truncated solution)

    Therefore, specialized algorithms specific to

    Mixed Integer problems have been developed.

    12

    CCB 4333: Professor Saibal Ganguly

  • Branch and Bound Method

    This is the most widely used and probably the most

    successful method for solving both IP and MILP

    problems

    BASIC IDEA:

    1) Solve the problem as if it contains only continuous

    variables

    2) If the optimal solution contains noninteger values

    for some integer variables, use partitioning method

    for these integer variables to divide up all the

    possible solutions into subsets

    3) Avoid exhaustive search using bounding methods

    CCB 4333: Professor Saibal Ganguly

  • Branch and Bound Method The starting node (e.g. node 1) is called root node or

    initial node. The ends node (e.g. nodes 2,4,5) are

    called terminal nodes and nodes in between (e.g.

    node 3) are regarded as intermediate nodes.

    Each tree of the solutions have the root node,

    intermediate nodes, and terminal nodes.

    Every path from root node to terminal nodes

    defines a complete solution.

    The optimum solution should be chosen among all

    terminal nodes.

    14

    CCB 4333: Professor Saibal Ganguly

  • TREE REPRESENTATION Example: MILP with 3 binary variables

    CCB 4333: Professor Saibal Ganguly

  • BRANCHING STRATEGIES

    Depth-first (1) Perform branching on most recently

    created node

    (2) When no nodes can be expanded,

    backtrack to node whose successor have

    not been examined

    Breadth-first (1) Select the node with the best value at

    each level and expand all its successor

    nodes

    CCB 4333: Professor Saibal Ganguly

  • Example 3 Minimize the overall cost

    Node 2: 10; Node 3: 17; Node 4: 6; Node 5: 2; Node 6: 2; Node 7: 2;

    Node 8: 2; Node 9: 4; Node 10: 2; Node 11: 4;

    Node 12: 4; Node 13: 4; Node 14: 2; Node 15: 4

    CCB 4333: Professor Saibal Ganguly

  • Strategy: Depth first

    Step 1: Select Initial Sequence: 1-2-4-9: 10+6+4 = 20;

    Set expansion node = 4;

    Set optimal sequence to 1-2-4-9 with bound = 20.

    Step 2: Retrace to Sequence: 1-2-4-8: 10+6+2 = 18;

    Since 18 < 20, change optimal sequence.

    Set new optimal sequence to 1-2-4-8 with bound = 18.

    Step 3: Retrace to Sequence: 1-2-5-10: 10+2+2 = 14;

    Set expansion node = 5;

    Since 14 < 18, change optimal sequence.

    Set new optimal sequence to 1-2-5-10 with bound = 14.

    18

    CCB 4333: Professor Saibal Ganguly

  • Step 4: Retrace to Sequence: 1-2-5-11: 10+2+4 = 16;

    Since 16 > 14, donot change optimal sequence.

    Step 5: Retrace to Sequence: 1-3: 17 > 14;

    Prune and discard all branches of 1-3 and beyond.

    The optimal sequence is 1-2-5-10 with bound = 14.

    In breadth first strategy, compare

    horizontally side nodes first and arrive at the

    optimum.

    19

    CCB 4333: Professor Saibal Ganguly

  • COMPARISON BETWEEN BRANCH AND

    BOUND STRATEGIES

    Depth-first

    Requires less storage of nodes since maximum

    nodes to be stored at any point is the number of

    levels in the tree

    Has the tendency of finding the optimal solution

    early in the enumeration procedure.

    Breadth-first

    In general requires examination of fewer nodes

    no backtracking

    20

    CCB 4333: Professor Saibal Ganguly

  • BRANCH AND BOUND METHOD USING LP

    RELAXATIONS In a mixed integer MILP formulation, often integer

    variables can be binary that is either 0 or 1. Quite

    often the approach to solving the MILP is obtained by

    relaxation of the only 0 or 1 constraints to

    anywhere between 0 and 1 constraints. This

    procedure of relaxation is known as LP Relaxation

    The subsequent problem formed is known as an LP

    subproblem

    21

    CCB 4333: Professor Saibal Ganguly

  • Example 4:

    Maximize f = 86x1 + 4x

    2 + 40x

    3

    Subject to 774x1 + 76x

    2 + 42x

    3 875

    67x1 + 27x

    2 + 53x

    3 875

    where xi 0 for i = 1, 2,3

    and x1 x

    2 & x

    3 are integers [0,1]

    Solution:

    A decomposition is attempted using Branch and

    Bound method.

    22

    CCB 4333: Professor Saibal Ganguly

  • NODE 1: Continuous LP optimum is solved for

    constraints 0 x1 1; 0 x

    2 1 & 0 x

    3 1 to yield

    an optimal solution at [1, 0.776, 1] with f = 129.1

    NODE 2 NODE 3 Assume x

    2 = 0 Assume x

    2 = 1

    0 x1 1; 0 x

    1 1;

    x2 = 0 & x

    2 = 1 &

    0 x3 1 0 x

    3 1

    LP optimum: [1,0,1] LP optimum:[0.978,1,1]

    f= 126.0 f= 128.11

    CCB 4333: Professor Saibal Ganguly

  • NODE 3 Assume x

    2 = 1

    0 x1 1; x

    2 = 1 & 0 x

    3 1

    LP optimum:[0.978,1,1] with f= 128.11

    NODE 4 NODE 5 Assume x

    1 = 0 Assume x

    1 = 1

    x1 = 0; x

    1 = 1;

    x2 = 0 & x

    2 = 1 &

    0 x3 1 0 x

    3 1

    LP optimum: [0,1,1] LP optimum:[1,1, 0.595]

    f= 44.0 f= 113.81

    Global optimum was obtained at Node 2.

    CCB 4333: Professor Saibal Ganguly

  • Mixed Integer Nonlinear Programming (MINLP)

    Example 5:

    Reaction: A B

    Reactor I: conversion 0.8; Cost = 5.5 (Feed)0.6

    /hr

    Reactor II: conversion 0.667; Cost = 4 (Feed)0.6

    /hr

    x0: feed flowrate (kmol/hr) of A at 5 /kmol

    Desired product, B, at 10 kmol/hr

    Select the cheapest combination of the above reactors

    25

    CCB 4333: Professor Saibal Ganguly

  • Solution:

    Objective function:

    Minimise Cost = 5.5 (x1)

    0.6

    + 4 (x1)

    0.6

    + 5 x0

    Operation cost Material cost

    Constraints:

    Mass balance at initial split: x0 = x

    1 + x

    2

    Mass balance at reactor I: z1 = 0.8 x

    1

    Mass balance at reactor II: z2 = 0.667 x

    2

    Mass balance at mixer: z1 + z

    2 = 10

    Non-negativity constraints: x0 , x

    1, x

    2 , z

    1, z

    2 0

    DOF = NV NE =5 - 4 = 1 (optimisation problem)

    CCB 4333: Professor Saibal Ganguly

  • Eliminate z1, z

    2 and x

    0 from the constraints

    Minimise 5.5 (x1)0.6

    + 4 (x1)

    0.6

    + 5 x0

    subject to 0.8 x1 + 0.667 x

    2 = 10

    If we eliminate x1, the problem can easily be solved

    Let us plot Cost as a function of x2

    CCB 4333: Professor Saibal Ganguly

  • Discussion

    Note that cost function exhibits two minima

    at the extreme values 0 and 15 of x2

    At x2 = 0 the global optimum (87.5/hr) occurs

    at which it corresponds to selecting reactor I

    only

    At x2 = 15 we have a local optimum which

    corresponds to selecting reactor II only

    Clearly, this is an undesirable feature as it

    means that when using standard NLP

    algorithms our solution will be dependent on

    the starting point

    CCB 4333: Professor Saibal Ganguly

  • MINLP Formulation

    Introduce binary variables

    How to incorporate these binary

    variables into the formulation?

    Define new constraint:

    With upper limits of x1 and x

    2

    29

    CCB 4333: Professor Saibal Ganguly

  • Define Binary variables

    If y1 = 0 (reactor I is not selected); x

    1 = 0

    If y1 = 1 (reactor I is selected); x

    1 = m1

    If y2 = 0 (reactor II is not selected); x

    2 = 0

    If y2 = 1 (reactor II is selected); x

    2 = m2

    x1 (m1) y

    1 0

    x2 (m2) y

    2 0

    30

    CCB 4333: Professor Saibal Ganguly

  • Upper Limit Calculation

    Upper limit of x1 is when 10 kmol/hr of B is to be

    produced from x1

    Similarly upper limit of x2 is when 10 kmol/hr of B

    is to be produced from x2

    Thus, new constraints are calculated :

    m1 = 10/0.8 = 12.5 kmol/h

    m2 = 10/0.667 = 15 kmol/h

    x1 (12.5) y

    1 0

    x2 (15) y

    2 0

    CCB 4333: Professor Saibal Ganguly

  • The full MINLP formulation

    Minimise 5.5 (x1)0.6

    + 4 (x1)

    0.6

    + 5 x0

    subject to 0.8 x1 + 0.667 x

    2 = 10

    x1 (12.5) y

    1 0

    x2 (15) y

    2 0

    Non-negativity constraints: x0 , x

    1, x

    2 , z

    1, z

    2 0

    Integer constraints: y1 and

    y

    1 = [0,1]

    32

    CCB 4333: Professor Saibal Ganguly

  • N COMPUTER SOFTWARE

    1. For LP and MILP:

    LINDO by Linus Schrage. Interactive easy to use.

    ZOOM by Roy Marsten.

    LSSOL, LPSOL from Stanford Software Centre

    2. For NLP:

    GINO by leon Lasdon. Interactive program.

    MINOS by Murtagh and Saunders (Stanford Software).

    CONOPT by Drud in Denmark

    3. For MINLP:

    DICOPT++ by Viswanathan and Grossmann.

    The program GAMS provides a computer interface that

    facilitates the formulation and solution of LP, MILP, NLP,

    an MINLP problems. GAMS interfaces with other

    commercial packages also.

    CCB 4333: Professor Saibal Ganguly

  • Thank you

    34

    End of Lecture Set 8

    CCB 4333: Professor Saibal Ganguly