FBA (1) Author: Tõnis Aaviksaar TALLINN 2006 CCFFT
2 Contents Intro Systems of linear equations Solution by row operations Steady state mass balance Linear Programming
3 Metabolic Networks Metabolic networks consist of reactions between metabolites Flux Balance Analysis (FBA) calculates flux patterns from a system of linear equations –Flux value = rate of reaction –Flux pattern is a collection of flux values
4 v3v3 v4v4 v2v2 v1v1 A B C.... v5v5 Flux Patterns v3v3 v4v4 v2v2 v1v1 A B C.... v5v5 v1v1 v2v2 v3v3 v4v4 v5v5 v = v3v3 v4v4 v2v2 v1v1 A B C.... v5v5
5 Metabolic Networks Metabolic networks consist of reactions between metabolites –Thousands of metabolites –More reactions than metabolites Flux Balance Analysis (FBA) calculates flux patterns from a system of linear equations –Flux value = rate of reaction –Flux pattern is a collection of flux values
6 FBA Steady-state mass balance equations Weighted sums (linear combinations) of –Reaction stoichiometries –Flux patterns
7 Contents Intro Systems of linear equations Solution by row operations Steady state mass balance Linear Programming
8 Linear equation 2x 1 + 3x 2 + 4x 3 = 11
9 Linear equation a 1 x 1 + a 2 x 2 + a 3 x 3 = b in matrix form x1x1 x2x2 x3x3 a1a1 a2a2 a3a3 b×= 2x 1 + 3x 2 + 4x 3 = 11
10 Linear equation a 1 x 1 + a 2 x 2 + a 3 x 3 = b in matrix form x1x1 x2x2 x3x3 a1a1 a2a2 a3a3 b×=a 1 x 1 + a 2 x 2 + a 3 x 3 = 2x 1 + 3x 2 + 4x 3 = 11
11 System of linear equations a 11 x 1 + a 12 x 2 + a 13 x 3 = b 1 a 21 x 1 + a 22 x 2 + a 23 x 3 = b 2 a 31 x 1 + a 32 x 2 + a 33 x 3 = b 3 in matrix form x1x1 x2x2 x3x3 ×= a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33 a 11 x 1 + a 12 x 2 + a 13 x 3 a 21 x 1 + a 22 x 2 + a 23 x 3 a 31 x 1 + a 32 x 2 + a 33 x 3 = b1b1 b2b2 b3b3
12 System of linear equations a 11 x 1 + a 12 x 2 + a 13 x 3 = b 1 a 21 x 1 + a 22 x 2 + a 23 x 3 = b 2 a 31 x 1 + a 32 x 2 + a 33 x 3 = b 3 in matrix form x1x1 x2x2 x3x3 ×= a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33 a 11 x 1 + a 12 x 2 + a 13 x 3 a 21 x 1 + a 22 x 2 + a 23 x 3 a 31 x 1 + a 32 x 2 + a 33 x 3 = b1b1 b2b2 b3b3
13 System of linear equations a 11 x 1 + a 12 x 2 + a 13 x 3 = b 1 a 21 x 1 + a 22 x 2 + a 23 x 3 = b 2 a 31 x 1 + a 32 x 2 + a 33 x 3 = b 3 in matrix form x1x1 x2x2 x3x3 ×= a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33 a 11 x 1 + a 12 x 2 + a 13 x 3 a 21 x 1 + a 22 x 2 + a 23 x 3 a 31 x 1 + a 32 x 2 + a 33 x 3 = b1b1 b2b2 b3b3
14 System of linear equations a 11 x 1 + a 12 x 2 + a 13 x 3 = b 1 a 21 x 1 + a 22 x 2 + a 23 x 3 = b 2 a 31 x 1 + a 32 x 2 + a 33 x 3 = b 3 in matrix form x1x1 x2x2 x3x3 ×= a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33 a 11 x 1 + a 12 x 2 + a 13 x 3 a 21 x 1 + a 22 x 2 + a 23 x 3 a 31 x 1 + a 32 x 2 + a 33 x 3 = b1b1 b2b2 b3b3
15 System of linear equations a 11 x 1 + a 12 x 2 + a 13 x 3 = b 1 a 21 x 1 + a 22 x 2 + a 23 x 3 = b 2 a 31 x 1 + a 32 x 2 + a 33 x 3 = b 3 in matrix form x1x1 x2x2 x3x3 ×= b1b1 b2b2 b3b3 a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33
16 Linear Combination of Columns System of linear equations a 11 x 1 + a 12 x 2 + a 13 x 3 = b 1 a 21 x 1 + a 22 x 2 + a 23 x 3 = b 2 a 31 x 1 + a 32 x 2 + a 33 x 3 = b 3 in matrix form x1x1 x2x2 x3x3 ×= b1b1 b2b2 b3b3 a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33
17 Linear Combination of Columns System of linear equations a 11 x 1 + a 12 x 2 + a 13 x 3 = b 1 a 21 x 1 + a 22 x 2 + a 23 x 3 = b 2 a 31 x 1 + a 32 x 2 + a 33 x 3 = b 3 in matrix form = a 11 a 21 a 31 a12a12 a22a22 a32a32 a13a13 a23a23 a33a33 x1 +x1 +x2 +x2 +x3x3 x1x1 x2x2 x3x3 × a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33
18 Linear Combination of Columns System of linear equations a 11 x 1 + a 12 x 2 + a 13 x 3 = b 1 a 21 x 1 + a 22 x 2 + a 23 x 3 = b 2 a 31 x 1 + a 32 x 2 + a 33 x 3 = b 3 in matrix form = x1x1 x2x2 x3x3 × a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33 a 11 x 1 + a 12 x 2 + a 13 x 3 a 21 x 1 + a 22 x 2 + a 23 x 3 a 31 x 1 + a 32 x 2 + a 33 x 3
19 Linear Combination of Columns System of linear equations a 11 x 1 + a 12 x 2 + a 13 x 3 = b 1 a 21 x 1 + a 22 x 2 + a 23 x 3 = b 2 a 31 x 1 + a 32 x 2 + a 33 x 3 = b 3 in matrix form x1x1 x2x2 x3x3 ×= b1b1 b2b2 b3b3 a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33
20 Contents Intro Systems of linear equations –Rows correspond to equations –Linear combination of columns Solution by row operations Steady state mass balance Linear Programming
21 Matrices Identity matrix I Inverse of a matrix AA -1 = I if AB = I and BA = I then B = A -1 and A = B -1 Solution to a system of linear equations Ax = b A -1 Ax = A -1 b I = 1 1 1
22 Matrices Identity matrix I Inverse of a matrix AA -1 = I if AB = I and BA = I then B = A -1 and A = B -1 Solution to a system of linear equations Ax = b A -1 Ax = A -1 b Ix = A -1 b x = A -1 b I = x1x1 x2x2 x3x3 × Ix = = x1x1 x2x2 x3x3
23 Matrices Identity matrix I Inverse of a matrix AA -1 = I if AB = I and BA = I then B = A -1 and A = B -1 Solution to a system of linear equations Ax = b A -1 Ax = A -1 b Ix = A -1 b x = A -1 b I = x1x1 x2x2 x3x3 × Ix = = x1x1 x2x2 x3x3
24 Matrix Row Operations –7–6–12– /712/733/ /712/733/7 5/7–11/73/7 –6/716/72/7 · (–1 / 7) – 5 · R1 – 1 · R1
25 Matrix Row Operations –7–6–12– /712/733/ · (–1 / 7) – 5 · R1 – 1 · R1 1− …. 16/712/733/7 5/7–11/73/7 –6/716/72/7 · 7 / 5
26 Matrix Row Operations Equivalent systems of equations –Two systems of equations are equivalent if they have same solution sets Row operations produce equivalent systems of equations –Changing the order of rows –Multiplication of a row by a constant 2x = 4 is equivalent to 4x = 8 –Addition of a row to another row 2x 1 + 3x 2 = 5 -x 1 + 2x 2 = 1 2x 1 + 3x 2 = 5 x 1 + 5x 2 = 6 is equivalent to
27 Matrix Row Operations Equivalent systems of equations –Two systems of equations are equivalent if they have same solution sets Row operations produce equivalent systems of equations –Changing the order of rows –Multiplication of a row by a constant 2x = 4 is equivalent to 4x = 8 –Addition of a row to another row 2x 1 + 3x 2 = 5 -x 1 + 2x 2 = 1 2x 1 + 3x 2 = 5 x 1 + 5x 2 = 6 is equivalent to
28 Gaussian Elimination Given a system of linear equations Ax = bAx = b Matrix A is augmented by b [ A | b ] Which is then simplified by row operations to produce [ I | c ] Which corresponds to system of equations Ix = cIx = c Which is equivalent to the original system Ax = bAx = b
29 System of equations −7x 1 − 6x 2 − 12x 3 = −33 5x 1 + 5x 2 + 7x 3 = 24 x 1 + 4x 3 = 5 Row-Reduced [ A | b ] ~ [ I | c ] = Simplified equivalent system of equations, only one solution x 1 = −3 x 2 = 5 x 3 = 2 Row-Reduced [ A | b ] Examples 1− −7−6−12− [ A | b ] =
30 Row-Reduced [ A | b ] Examples System of equations x 1 − x 2 + 2x 3 = 1 2x 1 + x 2 + x 3 = 8 x 1 + x 2 = 5 Row-Reduced [ A | b ] Simplified equivalent system of equations, infinite number of solutions (solution space) x 1 + x 3 = 3 x 2 − x 3 = −12
31 Row-Reduced [ A | b ] Examples System of equations 2x 1 + x 2 + 7x 3 − 7x 4 = 2 −3x 1 + 4x 2 − 5x 3 − 6x 4 = 3 x 1 + x 2 + 4x 3 − 5x 4 = 2 Row-Reduced [ A | b ] Inconsistent system, no solutions 0x 1 + 0x 2 + 0x 3 − 0x 4 ≠ 1 13−2 11−3 1
32 Gaussian Elimination Carl Friedrich Gauss (1777–1855) Chiu-chang suan-shu or The Nine Chapters on the Mathematical Art, written around 250 BCE
33 Contents Intro Systems of linear equations Solution by row operations –Equivalent linear systems –Reduced row echelon form Steady state mass balance Linear programming
34 Steady State Approximation Steady state condition Fluxes ≠ 0 Concentrations = const Steady state mass balance Compound production = consumption Production – consumption = 0 v2v2 v1v1 A....
35 Mass Balance Equations v 1 – v 2 = 0 v 2 – v 3 – v 5 = 0 v 3 – v 4 = A B C v1v1 v2v2 v3v3 v4v4 v5v5 v1v1 v2v2 v3v3 v4v4 v5v5 ×= Nv = 0 v3v3 v4v4 v2v2 v1v1 A B C.... v5v5
36 Stoichiometry Matrix … … … … … H2OH2O O2O2 H2H2 N2N2 NH 3 v1v1 v2v2 … v1v1 v2v2 … × v2v2 H2H2 N2N2 1N 2 + 3H 2 = 2NH 3 2H 2 O = 2H 2 + 1O 2 O2O2 NH 3 H2OH2O v1v1
37 Stoichiometry Matrix … … … … … H2OH2O O2O2 H2H2 N2N2 NH 3 v1v1 v2v2 … v1v1 v2v2 … × v2v2 H2H2 N2N2 1N 2 + 3H 2 = 2NH 3 2H 2 O = 2H 2 + 1O 2 O2O2 NH 3 H2OH2O v1v1
38 Stoichiometry Matrix -2… … … … … H2OH2O O2O2 H2H2 N2N2 NH 3 v1v1 v2v2 … v1v1 v2v2 … × v2v2 H2H2 N2N2 1N 2 + 3H 2 = 2NH 3 2H 2 O = 2H 2 + 1O 2 O2O2 NH 3 H2OH2O v1v1
39 Stoichiometry Matrix -2… … 2… … … H2OH2O O2O2 H2H2 N2N2 NH 3 v1v1 v2v2 … v1v1 v2v2 … × v2v2 H2H2 N2N2 1N 2 + 3H 2 = 2NH 3 2H 2 O = 2H 2 + 1O 2 O2O2 NH 3 H2OH2O v1v1
40 Stoichiometry Matrix -2… 1… 2… … … H2OH2O O2O2 H2H2 N2N2 NH 3 v1v1 v2v2 … v1v1 v2v2 … × v2v2 H2H2 N2N2 1N 2 + 3H 2 = 2NH 3 2H 2 O = 2H 2 + 1O 2 O2O2 NH 3 H2OH2O v1v1
41 Stoichiometry Matrix -2… 1… 2… … … H2OH2O O2O2 H2H2 N2N2 NH 3 v1v1 v2v2 … v1v1 v2v2 … × v2v2 H2H2 N2N2 1N 2 + 3H 2 = 2NH 3 2H 2 O = 2H 2 + 1O 2 O2O2 NH 3 H2OH2O v1v1
42 Stoichiometry Matrix -2… 1… 2… … … H2OH2O O2O2 H2H2 N2N2 NH 3 v1v1 v2v2 … v1v1 v2v2 … × v2v2 H2H2 N2N2 1N 2 + 3H 2 = 2NH 3 2H 2 O = 2H 2 + 1O 2 O2O2 NH 3 H2OH2O v1v1
43 Stoichiometry Matrix -2… 1… 2-3… … 2… H2OH2O O2O2 H2H2 N2N2 NH 3 v1v1 v2v2 … v1v1 v2v2 … × v2v2 H2H2 N2N2 1N 2 + 3H 2 = 2NH 3 2H 2 O = 2H 2 + 1O 2 O2O2 NH 3 H2OH2O v1v1
44 Stoichiometry Matrix -2… 1… 2-3… … 2… H2OH2O O2O2 H2H2 N2N2 NH 3 v1v1 v2v2 … v1v1 v2v2 … × v2v2 H2H2 N2N2 1N 2 + 3H 2 = 2NH 3 2H 2 O = 2H 2 + 1O 2 O2O2 NH 3 H2OH2O v1v1
45 Stoichiometry Matrix H2OH2O O2O2 H2H2 N2N2 NH 3 v2v2 H2H2 N2N2 1N 2 + 3H 2 = 2NH 3 2H 2 O = 2H 2 + 1O 2 O2O2 NH 3 H2OH2O v1v v1 +v1 + v 2 + …. v1v1 v2v2
46 Stoichiometry Matrix H2OH2O O2O2 H2H2 N2N2 NH 3 v2v2 H2H2 N2N2 1N 2 + 3H 2 = 2NH 3 2H 2 O = 2H 2 + 1O 2 O2O2 NH 3 H2OH2O v1v v1 +v1 + v 2 + …. = v 1 = 3 v 2 = 2 v1v1 v2v2
47 Stoichiometry Matrix H2OH2O O2O2 H2H2 N2N2 NH 3 v2v2 H2H2 N2N2 1N 2 + 3H 2 = 2NH 3 2H 2 O = 2H 2 + 1O 2 O2O2 NH 3 H2OH2O v1v v1 +v1 + v 2 + …. = v 1 = 3 v 2 = 2 v1v1 v2v2
48 Stoichiometry Matrix H2OH2O O2O2 H2H2 N2N2 NH 3 v2v2 H2H2 N2N2 1N 2 + 3H 2 = 2NH 3 2H 2 O = 2H 2 + 1O 2 O2O2 NH 3 H2OH2O v1v v1 +v1 + v 2 + …. = v 1 = 3 v 2 = 2 v1v1 v2v2
49 Calculable Fluxes v 1 – v 2 = 0 v 2 – v 3 – v 5 = 0 v 3 – v 4 = 0 v3v3 v4v4 v2v2 v1v1 A B C.... v5v A B C v1v1 v2v2 v3v3 v4v4 v5v5 v1v1 v2v2 v3v3 v4v4 v5v5 ×= A B C Nv = 0
50 Calculable Fluxes v 1 – v 2 = 0 v 2 – v 3 – v 5 = 0 v 3 – v 4 = 0 v3v3 v4v4 v2v2 v1v1 A B C.... v5v A B C v1v1 v2v2 v3v3 v4v4 v5v5 v1v1 v2v2 v3v3 v4v4 v5v5 ×= A B C Nv = 0
51 Calculable Fluxes v3v3 v4v4 v2v2 v1v1 A B C.... v5v A B C v1v1 v2v2 v3v3 v4v4 v5v5 v1v1 v2v2 v3v3 v4v4 v5v5 ×= Nv = 0 A B C 1 1 A B C v2v2 v3v3 v5v5 v1v1 v4v4 += 1 v1v1 v4v4 v2v2 v3v3 v5v5 ×× N clc v clc + N exp v exp = 0 v 1 = 1.0 v 4 =.4 A B C
52 Calculable Fluxes v3v3 v4v4 v2v2 v1v1 A B C.... v5v A B C v1v1 v2v2 v3v3 v4v4 v5v5 v1v1 v2v2 v3v3 v4v4 v5v5 ×= Nv = 0 A B C 1 1 A B C v2v2 v3v3 v5v = 1 v1v1 v4v4 v2v2 v3v3 v5v5 ×× N clc v clc + N exp v exp = 0 v 1 = 1.0 v 4 =.4 A B C
53 Calculable Fluxes v3v3 v4v4 v2v2 v1v1 A B C.... v5v A B C v1v1 v2v2 v3v3 v4v4 v5v5 v1v1 v2v2 v3v3 v4v4 v5v5 ×= Nv = 0 A B C 1 1 A B C v2v2 v3v3 v5v5 += v2v2 v3v3 v5v5 × N clc v clc + N exp v exp = b exp A B C v 1 = 1.0 v 4 =.4
54 Calculable Fluxes v3v3 v4v4 v2v2 v1v1 A B C.... v5v A B C v1v1 v2v2 v3v3 v4v4 v5v5 v1v1 v2v2 v3v3 v4v4 v5v5 ×= Nv = 0 A B C N clc v clc + N exp v exp = A B C v2v2 v3v3 v5v5 =.4 A B C b clc v2v2 v3v3 v5v5 ×
55 Row-Reduced [ A | b ] Examples System of equations x 1 − x 2 + 2x 3 = 1 2x 1 + x 2 + x 3 = 8 x 1 + x 2 = 5 Row-Reduced [ A | b ] Simplified equivalent system of equations, infinite number of solutions (solution space) x 1 + x 3 = 3 x 2 − x 3 = −12
56 Dependent and Free Fluxes A B C v2v2 v3v3 v5v5 v1v1 v4v4 v2v2 v3v3 v5v5 v1v1 v4v4 ×= A B C v2v2 v3v3 v5v5 v1v1 v4v4 v3v3 v4v4 v2v2 v1v1 A B C.... v5v5 Nv = 0 N clc v clc + N exp v exp = 0
57 Dependent and Free Fluxes v1v1 v2v2 v5v5 v3v3 v4v R3 + R R3 v3v3 v4v4 v2v2 v1v1 A B C.... v5v5
58 Dependent and Free Fluxes v1v1 v2v2 v3v3 v4v4 v5v R1 · (-1) v3v3 v4v4 v2v2 v1v1 A B C.... v5v5
59 Dependent and Free Fluxes v1v1 v2v2 v3v3 v4v4 v5v R2 · (-1) v3v3 v4v4 v2v2 v1v1 A B C.... v5v5
60 Contents Intro Systems of linear equations Solution by row operations Steady state mass balance –Steady state mass balance –Stoichiometry matrix –Dependent and free fluxes Linear Programming
61 Underdetermined Systems Be content with infinite solution space Make more measurements Assign “experimental” values Assume that the microorganism “tries” to optimize an objective –Maximize biomass production –Maximize ATP production –….
62 The Simplex Method Objective function –A linear function Constraints –Linear inequalities Assumption that all variables are nonnegative –x i ≥ 0 Solution space is a convex polytope –An optimal solution is a vertex –Move to neighboring vertex with highest objective function value
63 Simplex Example (1) v3v3 z v2v2 v1v1 A B C.... v4v4 +z−v3−v3 =0 C→ max
64 Simplex Example (1) v3v3 z v2v2 v1v1 A B C.... v4v4 +z−v3−v3 =0 +v1+v1 −v2−v2 +v2+v2 −v3−v3 −v4−v4 +v1+v1 ≤5≤5 C A B → max
65 Simplex Example (1) v3v3 z v2v2 v1v1 A B C.... v4v4 +z−v3−v3 =0 +v1+v1 −v2−v2 +v2+v2 −v3−v3 −v4−v4 +v1+v1 +x 5 =5 C A B → max
66 Simplex Example (1) v3v3 z v2v2 v1v1 A B C.... v4v4 +z−v3−v3 =0 +v1+v1 −v2−v2 ≤0≤0 +v1+v1 −v2−v2 ≥0≥0 +v2+v2 −v3−v3 −v4−v4 ≤0≤0 +v2+v2 −v3−v3 −v4−v4 ≥0≥0 +v1+v1 +x 5 =5 C A A B B → max
67 Simplex Example (1) v3v3 z v2v2 v1v1 A B C.... v4v4 +z−v3−v3 =0 +v1+v1 −v2−v2 ≤0≤0 −v1−v1 +v2+v2 ≤0≤0 +v2+v2 −v3−v3 −v4−v4 ≤0≤0 −v2−v2 +v3+v3 +v4+v4 ≤0≤0 +v1+v1 +x 5 =5 C A A B B → max
68 Simplex Example (1) v3v3 z v2v2 v1v1 A B C.... v4v4 +z−v3−v3 =0 +v1+v1 −v2−v2 +x 1 =0 −v1−v1 +v2+v2 +x 2 =0 +v2+v2 −v3−v3 −v4−v4 +x 3 =0 −v2−v2 +v3+v3 +v4+v4 +x 4 =0 +v1+v1 +x 5 =5 C A A B B → max
69 Simplex Example (1) v3v3 z v2v2 v1v1 A B C.... v4v4 +z−v3−v3 =0 +v1+v1 −v2−v2 +x 1 =0 −v1−v1 +v2+v2 +x 2 =0 +v2+v2 −v3−v3 −v4−v4 +x 3 =0 −v2−v2 +v3+v3 +v4+v4 +x 4 =0 +v1+v1 +x 5 =5 C A A B B → max
70 Simplex Example (1) v3v3 z v2v2 v1v1 A B C.... v4v4 +z−v2−v2 +v4+v4 +x 4 =0 +v1+v1 −v2−v2 +x 1 =0 −v1−v1 +v2+v2 +x 2 =0 +x 3 +x 4 =0 −v2−v2 +v3+v3 +v4+v4 +x 4 =0 +v1+v1 +x 5 =5 C A A B B → max
71 Simplex Example (1) v3v3 z v2v2 v1v1 A B C.... v4v4 +z−v2−v2 +v4+v4 +x 4 =0 +v1+v1 −v2−v2 +x 1 =0 −v1−v1 +v2+v2 +x 2 =0 +x 3 +x 4 =0 −v2−v2 +v3+v3 +v4+v4 +x 4 =0 +v1+v1 +x 5 =5 C A A B B → max
72 Simplex Example (1) v3v3 z v2v2 v1v1 A B C.... v4v4 +z−v1−v1 +v4+v4 +x 2 +x 4 =0 +x 1 +x 2 =0 −v1−v1 +v2+v2 +x 2 =0 +x 3 +x 4 =0 −v1−v1 +v3+v3 +v4+v4 +x 2 +x 4 =0 +v1+v1 +x 5 =5 C A A B B → max
73 Simplex Example (1) v3v3 z v2v2 v1v1 A B C.... v4v4 +z−v1−v1 +v4+v4 +x 2 +x 4 =0 +x 1 +x 2 =0 −v1−v1 +v2+v2 +x 2 =0 +x 3 +x 4 =0 −v1−v1 +v3+v3 +v4+v4 +x 2 +x 4 =0 +v1+v1 +x 5 =5 C A A B B → max
74 Simplex Example (1) v3v3 z v2v2 v1v1 A B C.... v4v4 +z+v4+v4 +x 2 +x 4 +x 5 =5 +x 1 +x 2 =0 +v2+v2 +x 2 +x 5 =5 +x 3 +x 4 =0 +v3+v3 +v4+v4 +x 2 +x 4 +x 5 =5 +v1+v1 +x 5 =5 C A A B B → max
75 Simplex Example (1) v3v3 z v2v2 v1v1 A B C.... v4v4 +z+v4+v4 +x 2 +x 4 +x 5 =5 +x 1 +x 2 =0 +v2+v2 +x 2 +x 5 =5 +x 3 +x 4 =0 +v3+v3 +v4+v4 +x 2 +x 4 +x 5 =5 +v1+v1 +x 5 =5 C A A B B → max
76 Simplex Example (2) z v3v3 v1v1 AB C.... v4v4 v2v2 2A + 3B = 1C +z−v3−v3 =0 +v1+v1 −2v3−2v3 −v4−v4 +x 1 =0 −v1−v1 +2v3+2v3 +v4+v4 +x 2 =0 +v2+v2 −3v3−3v3 +x 3 =0 −v2−v2 +3v3+3v3 +x 4 =0 +v1+v1 +x 5 =1 +v2+v2 +x 6 =1=1
77 Simplex Example (2) z v3v3 v1v1 AB C.... v4v4 v2v2 2A + 3B = 1C +z−v3−v3 =0 +v1+v1 −2v3−2v3 −v4−v4 +x 1 =0 −v1−v1 +2v3+2v3 +v4+v4 +x 2 =0 +v2+v2 −3v3−3v3 +x 3 =0 −v2−v2 +3v3+3v3 +x 4 =0 +v1+v1 +x 5 =1 +v2+v2 +x 6 =1=1
78 Simplex Example (2) +z−1/3v 2 +1/3x 4 =0 +v1+v1 −2/3v 2 −v4−v4 +x 1 +2/3x 4 =0 −v1−v1 +2/3v 2 +v4+v4 +x 2 +2/3x 4 =0 +x 3 +x 4 =0 −1/3v 2 +v3+v3 +1/3x 4 =0 +v1+v1 +x 5 =1 +v2+v2 +x 6 =1=1
79 Simplex Example (2) +z−1/3v 2 +1/3x 4 =0 +v1+v1 −2/3v 2 −v4−v4 +x 1 +2/3x 4 =0 −v1−v1 +2/3v 2 +v4+v4 +x 2 +2/3x 4 =0 +x 3 +x 4 =0 −1/3v 2 +v3+v3 +1/3x 4 =0 +v1+v1 +x 5 =1 +v2+v2 +x 6 =1=1
80 Simplex Example (2) +z−1/2v 1 +1/2v 4 +1/2x 2 =0 +x 1 +x 2 =0 −3/2v 1 +2/3v 2 +3/2v 4 +3/2x 2 −x 4 =0 +x 3 +x 4 =0 −1/2v 1 +v3+v3 +1/2v 4 +1/2x 2 =0 +v1+v1 +x 5 =1 +3/2v 1 −3/2v 4 −3/2x 2 +x 4 +x 6 =1=1
81 Simplex Example (2) +z−1/2v 1 +1/2v 4 +1/2x 2 =0 +x 1 +x 2 =0 −3/2v 1 +2/3v 2 +3/2v 4 +3/2x 2 −x 4 =0 +x 3 +x 4 =0 −1/2v 1 +v3+v3 +1/2v 4 +1/2x 2 =0 +v1+v1 +x 5 =1 +3/2v 1 −3/2v 4 −3/2x 2 +x 4 +x 6 =1=1
82 Simplex Example (2) +z+1/3x 4 +1/3x 6 =1/3 +x 1 +x 2 =0 +v2+v2 +x 6 =1 +x 3 +x 4 =0 +v3+v3 +1/3x 4 +1/3x 6 =1/3 +v4+v4 +x 2 −2/3x 4 +x 5 −2/3x 6 =1/3 +v1+v1 −v4−v4 −x 2 +2/3x 4 +2/3x 6 =2/3
83 Simplex Example (2) +z + 1/3 x 4 + 1/3 x 6 =1/3 +x 1 +x 2 =0 +v2+v2 +x 6 =1 +x 3 +x 4 =0 +v3+v3 + 1/3 x 4 + 1/3 x 6 =1/3 +v4+v4 +x 2 − 2/3 x 4 +x 5 − 2/3 x 6 =1/3 +v1+v1 −v4−v4 −x 2 + 2/3 x 4 + 2/3 x 6 =2/3 z v3v3 v1v1 AB C.... v4v4 v2v2 2A + 3B = 1C
84 Simplex Example (2) +z + 1/3 x 4 + 1/3 x 6 =1/3 +x 1 +x 2 =0 +v2+v2 +x 6 =1 +x 3 +x 4 =0 +v3+v3 + 1/3 x 4 + 1/3 x 6 =1/3 +v4+v4 +x 2 − 2/3 x 4 +x 5 − 2/3 x 6 =1/3 +v1+v1 −v4−v4 −x 2 + 2/3 x 4 + 2/3 x 6 =2/3 z v3v3 v1v1 AB C.... v4v4 v2v2 2A + 3B = 1C
85 Simplex Example (2) +z + 1/3 x 4 + 1/3 x 6 =1/3 +x 1 +x 2 =0 +v2+v2 +x 6 =1 +x 3 +x 4 =0 +v3+v3 + 1/3 x 4 + 1/3 x 6 =1/3 +v4+v4 +x 2 − 2/3 x 4 +x 5 − 2/3 x 6 =1/3 +v1+v1 +x 5 =1=1 z v3v3 v1v1 AB C.... v4v4 v2v2 2A + 3B = 1C
86 Simplex Example (2) +z + 1/3 x 4 + 1/3 x 6 =1/3 +x 1 +x 2 =0 +v2+v2 +x 6 =1 +x 3 +x 4 =0 +v3+v3 + 1/3 x 4 + 1/3 x 6 =1/3 +v4+v4 +x 2 − 2/3 x 4 +x 5 − 2/3 x 6 =1/3 +v1+v1 +x 5 =1=1 z v3v3 v1v1 AB C.... v4v4 v2v2 2A + 3B = 1C
87 Contents Intro Systems of linear equations Solution by row operations Steady state mass balance Linear Programming –Objective Function –Convex Solution Space –The Simplex Method –Multiple Optimal Solutions