Operaciona istraživanja l1

Embed Size (px)

Citation preview

  • 7/25/2019 Operaciona istraivanja l1

    1/256

    Univerzitet u ZeniciPedagoki fakultetAkademska 2009/2010.

    Sveska sa vjebi iz predmeta

    Operaciona istraivanjaSedmica broj 1Problemi transporta i distribucije 3 Formulacija transportnog problema 3 Metode odrivanja bazinog rjeen,a transportnog problema 6 Dijagonalna metoda (metoda sjeverozapadnog ugla) 7 Metoda najmanje jedinine cijena 9 Sluaj degenetacije 10 VAM metoda (Vogelova metoda) 11

    Metode odrivanja optimalnog rjeenja transportnog problema 16 Metoda raspodjele 16

    Sedmica broj 2Problemi transporta i distribucije

    Metode odrivanja optimalnog rjeenja transportnog problema Metoda koeficijenata ili modificirana metoda distribucije 27

    Razliite modifikacije transportnog problema 36 Otvoreni model transporta 36

    Sedmica broj 3Problemi transporta i distribucije

    Razliite modifikacije transportnog problema Minimizacija vremena transporta 43

    Zadaci za vjebu 51

    Sedmica broj 4Problemi transporta i distribucije

    Razliite modifikacije transportnog problema

    Metoda rasporeivanja 63

    Sedmica broj 5Cjelobrojno programiranje 81 Metoda odsjeaka (Gomorijeva metoda) 85

    Sedmica broj 6Cjelobrojno programiranje

    Metoda grananja i ograniavanja 103

    1

  • 7/25/2019 Operaciona istraivanja l1

    2/256

    Sedmica broj 7Teorija igara

    Opti pojmovi i definicije iz domena matrinih igara 117 Rjeavanje prostih matrinih igara 119

    Sedmica broj 8 i 9

    Teorija igara Rjeavanje mjeovitih matrinih igara 129

    Rjeavanje matrinih igara 22 130 Rjeavanje matrinih igara n2 136 Rjeavanje matrinih igara 2m 142

    Sedmica broj 10Teorija igara

    Rjeavanje matrinih igara redukcijom matrice cijena igra 149

    Sedmica broj 11Teorija igara

    Rjeavanje matrinih igara nm primjenom linearnog programiranja 161

    Sedmica broj 12Mreno planiranje 181 Uvod 181 Analiza strukture 181

    Sedmica broj 13

    Mreno planiranje Analiza vremena i trokova (Metoda kritinog puta) 191

    Sedmica broj 14Mreno planiranje

    Analiza vremena i trokova (Pert metoda) 205

    Sedmica broj 15Mreno planiranje

    Raspodjela resursa 219

    Dodatak ANumeriko rjeavanje linearnog problema 237 Simpleks metoda 237

    Dodatak BDva ispitna roka 255

    2

  • 7/25/2019 Operaciona istraivanja l1

    3/256

    3

  • 7/25/2019 Operaciona istraivanja l1

    4/256

    4

  • 7/25/2019 Operaciona istraivanja l1

    5/256

    5

  • 7/25/2019 Operaciona istraivanja l1

    6/256

    6

  • 7/25/2019 Operaciona istraivanja l1

    7/256

    7

  • 7/25/2019 Operaciona istraivanja l1

    8/256

    8

  • 7/25/2019 Operaciona istraivanja l1

    9/256

    9

  • 7/25/2019 Operaciona istraivanja l1

    10/256

    10

  • 7/25/2019 Operaciona istraivanja l1

    11/256

    11

  • 7/25/2019 Operaciona istraivanja l1

    12/256

    12

  • 7/25/2019 Operaciona istraivanja l1

    13/256

    13

  • 7/25/2019 Operaciona istraivanja l1

    14/256

    14

  • 7/25/2019 Operaciona istraivanja l1

    15/256

    15

  • 7/25/2019 Operaciona istraivanja l1

    16/256

    16

  • 7/25/2019 Operaciona istraivanja l1

    17/256

    17

  • 7/25/2019 Operaciona istraivanja l1

    18/256

    18

  • 7/25/2019 Operaciona istraivanja l1

    19/256

    19

  • 7/25/2019 Operaciona istraivanja l1

    20/256

    20

  • 7/25/2019 Operaciona istraivanja l1

    21/256

    21

  • 7/25/2019 Operaciona istraivanja l1

    22/256

    22

  • 7/25/2019 Operaciona istraivanja l1

    23/256

    23

  • 7/25/2019 Operaciona istraivanja l1

    24/256

    24

  • 7/25/2019 Operaciona istraivanja l1

    25/256

    25

  • 7/25/2019 Operaciona istraivanja l1

    26/256

    (Ova stranica je ostavljena prazna)

    26

  • 7/25/2019 Operaciona istraivanja l1

    27/256

    27

  • 7/25/2019 Operaciona istraivanja l1

    28/256

    28

  • 7/25/2019 Operaciona istraivanja l1

    29/256

    29

  • 7/25/2019 Operaciona istraivanja l1

    30/256

    30

  • 7/25/2019 Operaciona istraivanja l1

    31/256

    31

  • 7/25/2019 Operaciona istraivanja l1

    32/256

    32

  • 7/25/2019 Operaciona istraivanja l1

    33/256

    33

  • 7/25/2019 Operaciona istraivanja l1

    34/256

    34

  • 7/25/2019 Operaciona istraivanja l1

    35/256

    35

  • 7/25/2019 Operaciona istraivanja l1

    36/256

    36

  • 7/25/2019 Operaciona istraivanja l1

    37/256

    37

  • 7/25/2019 Operaciona istraivanja l1

    38/256

    38

  • 7/25/2019 Operaciona istraivanja l1

    39/256

    39

  • 7/25/2019 Operaciona istraivanja l1

    40/256

    40

  • 7/25/2019 Operaciona istraivanja l1

    41/256

    41

  • 7/25/2019 Operaciona istraivanja l1

    42/256

    42

  • 7/25/2019 Operaciona istraivanja l1

    43/256

    43

  • 7/25/2019 Operaciona istraivanja l1

    44/256

    44

  • 7/25/2019 Operaciona istraivanja l1

    45/256

    45

  • 7/25/2019 Operaciona istraivanja l1

    46/256

    46

  • 7/25/2019 Operaciona istraivanja l1

    47/256

    47

  • 7/25/2019 Operaciona istraivanja l1

    48/256

    48

  • 7/25/2019 Operaciona istraivanja l1

    49/256

    49

  • 7/25/2019 Operaciona istraivanja l1

    50/256

    (Ova stranica je ostavljena prazna)

    50

  • 7/25/2019 Operaciona istraivanja l1

    51/256

    51

  • 7/25/2019 Operaciona istraivanja l1

    52/256

    52

  • 7/25/2019 Operaciona istraivanja l1

    53/256

    53

  • 7/25/2019 Operaciona istraivanja l1

    54/256

    54

  • 7/25/2019 Operaciona istraivanja l1

    55/256

    55

  • 7/25/2019 Operaciona istraivanja l1

    56/256

    56

  • 7/25/2019 Operaciona istraivanja l1

    57/256

    57

  • 7/25/2019 Operaciona istraivanja l1

    58/256

    58

  • 7/25/2019 Operaciona istraivanja l1

    59/256

    59

  • 7/25/2019 Operaciona istraivanja l1

    60/256

    60

  • 7/25/2019 Operaciona istraivanja l1

    61/256

    61

  • 7/25/2019 Operaciona istraivanja l1

    62/256

    62

  • 7/25/2019 Operaciona istraivanja l1

    63/256

    63

  • 7/25/2019 Operaciona istraivanja l1

    64/256

    64

  • 7/25/2019 Operaciona istraivanja l1

    65/256

    65

  • 7/25/2019 Operaciona istraivanja l1

    66/256

    66

  • 7/25/2019 Operaciona istraivanja l1

    67/256

    67

  • 7/25/2019 Operaciona istraivanja l1

    68/256

    68

  • 7/25/2019 Operaciona istraivanja l1

    69/256

    69

  • 7/25/2019 Operaciona istraivanja l1

    70/256

    70

  • 7/25/2019 Operaciona istraivanja l1

    71/256

    71

  • 7/25/2019 Operaciona istraivanja l1

    72/256

    72

  • 7/25/2019 Operaciona istraivanja l1

    73/256

    73

  • 7/25/2019 Operaciona istraivanja l1

    74/256

    74

  • 7/25/2019 Operaciona istraivanja l1

    75/256

    75

  • 7/25/2019 Operaciona istraivanja l1

    76/256

    76

  • 7/25/2019 Operaciona istraivanja l1

    77/256

    77

  • 7/25/2019 Operaciona istraivanja l1

    78/256

    78

  • 7/25/2019 Operaciona istraivanja l1

    79/256

    79

  • 7/25/2019 Operaciona istraivanja l1

    80/256

    80

  • 7/25/2019 Operaciona istraivanja l1

    81/256

    81

  • 7/25/2019 Operaciona istraivanja l1

    82/256

    82

  • 7/25/2019 Operaciona istraivanja l1

    83/256

    83

  • 7/25/2019 Operaciona istraivanja l1

    84/256

    84

  • 7/25/2019 Operaciona istraivanja l1

    85/256

    85

  • 7/25/2019 Operaciona istraivanja l1

    86/256

    86

  • 7/25/2019 Operaciona istraivanja l1

    87/256

    87

  • 7/25/2019 Operaciona istraivanja l1

    88/256

    88

  • 7/25/2019 Operaciona istraivanja l1

    89/256

    89

  • 7/25/2019 Operaciona istraivanja l1

    90/256

    90

  • 7/25/2019 Operaciona istraivanja l1

    91/256

    91

  • 7/25/2019 Operaciona istraivanja l1

    92/256

    92

  • 7/25/2019 Operaciona istraivanja l1

    93/256

    93

  • 7/25/2019 Operaciona istraivanja l1

    94/256

    94

  • 7/25/2019 Operaciona istraivanja l1

    95/256

    95

  • 7/25/2019 Operaciona istraivanja l1

    96/256

    96

  • 7/25/2019 Operaciona istraivanja l1

    97/256

    97

  • 7/25/2019 Operaciona istraivanja l1

    98/256

    98

  • 7/25/2019 Operaciona istraivanja l1

    99/256

    General Cutting Planes

    Consider the following integer program:

    If we ignore integrality, we get the following optimal tableau (with the updated columns and reduced costsshown for nonbasic variables):

    Let's look at the first constraint:

    We can manipulate this to put all of the integer parts on the left side, and all the fractional parts on theright to get:

    Now, note that the left hand side consists only of integers, so the right hand side must add up to an integer.Which integer can it be? Well, it consists of some positive fraction minus a series of positive values.Therefore, the right hand side can only be ; it cannot be a positive value. Therefore, we

    have derived the following constraint:

    This constraint is satisfied by every feasible integer solution to our original problem. But, in our currentsolution, and both equal 0, which is infeasible to the above constraint. This means the above

    constraint is a cut, called the Gomory cutafter its discoverer. We can now add this constraint to the linearprogram and be guaranteed to find a different solution, one that might be integer.

    We can also generate a cut from the other constraint. Here we have to be careful to get the signs right:

    gives the constraint

    99

  • 7/25/2019 Operaciona istraivanja l1

    100/256

    n general, let be defined as the largest integer less than or equal to a. For example, ,

    , and .

    we have a constraint

    ith bnot an integer, we can write each , for some , and for

    ome 0 ;SPMlt;b' ;SPMlt; 1. Using the same steps we get:

    get the cut

    his cut can then be added to the linear program and the problem resolved. The problem is guaranteed not get the same solution.

    his method can be shown to guarantee finding the optimal integer solution. There are a couple of

    sadvantages:

    Round-off error can cause great difficulties: Is that 3.000000001 really a 3, or should I generate a

    cut? If I make the wrong decision I could either cut off a feasible solution (if it is really a 3 but I

    generate a cut) or I could end up with an infeasible solution (if it is not a 3 but I treat it as one).

    1.

    The number of constraints that are generated can be enormous. Just like branch and bound cangenerate a huge number of subproblems, this technique can generate a huge number of constraints.2.

    he combination of these makes this cutting plane technique impractical by itself. Recently however, moreowerful techniques have been discovered for special problem structure. This is the subject of the next

    ection.

    100

  • 7/25/2019 Operaciona istraivanja l1

    101/256

    4 SOME CHARACTERISTICS OF INTEGER PROGRAMSA SAMPLE PROBLEM

    Whereas the simplex method is effective for solving linear programs, there is no single technique for solvingnteger programs. Instead, a number of procedures have been developed, and the performance of any particular

    echnique appears to be highly problem-dependent. Methods to date can be classified broadly as following

    ne of three approaches:

    i) enumeration techniques, including the branch-and-bound procedure;

    ii) cutting-plane techniques; and

    iii) group-theoretic techniques.

    n addition, several composite procedures have been proposed, which combine techniques using several of

    hese approaches. In fact, there is a trend in computer systems for integer programming to include a numberf approaches and possibly utilize them all when analyzing a given problem. In the sections to follow, we

    hall consider the first two approaches in some detail. At this point, we shall introduce a specific problem

    nd indicate some features of integer programs. Later we will use this example to illustrate and motivate the

    olution procedures. Many characteristics of this example are shared by the integer version of the custom-

    molder problem presented in Chapter 1.

    The problem is to determinez where:

    z = maxz = 5x1 + 8x2,

    101

  • 7/25/2019 Operaciona istraivanja l1

    102/256

    ubject to:

    x1 + x2 6,

    5x1 + 9x2 45,

    x1,x2 0 and integer.

    The feasible region is sketched in Fig. 9.8. Dots in the shaded region are feasible integer points.

    Figure 9.8 An integer programming example.

    If the integrality restrictions on variables are dropped, the resulting problem is a linear program. We will

    all it the associated linear program. We may easily determine its optimal solution graphically. Table 9.1

    epicts some of the features of the problem.

    Table 9.1 Problem features.

    Nearest

    Continuous Round feasible Integer

    optimum off point optimum

    x194

    = 2.25 2 2 0

    x2154

    = 3.75 4 3 5

    z 41.25 Infeasible 34 40

    Observe that the optimal integer-programming solution is not obtained by rounding the linear-programming

    olution. The closest point to the optimal linear-program solution is not even feasible. Also, note that the

    earest feasible integer point to the linear-program solution is far removed from the optimal integer point.

    hus, it is not sufficient simply to round linear-programming solutions. In fact, by scaling the righthand-side

    nd cost coefficients of this example properly, we can construct a problem for which the optimal integer-

    rogramming solution lies as far as we like from the rounded linear-programming solution, in either z value

    r distance on the plane.

    In an example as simple as this, almost any solution procedure will be effective. For instance, we couldasily enumerate all the integer points with x1 9, x2 6, and select the best feasible point. In practice, the

    umber of points to be considered is likely to prohibit such an exhaustive enumeration of potentially feasible

    oints, and a more sophisticated procedure will have to be adopted.

    102

  • 7/25/2019 Operaciona istraivanja l1

    103/256

    Figure 9.9 Subdividing the feasible region.

    5 BRANCH-AND-BOUND

    ranch-and-bound is essentially a strategy of divide and conquer. The idea is to partition the feasibleegion into more manageable subdivisions and then, if required, to further partition the subdivisions. In

    eneral, there are a number of ways to divide the feasible region, and as a consequence there are a number of

    ranch-and-bound algorithms. We shall consider one such technique, for problems with only binary variables,

    n Section 9.7. For historical reasons, the technique that will be described next usually is referred to as the

    ranch-and-bound procedure.

    asic Procedure

    An integer linear program is a linear program further constrained by the integrality restrictions. Thus, in a

    maximization problem, the value of the objective function, at the linear-program optimum, will always be anpper bound on the optimal integer-programming objective. In addition, any integer feasible point is always

    lower bound on the optimal linear-program objective value.

    The idea of branch-and-bound is to utilize these observations to systematically subdivide the linear-

    rogramming feasible region and make assessments of the integer-programming problem based upon these

    ubdivisions. The method can be described easily by considering the example from the previous section.

    At first, the linear-programming region is not subdivided: The integrality restrictions are dropped and the

    ssociated linear program is solved, giving an optimal valuez 0. From our remark above, this gives the upper

    ound onz ,z z0 = 41 14

    . Since the coefficients in the objective function are integral,z must be integral

    nd this implies that z

    41.Next note that the linear-programming solution has x1 = 214

    andx2 = 334

    . Both of these variables must

    e integer in the optimal solution, and we can divide the feasible region in an attempt to makeeither integral.

    We know that, in any integer programming solution,x2must be either an integer 3 or an integer 4. Thus,

    ur first subdivision is into the regions wherex2 3 andx2 4 as displayed by the shaded regions L1 and

    2in Fig. 9.9. Observe that, by making the subdivisions, we have excluded the old linear-program solution.

    f we selectedx1 instead, the region would be subdivided withx1 2 andx1 3.)

    The results up to this point are pictured conveniently in an enumeration tree (Fig. 9.10). Here L0epresents the associated linear program, whose optimal solution has been included within the L 0 box, and

    he upper bound on z appears to the right of the box. The boxes below correspond to the new subdivisions;

    he constraints that subdivide L0are included next to the lines joining the boxes. Thus, the constraints ofL 1re those ofL0together with the constraint x2 4, while the constraints ofL 2are those ofL0together with

    he constraintx2 3.The strategy to be pursued now may be apparent: Simply treat each subdivision as we did the original

    roblem. Consider L1 first. Graphically, from Fig. 9.9 we see that the optimal linear-programming solution

    103

  • 7/25/2019 Operaciona istraivanja l1

    104/256

    Figure 9.10 Enumeration tree.

    Figure 9.11 Subdividing the regionL1.

    es on the second constraint with x2 = 4, giving x1 = 1

    5(45 9(4)) = 9

    5 and an objective value z =

    95

    +8(4) = 41. Sincex1is not integer, we subdivideL 1further, into the regionsL 3withx1 2andL 4with

    1 1. L3 is an infeasible problemand so this branch of the enumeration tree no longer needs to be considered.

    The enumeration tree now becomes that shown in Fig. 9.12. Note that the constraints of any subdivisionre obtained by tracing back to L0. For example, L 4 contains the original constraints together with x2 4

    ndx1 2. The asterisk () below box L3indicates that the region need not be subdivided or, equivalently,

    hat the tree will not be extended from this box.

    At this point, subdivisions L2 and L4 must be considered. We may select one arbitrarily; however,

    n practice, a number of useful heuristics are applied to make this choice. For simplicity, let us select the

    ubdivision most recently generated, here L4. Analyzing the region, we find that its optimal solution has

    x1 = 1, x2 = 19(45 5) = 40

    9.

    incex2 is not integer, L4 must be further subdivided into L5withx2 4,and L 6withx2 5, leaving L2,

    5and L6yet to be considered.

    Treating L5 first (see Fig. 9.13), we see that its optimum has x1 =1,x2 =4, andz =37. Since this is

    he best linear-programming solution forL5and the linear program contains every integer solution in L5, no

    nteger point in that subdivision can give a larger objective value than this point. Consequently, other points

    104

  • 7/25/2019 Operaciona istraivanja l1

    105/256

    Figure 9.12

    Figure 9.13 Final subdivisions for the example.

    nL 5need never be considered andL 5need not be subdivided further. In fact, since x1 = 1,x2 = 4,z = 37,

    a feasible solution to the original problem, z

    37 and we now have the bounds 37

    z

    41. Withouturther analysis, we could terminate with the integer solution x1 = 1,x2 = 4, knowing that the objective

    alue of this point is within 10 percent of the true optimum. For convenience, the lower boundz 37 just

    etermined has been appended to the right of the L5 box in the enumeration tree (Fig. 9.14).

    Although x1 = 1, x2 = 4 is the best integer point in L 5, the regions L2 and L6 might contain better

    easible solutions, and we must continue the procedure by analyzing these regions. InL6, the only feasible

    oint isx1 = 0,x2 = 5, giving an objective valuez = +40. This is better than the previous integer point and

    hus the lower bound on z improves, so that 40 z 41. We could terminate with this integer solution

    nowing that it is within 2.5 percent of the true optimum. However, L2 couldcontain an even better integer

    olution.

    The linear-programming solution in L2 has x1 = x2 = 3 and z = 39. This is the best integer point in

    2 but is not as good as x1 =0, x2 = 5, so the later point (in L 6) must indeed be optimal. It is interesting

    o note that, even if the solution to L2 did not give x1 and x2 integer, but had z < 40, then no feasible

    and, in particular, no integer point) in L2 could be as good as x1 = 0, x2 = 5, with z = 40. Thus, again

    1 = 0, x2 = 5 would be known to be optimal. This observation has important computational implications,

    105

  • 7/25/2019 Operaciona istraivanja l1

    106/256

    Figure 9.14

    nce it is not necessary to drive every branch in the enumeration tree to an integer or infeasible solution, but

    nly to an objective value below the best integer solution.

    The problem now is solved and the entire solution procedure can be summarized by the enumeration tree

    n Fig. 9.15.

    Figure 9.15

    urther Considerations

    here are three points that have yet to be considered with respect to the branch-and-bound procedure:

    i) Can the linear programs corresponding to the subdivisions be solved efficiently?

    ii) What is the best way to subdivide a given region, and which unanalyzed subdivision should be considered

    next?

    106

  • 7/25/2019 Operaciona istraivanja l1

    107/256

    iii) Can the upper bound (z= 41, in the example) on the optimal valuez of the integer program be improved

    while the problem is being solved?

    he answer to the first question is an unqualifiedyes. When moving from a region to one of its subdivisions,

    we add one constraint that is not satisfied by the optimal linear-programming solution over the parent region.

    Moreover, this was one motivation for the dual simplex algorithm, and it is natural to adopt that algorithm

    ere.

    Referring to the sample problem will illustrate the method. Thefirst two subdivisions L1 and L 2in that

    xample were generated by adding the following constraints to the original problem:

    For subdivision 1 : x2 4 or x2 s3 = 4 (s3 0);

    For subdivision 2 : x2 3 or x2 + s4 = 3 (s4 0).

    n either case we add the new constraint to the optimal linear-programming tableau. For subdivision 1, this

    ives:

    (z) 54

    s1 34

    s2 = 4114

    x1 +9

    4

    s1 1

    4

    s2 = 9

    4x2 54 s1 + 14 s2 = 154

    Constraints from the

    optimal canonical

    form

    x2 + s3 = 4, Added constraint

    x1, x2, s1, s2, s3 0,

    where s1 and s2 are slack variables for the two constraints in the original problem formulation. Note that

    he new constraint has been multiplied by 1, so that the slack variable s3 can be used as a basic variable.

    ince the basic variable x2 appears with a nonzero coefficient in the new constraint, though, we must pivot

    o isolate this variable in the second constraint to re-express the system as:

    (z) 54

    s1 34

    s2 = 4114,

    x1 +94

    s1 14

    s2 = 9

    4,

    x2 54

    s1 +14

    s2 = 15

    4,

    5

    4s1 +

    14

    s2 +s3 = 14,

    x1,x2, s1, s2, s3 0.

    hese constraints are expressed in the proper form for applying the dual simplex algorithm, which will pivot

    ext to makes1the basic variable in the third constraint. The resulting system is given by:(z) s2 s3 = 41,

    x1 +15

    s2 +95

    s3 = 9

    5,

    x2 s3 = 4,

    s1 15

    s2 45

    s3 = 1

    5,

    x1, x2, s1, s2, s3 0.

    his tableau is optimal and gives the optimal linear-programming solution over the regionL 1asx1 = 95, x2 =

    , andz = 41. The same procedure can be used to determine the optimal solution inL2.

    When the linear-programming problem contains many constraints, this approach for recovering an optimalolution is very effective. After adding a new constraint and making the slack variable for that constraint

    asic, we always have a starting solution for the dual-simplex algorithm with only one basic variable negative.

    Usually, only a few dual-simplex pivoting operations are required to obtain the optimal solution. Using the

    rimal-simplex algorithm generally would require many more computations.

    107

  • 7/25/2019 Operaciona istraivanja l1

    108/256

    Figure 9.16

    Issue (ii) raised above is very important since, if we can make our choice of subdivisions in such a way

    s to rapidly obtain a good (with luck, near-optimal) integer solution z, then we can eliminate many potential

    ubdivisions immediately. Indeed, if any region has its linear programming valuez z, then the objective

    alue of no integer point in that region can exceed z and the region need not be subdivided. There is no

    niversal method for making the required choice, although several heuristic procedures have been suggested,

    uch as selecting the subdivision with the largest optimal linear-programming value.

    Rules for determining which fractional variables to use in constructing subdivisions are more subtle.

    ecall that any fractional variable can be used to generate a subdivision. One procedure utilized is to look

    head one step in the dual-simplex method for every possible subdivision to see which is most promising. Theetails are somewhat involved and are omitted here. For expository purposes, we have selected the fractional

    ariable arbitrarily.

    Finally, the upper boundzon the valuez of the integer program can be improved as we solve the problem.

    uppose for example, that subdivision L 2was analyzed before subdivisions L 5or L 6in our sample problem.

    he enumeration tree would be as shown in Fig. 9.16.

    At this point, the optimal solution must lie in either L2 or L4. Since, however, the largest value for

    ny feasible point in either of these regions is 40 59

    , the optimal value for the problemz cannotexceed40 59

    .

    ecausez must be integral, this implies thatz 40 and the upper bound has been improved from the value

    1 provided by the solution to the linear program on L0

    . In general, the upper bound is given in this way as

    he largest value of any hanging box (one that has not been divided) in the enumeration tree.

    ummary

    he essential idea of branch-and-bound is to subdivide the feasible region to develop bounds z < z < z onz .

    or a maximization problem, the lower bound zis the highest value of any feasible integer point encountered.

    he upper bound is given by the optimal value of the associated linear program or by the largest value for

    he objective function at any hanging box. After considering a subdivision, we must branchto (move to)

    nother subdivision and analyze it. Also, ifeither

    One common method used in practice is to consider subdivisions on a last-generatedfirst-analyzed basis. We usedhis rule in our previous example. Note that data to initiate the dual-simplex method mentioned above must be stored forach subdivision that has yet to be analyzed. This data usually is stored in a list, with new information being added to the

    op of the list. When required, data then is extracted from thetopof this list, leading to the last-generatedfirst-analyzedule. Observe that when we subdivide a region into two subdivisions, one of these subdivisions will be analyzed next.he data required for this analysis already will be in the computer core and need not be extracted from the list.

    108

  • 7/25/2019 Operaciona istraivanja l1

    109/256

    i) the linear program over Lj is infeasible;

    ii) the optimal linear-programming solution over Lj is integer;or

    iii) the value of the linear-programming solutionz j over Lj satisfieszj z(if maximizing),

    hen Lj need not be subdivided. In these cases, integer-programming terminology says that Lj has been

    athomed. Case (i) is termed fathoming by infeasibility, (ii) fathoming by integrality, and (iii) fathoming by

    ounds.

    The flow chart in Fig. 9.17 summarizes the general procedure.

    Figure 9.17 Branch-and-bound for integer-programming maximization.

    Tofathomis defined as to get to the bottom of; to understand thoroughly. In this chapter,fathomedmight be moreppropriately defined as understood enough or already considered.

    109

  • 7/25/2019 Operaciona istraivanja l1

    110/256

    Figure 9.18

    110

  • 7/25/2019 Operaciona istraivanja l1

    111/256

    Branch and Bound

    We will explain branch and bound by using the capital budgeting example from the previous section. In thatproblem, the model is

    The linear relaxation solution is with a value of 22. We know that no

    integer solution will have value more than 22. Unfortunately, since is not integer, we do not have an

    integer solution yet.

    We want to force to be integer. To do so, we branchon , creating two new problems. In one, we will

    add the constraint . In the other, we add the constraint . This is illustrated in Figure 2.

    Figure 2:First Branching

    Note that any optimal solution to the overall problem must be feasible to one of the subproblems. If wesolve the linear relaxations of the subproblems, we get the following solutions:

    : objective 21.65, , , , ;

    : objective 21.85, , , , .

    At this point we know that the optimal integer solution is no more than 21.85 (we actually know it is lessthan or equal to 21 (Why?)), but we still do not have any feasible integer solution. So, we will take a

    subproblem and branch on one of its variables. In general, we will choose the subproblem as follows:

    We will choose an activesubproblem, which so far only means one we have not chosen before, andWe will choose the subproblem with the highest solution value (for maximization) (lowest for

    111

  • 7/25/2019 Operaciona istraivanja l1

    112/256

    minimization).

    In this case, we will choose the subproblem with , and branch on . After solving the resulting

    subproblems, we have the branch and bound tree in Figure 3.

    Figure 3:Second Branching

    The solutions are:

    , : objective 18, , , , ;

    , : objective 21.8, , , , .

    We now have a feasible integer solution with value 18. Furthermore, since the problem

    gave an integer solution, no further branching on that problem is necessary. It is not active due to integrality

    of solution. There are still active subproblems that might give values more than 18. Using our rules, we will

    branch on problem by branching on to get Figure 4.

    112

  • 7/25/2019 Operaciona istraivanja l1

    113/256

    Figure 4:Third Branching

    The solutions are:

    , , : objective 21, , , , ;

    , , : infeasible.

    Our best integer solution now has value 21. The subproblem that generates that is not active due to

    integrality of solution. The other subproblem generated is not active due to infeasibility. There is still asubproblem that is active. It is the subproblem with solution value 21.65. By our ``round-down'' result, there

    is no better solution for this subproblem than 21. But we already have a solution with value 21. It is not

    useful to search for another such solution. We can fathomthis subproblem based on the above boundingargument and mark it not active. There are no longer any active subproblems, so the optimal solution value

    is 21.

    We have seen all parts of the branch and bound algorithm. The essence of the algorithm is as follows:

    Solve the linear relaxation of the problem. If the solution is integer, then we are done. Otherwise1.

    113

  • 7/25/2019 Operaciona istraivanja l1

    114/256

    create two new subproblems by branching on a fractional variable.A subproblem is not active when any of the following occurs:

    You used the subproblem to branch on,1.

    All variables in the solution are integer,2.

    The subproblem is infeasible,3.

    You can fathom the subproblem by a bounding argument.4.

    2.

    Choose an active subproblem and branch on a fractional variable. Repeat until there are no activesubproblems.

    3.

    That's all there is to branch and bound! Depending on the type of problem, the branching rule may change

    somewhat. For instance, ifxis restricted to be integer (but not necessarily 0 or 1), then ifx=4.27 your wouldbranch with the constraints and (not onx=4 andx=5).

    In the worst case, the number of subproblems can get huge. For many problems in practice, however, thenumber of subproblems is quite reasonable.

    For an example of a huge number of subproblems, try the following in LINGO:

    model: sets:

    a /1..17/: x;

    endsets

    max = -x0 + @sum(a: 2 * x);

    x0 + @sum(a: 2 * x) < 17;

    @for (a: @bin(x));

    end

    Note that this problem has only 18 variables and only a single constraint. LINDO looks at 48,619subproblems, taking about 20 minutes on a Sun Sparc workstation, before deciding the optimal objective is

    16. LINGO on a 16MHz 386 PC (with math coprocessor) looks at 48,000+ subproblems and takes about

    five hours. CPLEX on a Sun SPARC 10 takes about 50 seconds to examine 61,497 subproblems (countingthose that are fathomed without solving the LP). The 100 variable version of this problem would take about

    subproblems or about years (at 1000 subproblems per second). Luckily, most problems take

    far less time.

    114

  • 7/25/2019 Operaciona istraivanja l1

    115/256

    115

  • 7/25/2019 Operaciona istraivanja l1

    116/256

    (Ova stranica je ostavljena prazna)

    116

  • 7/25/2019 Operaciona istraivanja l1

    117/256

    117

  • 7/25/2019 Operaciona istraivanja l1

    118/256

    118

  • 7/25/2019 Operaciona istraivanja l1

    119/256

    119

  • 7/25/2019 Operaciona istraivanja l1

    120/256

    120

  • 7/25/2019 Operaciona istraivanja l1

    121/256

    121

  • 7/25/2019 Operaciona istraivanja l1

    122/256

    122

  • 7/25/2019 Operaciona istraivanja l1

    123/256

    123

  • 7/25/2019 Operaciona istraivanja l1

    124/256

    124

  • 7/25/2019 Operaciona istraivanja l1

    125/256

    125

  • 7/25/2019 Operaciona istraivanja l1

    126/256

    126

  • 7/25/2019 Operaciona istraivanja l1

    127/256

    127

  • 7/25/2019 Operaciona istraivanja l1

    128/256

    128

  • 7/25/2019 Operaciona istraivanja l1

    129/256

    129

  • 7/25/2019 Operaciona istraivanja l1

    130/256

    130

  • 7/25/2019 Operaciona istraivanja l1

    131/256

    131

  • 7/25/2019 Operaciona istraivanja l1

    132/256

    132

  • 7/25/2019 Operaciona istraivanja l1

    133/256

    133

  • 7/25/2019 Operaciona istraivanja l1

    134/256

    134

  • 7/25/2019 Operaciona istraivanja l1

    135/256

    135

  • 7/25/2019 Operaciona istraivanja l1

    136/256

    136

  • 7/25/2019 Operaciona istraivanja l1

    137/256

    137

  • 7/25/2019 Operaciona istraivanja l1

    138/256

    138

  • 7/25/2019 Operaciona istraivanja l1

    139/256

    139

  • 7/25/2019 Operaciona istraivanja l1

    140/256

    140

  • 7/25/2019 Operaciona istraivanja l1

    141/256

    141

  • 7/25/2019 Operaciona istraivanja l1

    142/256

    142

  • 7/25/2019 Operaciona istraivanja l1

    143/256

    143

  • 7/25/2019 Operaciona istraivanja l1

    144/256

    144

  • 7/25/2019 Operaciona istraivanja l1

    145/256

    145

  • 7/25/2019 Operaciona istraivanja l1

    146/256

    146

  • 7/25/2019 Operaciona istraivanja l1

    147/256

    147

  • 7/25/2019 Operaciona istraivanja l1

    148/256

    148

  • 7/25/2019 Operaciona istraivanja l1

    149/256

    149

  • 7/25/2019 Operaciona istraivanja l1

    150/256

    150

  • 7/25/2019 Operaciona istraivanja l1

    151/256

    151

  • 7/25/2019 Operaciona istraivanja l1

    152/256

    152

  • 7/25/2019 Operaciona istraivanja l1

    153/256

    153

  • 7/25/2019 Operaciona istraivanja l1

    154/256

    154

  • 7/25/2019 Operaciona istraivanja l1

    155/256

    155

  • 7/25/2019 Operaciona istraivanja l1

    156/256

    156

  • 7/25/2019 Operaciona istraivanja l1

    157/256

    157

  • 7/25/2019 Operaciona istraivanja l1

    158/256

    158

  • 7/25/2019 Operaciona istraivanja l1

    159/256

    159

  • 7/25/2019 Operaciona istraivanja l1

    160/256

    160

  • 7/25/2019 Operaciona istraivanja l1

    161/256

    161

  • 7/25/2019 Operaciona istraivanja l1

    162/256

    162

  • 7/25/2019 Operaciona istraivanja l1

    163/256

    163

  • 7/25/2019 Operaciona istraivanja l1

    164/256

    164

  • 7/25/2019 Operaciona istraivanja l1

    165/256

    165

  • 7/25/2019 Operaciona istraivanja l1

    166/256

    166

  • 7/25/2019 Operaciona istraivanja l1

    167/256

    167

  • 7/25/2019 Operaciona istraivanja l1

    168/256

    168

  • 7/25/2019 Operaciona istraivanja l1

    169/256

    169

  • 7/25/2019 Operaciona istraivanja l1

    170/256

    170

  • 7/25/2019 Operaciona istraivanja l1

    171/256

    171

  • 7/25/2019 Operaciona istraivanja l1

    172/256

    172

  • 7/25/2019 Operaciona istraivanja l1

    173/256

    173

  • 7/25/2019 Operaciona istraivanja l1

    174/256

    174

  • 7/25/2019 Operaciona istraivanja l1

    175/256

    175

  • 7/25/2019 Operaciona istraivanja l1

    176/256

    176

  • 7/25/2019 Operaciona istraivanja l1

    177/256

    177

  • 7/25/2019 Operaciona istraivanja l1

    178/256

    178

  • 7/25/2019 Operaciona istraivanja l1

    179/256

    179

  • 7/25/2019 Operaciona istraivanja l1

    180/256

    180

  • 7/25/2019 Operaciona istraivanja l1

    181/256

    181

  • 7/25/2019 Operaciona istraivanja l1

    182/256

    182

  • 7/25/2019 Operaciona istraivanja l1

    183/256

    183

  • 7/25/2019 Operaciona istraivanja l1

    184/256

    184

  • 7/25/2019 Operaciona istraivanja l1

    185/256

    185

  • 7/25/2019 Operaciona istraivanja l1

    186/256

    186

  • 7/25/2019 Operaciona istraivanja l1

    187/256

    187

  • 7/25/2019 Operaciona istraivanja l1

    188/256

    188

  • 7/25/2019 Operaciona istraivanja l1

    189/256

    189

  • 7/25/2019 Operaciona istraivanja l1

    190/256

    190

  • 7/25/2019 Operaciona istraivanja l1

    191/256

    191

  • 7/25/2019 Operaciona istraivanja l1

    192/256

    192

  • 7/25/2019 Operaciona istraivanja l1

    193/256

    193

  • 7/25/2019 Operaciona istraivanja l1

    194/256

    194

  • 7/25/2019 Operaciona istraivanja l1

    195/256

    195

  • 7/25/2019 Operaciona istraivanja l1

    196/256

    196

  • 7/25/2019 Operaciona istraivanja l1

    197/256

    197

  • 7/25/2019 Operaciona istraivanja l1

    198/256

    198

  • 7/25/2019 Operaciona istraivanja l1

    199/256

    199

  • 7/25/2019 Operaciona istraivanja l1

    200/256

    200

  • 7/25/2019 Operaciona istraivanja l1

    201/256

    201

  • 7/25/2019 Operaciona istraivanja l1

    202/256

    202

  • 7/25/2019 Operaciona istraivanja l1

    203/256

    203

  • 7/25/2019 Operaciona istraivanja l1

    204/256

    204

  • 7/25/2019 Operaciona istraivanja l1

    205/256

    205

  • 7/25/2019 Operaciona istraivanja l1

    206/256

    206

  • 7/25/2019 Operaciona istraivanja l1

    207/256

    207

  • 7/25/2019 Operaciona istraivanja l1

    208/256

    208

  • 7/25/2019 Operaciona istraivanja l1

    209/256

    209

  • 7/25/2019 Operaciona istraivanja l1

    210/256

    210

  • 7/25/2019 Operaciona istraivanja l1

    211/256

    211

  • 7/25/2019 Operaciona istraivanja l1

    212/256

    212

  • 7/25/2019 Operaciona istraivanja l1

    213/256

    213

  • 7/25/2019 Operaciona istraivanja l1

    214/256

    214

  • 7/25/2019 Operaciona istraivanja l1

    215/256

    215

  • 7/25/2019 Operaciona istraivanja l1

    216/256

    216

  • 7/25/2019 Operaciona istraivanja l1

    217/256

    217

  • 7/25/2019 Operaciona istraivanja l1

    218/256

    218

  • 7/25/2019 Operaciona istraivanja l1

    219/256

    219

  • 7/25/2019 Operaciona istraivanja l1

    220/256

    220

  • 7/25/2019 Operaciona istraivanja l1

    221/256

    221

  • 7/25/2019 Operaciona istraivanja l1

    222/256

    222

  • 7/25/2019 Operaciona istraivanja l1

    223/256

    223

  • 7/25/2019 Operaciona istraivanja l1

    224/256

    224

  • 7/25/2019 Operaciona istraivanja l1

    225/256

    225

  • 7/25/2019 Operaciona istraivanja l1

    226/256

    226

  • 7/25/2019 Operaciona istraivanja l1

    227/256

    227

  • 7/25/2019 Operaciona istraivanja l1

    228/256

    228

  • 7/25/2019 Operaciona istraivanja l1

    229/256

    229

  • 7/25/2019 Operaciona istraivanja l1

    230/256

    230

  • 7/25/2019 Operaciona istraivanja l1

    231/256

    231

  • 7/25/2019 Operaciona istraivanja l1

    232/256

    232

  • 7/25/2019 Operaciona istraivanja l1

    233/256

    233

  • 7/25/2019 Operaciona istraivanja l1

    234/256

    234

  • 7/25/2019 Operaciona istraivanja l1

    235/256

    235

  • 7/25/2019 Operaciona istraivanja l1

    236/256

    (Ova stranica je ostavljena prazna)

    236

  • 7/25/2019 Operaciona istraivanja l1

    237/256

    237

  • 7/25/2019 Operaciona istraivanja l1

    238/256

    238

  • 7/25/2019 Operaciona istraivanja l1

    239/256

    239

  • 7/25/2019 Operaciona istraivanja l1

    240/256

    240

  • 7/25/2019 Operaciona istraivanja l1

    241/256

    241

  • 7/25/2019 Operaciona istraivanja l1

    242/256

    242

  • 7/25/2019 Operaciona istraivanja l1

    243/256

    243

  • 7/25/2019 Operaciona istraivanja l1

    244/256

    244

  • 7/25/2019 Operaciona istraivanja l1

    245/256

    245

  • 7/25/2019 Operaciona istraivanja l1

    246/256

    246

  • 7/25/2019 Operaciona istraivanja l1

    247/256

    247

  • 7/25/2019 Operaciona istraivanja l1

    248/256

    248

  • 7/25/2019 Operaciona istraivanja l1

    249/256

    249

  • 7/25/2019 Operaciona istraivanja l1

    250/256

    250

  • 7/25/2019 Operaciona istraivanja l1

    251/256

    251

  • 7/25/2019 Operaciona istraivanja l1

    252/256

    252

  • 7/25/2019 Operaciona istraivanja l1

    253/256

    253

  • 7/25/2019 Operaciona istraivanja l1

    254/256

    254

  • 7/25/2019 Operaciona istraivanja l1

    255/256

    Univerzitet u Zenici

    Pedagoki fakultetOdsjek: Matematika i informatika

    Zenica, 12.02.2010.

    Pismeni ispit iz Operacionih istraivanja

    1. Riba se izlovljava u uzgajalitima , , . Svako jutro riba kree put ribarnica koje se

    nalaze u mjestima , , i . Iz uzgajalita do ribarnica prijevoz traje redom: 2, 5, 9 i 6

    sati. Da bi iz riba dola u spomenute ribarnice treba po 1, 7, 3 i 8 sati. Konano, prijevozi iz

    traju 5, 9 do ribarnica , , te po 3 i 4 sata do ribarnica i (respektivno). Na uzgajalitima je

    na raspolaganju: 80 t, 120 t, 160 t dnevno, a ribarnice potrauju redom: 100 t, 40 t, 150 t i 110 t

    dnevno.

    1I 2I 3I

    1R 2R 3R 4R 1I

    2I 3I

    1R 2R 3R 4R

    Kako treba prevesti ribu da ukupno vrijeme transporta bude minimalno.

    Napraviti takav plan transporta da je to je mogue manje ribe na najduem putu. Za polazno

    bazino rjeenje uzeti rjeenje dobijeno pod a)

    2.Za matrinu igru definisanu matricom cijena odrediti optimalne strategije igraa i vrijednost

    igre:

    strategije B1 B2 B3 B4

    A1 10 10 2 2

    A2 2 2 9 9

    A3 5 10 5 10

    A4 4 2 4 2

    3. Na osnovu sastavljene liste odreenog skupa aktivnosti sa njihovim meuzavisnostima i

    determinisanim vremenima realizacije pojedinih aktivnosti , oblikovati i proraunati mreni dijagram

    CPM (nai kritini put, najraniji poetak, najraniji kraj, najkasniji poetak, najkasniji kraj i

    vremenske rezerve)

    Aktivnosti trajanje preduvjeti

    A 3 -

    B 6 -

    C 4 -

    D 7 A

    E 8 A,B

    F 10 A,BG 12 A,B

    H 8 C

    I 6 D,E

    J 7 H,G

    K 2 I,J,F

    4.Problem rijeiti Gomorijevom metodom:

    0

    (min) 4 6

    5 60

    45

    ,

    f x y

    x y

    x y

    x y

    255

  • 7/25/2019 Operaciona istraivanja l1

    256/256

    Univerzitet u Zenici

    Pedagoki fakultet

    Odsjek: Matematika i informatika

    Zenica, 29.01.2010.

    Pismeni ispit iz Operacionih istraivanja

    1.Radna organizacija je nabavila pet maine, specijalizovane za proizvodnju pojedinog sastavnog

    dij l l i d P t b j liti t d ik i t k d j d d ik