ch11 the art of modelling with spreadsheet

Upload: rajkzo

Post on 07-Aug-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/20/2019 Ch11 The Art of Modelling with Spreadsheet

    1/32

    MANAGEMENT

    SCIENCEThe Art of Modeling with Spreadsheets

    STEPHEN G. POWELL

    ENNETH !. "AE!

    Co#pati$le with Anal%ti& Sol'er Platfor#(O)!TH E*ITION

    CHAPTE! ++ POWE!POINT

    INTEGE! OPTIMI,ATION

  • 8/20/2019 Ch11 The Art of Modelling with Spreadsheet

    2/32

    INTRODUCTION

    •  The optimal solution of a linear program maycontain fractional decision variables, and thisis appropriate—or at least tolerable—in mostapplications

    • In some cases it may be necessary to ensurethat some or all of the decision variables ta!eon integer values

    • "ccommodating the re#uirement that

    variables must be integers is the sub$ect ofinteger progra##ing

    Chapter ++ Cop%right - /+0 1ohn Wile% 2Sons3 In&.

  • 8/20/2019 Ch11 The Art of Modelling with Spreadsheet

    3/32

    INT%&%R '"RI"()%* "ND T+% INT%&%R *O)'%R

    • *olver allos us to directly designate decisionvariables as integer values

    • In integer linear programs, *olver employs analgorithm that chec!s all possible assignments of

    integer values to variables, although some of theassignments may not have to be e-aminede-plicitly

    •  This procedure may re#uire the solution of a largenumber of linear programs. *olver can do this#uic!ly and reliably ith the simple- algorithm,and ill eventually locate a global optimum

    • In the case of integer nonlinear programs, certaindi/culties can arise, although *olver ill alaysattempt to 0nd a solution

    Chapter ++ Cop%right - /+0 1ohn Wile% 2Sons3 In&.

    0

  • 8/20/2019 Ch11 The Art of Modelling with Spreadsheet

    4/32

    D%*I&N"TIN& '"RI"()%* "* INT%&%R*

    Chapter ++ Cop%right - /+0 1ohn Wile% 2Sons3 In&.

    4

  • 8/20/2019 Ch11 The Art of Modelling with Spreadsheet

    5/32

    *%TTIN& T+% TO)%R"NC% 1"R"2%T%R

    Chapter ++ Cop%right - /+0 1ohn Wile% 2Sons3 In&.

    5

  • 8/20/2019 Ch11 The Art of Modelling with Spreadsheet

    6/32

    *O)'%R TI13 INT%&%R O1TION*

    •  The most important integer option is the Tolerance parameter

    •  The default value of the parameter is 45,

    and e may leave this value undisturbedhile e debug our model

    •  Once e are convinced that our model isrunning correctly, e can set the Tolerance

    parameter to 65 so that an optimal solutionis guaranteed

    Chapter ++ Cop%right - /+0 1ohn Wile% 2Sons3 In&.

    6

  • 8/20/2019 Ch11 The Art of Modelling with Spreadsheet

    7/32

    (IN"R7 '"RI"()%* "ND (IN"R7 C+OIC%2OD%)*

    • " binary variable, hich ta!es on the values8ero or one, can be used to represent a9go:no;go< decision

    • =e can thin! in terms of discrete pro$ects,here the decision to accept the pro$ect isrepresented by the value >, and the decisionto re$ect the pro$ect is represented by thevalue 0

    Chapter ++ Cop%right - /+0 1ohn Wile% 2Sons3 In&.

    7

  • 8/20/2019 Ch11 The Art of Modelling with Spreadsheet

    8/32

     T+% C"1IT") (UD&%TIN& 1RO()%2

    • Companies, committees, and even householdsoften 0nd themselves facing a problem ofallocating a capital budget

    • "s the problem arises in many 0rms, there is a

    speci0ed budget for the year, to be invested inmulti;year pro$ects

    •  There are typically several proposed pro$ectsunder consideration

    •  The challenge is to determine ho to ma-imi8ethe value of the pro$ects selected, sub$ect tothe limitation on e-penditures represented bythe capital budget

    Chapter ++ Cop%right - /+0 1ohn Wile% 2Sons3 In&.

    8

  • 8/20/2019 Ch11 The Art of Modelling with Spreadsheet

    9/32

     T+% C"1IT") (UD&%TIN& 1RO()%2

    • In the classic version of the &apital$9dgeting pro$le#, each pro$ect isdescribed by to values3 the e-penditurere#uired and the value of the pro$ect

    • "s a pro$ect is typically a multi;year activity,its value is represented by the net presentvalue ?N1'@ of its cash Aos over the pro$ectlife

    •  The e-penditure, combined ith thee-penditures of other pro$ects selected,cannot be more than the budget available

    Chapter ++ Cop%right - /+0 1ohn Wile% 2Sons3 In&.

    :

  • 8/20/2019 Ch11 The Art of Modelling with Spreadsheet

    10/32

    D%*I&N"TIN& '"RI"()%* "* (IN"R7INT%&%R*

    Chapter ++ Cop%right - /+0 1ohn Wile% 2Sons3 In&.

    +/

  • 8/20/2019 Ch11 The Art of Modelling with Spreadsheet

    11/32

     T+% *%T CO'%RIN& 1RO()%2

    •  The set &o'ering pro$le# is a variation ofthe covering model in hich the variables areall binary

    • In addition, the parameters in the constraints

    are all 8eroes and ones• In the classic version of the set covering

    problem, each pro$ect is described by asubset of locations that it 9covers<

     The problem is to cover all locations ith aminimal number of pro$ects

    Chapter ++ Cop%right - /+0 1ohn Wile% 2Sons3 In&.

    ++

  • 8/20/2019 Ch11 The Art of Modelling with Spreadsheet

    12/32

    (IN"R7 '"RI"()%* "ND )O&IC")R%)"TION*+I1*

    • =e sometimes encounter additionalconditions aBecting the selection of pro$ectsin problems li!e capital budgeting

     These include relationships among pro$ects,0-ed costs, and #uantity discounts

    Chapter ++ Cop%right - /+0 1ohn Wile% 2Sons3 In&.

    +

  • 8/20/2019 Ch11 The Art of Modelling with Spreadsheet

    13/32

    R%)"TION*+I1* "2ON& 1RO%CT*

    • 1ro$ects can be related in any number ofays, 0ve of hich are as follos3 – "t least m pro$ects must be selected

     – "t most n pro$ects must be selected

     – %-actly k  pro$ects must be selected

     – *ome pro$ects are mutually e-clusive

     – *ome pro$ects have contingency relationships

    Chapter ++ Cop%right - /+0 1ohn Wile% 2Sons3 In&.

    +0

  • 8/20/2019 Ch11 The Art of Modelling with Spreadsheet

    14/32

    R%)"TION*+I13 "T )%"*T M 1RO%CT* 2U*T (%*%)%CT%D

    •   y  E y 4 F >

    • 1ro$ect , or 1ro$ect 4, or both, ill beselected, thus satisfying the re#uirement of at

    least one selection

    Chapter ++ Cop%right - /+0 1ohn Wile% 2Sons3 In&.

    +4

  • 8/20/2019 Ch11 The Art of Modelling with Spreadsheet

    15/32

    R%)"TION*+I13 "T 2O*T N 1RO%CT* 2U*T (%*%)%CT%D

    •   y G E y 4 H >

    • 1ro$ect G, or 1ro$ect 4, or neither, but not bothill be selected, thus satisfying the

    re#uirement of at most one selection

    Chapter ++ Cop%right - /+0 1ohn Wile% 2Sons3 In&.

    +5

  • 8/20/2019 Ch11 The Art of Modelling with Spreadsheet

    16/32

    R%)"TION*+I13 %"CT)7 K  1RO%CT* 2U*T (%*%)%CT%D

    •   y G E y 4 J >

    • %-actly one of either 1ro$ect G or 1ro$ect 4 illbe selected, thus satisfying the re#uirement

    of e-actly one selection

    Chapter ++ Cop%right - /+0 1ohn Wile% 2Sons3 In&.

    +6

  • 8/20/2019 Ch11 The Art of Modelling with Spreadsheet

    17/32

    R%)"TION*+I13*O2% 1RO%CT* +"'% CONTIN&%NC7R%)"TION*+I1*

    •   y K L y 4 F 6

    • If 1ro$ect 4 is selected, then pro$ect K must beas ell

    Chapter ++ Cop%right - /+0 1ohn Wile% 2Sons3 In&.

    +7

  • 8/20/2019 Ch11 The Art of Modelling with Spreadsheet

    18/32

    )INMIN& CON*TR"INT* "ND I%D CO*T*

    • =e commonly encounter situations in hichactivity costs are composed of 0-ed costs andvariable costs, ith only the variable costsbeing proportional to activity level

    • =ith an integer programming model, e canalso integrate the 0-ed component of cost

    Chapter ++ Cop%right - /+0 1ohn Wile% 2Sons3 In&.

    +8

  • 8/20/2019 Ch11 The Art of Modelling with Spreadsheet

    19/32

    )INMIN& CON*TR"INT* "ND I%D CO*T*

    • =e separate the 0-ed and variablecomponents of cost

    • In algebraic terms, e rite cost as3Cost  J Fy  E cx here F  represents the 0-ed cost, and c represents the linear variable cost

    •  The variables x  and y  are decision variables,here x  is a normal ?continuous@ variable,

    and y  is a binary variable

    Chapter ++ Cop%right - /+0 1ohn Wile% 2Sons3 In&.

    +:

  • 8/20/2019 Ch11 The Art of Modelling with Spreadsheet

    20/32

    )INMIN& CON*TR"INT* "ND I%D CO*T*

    •  To achieve consistent lin!ing of the tovariables, e add the folloing genericlin;ing &onstraint to the model3 x  H My 

    here the number M represents an upperbound on the variable x 

    • In other ords, M is at least as large as anyvalue e can feasibly choose for x 

    Chapter ++ Cop%right - /+0 1ohn Wile% 2Sons3 In&.

    /

  • 8/20/2019 Ch11 The Art of Modelling with Spreadsheet

    21/32

    )INMIN& CON*TR"INT3 X  H MY 

    • =hen y  J 6 ?and therefore no 0-ed cost is incurred@, theright;hand side becomes 8ero, and *olver interprets theconstraint as x  HJ 6

     – *ince e also re#uire x  FJ 6, these to constraints togetherforce x  to be 8ero

     –

     Thus, hen y  J 6, it ill be consistent to avoid the 0-edcost

    • On the other hand, hen y  J >, the right;hand side illbe so large that *olver does not need to restrict x  at all,permitting its value to be positive hile e incur the0-ed cost

     –

     Thus, hen y  J >, it ill be consistent to incur the 0-ed cost• Of course, because e are optimi8ing, *olver ill never

    produce a solution ith the combination of y  J > and x  J6, because it ould alays be preferable to set y  J 6

    Chapter ++ Cop%right - /+0 1ohn Wile% 2Sons3 In&.

    +

  • 8/20/2019 Ch11 The Art of Modelling with Spreadsheet

    22/32

    *O)'%R TI13)O&IC") UNCTION* "ND INT%&%R1RO&R"22IN&

    • %-perienced %-cel programmers might betempted to use the logical functions ?I, "ND,OR, etc@ to e-press certain relationships

    Unfortunately, the linear solver does notalays detect the nonlinearity caused by theuse of logical functions, so it is important toremember never  to use an I function in a

    model built for the linear solver

    Chapter ++ Cop%right - /+0 1ohn Wile% 2Sons3 In&.

  • 8/20/2019 Ch11 The Art of Modelling with Spreadsheet

    23/32

     T+R%*+O)D )%'%)* "ND U"NTIT7DI*COUNT*

    • Threshold le'el re

  • 8/20/2019 Ch11 The Art of Modelling with Spreadsheet

    24/32

     T+R%*+O)D )%'%)*

    • *uppose e have a variable x  that is sub$ectto a threshold re#uirement )et m denote theminimum feasible value of x  if it is non8ero

     Then e can capture this structure in an

    integer programming model by including thefolloing pair  of constraints3 x  L my  F 6 x  L My  H 6here, as before, M is a large number that is

    greater than or e#ual to any value x  couldfeasibly ta!e

    Chapter ++ Cop%right - /+0 1ohn Wile% 2Sons3 In&.

    4

  • 8/20/2019 Ch11 The Art of Modelling with Spreadsheet

    25/32

    PT+% "CI)IT7 )OC"TION 2OD%)

    •  The transportation model ?discussed inChapter >6@ is typically used to 0nd optimalshipping schedules in supply chains andlogistics systems

    • The applications of the model can be vieedas tactical problems, in the sense that thetime interval of interest is usually short, say aee! or a month

    • Over that time period, the supply capacities

    and locations are unli!ely to change at all,and the demands can be predicted ithreasonable precision

    Chapter ++ Cop%right - /+0 1ohn Wile% 2Sons3 In&.

    5

  • 8/20/2019 Ch11 The Art of Modelling with Spreadsheet

    26/32

    PT+% "CI)IT7 )OC"TION 2OD%)

    • Over a longer time frame, a strategic versionof the problem arises In this setting, thedecisions relate to the selection of supplylocations as ell as the shipment schedule

    •  These decisions are strategic in the sensethat, once determined, they inAuence thesystem for a relatively long time interval

    •  The basic model for choosing supply locations

    is called the fa&ilit% lo&ation #odel

    Chapter ++ Cop%right - /+0 1ohn Wile% 2Sons3 In&.

    6

  • 8/20/2019 Ch11 The Art of Modelling with Spreadsheet

    27/32

     T+% C"1"CIT"T%D 1RO()%2

    • Conceptually, e can thin! of this problem ashaving to stages

    • In the 0rst stage, decisions must be madeabout ho many arehouses to open and

    here they should be•  Then, once e !no here the arehouses

    are, e can construct a transportation modelto optimi8e the actual shipments

    •  The costs at sta!e are also of to types3 0-edcosts associated ith !eeping a arehouseopen and variable transportation costsassociated ith shipments from the openarehouses

    Chapter ++ Cop%right - /+0 1ohn Wile% 2Sons3 In&.

    7

  • 8/20/2019 Ch11 The Art of Modelling with Spreadsheet

    28/32

     T+% UNC"1"CIT"T%D 1RO()%2

    • Once e see ho to solve the facility locationproblem ith capacities given, it is notdi/cult to adapt the model to theuncapacitated case

    • Obviously, e could choose a virtual capacityfor each arehouse that is as large as totaldemand, so that capacity ould neverinterfere ith the optimi8ation

    Chapter ++ Cop%right - /+0 1ohn Wile% 2Sons3 In&.

    8

  • 8/20/2019 Ch11 The Art of Modelling with Spreadsheet

    29/32

     T+% "**ORT2%NT 2OD%)

    •  The facility location model, ith or ithoutcapacity constraints, clearly has direct applicationto the design of supply chains and the choice oflocations from a discrete set of alternatives

    •(ut the model can actually be used in other typesof problems because it captures the essentialtrade;oB beteen 0-ed costs and variable costs

    • "n e-ample from the 0eld of 2ar!eting is theassort#ent pro$le#, hich as!s hich items ina product line should be carried, hen customersare illing to substitute

    Chapter ++ Cop%right - /+0 1ohn Wile% 2Sons3 In&.

    :

  • 8/20/2019 Ch11 The Art of Modelling with Spreadsheet

    30/32

  • 8/20/2019 Ch11 The Art of Modelling with Spreadsheet

    31/32

    *U22"R7

    • (inary variables can also be instrumental incapturing complicated logic in linear form so thate can harness the linear solver to 0nd solutions

    • (inary variables ma!e it possible toaccommodate problem information on3 – Contingency conditions beteen pro$ects – 2utual e-clusivity among pro$ects – )in!ing constraints for consistency – Threshold constraints for minimum activity levels

    =ith the capability of formulating these !inds ofrelationships in optimi8ation problems, ourmodeling abilities e-pand ell beyond the basiccapabilities of the linear and nonlinear solvers

    Chapter ++ Cop%right - /+0 1ohn Wile% 2Sons3 In&.

    0+

  • 8/20/2019 Ch11 The Art of Modelling with Spreadsheet

    32/32

    COPYRIGHT © 2013 JOHN WILEY & SONS, INC.

    13 - 32

    All right r!!r"!#. R!$r%#'ti%( %r tr)(l)ti%( %*

    thi +%r -!%(# th)t $!r/itt!# i( !'ti%( 11 %* th!

    1 (it!# St)t! C%$right A't +ith%t !4$r!

     $!r/ii%( %* th! '%$right %+(!r i (l)+*l. R!5!t

    *%r *rth!r i(*%r/)ti%( h%l# -! )##r!!# t% th!

    P!r/ii%( 6!$)rt/!(t, J%h( Wil! & S%(, I('. Th!

     $r'h)!r /) /)! -)'7$ '%$i! *%r hi8h!r %+( !

    %(l )(# (%t *%r #itri-ti%( %r r!)l!. Th! P-lih!r

    )/! (% r!$%(i-ilit *%r !rr%r, %/ii%(, %r

    #)/)g! ')!# - th! ! %* th!! $r%gr)/ %r *r%/ th!

    ! %* th! i(*%r/)ti%( h!r!i(.