Operation research finished

download Operation research finished

of 12

Transcript of Operation research finished

  • 8/7/2019 Operation research finished

    1/12

    Operation research:Jaroslav Knpek

    Czech Technical University in Prague

    Diogo Vasconcelos

    Jimmy Nordstrm

    Mats Heyman

    1

    http://www.facebook.com/Diogo.A.M.Vasconceloshttp://www.facebook.com/Diogo.A.M.Vasconcelos
  • 8/7/2019 Operation research finished

    2/12

    IntroductionIn these times of snowfall low temperatures and real winter weather we all feel that

    Christmas is near, so we (Jimmy, Diogo and Mats) got the idea for this seminar work,

    to work out, our Christmas Evening here in Prague.

    It seemed interesting for us to optimize our list of to do activities, within the fastest

    time, and this in the most efficient way in order to have an idea how long it would

    take, to prepare it all, if we do it in the optimal way.

    The plan is as followed; we would like to invite 10 friends into our rooms in Strahov

    spread over our 3 rooms. We only have 1 small kitchen at our disposal, this kitchen

    consist of two hotplates and one oven.

    We would like to prepare a real Christmas dinner for our 10 Erasmus friends, on the

    evening of December 24. But we are limited in time because we also need to study,

    and there are some other constraints, we should try to prepare this diner with a

    minimum amount of people and effort.

    We use the critical path method (CPM), a mathematically based algorithm for

    scheduling a set of project activities. Because its an important tool for effective

    project management. And our project is to secure a spectacular Christmas Eve.

    On this way we want to achieve an optimal solution. We also uses the simplex

    method for optimizing how the different tasks are distributed between us all.

    2

  • 8/7/2019 Operation research finished

    3/12

    Description of the taskThe task that is going to be solved consist of 4 different activities cleaning, cooking,

    making the table and buying last minute things. So in order to get a better distributionof task to minimize the time needed, we tried to assign the task according to

    efficiency on doing it (time needed). This efficiency is a value from 0,5 (taking twice

    the normal, estimated time to do it), and 2 (doing it twice as fast as the normal

    time).

    Also, Diogo cant cook so its efficiency is 0, and Jimmy doesnt have a car license, so

    he cant drive and buy the last minute things required for the dinner.

    Since cooking the diner is a kind of complex activity which includes several of small

    activities it is evaluated separately. The preparations would start in the afternoon of

    December 24, we expect 10 people, including a vegetarian, for which we will make a

    special vegetarian Christmas menu,Cabbage dish with chopped onions. The othernine eat the original Christmas dinner: turkey with croquettes and warm vegetables.

    Overview ingredients and preparation:

    Original Christmas dinner: (9 persons) Vegetarian Christmas dinner: (1 person)

    Turkey with croquettes and warm

    vegetables

    Cabbage dish with chopped onions

    Ready to cook a 4 kg turkey

    2 turkey livers

    500 g mixed minced meat (pork)

    2 eggs

    4 cream

    100 grams mushrooms (made

    clean)

    10 tablespoons breadcrumbs

    Salt, pepper and nutmeg

    Baking butter

    0,250 kg potatoes

    2 pcs onions, cut into wedges

    2 cups finely chopped vegetarian

    meat (a 175 g)

    1small table spoon Italian herbs (6

    g jar)

    1 jars of red cabbage with apple

    (a 300 g)

    15 g butter, cold

    1 tablespoons olive oil

    Preparation:

    1. Cut the mushrooms and halve that

    again. Stew the mushrooms for 10

    minutes in some butter.

    2. Break the egg into a bowl and mix

    with the minced meat. Grind theliver finely in a food processor and

    Preparation:

    1. Cut the potatoes into quarters and

    boil in 300 ml of water 20 minutes

    2. Preheat the oven to 180 C. Heat

    the oil in a wok and fry the onion

    for 3 minutes, stir in the choppedherbs and salt and pepper to

    3

  • 8/7/2019 Operation research finished

    4/12

    add to the minced meat. Stir in the

    mushrooms, cream and bread

    crumbs. So now the filling is

    finished.

    3. The turkey: Fill the turkey with the

    ground beef mixture and sew shut

    with needle and thread.

    4. Grease a baking tray and place

    the turkey. Butter well the turkey

    and season to taste with salt,

    pepper and nutmeg. Put an extra

    piece of butter in the baking tray.

    5. Put the turkey for three hours in a

    preheated oven at 180

    degrees. Put in the oven, a dish

    with water to combat

    dehydration. When cooked, add

    any remaining butter and baste

    the turkey regularly with the

    juices.

    taste. Spoon the minced mixture

    into the baking dish. Divide the

    cabbage with apple over it.

    3. Mash potatoes with

    masher. Spread the mixture on

    the cabbage. Cut the butter into

    pieces and arrange over the

    potatoes.

    4. Put the dish in the oven for 30

    minutes until the mash is golden

    brown.

    We have summarized and filled in proceedings; this into the following list of activities

    se table 1 below:

    DiscriptionsProceding

    Pessimistic,b

    Reference,m Optimistic,a

    A Cutting Potatoes 12 10 8

    B Boil Potatoes A 25 20 18

    C Smash potatoes B 11 10 9

    D Make the cover 9 5 4

    E Roll in the cover D,C 48 40 35

    F 1# fry E 11 7 6

    H Prepare the minced meat 17 15 13

    I Cook the minced meat H 26 20 17

    J Cut mushrooms 12 7 5

    K Put all inside I,J 10 6 5

    L Start the oven J 16 15 14

    M Turkey in the oven K,L 250 200 180

    4

  • 8/7/2019 Operation research finished

    5/12

    N Everything in Oven (Vegetarian) M,F,Q 40 30 26

    P Prepare the vegetables 20 15 10

    Q Put potatoes and vegetables together P,C 6 5 3

    Table 1: Description of the activities with proceeding activities and time estimations.

    We solved this problem with the critical path method, the PERT method because our

    problem has a stochastic behavior, in each activity things can go wrong, for example

    while cutting the mushrooms you can cut your finger or the mushroom can fall on the

    ground, then you lose time because you need to clean the mushroom again an clean

    the ground. Thats why the PERT method is useful, because you have the time

    reference, optimistic and pessimistic time.

    5

  • 8/7/2019 Operation research finished

    6/12

    SolvingCooking task

    The strategy when solving the task is first to make a scheme over the whole project

    to be able to calculate the critical path and see approximately how long the project

    will take. This can be seen in figure XX below where also the earliest possible and

    latest acceptable starting times for each activity are written. By looking at the first

    figure we can see that the project is going to take 5 people to solve since there are at

    least in one place 5 parallel activities that requires a person. This is not so optimal

    though most of these persons have nothing to do after they have finished their

    activities. By making another scheme (figure XX) and consider the fact that we want

    to minimize the number of persons that is used. In the second figure the same project

    is done but instead of having 5 people it only requires 2 people, despite that the end

    time and critical path is the same. Preparing it with only one person would also bepossible but that would affect the end time negatively which is not desirable.

    The critical path for the project in both of the cases is the activities H-I-K-M-N which

    also can be seen in the figures.The critical path is the path of activities where the

    total time reserve is zero, the total time reserve can be calculated with the formula

    rc=t'j-ti-tijwhich is (Total time reserve= latest acceptable-earliest possible-time for

    activity)

    Figure XX: Time schedule for the activities with earliest possible and latest

    acceptable starting time for each activity.

    6

  • 8/7/2019 Operation research finished

    7/12

    Figure XX: Time schedule for the activities designed to be performed by two persons

    with earliest possible and latest acceptable starting time for each activity.

    By using the Perth method the meantime and variance can be calculated (see table

    2). With these the probability of finishing within certain time can be calculated, the

    result is shown in figure XX. The calculations is as follows

    MeantimeVariances

    A 10 0,44

    B 20,5 1,36

    C 10 0,11

    D 5,5 0,69

    E 40,5 4,69

    F 7,5 0,69

    H 15 0,44

    I 20,5 2,25

    J 7,5 1,36

    K 6,5 0,69

    L 15 0,11

    M 205 136,11

    N 31 5,44

    P 15 2,77

    Q 4,83 0,25

    Table 2: Calculation of meantime

    and variances for all of the activities

    7

    Meantime: t=a+4m+b6 (see table 1)Variances: D=b-a236Specify the goal time as TG

    The value for the Gaussian distribution function can

    be calculated as Tg-TmDtotal, where Tmis the

    meantime for the project (278 minutes) and Dtotal is

    the sum of the variances from the critical path. From

    the Gaussian distribution function the probability of

    finishing within the goal time is obtained.

    The result is shown in figure XX below.

  • 8/7/2019 Operation research finished

    8/12

    Figure XX: Graph showing the probability of finishing related to different goal times.

    So the result for the cooking task is shown in the figure XX above. As seen the

    probability of finishing within a specified time increase as the time increases. 50%

    chance is obtained with the meantime that was calculated before, and with shorter

    time the change of doing it within the time decreasing.

    Distribution of people task

    For the Christmas dinner there are some tasks that need to be done. So in order to

    get a better distribution of task to minimize the time needed, we tried to assign the

    task according to efficiency on doing it (time needed). This efficiency is a value from

    0,5 (taking twice the normal, estimated time to do it), and 2 (doing it twice as fast as

    the normal time).

    Also, Diogo cant cook so its efficiency is 0, and Jimmy doesnt have a car license, so

    he cant drive and buy the last minute things required for the dinner.

    The time that one single person can work will be 300minutes (because its the time

    needed to finish the cooking, with 96,6% of probability to finish on time, according to

    previous problem). But with efficiency = 1, it would take 830min to finish all the tasks,

    and because Diogo will get there 2 hours later, he can only work 180min, and

    therefore the total working time is 780 min, 50min less than the normal time needed

    to finish. So we need to distribute the tasks in an effective way.

    In order to solve to optimize this dinner preparation, we used to simplex method, to

    solve this problem of linear programming.

    Simplex method Objective: get the best task distribution in order to get minimal time needed.

    Tasks: Cleaning, Cooking, preparing table, Buying last minute things

    People: Diogo, Jimmy, Mats

    Efficiency Cleaning (1) Cooking (2) Table (3) Buying (4)

    Diogo (D) 1,2 0 0,6 0,9

    Jimmy (J) 0,8 1,15 0,9 0

    Mats (M) 1,3 1,2 0,9 0,6

    8

    Goal time 240 255 270 278 285 300 315

    Probalility of

    finishing

    0,08

    % 2,80% 25,32% 50,00%

    71,95

    %

    96,62

    % 99,89%

  • 8/7/2019 Operation research finished

    9/12

    Criteria Function :

    D1+D2+D3+D4+M1+M2+M3+M4+J1+J2+J3+J4= min Tasks requirements :

    1,2 D1+0,8 J1+ 1,3 M1 = 180 (cleaning)

    0 D2 + 1,15 J2 + 1,2 M2 = 300 (cooking)

    0,6 D3+0,9 J3 + 0,9 M3 = 150 (table)

    0,9 D4 + 0 J4 + 0,6 M4 = 100 (buying)

    Time limitation (source limitation):

    D1 + D2 + D3 + D4 180 (Diogo)

    J1 + J2 + J3 + J4 300 (jimmy)

    M1 + M2 + M3 + M4 300 (Mats)

    i)The first step in Simplex method is to put this problem in Standard Form

    Criteria Function : (needs to be minimization)

    D1+D2+D3+D4+M1+M2+M3+M4+J1+J2+J3+J4= min

    Tasks requirements: (Adding artificial variable S, to ensure initial basic

    feasible solution).

    1,2 D1+0,8 J1+ 1,3 M1 +S1= 180 (cleaning)

    0 D2 + 1,15 J2 + 1,2 M2 +S2= 300 (cooking)

    0,6 D3+0,9 J3 + 0,9 M3 +S3= 150 (table)

    0,9 D4 + 0 J4 + 0,6 M4 +S4= 100 (buying)

    Time limitation (source limitation):(For inequalities, turn into equalities,

    adding slack variables )

    D1 + D2 + D3 + D4 +S5 = 180 (Diogo)

    J1 + J2 + J3 + J4 +S6 = 300 (Jimmy)

    M1 + M2 + M3 + M4 +S7 = 300 (Mats)

    Assuming non-negativity in all the variables.

    ii) Start with an elementary base:

    Simplex method is based in the principle that the solution is in a corner point, and

    that each corner point has a related feasible base.

    So we start with an elementary base (using the slack variables).

    iii) Test to see if solution if optimal

    9

  • 8/7/2019 Operation research finished

    10/12

    Than we test to see if the solution can be improved, and if so, we substitute one of

    the vectors in base, and so by changing the base we change the corner point were

    testing.

    iv) Change to another corner point

    Until we finally reach a corner point, where base cannot be improved, and this is our

    optimal solution.

    10

    Base Cb P0 P1 P2 P3 P4 P5 P6 P7 P8

    P 0 1 1 1 1 1 1 1 1

    S1 0 180 1,2 0 0 0 0,8 0 0 0

    S2 0 400 0 0 0 0 0 1,15 0 0

    S3 0 150 0 0 0,8 0 0 0 0,9 0

    S4 0 100 0 0 0 0,9 0 0 0 0

    S5 0 180 1 1 1 1 0 0 0 0

    S6 0 300 0 0 0 0 1 1 1 1

    S7 0 300 0 0 0 0 0 0 0 0

    Zj-Cj

    P9 P10 P11 P12 P13 P14 P15 P16 P17 P18 P19 h-ratio

    1 1 1 1 0 0 0 0 0 0 0

    1,3 0 0 0 1 0 0 0 0 0 0

    0 1,2 0 0 0 1 0 0 0 0 0

    0 0 0,9 0 0 0 1 0 0 0 0

    0 0 0 0,6 0 0 0 1 0 0 0

    0 0 0 0 0 0 0 0 1 0 0

    0 0 0 0 0 0 0 0 0 1 0

    1 1 1 1 0 0 0 0 0 0 1

  • 8/7/2019 Operation research finished

    11/12

    Because manual solution of this problem would take a lot of work, we used

    Excel to solve it.

    Solution:

    Total time, Criteria function = 758,80 min = 12 hours and 39 minutes

    D1 = 0 min J1=0 min M1=138,46 min

    D2 = 0 min J2=92,31 min M2= 161,53 min

    D3 = 0 min J3=166,67 min M3=0 min

    D4 = 111,11 min J4 = 0 min M4 = 0 min

    Total time each person worked:

    Diogo = 158,79 min = 2 hours and 39 minutes

    Jimmy = 300 min = 5 hours

    Mats = 300 min = 5 hours

    With efficiency = 1, (normal estimated time), it would take 830 minutes to finish all

    the tasks. But by distributing the tasks to the most effective people , we got 759

    minutes, which is less on hour and 10 minutes of work (8,58% reduction).

    Mats and Jimmy work the full 5 hours, exhausting all their time. Its a bit unfair that

    Diogo only work 2 hours and 39 minutes, when the two others work a lot more, and

    dont even exhaust all his time, but this is the most effective way to prepare thedinner, so just taking into account doing this task with the least consumption of

    working time, this would be the best solution.

    In reality, as there are 3 people working, the quickest/most effective way to get the

    dinner preparation (because people can work simultaneously) would be to get the

    lower (minimize) the time that the person that worked the most works and not the

    total time. But as said before, we also need to take into account other factors, like for

    instance, that to cook we need 278 minutes to finish the task, (300 minutes to have

    96,6% probability of finishing on time) so we know that people will be working for at

    least 300 minutes. So with this model, we go it, the minimal possible time (300minutes).

    Also with this model we got 2 people working on the cooking, like we get in the

    previous problem.

    Results:

    11

  • 8/7/2019 Operation research finished

    12/12

    So now we have an idea, how much it time it would take to have the perfect

    Christmas evening, using the CPM, PERT method we found that we need at least

    315 min to be sure that the dinner is finished on time.

    From the distribution task where we took also into account, activities as cleaning,

    covering the table and buying the ingredients. We found that Diogo needs to work 2

    hours and 39 minutes, Jimmy and Mats need to work 5 hours. More precise, Diogo

    buys all the ingredients (111,11 min), Jimmy covers the table (166,67min) and

    helps Mats with the cooking (92,31min) and Mats does the cleaning (138,46 min)

    and the cooking (161,53 min).

    References:

    Cooking Recipes:

    http://www.receptjes.be/recept_gevulde_kalkoen.html

    http://www.ah.nl/recepten/recept?id=678698

    12

    http://www.receptjes.be/recept_gevulde_kalkoen.htmlhttp://www.receptjes.be/recept_gevulde_kalkoen.htmlhttp://www.ah.nl/recepten/recept?id=678698http://www.ah.nl/recepten/recept?id=678698http://www.receptjes.be/recept_gevulde_kalkoen.htmlhttp://www.ah.nl/recepten/recept?id=678698