Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Spring 2013
E. B arcenas (UPPue)
Spring 2013
1 / 23
Contents
Linear Algebra Linear Programming Queuing Theory Deterministic Inventory Models Discrete Simulation
Bibliography
Winston and Goldberg. Operations Research: Applications and Algorithms. Barnes & Noble.
Evaluation
40% exams (theory), 40% homework (exercises and programming), 10% performance.
E. B arcenas (UPPue)
Spring 2013
2 / 23
Warm up test
1
Wam up test 2
Write a program to solve matrix addition Write a program to solve matrix multiplication Write a program to solve linear systems
E. B arcenas (UPPue)
Spring 2013
4 / 23
aij xj = bi (1 i n)
j =1
E. B arcenas (UPPue) Introduction to Operations Research Spring 2013 5 / 23
Gaussian Elimination
6x1 2x2 + 2x3 + 4x4 = 16 12x1 8x2 + 6x3 + 10x4 = 26 3x1 13x2 + 9x3 + 13x4 = 19 6x1 + 4x2 + x3 18x4 = 41 6x1 2x2 + 2x3 + 4x4 = 16 2x2 + x3 + x4 = 3 24x2 16x3 22x4 = 54 6x2 + x3 + 22x4 = 57
6x1 2x2 + 2x3 + 4x4 = 16 2x2 + x3 + x4 = 3 (10/3)x3 + (35/6)x4 = (41/2) (4/3)x3 + (25/3)x4 = 22 6x1 2x2 + 2x3 + 4x4 = 16 4x2 + 2x3 + 2x4 = 6 (10/3)x3 + (35/6)x4 = (41/2) (80/3)x4 = 96
E. B arcenas (UPPue)
Spring 2013
6 / 23
Gaussian Elimination
Example
2x1 + 2x2 + x3 = 9 2x1 x2 + 2x3 = 6 x1 x2 + 2x3 = 5 x1 + 3x2 + 2x3 + x4 = 2 4x1 + 2x2 + x3 + 2x4 = 2 2x1 + x2 + 2x3 + 3x4 = 1 x1 + 2x2 + 4x3 + x4 = 1
E. B arcenas (UPPue)
Spring 2013
7 / 23
)x2 = 2
Spring 2013
8 / 23
1 1
E. B arcenas (UPPue)
Spring 2013
9 / 23
Works
x1 + x2 = 2 0x1 + x2 = 1 x1 + x2 = 2 x1 + x2 = 1
E. B arcenas (UPPue)
Spring 2013
10 / 23
Complete Pivoting
Selects the pivot entry as the maximum privot entry from all entries in the submatrix.
Example
2 2 c 2c 1 1 2 where c is big.
E. B arcenas (UPPue)
Spring 2013
11 / 23
Solve the given equation system by Gaussian elimination with scaled partial pivoting.
E. B arcenas (UPPue) Introduction to Operations Research Spring 2013 12 / 23
E. B arcenas (UPPue)
Spring 2013
13 / 23
E. B arcenas (UPPue)
Spring 2013
14 / 23
E. B arcenas (UPPue)
Spring 2013
14 / 23
E. B arcenas (UPPue)
Spring 2013
14 / 23
Giapettos problem
Giappeto manufactures two types of wooden toys: soldiers and trains. A soldier sells for $27 and uses $10 worth of raw materials. Each soldier that is manufactured increases Giapettos variable labor and overhead costs by $14. A train sells for $21 and uses $9 worth of raw materials. Each train built increases Giapettos variable labor and overhead costs by $10. The manufacture of wooden soldiers and trains requires two types of skilled labor: carpentry and nishing. A soldier requires 2 hours of nishing labor and 1 hour of carpentry labor. A train requires 1 hour of nishing and 1 hour of carpentry labor. Each week, Giapetto can obtain all the needed raw material but only 100 nishing hours and 80 carpentry hours. Demand for trains is unlimited, but at most 40 soldiers are bought each week. Giapetto wants to maximize weekly prot (revenues minus costs). Formulate a mathematical model of Giapettos situation that can be used to maximize Giapettos weekly prot.
E. B arcenas (UPPue)
Spring 2013
15 / 23
E. B arcenas (UPPue)
Spring 2013
16 / 23
line 2x1 3x2 6 and the points above the line 2x1 3x2 6. This agrees
3
x2 = 2 2 x1 3
FIGURE
1 1
(0, 0)
x1
Spring 2013
17 / 23
the line segmentsolution AB. Thus (40,of 30) two-variable is infeasible, because it fails toprogramming satisfy (2). Graphical linear problems
x2
100
equalities (2)(6). For example, the point (40, 30) lies outside DGFEH because it is above
B (2)
Feasible region
Giappetos problem
Find max z = 3x1 + 2x2
80
60
(4)
40 z = 100
x1 + x2 80 x1 40 x1 0 x2 0
C
80
(3)
20
F z = 60 E A
50
z = 180
60
10
20
40
x1
Spring 2013 18 / 23
E. B arcenas (UPPue)
Minimization problem
Find min z = 50x1 + 100x2 such that 7x1 + 2x2 28 2x1 + 12x2 24 x1 0 x2 0
E. B arcenas (UPPue)
Spring 2013
19 / 23
Minimization problem
graphically, we begin by graphing the feasible region ed by points on or above the line AB (AB is part of
x2
Find min z = 50x1 + 100x2 such that 7x1 + 2x2 28 2x1 + 12x2 24 x1 0 x2 0
FIGURE
14 12 10 8 6 4
(10)
E. B arcenas (UPPue)
Spring 2013
20 / 23
60
B (13)
50
40
30
z = 100
20
(14)
10
z = 60 A C
50 60
10
20
30
40
x1
Spring 2013
20 / 23
+am2 x2
+...
+amn xn x1 , x2 , . . . , xn
bm 0
its canonical form is z c1 x1 a11 x1 a21 x1 . . . am1 x1 +am2 x2 +... +amn xn +sm x1 , x2 , . . . , xn
E. B arcenas (UPPue) Introduction to Operations Research
c2 x2 +a12 x2 +a22 x2
=0 =b1 =b2
=bm 0
Spring 2013 21 / 23
Canonical form of a LP
Convert the following LP to conaonical form
max z = 3x1 + 2x2 s.t. 2x1 + x2 100 x1 + x2 80 x1 40 x1 , x2 0 max z = 3x1 + 2x2 such that 1 x1 + 40 1 x1 + 50 1 x2 1 60 1 x2 1 50 x1 , x2 0