You are on page 1of 9

Benoit PERRUCHE ­ Jules LEGROS W 2014 

Operational Research
Semestrial Work

New Year's eve organization


 
 

Part 1
 
We are organising the new year's party in our flat. We have invited 19 people and we have to 
prepair the drinks. Everybody will give 20€ for the party. So our global budget is 420€. 
We have then ask everybody what were their 5 favorite cocktails, and make a list of the five 
preferate ones : Screwdriver, Tequila sunrise, Whisky coke, Cuba libre and Gin fiz. 
We will then need whisky, vodka, tequila, rhum, gin, orange juice, coke, shweppes and syrup 
to be able to make these cocktails. 
In the following table, the variables xi mean the number of glasses of the matching cocktails, 
qi mean the quantity of beverage i in Liters. 
 
    q1  q2  q3  q4  q5  q6  q7  q8  q9 
  Cocktails\Liquides  Whisky  Vodka  Tequila  Rhum  Gin  Orange  Coke  Schweppes  Syrup 
x1  Screwdriver  0  0,06  0  0  0  0,14  0  0  0 
x2  Tequila Sunrise  0  0  0,06  0  0  0,12  0  0  0,02 
x3  Whisky coke  0,06  0  0  0  0  0  0,14  0  0 
x4  Cuba libre  0  0  0  0,06  0  0  0,14  0  0 
x5  Gin fiz  0  0  0  0  0,06  0  0  0,14  0 
  Price  22  18  16  13  12  2  3  3  3 
 
The prices are in euros for one liter. Each glass of cocktail is made of 0,2 liter of drink mix. 
For example, a glasse of screwdriver is made of 6cl of vodka and 14cl of orange juice. 
 
Our goal is to make the maximum number of glasses with our 420€. Moreover, we don’t want 
to only have the cheaper cocktail, so we decided to have at least 80 glasses of screwdriver, 
tequila sunrise or whisky coke. 
 
We can express our problem with the following way : 
­ Objective function : MAX = x1 + x2 + x3 + x4 + x5 
­ Constraints : 

1/9 
Benoit PERRUCHE ­ Jules LEGROS W 2014 


 (0.06*18 + 0.14*2) x1 + (0.06*16 + 12*2) x2 + (0.06*22 + 0.14*3) x3 + (0.06*13 + 14*3) 
x4 + (0.06*12 + 0.14*3) x5  ≤  420 

x1 + x2 + x3  ≥  80 

⇔ 
 


1.5 x1 + 1.26 x2 + 1.74 x3 + 1.2 x4 + 1.14 x5  ≤  420 

x1 + x2 + x3  ≥  80 
Also,  ∀ i  ∈   [1; 5] ,  xi   ≥  0. 
 
Our next step, after expressing the problem, is to get the dual of this linear program : 
 
­ Objective function : MIN = 420 y1 + 80 y2 
­ Constraints :   
 
 


1.5 y1 + y2  ≥   1 (1) 

1.26 y1 + y2  ≥   1 (2) 

1.74 y1 + y2  ≥   1 (3) 

1.2 y1  ≥   1 (4) 

1.14 y1  ≥   1 (5) 


 
­ Variables : y1  ≥  0, y2  ≤  0 
 
In order to solve this system, we will trace on a diagram the 5 lines corresponding to the 5 
equations, and the objective function. Thanks to the graphical solution, we will find the 
equations that correspond to the resolution of the optimum. 
 

2/9 
Benoit PERRUCHE ­ Jules LEGROS W 2014 

 
 
Our optimal solution is on this green part : 

 
 
We can see graphically that the optimum is the intersection of the lines made by the 
constraints 2 & 5. Indeed, by looking at the objective function, our solution is given by the 
coordinates : 

3/9 
Benoit PERRUCHE ­ Jules LEGROS W 2014 


y2 = 1 ­ 1.26 y1 

 
1  
y1 =  1.14

⇔ 
 


y2 = ­  0.12
1.14  

 
1  
y1 =  1.14
 
And our dual objective function becomes : 
1  ­ 80 *  0.12  = 360  
420 *  1.14 1.14
 
According to these results, we know that we are only doing x2 and x5, that is to say tequila 
sunrise and gin fiz. 
 
Then, we get in our primal linear program :  
 
 


1.26 x2 + 1.14 x5 = 420 

 
x2 = 80 
 

⇔ 
 


x2 = 80 

 
x5 = 280 
 
That means that we are going to make 80 glasses of tequila sunrise, and 280 of gin fiz. 
As in the dual, we get for our objective function : x2 + x5 = 360 glasses. 
 
Now, we want to know what we have to buy on the supermarket : 

4/9 
Benoit PERRUCHE ­ Jules LEGROS W 2014 

Number of tequila liters = 80 * 0.06 = 4.8 
Norange = 80 * 0.12 = 9.6 
Nsyrup = 80 * 0.02 = 1.6 
Ngin = 280 * 0.06 = 16.8 
Nshweppes = 280 * 0.14 = 39.2 
 
   

5/9 
Benoit PERRUCHE ­ Jules LEGROS W 2014 

Part 2
 
The problem of the part 1 is the fact that there is no whisky coca or no screwdriver; some 
cocktails aren’t made. So we took the 3 most appreciated cocktails and put a constraint on the 
number of glasses according to what and how much people want to drink. 
 
 
    b1  b2  b3  b4  b5 
  Cocktails\Liquides  Whisky  Vodka  Rhum  Orange  Coke 
x1  Screwdriver  0  0,06  0  0,14  0 
x2  Whisky coke  0,06  0  0  0  0,14 
x3  Cuba libre  0  0  0,06  0  0,14 
  Price  22  18  13  2  3 
 
 
Our objective function is : MAX = x1 + x2 + x3. We still want to maximize the number of 
glasses we will be able to drink. We will call of objective function f. 
(1) (0.06 * 18+0.14 * 2) x1 + (0.06 * 22 + 0.14 * 3) x2 + (0.06 * 13 + 0.14 * 3) x3  ≤   420 

{  (2)

(3)
x1  ≥   35 

x2  ≥   70 

⇔ 
 


(1) 1.51 x1 + 1.74 x2 +1.2 x3  ≤   420  

(2) x1  ≥   35 

(3) x2  ≥   70 

 
Also,  ∀ i  ∈   [1; 3] ,  xi   ≥  0. 
 
To solve this problem, we will use the Simplex Algorithm  
1.51 x1 + 1.74 x2 + 1.2 x3 +S1 = 420 
x1 ­ S2 = 35 
x2 ­ S3 = 70 
 

6/9 
Benoit PERRUCHE ­ Jules LEGROS W 2014 

 
With S1, S2, S3  ≥  0. 
 
x1 = x2 = x3 = 0 
S1 = 420 ­ (1.51 x1 + 1.74 x2 + 1.2 x3) = 420 
S2 = x1 ­ 35 
S3 = x2 ­ 70 
 
So we get here : P1 = (0,0,0,420,­35,­70), and f = 0. 
 
We then look at the most powerful constraints to make enter the variable x1 : 
S1  ≥  0  ⇒  420 ­ 1.51 x1  ≥  0 
420  
⇔  x1  ≤   1.51
S2  ≥  0  ⇒  x1  ≤  35 
S3  ≥  0  ⇒ no constraint on x1 
 
420 , the variable x1 replace S2. 
So, since 35  ≤   1.51
 
We then get : 
x1 = S2 + 35 
S1 = 420 ­ (1.51*(S2 + 35) + 1.74 x2 + 1.2 x3) = 367.15 ­ (1.51 S2 + 1.74 x2 + 1.2 x3) = 
367.15 
S3 = x2 ­ 70 
f = (S2 + 35) + x2 + x3 
 
Our base here is (x1,S1,S3), and f = 35 with the solution (35,0,0,367.15,0,­70). 
 
We now try to enter the variable x2 : 
x1  ≥  0  ⇒  no constraint on x2 
S1  ≥  0  ⇒  367.15 ­ 1.74 x2  ≥  0 
⇔  x2  ≤  211 
S3  ≥  0  ⇒  x2  ≤  70 
 
So, since 70  ≤  211, we replace S3 by x2. 
 
   

7/9 
Benoit PERRUCHE ­ Jules LEGROS W 2014 

We then get: 
x1 = S2 + 35 
x2 = S3 + 70 
S1 = 367.15 ­ (1.51 S2 + 1.74*(S3 + 70) + 1.2 x3) = 245.35 ­ (1.51 S2 + 1.74 S3 + 1.2 x3)  
f = 110 + S2 + S3 + x3 
 
Our base here is (x1,x2,S1), and f = 110 with the solution (35,70,0,245.35,0,0). 
 
For the last step, we want to enter x3 :  
x1  ≥  0  ⇒  no constraint on x3 
x2  ≥  0  ⇒  no constraint on x3 
S1  ≥  0  ⇒  245.35 ­ 1.2 x3  ≥  0 
⇔  x3  ≤  204 
 
We replace S1 by x3, and get as a final solution : 
x1 = 35 
x2 = 70 
x3 = 204 
f = 309 
 
So we will do 309 glasses, 35 of screwdriver, 70 of whisky coke, and 204 of cuba libre. 
 
Now, we want to know what we have to buy on the supermarket : 
Number of vodka liters = 35 * 0.06 = 2.1 
Norange = 35 * 0.14 = 4.9 
Nwhisky = 70 * 0.06 = 4.2 
Nrhum = 204 * 0.06 = 12.24 
Ncoke = (70 + 204) * 0.14 = 38.36 
 
Finally, since the beverages are not sold by pack of 38.36L, we have an other problem. 
There is bottle of 0.7L and 1L for alcoholic beverage and, for juice and soda, the size are 1L 
and 1.5L. 
so we will buy : 
­ 3 * 0.7L of Vodka : 3 * 0.7 * 18€ = 37.8€ 
­ 5 * 1L of Orange juice : 5 *  2€ = 10€ 
­ 6 * 0.7L of Whisky : 6 * 0.7 *22€ = 92.4€ 
­ 12 * 1L of Rhum : 12 * 13€ = 156€ 
­ 39 * 1L of Coke : 39 * 3€ = 117€ 
Our budget used is still  ≤  420€, since 0.1*2 ­ 0.24*13 + 0.64*3 = ­1  ≤  0. 
    (orange surplus ­ lack of rhum + coke surplus) 

8/9 
Benoit PERRUCHE ­ Jules LEGROS W 2014 

Total : 413.2€ 
We will make slightly lighter screwdrivers, Cuba Libre and Whisky Coke and the surplus will 
be used to buy some food. 

9/9 

You might also like