2852 spring 2010

844
MIT 2.852 Manufacturing Systems Analysis Lectures 15–16: Assembly/Disassembly Systems Stanley B. Gershwin http://web.mit.edu/manuf-sys Massachusetts Institute of Technology Spring, 2010 c 2.852 Manufacturing Systems Analysis 1/41 Copyright 2010 Stanley B. Gershwin.

Upload: combatps1

Post on 14-Apr-2016

234 views

Category:

Documents


3 download

TRANSCRIPT

  • MIT 2.852

    Manufacturing Systems Analysis

    Lectures 1516: Assembly/Disassembly Systems

    Stanley B. Gershwin

    http://web.mit.edu/manuf-sys

    Massachusetts Institute of Technology

    Spring, 2010

    c2.852 Manufacturing Systems Analysis 1/41 Copyright 2010 Stanley B. Gershwin.

  • Assembly-Disassembly Systems Assembly System

    2.852 Manufacturing Systems Analysis 2/41 Copyright c2010 Stanley B. Gershwin.

  • Assembly-Disassembly Systems Assembly-Disassembly System with a Loop

    2.852 Manufacturing Systems Analysis 3/41 Copyright c2010 Stanley B. Gershwin.

  • Assembly-Disassembly Systems A-D System without Loops

    2.852 Manufacturing Systems Analysis 4/41 Copyright c2010 Stanley B. Gershwin.

  • Assembly-Disassembly Systems Disruption Propagation in an A-D System without Loops

    F

    E

    E

    E E

    E

    E

    F

    F

    F

    FF

    F

    F

    2.852 Manufacturing Systems Analysis 5/41 Copyright c2010 Stanley B. Gershwin.

  • Assembly-Disassembly Systems Models and Analysis

    An assembly/disassembly system is a generalization of a transfer line:

    Each machine may have 0, 1, or more than one buer upstream.

    Each machine may have 0, 1, or more than one buer downstream.

    Each buer has exactly one machine upstream and one machine downstream.

    Discrete material systems: when a machine does an operation, it removes one part from each upstream buer and inserts one part into each downstream buer.

    Continuous material systems: when machine Mi operates during [t, t + t], it removes i t from each upstream buer and inserts i t into each downstream buer.

    A machine is starved if any of its upstream buers is empty. It is blocked if any of its downstream buers is full.

    2.852 Manufacturing Systems Analysis 6/41 Copyright c2010 Stanley B. Gershwin.

  • Assembly-Disassembly Systems Models and Analysis

    A/D systems can be modeled similarly to lines: discrete material, discrete time, deterministic processing time,

    geometric repair and failure times; discrete material, continuous time, exponential processing, repair, and

    failure times; continuous continuous time, deterministic processing rate, exponential

    repair and failure times; other models not yet discussed in class.

    A/D systems without loops can be analyzed similarly to lines by decomposition.

    A/D systems with loops can be analyzed by decomposition, but there are additional complexities.

    2.852 Manufacturing Systems Analysis 7/41 Copyright c2010 Stanley B. Gershwin.

  • Assembly-Disassembly Systems Models and Analysis

    Systems with loops are not ergodic. That is, the steady-state distribution is a function of the initial conditions.

    Example: if the system below has K pallets at time 0, it will have K pallets for all t 0. Therefore, the probability distribution is a function of K .

    Empty Pallet Buffer

    Raw Part Input

    Finished Part Output

    This applies to more general systems with loops, such the example on Slide 3.

    2.852 Manufacturing Systems Analysis 8/41 Copyright c2010 Stanley B. Gershwin.

  • Assembly-Disassembly Systems Models and Analysis

    In general,

    p(s|s(0)) = lim t

    prob { state of the system at time t = s|

    state of the system at time 0 = s(0)}.

    Consequently, the performance measures depend on the initial state of the system: The production rate of Machine Mi , in parts per time unit, is

    Ei (s(0)) = prob

    i = 1 and (nb > 0 b U(i)) and

    (nb < Nb b D(i))

    s(0) .

    The average level of Buer b is

    nb(s(0)) = s

    nb prob (s|s(0)).

    2.852 Manufacturing Systems Analysis 9/41 Copyright c2010 Stanley B. Gershwin.

  • Assembly-Disassembly Systems Decomposition

    Mj

    B (j, i)

    B (n, i)

    Mn

    Mi

    B (i, m)

    Mm

    B (i, q)

    Mq

    Part of Original Network

    2.852 Manufacturing Systems Analysis 10/41 Copyright c2010 Stanley B. Gershwin.

  • Assembly-Disassembly Systems Decomposition

    Mu (j, i) B (j, i) Md (j, i)

    Mu (n, i) B (n, i) Md (n, i)

    Mu (i, m) B (i, m) Md (i, m)

    Mu (i, q) B (i, q) Md (i, q)

    Part of Decomposition

    2.852 Manufacturing Systems Analysis 11/41 Copyright c2010 Stanley B. Gershwin.

  • Numerical examples Eight-Machine Systems

    Deterministic processing time model

    2.852 Manufacturing Systems Analysis 12/41 Copyright c2010 Stanley B. Gershwin.

  • Numerical examples Eight-Machine Systems

    7.3351

    7.3351

    5.6516

    5.6516

    2.6449

    7.3351

    7.3351

    Case 1:

    ri = .1, pi = .1, i = 1, ..., 8;

    Ni = 10, i = 1, ..., 7.

    2.852 Manufacturing Systems Analysis 13/41 Copyright c2010 Stanley B. Gershwin.

  • Numerical examples Eight-Machine Systems

    7.9444

    7.9444

    7.0529

    7.0529

    2.0555

    7.9444

    7.9444

    Case 2:

    Same as Case 1 except p7 = .2

    2.852 Manufacturing Systems Analysis 14/41 Copyright c2010 Stanley B. Gershwin.

  • Numerical examples Eight-Machine Systems

    7.7077

    7.7077

    4.1089

    6.5276

    2.2923

    4.5640

    7.7077

    Case 3:

    Same as Case 1 except p1 = .2

    2.852 Manufacturing Systems Analysis 15/41 Copyright c2010 Stanley B. Gershwin.

  • Numerical examples Eight-Machine Systems

    7.9017

    7.9017

    3.4593

    6.9609

    2.0983

    7.9017

    7.9017

    Case 4:

    Same as Case 1 except p3 = .2

    2.852 Manufacturing Systems Analysis 16/41 Copyright c2010 Stanley B. Gershwin.

  • Numerical Examples

    Alternate Assembly Line Designs

    A product is made of three

    subassemblies (blue, yellow,

    and red). Each subassembly

    can be assembled

    independently of the others.

    We consider four possible

    production system

    structures.

    Machine 6 (the rst machine

    of the yellow process) is the

    bottleneck the slowest

    operation of all.

    2.852 Manufacturing Systems Analysis 17/41 cCopyright 2010 Stanley B. Gershwin.

  • Numerical Examples Alternate Assembly Line Designs

    c2.852 Manufacturing Systems Analysis 18/41 Copyright 2010 Stanley B. Gershwin.

  • Numerical Examples Alternate Assembly Line Designs

    Now the bottleneck is Machine 5, the last operation of the blue process.

    2.852 Manufacturing Systems Analysis 19/41 Copyright c2010 Stanley B. Gershwin.

  • Numerical Examples Alternate Assembly Line Designs

    2.852 Manufacturing Systems Analysis 20/41 Copyright c2010 Stanley B. Gershwin.

  • Equivalence Simple models

    Consider a three-machine transfer line and a three-machine assembly system. Both are perfectly reliable (pi = 0) exponentially processing time systems.

    2

    1N = 2

    1

    3

    N = 3 2

    N = 2 N = 31 2

    1 2 3

    c2.852 Manufacturing Systems Analysis 21/41 Copyright 2010 Stanley B. Gershwin.

  • Equivalence Assembly System State Space

    2

    1N = 2

    1

    3

    N = 3 2

    3

    3

    3

    2

    2

    2

    2

    2

    2

    1

    1 1

    1

    1

    1

    3

    3

    3

    00 10

    01 11

    1202

    03 13 23

    22

    21

    20 1 1

    3

    3

    3

    2.852 cManufacturing Systems Analysis 22/41 Copyright 2010 Stanley B. Gershwin.

  • Equivalence Transfer Line State Space

    3

    3

    3

    2

    2

    2

    2

    2

    2

    1

    1 1

    1

    1

    1

    3

    3

    3

    03 13

    02 12

    1101

    00 10 20

    21

    22

    23 1 1

    3N = 2 N = 31 2

    3

    1 2 3

    3

    c2.852 Manufacturing Systems Analysis 23/41 Copyright 2010 Stanley B. Gershwin.

  • Equivalence Unlabeled State Space

    The transition graphs of the two systems

    are the same except for the labels of the

    states.

    Therefore, the steady-state probability 3 distributions of the two systems are the same, except for the labels of the states.

    The relationship between the labels of the 3 states is:

    (n1 A , n2

    A) (n1 T ,N2 n2

    T ) 3

    Therefore, in steady state,

    3

    3

    3

    2

    2

    2

    2

    2

    2

    1

    1 1

    1

    1

    1

    3

    3

    3

    1 1

    prob(n1 A , n2

    A) = prob(n1 T ,N2 n2

    T )

    c2.852 Manufacturing Systems Analysis 24/41 Copyright 2010 Stanley B. Gershwin.

  • Equivalence Assembly System Production Rate

    Production rate = rate of ow of material into M1 1 3

    = 1 p(n1, n2) n1=0 n2=0

    2

    1N = 2

    1

    3

    N = 3 2

    3

    3

    3

    3

    3

    3

    2

    2

    2

    2

    2

    2

    1

    1 1

    1

    1

    1

    3

    3

    3

    00 10

    01 11

    1202

    03 13 23

    22

    21

    20 1 1

    c2.852 Manufacturing Systems Analysis 25/41 Copyright 2010 Stanley B. Gershwin.

  • Equivalence Assembly System Production RateTransfer Line Production Rate

    Production rate = rate of ow of material into M1

    = 1

    1 n1=0

    3 n2=0

    p(n1, n2)

    1N = 2 2N = 3 3

    1 2 3

    3

    3

    3

    3

    3

    2

    2

    2

    2

    2

    2

    1

    1 1

    1

    1

    1

    3

    3

    3

    03 13

    02 12

    1101

    00 10 20

    21

    22

    23 1 1

    c2.852 Manufacturing Systems Analysis 26/41 Copyright 2010 Stanley B. Gershwin.

  • Equivalence Assembly Systtem Production RatEqual Produc ion Rates

    Therefore

    PA PT =

    c2.852 Manufacturing Systems Analysis 27/41 Copyright 2010 Stanley B. Gershwin.

  • Equivalence Assembly System n1

    2 3 2 3

    n1 = n1p(n1, n2) = n1 p(n1, n2)

    1 1 n1=0 n2=0 n1=0 n2=0

    2

    1N = 2

    1

    3

    N = 3 2

    3

    3

    3

    3

    3

    3

    2

    2

    2

    2

    2

    2

    1

    1 1

    1

    1

    1

    3

    3

    3

    00 10

    01 11

    1202

    03 13 23

    22

    21

    20

    c2.852 Manufacturing Systems Analysis 28/41 Copyright 2010 Stanley B. Gershwin.

  • Equivalence Assembly System n1Transfer Line n1

    2 3 2 3 n1 = n1p(n1, n2) = n1 p(n1, n2) 1 1

    n1=0 n2=0 n1=0 n2=0

    N = 2 N = 31 2

    1 2 3

    3

    3

    3

    3

    3

    3

    2

    2

    2

    2

    2

    2

    1

    1 1

    1

    1

    1

    3

    3

    3

    03 13

    02 12

    1101

    00 10 20

    21

    22

    23

    c2.852 Manufacturing Systems Analysis 29/41 Copyright 2010 Stanley B. Gershwin.

  • Equivalence Assembly System Production RateEqual n1

    Therefore

    n1 A = n1

    T

    c2.852 Manufacturing Systems Analysis 30/41 Copyright 2010 Stanley B. Gershwin.

  • Equivalence Assembly System n2

    2 3 3 2

    n2 = n2p(n1, n2) = n2 p(n1, n2) 1 1 n1=0 n2=0 n2=0 n1=0

    2

    1N = 2

    1

    3

    N = 3 2

    3

    3

    3

    3

    3

    3

    2

    2

    2

    2

    2

    2

    1

    1 1

    1

    1

    1

    3

    3

    3

    00 10

    01 11

    1202

    03 13 23

    22

    21

    20

    c2.852 Manufacturing Systems Analysis 31/41 Copyright 2010 Stanley B. Gershwin.

  • Equivalence Assembly System n2Transfer Line n2

    2 3 3 2

    n2 = n2p(n1, n2) = n2 p(n1, n2) 1 1 n1=0 n2=0 n2=0 n1=0

    3 N = 2 N = 31 2

    3 1 2 3

    3

    3

    3

    3

    2

    2

    2

    2

    2

    2

    1

    1 1

    1

    1

    1

    3

    3

    3

    03 13

    02 12

    1101

    00 10 20

    21

    22

    23

    c2.852 Manufacturing Systems Analysis 32/41 Copyright 2010 Stanley B. Gershwin.

  • Equivalence Assembly System Production RateComplementary n1

    Therefore

    n2 A = N2 n2

    T

    c2.852 Manufacturing Systems Analysis 33/41 Copyright 2010 Stanley B. Gershwin.

  • Equivalence Theorem

    Notation: Let j be a buer. Then the machine upstream of the buer is u(j) and the machine downstream of the buer is d(j).

    Theorem:

    Assume

    Z and Z are two exponential A/D networks with the same number of

    machines and buers. Corresponding machines and buers have the same parameters; that is, i = i , i = 1, ..., kM and

    Nb = Nb , b = 1, ..., kB .

    There is a subset of buers such that for j 6 , u (j) = u(j) and d (j) = d(j); and for j , u (j) = d(j) and d (j) = u(j). That is,

    there is a set of buers such that the direction of ow is reversed in the two networks.

    Then, the transition equations for network Z are the same as those of

    Z , except that the buer levels in are replaced by the amounts of space in those buers.

    c2.852 Manufacturing Systems Analysis 34/41 Copyright 2010 Stanley B. Gershwin.

  • Equivalence Theorem

    That is, the transition (or balance) equations of Z can be written by

    transforming those of Z .

    In the Z equations, replace nj by Nj nj for all j .

    c2.852 Manufacturing Systems Analysis 35/41 Copyright 2010 Stanley B. Gershwin.

  • Equivalence Theorem

    Corollary:

    Assume: The initial states s(0) and s (0) are related as follows: nj

    (0) = nj (0) for j 6 , and nj (0) = Nj nj (0) for j .

    Then

    P (n (0)) = P(n(0))

    nb (n (0)) = nb(n(0)), for j 6

    nb (n (0)) = Nb nb(n(0)), for j

    c2.852 Manufacturing Systems Analysis 36/41 Copyright 2010 Stanley B. Gershwin.

  • Equivalence Theorem

    Corollary: That is,

    the production rates of the two systems are the same,

    the average levels of all the buers in the systems whose direction of ow has not been changed are the same,

    the average levels of all the buers in the systems whose direction of ow has been changed are complementary; the average number of parts in one is equal to the average amount of space in the other.

    c2.852 Manufacturing Systems Analysis 37/41 Copyright 2010 Stanley B. Gershwin.

  • Equivalence Equivalence class of three-machine systems

    N N1 2

    1

    2N

    2

    3

    1

    1N

    2 N

    2B

    1B

    2 3

    2

    1

    1

    2

    3

    N

    N

    1N

    2B

    1B

    3 2 1

    c2.852 Manufacturing Systems Analysis 38/41 Copyright 2010 Stanley B. Gershwin.

  • Equivalence Equivalence classes of four-machine systems

    Representative members

    c2.852 Manufacturing Systems Analysis 39/41 Copyright 2010 Stanley B. Gershwin.

  • Equivalence Example of equivalent loops

    2

    2

    1

    1

    4

    4

    3

    3

    4

    3

    3

    2

    2

    1

    4

    1

    = (3, 4)

    (a) A Fork/ Join Network (b) A Closed Network

    c2.852 Manufacturing Systems Analysis 40/41 Copyright 2010 Stanley B. Gershwin.

  • Equivalence To come

    Loops and invariants

    Two-machine loops

    Instability of A/D systems with innite buers

    c2.852 Manufacturing Systems Analysis 41/41 Copyright 2010 Stanley B. Gershwin.

  • For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

    MIT OpenCourseWare http://ocw.mit.edu

    2.852 Manufacturing Systems Analysis Spring 2010

    For information about citing these materials or our Terms of Use,visit:http://ocw.mit.edu/terms.

  • MIT 2.852

    Manufacturing Systems Analysis

    Lectures 1921 Scheduling: Real-Time Control of Manufacturing Systems

    Stanley B. Gershwin

    Spring, 2007

    Copyright c2007 Stanley B. Gershwin.

  • Definitions

    Events may be controllable or not, and predictable or not.

    controllable uncontrollable predictable loading a part lunch unpredictable ??? machine failure

    Copyright 2007 Stanley B. Gershwin. c 2

  • Definitions

    Scheduling is the selection of times for future controllable events.

    Ideally, scheduling systems should deal with all

    controllable events, and not just production.

    That is, they should select times for operations,

    set-up changes, preventive maintenance, etc.

    They should at least be aware of set-up changes, preventive maintenance, etc.when they select times for operations.

    Copyright 2007 Stanley B. Gershwin. c 3

  • Definitions

    Because of recurring random events, scheduling is an on-going process, and not a one-time calculation.

    Scheduling, or shop floor control, is the bottom of the scheduling/planning hierarchy. It translates plans into events.

    Copyright c 42007 Stanley B. Gershwin.

  • Issues in

    Factory Control

    Problems are dynamic ; current decisions influence future behavior and requirements.

    There are large numbers of parameters, time-varying quantities, and possible decisions.

    Some time-varying quantities are stochastic . Some relevant information (MTTR, MTTF, amount of inventory available, etc.) is not known.

    Some possible control policies are unstable .

    Copyright c 52007 Stanley B. Gershwin.

  • Dynamic Example

    Programming Problem

    Discrete Time, Discrete State, Deterministic F

    68

    A

    1

    B L

    5

    6

    2 2

    G 5

    10

    6

    4M

    9

    2 D 7 72 4 N

    5 9

    4 E

    5 I 8

    6

    13

    6 2 C H

    J

    1

    4 Z

    K 3 O

    Problem: nd the least expensive path from A to Z. Copyright c 62007 Stanley B. Gershwin.

  • Dynamic Example

    Programming Problem

    Let g(i, j) be the cost of traversing the link from i to j. Let i(t) be the tth node on a path from A to Z. Then the path cost is

    T

    g(i(t 1), i(t)) t=1

    where T is the number of nodes on the path, i(0) = A, and i(T ) = Z.

    T is not specied; it is part of the solution.

    Copyright c 72007 Stanley B. Gershwin.

  • Dynamic Example Programming Solution A possible approach would be to enumerate all possible paths (possible solutions). However, there can be a lot of possible solutions.

    Dynamic programming reduces the number of possiblesolutions that must be considered. Good news: it often greatly reduces the number of possible solutions.

    Bad news: it often does not reduce it enough to give an exact optimalsolution practically (ie, with limited time and memory). This is the curse of dimensionality .

    Good news: we can learn something by characterizing the optimal

    solution, and that sometimes helps in getting an analytical optimal

    solution or an approximation.

    Good news: it tells us something about stochastic problems.

    Copyright 2007 Stanley B. Gershwin. c 8

  • Dynamic Example

    Programming Solution

    Instead of solving the problem only for A as the initial point, we solve it for all possible initial points.

    For every node i, dene J(i) to be the optimal cost to go from Node i to Node Z (the cost of the optimal path from i to Z). We can write

    T

    J(i) = g(i(t 1), i(t))

    t=1

    where i(0) = i; i(T ) =Z; (i(t 1), i(t)) is a link for every t.

    Copyright c 92007 Stanley B. Gershwin.

  • Dynamic Example

    Programming Solution

    Then J(i) satises

    J(Z) = 0

    and, if the optimal path from i to Z traverses link (i, j),

    J(i) = g(i, j) + J(j).

    i j

    Z

    Copyright 2007 Stanley B. Gershwin. c 10

  • Dynamic Example Programming Solution Suppose that several links go out of Node i.

    4j 3j

    2j

    5j

    1j

    6j

    i Z

    Suppose that for each node j for which a link exists from i to j, the optimal path and optimal cost J(j) from j to Z is known. Copyright 2007 Stanley B. Gershwin.c 11

  • Dynamic Example

    Programming Solution

    Then the optimal path from i to Z is the one that minimizes the sum of the costs from i to j and from j to Z. That is,

    J(i) = min [g(i, j) + J(j)]

    j

    where the minimization is performed over all j such that a link

    from i to j exists. This is the Bellman equation .

    This is a recursion or recursive equation because J() appears

    on both sides, although with different arguments.

    J(i) can be calculated from this if J(j) is known for every node j

    such that (i, j) is a link.

    Copyright c 122007 Stanley B. Gershwin.

  • Dynamic Example

    Programming Solution

    Bellmans Principle of Optimality: if i and j are nodes on an optimal path from A to Z, then the portion of that path from A to Z between i and j is an optimal path from i to j.

    A

    Z

    j

    i

    Copyright 2007 Stanley B. Gershwin. c 13

  • { }

    { }

    Dynamic Example

    Programming Solution

    Example: Assume that we have determined that J(O) = 6 and J(J) = 11. To calculate J(K),

    g(K, O) + J(O)J(K) = min

    g(K, J) + J(J)

    3 + 6 = min = 9.

    9 + 11

    Copyright 2007 Stanley B. Gershwin.c 14

  • Dynamic Example

    Programming Solution

    Algorithm 1. Set J(Z) = 0. 2. Find some node i such that

    J(i) has not yet been found, and for each node j in which link (i, j) exists, J(j) is already calculated.

    Assign J(i) according to

    J(i) = min [g(i, j) + J(j)]

    j

    3. Repeat Step 2 until all nodes, including A, have costs calculated.

    Copyright c 152007 Stanley B. Gershwin.

  • KDynamic Example

    Programming Solution

    F

    A

    B 11 L

    5

    6 H

    C

    14

    D

    E

    I

    O

    J

    9

    G

    M

    N 4

    8

    14

    13

    11

    17

    12

    13

    6

    11

    Z

    Copyright 2007 Stanley B. Gershwin. c 16

  • Dynamic Example

    Programming Solution

    The important features of a dynamic programming problem are the state (i) ; the decision (to go to j after i); ( ) the objective function

    Tt=1 g(i(t 1), i(t))

    the cost-to-go function (J(i)) ; the one-step recursion equation that determines J(i)

    (J(i) = minj [g(i, j) + J(j)]);

    that the solution is determined for every i, not just A and not just nodes on the optimal path;

    that J(i) depends on the nodes to be visited after i, not those between A and i. The only thing that matters is the present state and the future;

    that J(i) is obtained by working backwards.

    Copyright 2007 Stanley B. Gershwin.c 17

  • Dynamic Example

    Programming Solution

    This problem was discrete time, discrete state, deterministic. Other versions: discrete time, discrete state, stochastic continuous time, discrete state, deterministic continuous time, discrete state, stochastic continuous time, mixed state, deterministic continuous time, mixed state, stochastic

    in stochastic systems, we optimize the expected cost. Copyright c 182007 Stanley B. Gershwin.

  • ( )

    Programming Discrete time, discrete state

    Stochastic Dynamic

    Suppose g(i, j) is a random variable; or if you are at i and you choose j, you actually go to k with probability p(i, j, k).

    Then the cost of a sequence of choices is random. The objective function is

    T

    E g(i(t 1), i(t))

    t=1

    and we can dene J(i) = E min [g(i, j) + J(j)]

    j

    Copyright 2007 Stanley B. Gershwin. c 19

  • Programming Continuous Time, Mixed State

    Stochastic Example Dynamic

    Context: The planning/scheduling hierarchy Long term: factory design, capital expansion, etc. Medium term: demand planning, stafng, etc. Short term: response to short term events part release and dispatch In this problem, we deal with the response to short term events. The factory and the demand are given to us; we must calculate short term production rates; these rates are the targets that release and dispatch must achieve.

    Copyright c 202007 Stanley B. Gershwin.

  • DynamicProgramming

    Continuous Time, Mixed State

    Stochastic Example

    x1

    x2

    d1

    d2

    u (t)1

    u (t)2 Type 2

    Type 1

    r, p Perfectly exible machine, two part types. i time units required to make Type i parts, i = 1, 2.

    Exponential failures and repairs with rates p and r. Constant demand rates d1, d2. Instantaneous production rates ui(t), i = 1, 2 control variables .

    Downstream surpluses xi(t).

    Copyright c 212007 Stanley B. Gershwin.

  • Programming Continuous Time, Mixed State

    Stochastic Example Dynamic

    Objective: Minimize the difference between cumulative production and cumulative demand.

    The surplus satises xi(t) = Pi(t) Di(t)

    t

    Cumulative Production and Demand production P (t)

    surplus x (t)

    i

    i

    idemand D (t) = d ti

    Copyright c2007 Stanley B. Gershwin. 22

  • Programming Continuous Time, Mixed State

    Stochastic Example Dynamic

    Feasibility: For the problem to be feasible, it must be possible to make approximately diT Type i parts in a long time period of length T, i = 1, 2. (Why approximately?)

    The time required to make diT parts is idiT . During this period, the total up time of the machine ie, the time available for production is approximately r/(r + p)T .

    Therefore, we must have 1d1T + 2d2T r/(r + p)T , or 2 r

    idi r + p

    i=1

    Copyright 2007 Stanley B. Gershwin. c 23

  • Programming Continuous Time, Mixed State

    Stochastic Example Dynamic

    If this condition is not satised, the demand cannot be met. What will happen to the surplus? The feasibility condition is also written

    2 di r

    i=1 i r + p

    where i = 1/i. If there were only one part type, this would be

    r

    d

    r + p

    Look familiar?

    Copyright 2007 Stanley B. Gershwin. c 24

  • Programming Continuous Time, Mixed State

    Stochastic Example Dynamic

    The surplus satises xi(t) = Pi(t) Di(t)

    where t Pi(t) = ui(s)ds; Di(t) = dit

    0

    Therefore dxi(t)

    = ui(t) di dt

    Copyright 2007 Stanley B. Gershwin. c 25

  • Programming Continuous Time, Mixed State

    Stochastic Example Dynamic

    To define the objective more precisely, let there be a function g(x1, x2) such that

    g is convex g(0, 0) = 0

    lim g(x1, x2) = ; lim g(x1, x2) = . x1 x1

    lim g(x1, x2) = ; lim g(x1, x2) = . x2 x2

    Copyright 2007 Stanley B. Gershwin. c 26

  • Programming Continuous Time, Mixed State

    Stochastic Example Dynamic

    Examples:

    g(x1, x2) = A1x12 + A2x2

    2

    g(x1, x2) = A1|x1| + A2|x2|

    g(x1, x2) = g1(x1) + g2(x2) where + gi(xi) = g(i+)xi + g(i)xi ,

    xi + = max(xi, 0), xi = min(xi, 0),

    g(i+) > 0, g(i) > 0.

    Copyright c 272007 Stanley B. Gershwin.

  • Dynamic

    Programming

    Objective:

    Continuous Time, Mixed State

    Stochastic Example

    T min E g(x1(t), x2(t))dt

    0

    x1

    g(x ,x )1 2

    x2

    Copyright 2007 Stanley B. Gershwin.c 28

  • Programming Continuous Time, Mixed State

    Stochastic Example Dynamic

    Constraints: u1(t) 0; u2(t) 0

    Short-term capacity:

    If the machine is down at time t, u1(t) = u2(t) = 0

    Copyright 2007 Stanley B. Gershwin. c 29

  • u1

    Programming Continuous Time, Mixed State

    Stochastic Example Assume the machine is up for a short period [t, t + t]. Let t

    Dynamic

    be small enough so that ui is constant; that is ui(s) = ui(t), s [t, t + t]

    The machine makes ui(t)t parts of type i. The time required to make that number of Type i parts is iui(t)t. Therefore

    iui(t)t t 1/

    i

    or iui(t) 1 1/ 1

    2

    u2

    0 i

    Copyright 2007 Stanley B. Gershwin. c 30

  • Programming Continuous Time, Mixed State

    Stochastic Example Dynamic

    Machine state dynamics: Dene (t) to be the repair state of the machine at time t. (t) = 1 means the machine is up; (t) = 0 means the machine is down.

    prob((t + t) = 0|(t) = 1) = pt + o(t)

    prob((t + t) = 1|(t) = 0) = rt + o(t)

    The constraints may be written iui(t) (t); ui(t) 0

    i

    Copyright 2007 Stanley B. Gershwin. c 31

  • Programming Continuous Time, Mixed State

    Stochastic Example Dynamic

    Dynamic programming problem formulation: T min E g(x1(t), x2(t))dt

    subject to: 0

    dxi(t) = ui(t) di

    dt

    prob((t + t) = 0|(t) = 1) = pt + o(t)

    prob((t + t) = 1|(t) = 0) = rt + o(t)

    iui(t) (t); ui(t) 0 i

    x(0), (0) specified

    Copyright 2007 Stanley B. Gershwin. c 32

  • Dynamic Elements of a DP Problem Programming state: x all the information that is available to determine the future evolution of the system.

    control: u the actions taken by the decision-maker. objective function: J the quantity that must be minimized; dynamics: the evolution of the state as a function of the control variables and random events.

    constraints: the limitations on the set of allowable controls initial conditions: the values of the state variables at the start of the time interval over which the problem is described. There are also sometimes terminal conditions such as in the network example.

    Copyright c 332007 Stanley B. Gershwin.

  • Dynamic Elements of a DP Solution Programming

    control policy: u(x(t), t). A stationary or time-invariant policy is of the form u(x(t)).

    value function: (also called the cost-to-go function) the value J(x, t) of the objective function when the optimal control policy is applied starting at time t, when the initial state is x(t) = x.

    Copyright c 342007 Stanley B. Gershwin.

  • Bellmans Continuous x, t

    Equation Deterministic T

    Problem: min g(x(t), u(t))dt + F (x(T ))

    u(t),0tT 0

    such that dx(t)

    = f(x(t), u(t), t)dt

    x(0) specied

    h(x(t), u(t)) 0

    x Rn, u Rm, f Rn, h Rk, and g and F are scalars. Data: T, x(0), and the functions f, g, h, and F . Copyright c 352007 Stanley B. Gershwin.

  • Bellmans Continuous x, t Equation Deterministic The cost-to-go function is

    T J(x, t) = min g(x(s), u(s))ds + F (x(T ))

    t T J(x(0), 0) = min g(x(s), u(s))ds + F (x(T ))

    0 { } t1 T = min g(x(t), u(t))dt + g(x(t), u(t))dt + F (x(T )) .

    u(t), 0 t1

    0tT

    Copyright 2007 Stanley B. Gershwin. c 36

  • Bellmans Continuous x, t

    Equation Deterministic

    [ ] t1 T = min g(x(t), u(t))dt + min g(x(t), u(t))dt + F (x(T ))

    u(t), 0 u(t), t1 0tt1 t1tT{ t1 }

    = min g(x(t), u(t))dt + J(x(t1), t1) . u(t), 0

    0tt1

    Copyright 2007 Stanley B. Gershwin.c 37

  • Bellmans Continuous x, t

    Equation Deterministic

    where

    T J(x(t1), t1) = min g(x(t), u(t))dt + F (x(T ))

    u(t),t1tT t1

    such that dx(t)

    = f(x(t), u(t), t)dt

    x(t1) specied

    h(x(t), u(t)) 0

    Copyright 2007 Stanley B. Gershwin.c 38

  • { }

    Bellmans Continuous x, t Equation Deterministic Break up [t1, T ] into [t1, t1 + t] [t1 + t, T ] : { t1+t

    J(x(t1), t1) = min g(x(t), u(t))dt u(t1) t1

    +J(x(t1 + t), t1 + t)}

    where t is small enough so that we can approximate x(t) and u(t) with constant x(t1) and u(t1), during the interval. Then, approximately,

    J(x(t1), t1) = min g(x(t1), u(t1))t + J(x(t1 + t), t1 + t) u(t1)

    Copyright 2007 Stanley B. Gershwin.c 39

  • { }

    Bellmans Continuous x, t

    Equation Deterministic

    Or,

    J(x(t1), t1) = min g(x(t1), u(t1))t + J(x(t1), t1)+ u(t1)

    J J (x(t1), t1)(x(t1 + t) x(t1)) + (x(t1), t1)t

    x t

    Note that dx

    x(t1 + t) = x(t1) + t = x(t1) + f(x(t1), u(t1), t1)t dt

    Copyright 2007 Stanley B. Gershwin. c 40

  • { }

    { }

    Bellmans Continuous x, t

    Equation Deterministic

    Therefore

    J(x, t1) = J(x, t1)

    J J + min g(x, u)t + (x, t1)f(x, u, t1)t + (x, t1)t

    u x t where x = x(t1); u = u(t1) = u(x(t1), t1). Then (dropping the t subscript)

    J J (x, t) = min g(x, u) + (x, t)f(x, u, t)

    t u x

    Copyright 2007 Stanley B. Gershwin. c 41

  • ( )

    Bellmans Continuous x, t

    Equation Deterministic

    This is the Bellman equation . It is the counterpart of the recursion equation for the network example.

    If we had a guess of J(x, t) (for all x and t) we could confirm it by

    performing the minimization.

    If we knew J(x, t) for all x and t, we could determine u by performing the

    minimization. U could then be written

    J u = U x, , t .

    x

    This would be a feedback law .

    The Bellman equation is usually impossible to solve analytically or numerically. There are some important special cases that can be solved analytically.

    Copyright 2007 Stanley B. Gershwin. c 42

  • Bellmans Continuous x, t

    Equation Example

    Bang-Bang Control

    min |x|dt 0

    subject to

    dx = u

    dt

    x(0) specied

    1 u 1

    Copyright 2007 Stanley B. Gershwin. c 43

  • { }

    { }

    Bellmans Continuous x, t

    Equation Example

    The Bellman equation is

    J J (x, t) = min |x| + (x, t)u .

    t xu, 1u1

    J(x, t) = J(x) is a solution because the time horizon is infinite and t does not appear explicitly in the problem data (ie, g(x) = |x| is not a function of t. Therefore

    dJ 0 = min |x| + (x)u .

    dxu, 1u1

    J(0) = 0 because if x(0) = 0 we can choose u(t) = 0 for all t. Then x(t) = 0 for all t and the integral is 0. There is no possible choice of u(t) that will make the integral less than 0, so this is the minimum.

    Copyright 2007 Stanley B. Gershwin. c 44

  • Bellmans Continuous x, t

    Equation Example

    The minimum is achieved when

    u =

    Why?

    1 if dJ

    (x) > 0 dx

    1 if dJ

    (x) < 0 dx

    undetermined if dJ

    (x) = 0 dx

    Copyright 2007 Stanley B. Gershwin. c 45

  • Bellmans Continuous x, t

    Equation Example

    Consider the set of x where dJ/dx(x) < 0. For x in that set, u = 1, so

    dJ 0 = |x| + (x)

    dxor dJ

    (x) = |x|dx

    Similarly, if x is such that dJ/dx(x) > 0 and u = 1,

    dJ

    (x) = |x|dx

    Copyright 2007 Stanley B. Gershwin. c 46

  • Bellmans Continuous x, t

    Equation Example

    To complete the solution, we must determine where dJ/dx > 0, < 0, and = 0. We already know that J(0) = 0. We must have J(x) > 0 for all

    x 0 because |x| > 0 so the integral of |x(t)| must be positive.= Since J(x) > J(0) for all x 0, we must have =

    dJ (x) < 0 for x < 0

    dx

    dJ

    (x) > 0 for x > 0

    dx

    Copyright 2007 Stanley B. Gershwin. c 47

  • Bellmans Continuous x, t

    Equation Example

    Therefore

    dJ

    (x) >= x

    dx

    so

    1 J = x 2

    2 and 1 if x < 0

    u = 0 if x = 0 1 if x > 0

    Copyright 2007 Stanley B. Gershwin. c 48

  • Continuous x, t,Discrete

    Stochastic { T } Bellmans

    Equation

    J(x(0), (0), 0) = min E g(x(t), u(t))dt + F (x(T ))

    u 0

    such that dx(t)

    = f(x, , u, t)dt

    prob [(t + t) = = = ijt for all i, j, i i | (t) j] = j

    x(0), (0) specied

    h(x(t), (t), u(t)) 0

    Copyright 2007 Stanley B. Gershwin.c 49

  • Bellmans

    Equation

    Continuous x, t,Discrete

    Stochastic

    Getting the Bellman equation in this case is more complicated because changes by large amounts when it changes. Let H() be some function of . We need to calculate

    EH((t + t)) = E {H((t + t)) | (t)}

    =

    H(j)prob {(t + t) = j | (t)}

    j

    Copyright 2007 Stanley B. Gershwin. c 50

  • ( )

    Bellmans

    Equation

    Continuous x, t,Discrete

    Stochastic

    = H(j)j(t)t + H((t)) 1 j(t)t + o(t)

    j j=(t)=(t)

    = H(j)j(t)t + H((t)) 1 + (t)(t)t + o(t) j =(t)

    E {H((t + t)) | (t)} = H((t)) + H(j)j(t) t + o(t)

    j

    We use this in the derivation of the Bellman equation.

    Copyright 2007 Stanley B. Gershwin.c 51

  • Bellmans

    Equation

    Continuous x, t,Discrete

    Stochastic

    { } T J(x(t), (t), t) = min E g(x(s), u(s))ds + F (x(T ))

    u(s), t

    ts

  • Bellmans

    Equation

    t+t = min E g(x(s), u(s))ds

    Continuous x, t,Discrete

    Stochastic

    u(s), t

    0st+t

    [ ] T + min E g(x(s), u(s))ds + F (x(T ))

    u(s), t+t

    t+tsT

    Copyright 2007 Stanley B. Gershwin. c 53

  • Bellmans

    Equation

    Continuous x, t,Discrete

    Stochastic

    = min u(s),

    E

    { t+t t

    g(x(s), u(s))ds

    tst+t

    +J(x(t + t), (t + t), t + t)

    Next, we expand the second term in a Taylor series about x(t). We leave (t + t) alone, for now.

    Copyright 2007 Stanley B. Gershwin.c 54

  • { }

    Bellmans

    Equation

    Continuous x, t,Discrete

    Stochastic

    J(x(t), (t), t) =

    min E g(x(t), u(t))t + J(x(t), (t + t), t) +

    u(t)

    J J (x(t), (t + t), t)x(t) + (x(t), (t + t), t)t + o(t).

    x t where x(t) = x(t + t) x(t) = f(x(t), (t), u(t), t)t + o(t)

    Copyright c 552007 Stanley B. Gershwin.

  • Bellmans

    Equation

    Continuous x, t,Discrete

    Stochastic

    Using the expansion of EH((t + t)),

    J(x(t), (t), t) = min g(x(t), u(t))t u(t)

    + J(x(t), (t), t) + J(x(t), j, t)j(t)t j J J

    + (x(t), (t), t)x(t) + (x(t), (t), t)t + o(t)x t

    We can clean up notation by replacing x(t) with x, (t) with , and u(t) with u. Copyright 2007 Stanley B. Gershwin. c 56

  • Bellmans

    Equation

    Continuous x, t,Discrete

    Stochastic

    J(x, , t) =

    min u g(x, u)t + J(x, , t) +

    j

    J(x, j, t)jt J J

    + (x, , t)x + (x, , t)t + o(t)

    x t

    We can subtract J(x, , t) from both sides and use the expression for x to get ...

    Copyright 2007 Stanley B. Gershwin. c 57

  • Bellmans

    Equation

    Continuous x, t,Discrete

    Stochastic

    0 = min g(x, u)t + J(x, j, t)jt u

    j J J

    + x

    (x, , t)f(x, , u, t)t + t

    (x, , t)t + o(t) or,

    Copyright 2007 Stanley B. Gershwin. c 58

  • { }

    Bellmans

    Equation

    Continuous x, t,Discrete

    Stochastic

    J (x, , t) = J(x, j, t)j+

    t j

    J min g(x, u) + (x, , t)f(x, , u, t)

    u x

    Bad news: usually impossible to solve; Good news: insight.

    Copyright c 592007 Stanley B. Gershwin.

  • Bellmans

    Equation

    Continuous x, t,Discrete

    Stochastic

    An approximation: when T is large and f is not a function of t, typical trajectories look like this:

    x

    t

    Copyright 2007 Stanley B. Gershwin. c 60

  • { }

    Bellmans

    Equation

    Continuous x, t,Discrete

    Stochastic

    That is, in the long run, x approaches a steady-state probability distribution. Let J be the expected value of g(x, u), where u is the optimal control. Suppose we started the problem with x(0) a random variable whose probability distribution is the steady-state distribution. Then, for large T , T

    EJ = minu E 0 g(x(t), u(t))dt + F (x(T ))

    JT

    Copyright 2007 Stanley B. Gershwin. c 61

  • Bellmans

    Equation

    Continuous x, t,Discrete

    Stochastic

    For x(0) and (0) specied

    J(x(0), (0), 0) JT + W (x(0), (0))

    or, more generally, for x(t) = x and (t) = specied, J(x, , t) J(T t) + W (x, )

    Copyright 2007 Stanley B. Gershwin. c 62

  • Flexible

    Manufacturing

    System Control

    Single machine, multiple part types. x, u, d are N -dimensional vectors. T

    min E g(x(t))dt

    subject to: 0

    dxi(t) = ui(t) di, i = 1, ..., N

    dt

    prob((t + t) = 0|(t) = 1) = pt + o(t)

    prob((t + t) = 1|(t) = 0) = rt + o(t)

    iui(t) (t); ui(t) 0 i

    x(0), (0) specified

    Copyright 2007 Stanley B. Gershwin. c 63

  • { }

    Flexible

    Manufacturing

    System Control

    Dene () = {u| i iui }. Then, for = 0, 1,

    J (x, , t) = J(x, j, t)j+

    t j

    J min g(x) + (x, , t)(u d)

    u() x

    Copyright 2007 Stanley B. Gershwin. c 64

  • { }

    Flexible

    Manufacturing

    System Control

    Approximating J with J(T t) + W (x, ) gives:

    J = (J(T t) + W (x, j))j+ j

    W min g(x) + (x, , t)(u d)

    u() x Recall that

    j = 0... j

    Copyright 2007 Stanley B. Gershwin. c 65

  • { }

    Flexible

    Manufacturing

    System Control

    so

    J = W (x, j)j+ j

    W min g(x) + (x, , t)(u d)

    u() x

    for = 0, 1

    Copyright 2007 Stanley B. Gershwin. c 66

  • ,[ ]

    Flexible

    Manufacturing

    System Control

    This is actually two equations, one for = 0, one for = 1.

    W J = g(x) + W (x, 1)r W (x, 0)r (x, 0)d,

    x for = 0,

    W J = g(x) + W (x, 0)p W (x, 1)p + min (x, 1)(u d)

    u(1) x for = 1.

    Copyright 2007 Stanley B. Gershwin.c 67

  • ,[ ]

    Flexible Single-part-type case

    Manufacturing

    System Control Technically, not exible! Now, x and u are scalars, and

    (1) = [0, 1/ ] = [0, ]

    dW J = g(x) + W (x, 1)r W (x, 0)r (x, 0)d,

    dxfor = 0,

    dW J = g(x) + W (x, 0)p W (x, 1)p + min (x, 1)(u d)

    0u dx for = 1.

    Copyright 2007 Stanley B. Gershwin. c 68

  • Flexible Single-part-type case

    Manufacturing

    System Control

    See book, Sections 2.6.2 and 9.3; see Probability slides #

    91120.

    When = 0, u = 0.

    When = 1,

    if dW < 0, u = ,dx

    if dW = 0, u unspecied,dx

    if dW > 0, u = 0.dx

    Copyright c 692007 Stanley B. Gershwin.

  • Flexible Single-part-type case

    Manufacturing

    System Control

    W (x, ) has been shown to be convex in x. If the minimum of W (x, 1) occurs at x = Z and W (x, 1) is differentiable for all x, then

    dW < 0 x < Z dx

    dW = 0 x = Zdx

    dW > 0 x > Z dx

    Therefore, if x < Z, u = , if x = Z, u unspecied, if x > Z, u = 0. Copyright c 702007 Stanley B. Gershwin.

  • Flexible Single-part-type case ManufacturingSystem Control Surplus, or inventory/backlog:

    Production policy: Choose Z (the hedging point ) Then, if = 1,

    if x < Z, u = ,

    if x = Z, u = d,

    if x > Z, u = 0;

    if = 0,

    u = 0.

    How do we choose Z?

    dx(t) = u(t) d

    dt Cumulative

    Production and Demand production

    d t + Z

    hedging point Z

    surplus x(t)

    demand dt

    t

    Copyright 2007 Stanley B. Gershwin. c 71

  • Flexible Single-part-type case

    Manufacturing

    System Control Determination of Z

    Z J = Eg(x) = g(Z)P (Z, 1)+ g(x) [f(x, 0) + f(x, 1)] dx

    in which P and f form the steady-state probability distribution of

    x. We choose Z to minimize J . P and f are given by

    f(x, 0) = Aebx

    f(x, 1) = A d ebx d

    P (Z, 1) = Apd ebZ

    Copyright 2007 Stanley B. Gershwin. c 72

  • [ ]

    Flexible Single-part-type case ManufacturingSystem Control Determination of Z where

    r pb =

    d d and A is chosen so that Z

    [f(x, 0) + f(x, 1)] dx + P (Z, 1) = 1

    After some manipulation, A =

    bp( d) e bZ

    db( d) + pand

    db( d)P (Z, 1) =

    db( d) + p

    Copyright 2007 Stanley B. Gershwin. c 73

  • Flexible Single-part-type case

    Manufacturing

    System Control Determination of Z

    Since g(x) = g+x+ + gx , ifZ 0, then Z

    J = gZP (Z, 1) gx [f(x, 0) + f(x, 1)] dx;

    ifZ > 0, 0 J = g+ZP (Z, 1) gx [f(x, 0) + f(x, 1)] dx

    Z + g+x [f(x, 0) + f(x, 1)] dx.

    0

    Copyright 2007 Stanley B. Gershwin. c 74

  • [ ]

    Flexible Single-part-type case

    Manufacturing

    System Control Determination of Z

    To minimize J: ( )

    ln Kb(1 + g )

    if g+ Kb(g+ + g) < 0, Z = g+

    . b

    if g+ Kb(g+ + g) 0, Z = 0

    where K = p p 1 p

    = = b(bd d2b + p) b(r + p)( d) b db( d) + p

    Z is a function of d, , r, p, g+, g.

    Copyright 2007 Stanley B. Gershwin. c 75

  • { ( )}

    { ( )}

    Flexible Single-part-type case ManufacturingSystem Control Determination of Z That is, we choose Z such that

    e bZ = min 1,Kb g+ + g

    g+ or

    bZ 1 g+ e = max 1, Kb g+ + g

    Copyright 2007 Stanley B. Gershwin. c 76

  • ( ) [ ]

    [ ]

    Flexible Single-part-type case ManufacturingSystem Control Determination of Z

    0 prob(x 0) = (f(x, 0) + f(x, 1))dx

    ( ) 0d = A 1 + e bxdx

    d d 1

    = A 1 + = A d b b( d)

    bp( d) bZ = e db( d) + p b( d)

    p bZ = e db( d) + p

    Copyright 2007 Stanley B. Gershwin. c 77

  • { ( )} { }

    Flexible Single-part-type case

    Manufacturing

    System Control Determination of Z

    Or, [ ] { ( )} prob(x 0) =

    p max 1,

    1 g+

    db( d) + p Kb g+ + g

    It can be shown that p

    Kb = p + bd( d)

    Therefore prob(x 0) = Kb max 1,

    1 g+

    Kb g+ + g p g+

    = max , p + bd( d) g+ + g

    Copyright 2007 Stanley B. Gershwin. c 78

  • Flexible Single-part-type case ManufacturingSystem Control Determination of Z That is, if

    p >

    g+ , then Z = 0 and p + bd( d) g+ + g

    prob(x 0) = p

    ;

    p + bd( d)

    if p

    0 and

    p + bd( d) g+ + g

    prob(x 0) = g+

    . g+ + g

    This looks a lot like the solution of the newsboy problem. Copyright 2007 Stanley B. Gershwin. c 79

  • Flexible Single-part-type case Manufacturing

    Z vs. dSystem Control Base values: g+ = 1, g = 10 d = .7, = 1., r = .09, p = .01.

    100

    90

    80

    70

    60

    Z 50

    40

    30

    20

    10

    0

    d 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

    Copyright 2007 Stanley B. Gershwin. c 80

  • Flexible Single-part-type case

    System Control Manufacturing

    Z vs. g+

    Base values: g+ = 1, g = 10 d = .7, = 1., r = .09, p = .01.

    70

    60

    50

    40

    0 0.5 1 1.5 2 2.5 3 g+

    Z 30

    20

    10

    0

    3.5

    Copyright 2007 Stanley B. Gershwin. c 81

  • Flexible Single-part-type case

    System Control Manufacturing

    Z vs. g

    Base values: g+ = 1, g = 10 d = .7, = 1., r = .09, p = .01.

    14

    12

    10

    8 Z

    6

    4

    2

    0 0 1 2 3 4 5 6 7 8 9 10 11

    g

    Copyright 2007 Stanley B. Gershwin. c 82

  • Flexible Single-part-type case

    System Control Manufacturing

    Z vs. p

    Base values: g+ = 1, g = 10 d = .7, = 1., r = .09, p = .01.

    1400

    1200

    1000

    800

    Z

    600

    400

    200

    0

    0.005 0.01 0.015 0.02 0.025 0.03 0.035

    p 0 0.04

    Copyright 2007 Stanley B. Gershwin.c 83

  • Flexible Two-part-type case

    System Control Manufacturing

    x1

    x2

    d1

    d2

    u (t)1

    u (t)2 Type 2

    Type 1

    r, p

    u11/ 1

    1/ 2

    u2

    0

    Capacity set (1) when machine is up.

    Copyright 2007 Stanley B. Gershwin. c 84

  • { }

    Flexible Two-part-type case

    Manufacturing

    System Control

    We must nd u(x, ) to satisfy

    W min (x, , t) u

    u() x Partial solution of LP:

    If W/x1 > 0 and W/x2 > 0, u1 = u2 = 0. If W/x1 < W/x2 < 0, u1 = 1, u2 = 0. If W/x2 < W/x1 < 0, u2 = 2, u1 = 0.

    Problem: no complete analytical solution available.

    Copyright c 852007 Stanley B. Gershwin.

  • 1

    0

    2

    Flexible Two-part-type case ManufacturingSystem Control Case: Exact solution if Z = (Z1, Z2) = 0

    x2

    x1

    1 2u = u = 0

    dx dt

    2

    2u = 0

    u = 01

    1u = 1

    2

    u =

    u11/

    1/ 2

    u2

    0

    u11/ 1

    1/ 2

    u2

    1/ 1

    1/

    u2

    0 u1

    Copyright 2007 Stanley B. Gershwin. c 86

  • 1

    2

    0

    Flexible Two-part-type case ManufacturingSystem Control Case: Approximate solution if Z > 0

    x2 1 2u = u = 0

    dx dt

    2

    2u = 0

    u = 01

    1u = 1

    2

    u =

    u11/

    1/ 2

    u2

    0

    1/ 1

    1/

    u2

    0

    u11/ 1

    1/ 2

    u2

    x1

    u1

    Copyright 2007 Stanley B. Gershwin. c 87

  • 45

    Flexible Two-part-type case

    System Control Manufacturing

    Two parts, multiple machines without buffers: e 12

    4

    61e

    e

    34e

    23e

    3

    12

    x2

    Z

    6 x1

    5

    56e

    6

    1 2

    3

    4

    5

    u 2

    e34

    12e

    u1

    I

    e23

    e45

    e56

    d 61e

    Copyright 2007 Stanley B. Gershwin.c 88

  • Flexible Two-part-type case

    Manufacturing

    System Control

    Proposed approximate solution for multiple-part, single machine system: Rank order the part types, and bring them to their hedging points in that order.

    Copyright 2007 Stanley B. Gershwin. c 89

  • Flexible Single-part-type case

    System Control Manufacturing

    Surplus and tokens

    Operating Machine M according to the hedging point policy is equivalent to operating this assembly system according to a nite

    B buffer policy. D

    M

    S

    FG

    Copyright 2007 Stanley B. Gershwin.c 90

  • Flexible Single-part-type case

    System Control Manufacturing

    Surplus and tokens

    D is a demand generator . Whenever a demand arrives, D

    sends a token to B.

    S is a synchronization machine. S is perfectly reliable and in

    nitely fast.

    M

    D

    S

    FG

    B

    FG is a nite nished goods buffer. B is an innite backlog buffer.

    Copyright c 912007 Stanley B. Gershwin.

  • Flexible Single-part-type case

    Manufacturing

    System Control Material/token policies

    Operator An operation cannot take Machine place unless there is a

    Part Part token available. OperationConsumable Waste

    Tokens authorize Token Token

    production.

    These policies can often be implemented either with nite

    buffer space, or a nite number of tokens. Mixtures are also

    possible.

    Buffer space could be shelf space, or oor space indicated with paint or tape.

    Copyright c 922007 Stanley B. Gershwin.

  • Multi-stage Proposed policy systems

    To control M B M B M1 1 2 2 3

    add an information flow system:

    B1 M B M2 2 3M1

    S S2 3

    D

    S1 BB1

    SB2

    BB2

    SB3

    BB3

    SB1

    Copyright 2007 Stanley B. Gershwin. c 93

  • Multi-stage Proposed policy systems

    B1 M B M2 2 3M1

    S S2 3

    D

    S1 BB1

    SB2

    BB2

    SB3

    BB3

    SB1

    Bi are material buffers and are nite. SBi are surplus buffers and are nite. BBi are backlog buffers and are innite. The sizes of Bi and SBi are control parameters. Problem: predicting the performance of this system.

    Copyright c 942007 Stanley B. Gershwin.

  • Multi-stage

    systems

    Three Views of Scheduling

    Three kinds of scheduling policies, which are sometimes exactly the same.

    Surplus-based: make decisions based on how much production exceed demand.

    Time-based: make decisions based on how early or late a product is.

    Token-based: make decisions based on presence or absence of tokens.

    Copyright c 952007 Stanley B. Gershwin.

  • Multi-stage Objective of Scheduling systems Surplus and time

    and Demand

    earliness

    production P(t)

    demand D(t)

    surplus/backlog x(t)

    Objective is to keep cumulative production close to cumulative demand.

    Cumulative

    Production

    Surplus-based policies look at vertical differences between the graphs.

    Time-based policies look at the horizontal t differences.

    Copyright 2007 Stanley B. Gershwin.c 96

  • Multi-stage Other policies systems CONWIP, kanban, and hybrid

    CONWIP: finite population, infinite buffers kanban: infinite population, finite buffers hybrid: finite population, finite buffers

    Copyright c 972007 Stanley B. Gershwin.

  • Multi-stage Other policies systems CONWIP, kanban, and hybrid CONWIP

    Supply Demand

    Token flow

    Demand is less than capacity. How does the number of tokens affect performance (production rate, inventory)?

    Copyright c 982007 Stanley B. Gershwin.

  • 0.85

    0.855

    0.86

    P

    Multi-stage Other policies systems CONWIP, kanban, and hybrid

    0.835

    0.84

    0.845

    0.865

    0.87

    0.875

    0 20 40 60 80 100 120 0

    5

    10

    20

    25

    30

    Aver

    age

    Buffe

    r Lev

    el

    n1 n2 n3

    15

    0 20 40 60

    Population Population

    80 100 120

    cCopyright 2007 Stanley B. Gershwin. 99

  • Multi-stage Other policies

    systems Basestock

    Demand

    Copyright 2007 Stanley B. Gershwin. c 100

  • Multi-stage Other policies systems FIFO First-In, First Out. Simple conceptually, but you have to keep track of arrival times.

    Leaves out much important information: due date, value of part, current surplus/backlog state, etc.

    Copyright 2007 Stanley B. Gershwin.c 101

  • Multi-stage Other policies systems EDD Earliest due date. Easy to implement. Does not consider work remaining on the item, value of the item, etc..

    Copyright 2007 Stanley B. Gershwin. c 102

  • Multi-stage Other policies systems SRPT Shortest Remaining Processing Time Whenever there is a choice of parts, load the one with least remaining work before it is finished.

    Variations: include waiting time with the work time. Use expected time if it is random.

    Copyright 2007 Stanley B. Gershwin.c 103

  • Multi-stage Other policies systems Critical ratio Widely used, but many variations. One version:

    Processing time remaining until completion Dene CR =

    Due date - Current time Choose the job with the highest ratio (provided it is positive). If a job is late, the ratio will be negative, or the denominator will be zero, and that job should be given highest priority.

    If there is more than one late job, schedule the late jobs in SRPT order.

    Copyright 2007 Stanley B. Gershwin.c 104

  • Multi-stage Other policies systems Least Slack This policy considers a parts due date. Define slack = due date - remaining work time When there is a choice, select the part with the least slack.

    Variations involve different ways of estimating remaining time.

    Copyright c 1052007 Stanley B. Gershwin.

  • Multi-stage Other policies systems Drum-Buffer-Rope Due to Eli Goldratt. Based on the idea that every system has a bottleneck. Drum: the common production rate that the system operates at, which is the rate of ow of the bottleneck.

    Buffer: DBR establishes a CONWIP policy between the entrance of the system and the bottleneck. The buffer is the CONWIP population.

    Rope: the limit on the difference in production between different stages in the system.

    But: What if bottleneck is not well-dened?

    Copyright c 1062007 Stanley B. Gershwin.

  • Conclusions

    Many policies and approaches. No simple statement telling which is better. Policies are not all well-dened in the literature or in practice. My opinion: This is because policies are not derived from rst principles. Instead, they are tested and compared. Currently, we have little intuition to guide policy development and choice.

    Copyright 2007 Stanley B. Gershwin. c 107

  • MIT OpenCourseWarehttp://ocw.mit.edu

    2.852 Manufacturing Systems Analysis Spring 2010

    For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

  • MIT 2.852

    Manufacturing Systems Analysis

    Lecture 1: Overview

    Stanley B. Gershwin

    http://web.mit.edu/manuf-sys

    Massachusetts Institute of Technology

    Spring, 2010

    c2.852 Manufacturing Systems Analysis 1/44 Copyright 2010 Stanley B. Gershwin.

  • Books

    Required Manufacturing Systems Engineering (MSE) by Stanley B. Gershwin ... obtainable from author.

    Optional Factory Physics by Hopp and Spearman The Goal by Goldratt Stochastic Models of Manufacturing Systems by Buzacott and

    Shanthikumar Production Systems Engineering by Li and Meerkov

    2.852 Manufacturing Systems Analysis 3/44 Copyright c2010 Stanley B. Gershwin.

  • Course Overview Goals

    To explain important measures of system performance.

    To show the importance of random, potentially disruptive events in factories.

    To give some intuition about behavior of these systems.

    To describe some current tools and methods.

    2.852 Manufacturing Systems Analysis 4/44 Copyright c2010 Stanley B. Gershwin.

  • Problems

    Manufacturing systems engineering is not as well-developed as most other elds of engineering.

    Practitioners are encouraged to rely on gurus, slogans, and black boxes.

    There is a gap between theoreticians and practitioners.

    2.852 Manufacturing Systems Analysis 5/44 Copyright c2010 Stanley B. Gershwin.

  • Problems

    The research literature does not always focus on real-world problems ... but practitioners are often unaware of what does exist.

    Terminology, notation, basic assumptions are not standardized.

    There is a separation of product, process, and system design.

    2.852 Manufacturing Systems Analysis 6/44 Copyright c2010 Stanley B. Gershwin.

  • Problems

    Confusion about objectives: maximize capacity? minimize capacity variability? maximize capacity utilization? minimize lead time? minimize lead time variability? maximize prot?

    Systems issues are often studied last, if at all.

    2.852 Manufacturing Systems Analysis 7/44 Copyright c2010 Stanley B. Gershwin.

  • Problems

    Manufacturing gets no respect. Systems not designed with engineering methods. Product designers and sales sta are not informed of manufacturing

    costs and constraints.

    Black box thinking. Factories not treated as systems to be analyzed and engineered. Simplistic ideas often used for management and design.

    2.852 Manufacturing Systems Analysis 8/44 Copyright c2010 Stanley B. Gershwin.

  • Problems

    Reliable systems intuition is lacking. As a consequence, there is ...

    Management by software Managers buy software to make production decisions, rather than to

    aid in making decisions.

    Management by slogan Gurus provide simple solutions which sometimes work. Sometimes.

    2.852 Manufacturing Systems Analysis 9/44 Copyright c2010 Stanley B. Gershwin.

  • Observation

    When a system is not well understood, rules proliferate.

    This is because rules are developed to regulate behavior.

    But the rules lead to unexpected, undesirable behavior. (Why?)

    New rules are developed to regulate the new behavior.

    Et cetera.

    2.852 Manufacturing Systems Analysis 10/44 Copyright c2010 Stanley B. Gershwin.

  • Observation Example

    A factory starts with one rule: do the latest jobs rst .

    Over time, more and more jobs are later and later.

    A new rule is added: treat the highest priority customers orders as though their due dates are two weeks earlier than they are.

    The low priority customers nd other suppliers, but the factory is still late.

    2.852 Manufacturing Systems Analysis 11/44 Copyright c2010 Stanley B. Gershwin.

  • Observation Example

    Why?

    There are signicant setup times from part family to part family. If setup times are not considered, changeovers will occur too often, and waste capacity.

    Any rules that that do not consider setup times in this factory will perform poorly.

    2.852 Manufacturing Systems Analysis 12/44 Copyright c2010 Stanley B. Gershwin.

  • Denitions

    Manufacturing: the transformation of material into something useful and portable.

    Manufacturing System: A manufacturing system is a set of machines, transportation elements, computers, storage buers, people, and other items that are used together for manufacturing. These items are resources.

    2.852 Manufacturing Systems Analysis 13/44 Copyright c2010 Stanley B. Gershwin.

  • Denitions

    Manufacturing System:

    Alternate terms: Factory Production system Fabrication facility

    Subsets of manufacturing systems, which are themselves systems, are sometimes called cells, work centers, or work stations .

    2.852 Manufacturing Systems Analysis 14/44 Copyright c2010 Stanley B. Gershwin.

  • Basic Issues

    Increasingly, there are ... frequent new product introductions, and short product lifetimes, and short process lifetimes.

    Consequently, ...

    factories are built and rebuilt frequently, and there is not much time to tinker with a factory. It must be operational

    quickly.

    2.852 Manufacturing Systems Analysis 15/44 Copyright c2010 Stanley B. Gershwin.

  • Basic Issues Consequent Needs

    Tools to predict performance of proposed factory design.

    Tools for optimal real-time management (control) of factories.

    Manufacturing Systems Engineering professionals who understand factories as complex systems.

    2.852 Manufacturing Systems Analysis 16/44 Copyright c2010 Stanley B. Gershwin.

  • Basic Issues Quantity, Quality and Variability

    Quantity how much and when.

    Quality how well.

    In this course, we emphasize quantity.

    General Statement: Variability is the enemy of manufacturing.

    General Statement: Know your enemy!

    2.852 Manufacturing Systems Analysis 17/44 Copyright c2010 Stanley B. Gershwin.

  • Basic Issues More Denitions

    Make to Stock (O the Shelf): items available when a customer arrives appropriate for large volumes, limited product variety, cheap raw

    materials

    Make to Order: production started only after order arrives appropriate for custom products, low volumes, expensive raw materials

    2.852 Manufacturing Systems Analysis 18/44 Copyright c2010 Stanley B. Gershwin.

  • Basic Issues Conicting Objectives

    Make to Stock: large nished goods inventories needed to prevent stockouts small nished goods inventories needed to keep costs low

    Make to Order: excess production capacity (low utilization) needed to allow early,

    reliable delivery promises minimal production capacity (high utilization) needed to to keep costs

    low

    2.852 Manufacturing Systems Analysis 19/44 Copyright c2010 Stanley B. Gershwin.

  • Basic Issues Concepts

    Complexity: collections of things have properties that are non-obvious functions of the properties of the things collected.

    Non-synchronism (especially randomness) and its consequences: Factories do not run like clockwork.

    2.852 Manufacturing Systems Analysis 20/44 Copyright c2010 Stanley B. Gershwin.

  • Basic Issues What is an Operation?

    Operation Part Part

    Waste

    Machine Operator

    Consumable

    Nothing happens until everything is present.

    2.852 Manufacturing Systems Analysis 21/44 Copyright c2010 Stanley B. Gershwin.

  • Basic Issues Waiting

    Whatever does not arrive last must wait.

    Inventory: parts waiting.

    Underutilization: machines waiting.

    Idle work force: operators waiting.

    2.852 Manufacturing Systems Analysis 22/44 Copyright c2010 Stanley B. Gershwin.

  • Basic Issues Causes of Poor Performance

    Operation Part Part

    Waste

    Machine Operator

    Consumable

    Reductions in the availability, or ...

    Variability in the availability ...

    ... of any one of these items causes waiting in the rest of them and reduces

    performance of the system.

    2.852 Manufacturing Systems Analysis 23/44 Copyright c2010 Stanley B. Gershwin.

  • Kinds of Systems Flow shop

    ... or Flow line , Transfer line , or Production line.

    Machine Buffer

    Traditionally used for high volume, low variety production.

    What are the buers for?

    2.852 Manufacturing Systems Analysis 24/44 Copyright c2010 Stanley B. Gershwin.

  • Kinds of Systems Assembly system

    Assembly systems are trees, and may involve thousands of parts.

    2.852 Manufacturing Systems Analysis 25/44 Copyright c2010 Stanley B. Gershwin.

  • Loops Closed loop (1a)

    Limited number of pallets or xtures:

    Empty Pallet Buffer

    Raw Part Input

    Finished Part Output

    Pallets or xtures travel in a closed loop. Routes are determined. The number of pallets in the loop is constant.

    Pallets or xtures take up space and may be expensive.

    2.852 Manufacturing Systems Analysis 26/44 Copyright c2010 Stanley B. Gershwin.

  • Loops Closed loop (1b)

    Limited number of tokens:

    Empty Token Buffer

    Raw Part Input

    Finished Part Output

    Tokens travel in a closed loop. Routes are determined. The number of pallets in the loop is constant.

    Tokens take up no space and cost nothing.

    What are the tokens for?

    2.852 Manufacturing Systems Analysis 27/44 Copyright c2010 Stanley B. Gershwin.

  • Loops Reentrant (2)

    System with reentrant ow and two part types

    M 1

    B11

    B21

    M 2 M 3

    M 4

    B51 B12 B22

    B61

    B32 B B31

    B41

    71

    Type 2 Type 1Type 1 Type 2

    Routes are determined. The number of parts in the loop varies.

    Semiconductor fabrication is highly reentrant.

    2.852 Manufacturing Systems Analysis 28/44 Copyright c2010 Stanley B. Gershwin.

  • Loops Rework loop (3)

    rework

    rejectinspection

    Routes are random. The number of parts in the loop varies.

    2.852 Manufacturing Systems Analysis 29/44 Copyright c2010 Stanley B. Gershwin.

  • Kinds of Systems Job shop

    Machines not organized according to process ow.

    Often, machines grouped by department: mill department lathe department etc.

    Great variety of products.

    Dierent products follow dierent paths.

    Complex management.

    2.852 Manufacturing Systems Analysis 30/44 Copyright c2010 Stanley B. Gershwin.

  • Two Issues

    Ecient design of systems;

    Ecient operation of systems after they are built.

    2.852 Manufacturing Systems Analysis 31/44 Copyright c2010 Stanley B. Gershwin.

  • Time

    Most factory performance measures are about time.

    production rate: how much is made in a given time. lead time: how much time before delivery. cycle time: how much time a part spends in the factory. delivery reliability: how often a factory delivers on time. capital pay-back period: the time before the company get its

    investment back.

    2.852 Manufacturing Systems Analysis 32/44 Copyright c2010 Stanley B. Gershwin.

  • Time

    Time appears in two forms:

    delay capacity utilization

    Every action has impact on both.

    2.852 Manufacturing Systems Analysis 33/44 Copyright c2010 Stanley B. Gershwin.

  • Time Delay

    An operation that takes 10 minutes adds 10 minutes to the delay that

    a workpiece experiences while undergoing that operation; every other workpiece experiences that is waiting while the rst is being

    processed.

    2.852 Manufacturing Systems Analysis 34/44 Copyright c2010 Stanley B. Gershwin.

  • Time Capacity Utilization

    An operation that takes 10 minutes takes up 10 minutes of the available time of a machine, an operator, or other resources.

    Since there are a limited number of minutes of each resource available, there are a limited number of operations that can be done.

    2.852 Manufacturing Systems Analysis 35/44 Copyright c2010 Stanley B. Gershwin.

  • Time More Denitions

    Operation Time: the time that a machine takes to do an operation.

    Production Rate: the average number of parts produced in a time unit. (Also called throughput. )

    If nothing interesting ever happens (no failures, etc.),

    Production rate = 1

    operation time

    ... but something interesting always happens.

    2.852 Manufacturing Systems Analysis 36/44 Copyright c2010 Stanley B. Gershwin.

  • Time More Denitions

    Capacity: the maximum possible production rate of a manufacturing system, for systems that are making only one part type. Short term capacity: determined by the resources available right now. Long term capacity: determined by the average resource availability.

    Capacity is harder to dene for systems making more than one part type. Since it is hard to dene, it is very hard to calculate.

    2.852 Manufacturing Systems Analysis 37/44 Copyright c2010 Stanley B. Gershwin.

  • Randomness, Variability, Uncertainty More Denitions

    Uncertainty: Incomplete knowledge.

    Variability: Change over time.

    Randomness: A specic kind of incomplete knowledge that can be quantied and for which there is a mathematical theory.

    2.852 Manufacturing Systems Analysis 38/44 Copyright c2010 Stanley B. Gershwin.

  • Randomness, Variability, Uncertainty

    Factories are full of random events: machine failures changes in orders quality failures human variability

    The economic environment is uncertain demand variations supplier unreliability changes in costs and prices

    2.852 Manufacturing Systems Analysis 39/44 Copyright c2010 Stanley B. Gershwin.

  • Randomness, Variability, Uncertainty

    Therefore, factories should be

    designed as reliably as possible, to minimize the creation of variability;

    designed with shock absorbers, to minimize the propagation of variability;

    operated in a way that minimizes the creation of variability;

    operated in a way that minimizes the propagation of variability.

    2.852 Manufacturing Systems Analysis 40/44 Copyright c2010 Stanley B. Gershwin.

  • Randomness, Variability, Uncertainty

    Therefore, all engineers should know probability... especially manufacturing systems engineers .

    Probability is an important prerequisite for this course.

    2.852 Manufacturing Systems Analysis 41/44 Copyright c2010 Stanley B. Gershwin.

  • The Course Mechanics

    Reading: Mainly Chapters 29 of MSE . (Chapter 9 up to 9.3.)

    Grading: project and class participation.

    Homework optional.

    2.852 Manufacturing Systems Analysis 42/44 Copyright c2010 Stanley B. Gershwin. .

  • The Course Topics

    Probability Basics, Markov processes, queues, other examples.

    Transfer lines Models, exact analysis of small systems, approximations of large

    systems.

    Extensions of transfer line models Assembly/disassembly, loops, system optimization

    Real-time scheduling

    Quality/Quantity interactions

    New material

    2.852 Manufacturing Systems Analysis 43/44 Copyright c2010 Stanley B. Gershwin.

  • The Course

    Emphasis on mathematical modeling and analysis.

    Emphasis on intuition.

    Comparison with 2.854: Narrower and deeper.

    2.852 Manufacturing Systems Analysis 44/44 Copyright c2010 Stanley B. Gershwin.

  • For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

    MIT OpenCourseWare http://ocw.mit.edu

    2.852 Manufacturing Systems Analysis Spring 2010

    For information about citing these materials or our Terms of Use,visit:http://ocw.mit.edu/terms.

  • MIT 2.852

    Manufacturing Systems Analysis

    Lecture 14-16 Line Optimization

    Stanley B. Gershwin

    Spring, 2007

    Copyright c2007 Stanley B. Gershwin.

  • Line Design

    Given a process, find the best set of machines and buffers on which it can be implemented.

    Best: least capital cost; least operating cost; least average inventory; greatest profit, etc.

    Constraints: minimal production rate, maximal stockout probability, maximal floor space, maximal inventory, etc..

    To be practical, computation time must be limited. Exact optimality is not necessary, especially since the parameters are not known perfectly.

    Copyright c 22007 Stanley B. Gershwin.

  • Optimization

    Optimization may be performed in two ways: Analytical solution of optimality conditions; or Searching

    For most problems, searching is the only realistic possibility.

    For some problems, optimality cannot be achieved in a reasonable amount of time.

    Copyright c 32007 Stanley B. Gershwin.

  • Search Optimization

    Dn

    past designs and performance.Modify design as a function of

    D = D(D , D , ..., D , P , P , ..., P )n+1 n0 01 n 0

    n = 0

    n = P( )Pn

    Is performance satisfactory?

    yes

    no

    n n+1 1

    Propose Design D

    Evaluate Design D

    Quit

    Typically, many designs are tested.

    Copyright 2007 Stanley B. Gershwin. c 4

  • Issues Optimization For this to be practical, total computation time must be limited. Therefore,we must control both computation time per iteration and the number of iterations .

    Computation time per iteration includes evaluation time and the time to determine the next design to be evaluated.

    The technical literature is generally focused on limiting the number of iterations by proposing designs efficiently.

    The number of iterations is also limited by choosing a reasonabletermination criterion (ie, required accuracy).

    Reducing computation time per iteration is accomplished by using analytical models rather than simulations using coarser approximations in early iterations and more accurate

    evaluations later.

    Copyright c 52007 Stanley B. Gershwin.

  • Problem

    Statement

    X is a set of possible choices. J is a scalar function defined on

    X. h and g are vector functions defined on X.

    Problem: Find x X that satisfies J(x) is maximized (or minimized) the objective subject to h(x) = 0 equality constraints

    g(x) 0 inequality constraints

    Copyright 2007 Stanley B. Gershwin. c 6

  • Taxonomy

    static/dynamic

    deterministic/stochastic

    X set: continuous/discrete/mixed

    (Extensions: multi-criteria optimization, in which the set of all

    good compromises between different objectives are sought; games, in which there are multiple optimizers, each preferring different xs but none having complete control; etc.) Copyright c 72007 Stanley B. Gershwin.

  • Continuous

    Variables and

    Objective

    X = Rn. J is a scalar function defined on Rn. h( Rm) and g( Rk) are vector functions defined on Rn.

    Problem: Find x Rn that satisfies J(x) is maximized (or minimized) subject to h(x) = 0

    g(x) 0

    Copyright 2007 Stanley B. Gershwin. c 8

  • Continuous Unconstrained Variables and Objective One-dimensional search

    Find t such that f(t) = 0.

    This is equivalent to Find t to maximize (or minimize) F (t)

    when F (t) is differentiable, and f(t) = dF (t)/dt is continuous.

    If f(t) is differentiable, maximization or minimization depends on the sign of d2F (t)/dt2.

    Copyright c 92007 Stanley B. Gershwin.

  • Continuous

    Variables and

    Objective

    Assume f(t) is decreasing. Binary search: Guess t0 and f(t0 ) t1 such that f(t0) > 0 and f(t1) < 0. Let t2 = (t0 + t1)/2. f(t2 )

    If f(t2) < 0, then repeat f(t1 )

    with t = t0 and t 0 1 =t2.

    If f(t2) > 0, then repeat with t0 t2 and t= =t1.

    Unconstrained

    One-dimensional search

    f(t)

    t0 t1t2

    t0 t1

    t

    1

    Copyright 2007 Stanley B. Gershwin. c 10

  • Continuous Unconstrained Variables and Objective One-dimensional search

    t0 t2 t1

    Example:

    f(t) = 4 t2

    0 1.5

    1.5

    1.875

    1.875

    1.96875

    1.96875

    1.9921875

    1.9921875

    1.998046875

    1.998046875

    1.99951171875

    1.99951171875

    1.9998779296875

    1.9998779296875

    1.99996948242188

    1.99996948242188

    1.99999237060547

    1.99999237060547

    1.99999809265137

    1.5

    2.25

    1.875

    2.0625

    1.96875

    2.015625

    1.9921875

    2.00390625

    1.998046875

    2.0009765625

    1.99951171875

    2.000244140625

    1.9998779296875

    2.00006103515625

    1.99996948242188

    2.00001525878906

    1.99999237060547

    2.00000381469727

    1.99999809265137

    2.00000095367432

    3 3 2.25

    2.25

    2.0625

    2.0625

    2.015625

    2.015625

    2.00390625

    2.00390625

    2.0009765625

    2.0009765625

    2.000244140625

    2.000244140625

    2.00006103515625

    2.00006103515625

    2.00001525878906

    2.00001525878906

    2.00000381469727

    2.00000381469727

    Copyright 2007 Stanley B. Gershwin. c 11

  • Continuous Unconstrained Variables and Objective One-dimensional search

    f(t)

    Newton search, exact tangent: f(t0 )

    Guess t0. Calculate

    df(t0)/dt.

    Choose t1 so that df (t0)f(t0) + (t1 t0) dt = 0. f(t1 )

    Repeat with t 0 = t1 until

    |f(t 0)| is small enough.

    t0 t1 t

    Copyright 2007 Stanley B. Gershwin. c 12

  • Continuous Variables and Objective

    Example:

    f(t) = 4 t2

    Unconstrained

    One-dimensional search

    t0 3 2.16666666666667 2.00641025641026 2.00001024002621 2.00000000002621 2

    Copyright 2007 Stanley B. Gershwin. c 13

  • Continuous Unconstrained Variables and Objective One-dimensional search

    f(t) Newton search, approximate tangent:

    f(t0 )

    Guess t0 and t1. Calculate

    approximate slope

    f (t1)f (t0)s = t1t0

    . f(t2 )

    Choose t2 so that f(t1 )

    f(t0) + (t2 t0)s = 0.

    Repeat with t 0 = t1 and

    t = t2 until |f(t )| is small1 0enough.

    t0 t1t2 t

    Copyright 2007 Stanley B. Gershwin.c 14

  • Continuous Variables and Objective

    Example:

    f(t) = 4 t2

    Unconstrained

    One-dimensional search

    t0 0 3 1.33333333333333 1.84615384615385 2.03225806451613 1.99872040946897 1.99998976002621 2.0000000032768 1.99999999999999 2

    Copyright 2007 Stanley B. Gershwin. c 15

  • Continuous Unconstrained Variables and Objective Multi-dimensional search

    x2

    J Optimum

    SteepestAscent Directions Optimum often found

    by steepest ascent or

    hill-climbing methods.

    x1

    Copyright 2007 Stanley B. Gershwin. c 16

  • { }

    Continuous Unconstrained

    Variables and

    Objective Gradient search To maximize J(x), where x is a vector (and J is a scalar function that has nice properties): 0. Set n = 0. Guess x0. 1. Evaluate J (xn).x2. Let t be a scalar. Define Jn(t) = J xn + t

    J (xn)

    x

    Find (by one-dimensional search ) t , the value of t thatnmaximizes Jn(t).

    3. Set xn+1 = xn + t J (xn). nx4. Set n n + 1. Go to Step 1. also called steepest ascent or steepest descent .

    Copyright c 172007 Stanley B. Gershwin.

  • Continuous Constrained Variables and Objective

    Equality constrained: solution is on the constraint surface.

    Problems are much easier when constraint is linear, ie, when the surface is a plane. In that case, replace J/x by its projection onto the constraint plane.

    But first: find an initial feasible guess.

    x1

    x2

    J

    Constrained Optimum

    h(x , x ) = 01 2

    Copyright 2007 Stanley B. Gershwin. c 18

  • Continuous Constrained Variables and Objective

    x2

    >1 2g(x , x )

    ConstrainedJ Optimum Inequality constrained:

    solution is required to

    be on one side of the

    plane.

    0

    x1

    Inequality constraints that are satisfied with equality are called effective or active constraints.

    If we knew which constraints would be effective, the problem would reduce toan equality-constrained optimization.

    Copyright c 192007 Stanley B. Gershwin.

  • Continuous Constrained Variables and Objective

    6

    8*(x+y).25*(x**4+y**4)4

    20 16

    2

    0

    2

    4

    6

    12 8 4 0

    4 8

    12 16 20 24

    2 0 2 4 6

    Minimize 8(x + y) (x4 + y4)/4

    subject to x + y 0

    Solving a linearly-constrained problem is relatively easy. If the

    solution is not in the interior, search within the boundary plane.

    Copyright 2007 Stanley B. Gershwin.c 20

  • Continuous Constrained Variables and Objective

    6

    8*(x+y).25*(x**4+y**4)4

    20 16

    2

    0

    2

    4

    6

    12 8 4 0

    4 8

    12 16 20 24

    2 0 2 4 6

    Minimize 8(x + y) (x4 + y4)/4

    subject to x (x y)2 + 1 0

    Solving a nonlinearly-constrained problem is not so easy. Searching within the boundary is numerically difficult. Copyright 2007 Stanley B. Gershwin. c 21

  • Continuous Nonlinear and Linear Programming Variables and Objective Optimization problems with continuous variables, objective, and constraints are called nonlinear programming problems, especially when at least one of J, h, g are not linear. When all of J, h, g are linear, the problem is a linear programming problem.

    Copyright 2007 Stanley B. Gershwin. c 22

  • Continuous Multiple Optima Variables and Objective

    x1

    x2

    J Local (or Relative)Maxima

    Global Maximum

    Danger: a search might find a local, rather than the global, optimum. Copyright 2007 Stanley B. Gershwin. c 23

  • Continuous Primals and Duals

    Variables and

    Objective

    Consider the two problems:

    min f(x) max j(x)

    subject to j(x) J subject to f(x) F

    f(x), F , j(x), and J are scalars. We will call these problems duals of one another. (However, this is not the conventional use of the term.) Under certain conditions when the last inequalities are effective, the same x satisfies both problems.

    We will call one the primal problem and the other the dual problem .

    Copyright 2007 Stanley B. Gershwin. c 24

  • Continuous Variables and Objective Generalization:

    min f(x)

    subject to h(x) = 0

    g(x) 0

    j(x) J

    Primals and Duals

    max j(x)

    subject to h(x) = 0

    g(x) 0

    f(x) F

    Copyright 2007 Stanley B. Gershwin. c 25

  • Buffer Space Problem statement Allocation

    M B1 1 M B2 2 M B3 3 M B4 4 M B5 5 M6

    Problem: Design the buffer space for a line. The machines have already been selected. Minimize the total buffer space needed to achieve a target production rate. Other problems: minimize total average inventory; maximize profit (revenue - inventory cost - buffer space cost); choose machines as well as buffer sizes; etc.

    Copyright c 262007 Stanley B. Gershwin.

  • Buffer Space Problem statement

    Allocation

    Assume a deterministic processing time line with k machines with ri and pi known for all i = 1, ..., k. Assume minimum buffer size N MIN. Assume a target production rate P . Then the function P (N1, ..., Nk1) is known it can be evaluated using the decomposition method. The problem is:

    Primal problem: k1

    Minimize

    Ni

    i=1

    subject to P (N1, ..., Nk1) P

    Ni N MIN, i = 1, ..., k 1.

    In the following, we treat the Nis like a set of continuous variables.

    Copyright 2007 Stanley B. Gershwin.c 27

  • Properties of P (N1, ..., Nk1)Buffer Space

    Allocation

    P (, ..., ) = min ei i=1,...,k

    P (N MIN, ..., N MIN) 1

  • Buffer Space Properties of P (N1, ..., Nk1) Allocation Example 3-machine line

    200 Optimal curve

    P=0.8800 P=0.8825 P=0.8850 P=0.8875 P=0.8900P P=0.8925

    0.91 150 P=0.8950 P=0.8975 0.9 P=0.9000

    0.89 0.88 0.87 N2 100 0.86 0.85 0.84 0.83

    100 50 90

    8070

    6010 20 30 40 50 60 3040

    50 N2

    N1 70 80 90 1020 0

    0 50 100 150 200100 N1

    r1 = .35 r2 = .15 r3 = .4 p1 = .037 p2 = .015 p3 = .02 e1 = .904 e2 = .909 e3 = .952

    Copyright 2007 Stanley B. Gershwin. c 29

  • Minimize k1

    Ni

    Buffer Space Solution Allocation Primal problem

    i=1

    subject to P (N1, ..., Nk1) P

    Ni N MIN, i = 1, ..., k 1.

    Difficulty: If all the buffers are larger than N MIN, the solution will satisfy P (N1, ..., Nk1) = P

    . (Why?) But P (N1, ..., Nk1) is nonlinear and cannot be expressed in closed form. Therefore any solution method will have to search within this constraint and all steps will be small and there will bemany iterations.

    It would be desirable to transform this problem into one with linear constraints.

    Copyright 2007 Stanley B. Gershwin. c 30

  • Buffer Space Solution Allocation Dual problem

    Maximize P (N1, ..., Nk1)

    k1

    subject to Ni N TOTAL specied i=1

    Ni N MIN, i = 1, ..., k 1.

    All the constraints are linear. The solution will satisfy the N TOTAL constraint with equality (assuming the problem is feasible). (1. Why? 2. When would the problem be infeasible?) This problem is consequently relatively easy to solve.

    Copyright 2007 Stanley B. Gershwin. c 31

  • Buffer Space Solution

    Allocation N2 Dual problem

    N1 +N2 +N3 = NTOTAL

    N3

    Constraint set (if N MIN = 0). N1

    Copyright 2007 Stanley B. Gershwin. c 32

  • Buffer Space Solution

    Allocation Primal strategy

    Solution