Linear Programming
Standard Linear Programming
Linear programming model (LP)
- A set of decision variables
- A linear objective function
- A set of linear constraints
一般形式:
\[ \min (\max ) \sum_{i=1}^{n} c_{i} x_{i} \\ s.t.\left\{\begin{array}{c}{a_{11} x_{1}+a_{12} x_{2}+\cdots+a_{1 n} x_{n} \geq(=, \leq) b_{1}} \\ {a_{21} x_{1}+a_{22} x_{2}+\cdots+a_{2 n} x_{n} \geq(=, \leq) b_{2}} \\ {\cdots} \\ {a_{m 1} x_{1}+a_{m 2} x_{2}+\cdots+a_{m n} x_{n} \geq(=, \leq) b_{m}} \\ {x_{i} \geq(=, \leq) 0, i=1,2, \cdots, n}\end{array}\right. \]
标准型:
\[ \max \sum_{i=1}^{n} c_{i} x_{i} \quad \text { s.t. }\left\{\begin{array}{c}{a_{11} x_{1}+a_{12} x_{2}+\cdots+a_{1 n} x_{n}=b_{1}} \\ {a_{21} x_{1}+a_{22} x_{2}+\cdots+a_{2 n} x_{n}=b_{2}} \\ {\cdots} \\ {x_{i} \geq 0, i=1,2, \cdots, n}\end{array}\right. \]
其中,记 \(c=\left(c_{1}, c_{2}, \cdots, c_{n}\right)^{T}, b=\left(b_{1}, b_{2}, \cdots, b_{m}\right)^{T}, x=\left(x_{1}, x_{2}, \cdots, x_{n}\right)^{T},\boldsymbol{A}=\left(a_{i j}\right)_{m \times n}\),则线性规划标准型记为
\[ \begin{array}{l}{\max \quad c^{T} x} \\ {\text { s.t. }\left\{\begin{array}{l}{A x=b} \\ {x \geq 0}\end{array}\right.}\end{array} \]
Of Standard
The objective function
Original objective function: \ (\ min \ Quad C ^ {X} T \ Quad \ Rightarrow \ max \ Quad-C ^ {X} T \)
Restrictions
Original problem Conditions: \ (A_ X_ {I}. 1. 1} {2} + I {A_ X_ {2} + \ A_ cdots {+} in n-X_ {} \ {I} Leq B_ \)
\(\Rightarrow\left\{\begin{array}{c}{a_{i 1} x_{1}+a_{i 2} x_{2}+\cdots+a_{i n} x_{n}+x_{n+i}=b_{i}} \\ {x_{n+i} \geq 0}\end{array}\right.\),\(x_{n+i}\) 称为松弛变量
Original problem Conditions: \ (A_ X_ {I}. 1. 1} {2} + I {A_ X_ {2} + \ A_ cdots {+} in n-X_ {} \ {I} GEQ B_ \)
\(\Rightarrow\left\{\begin{array}{c}{a_{i 1} x_{1}+a_{i 2} x_{2}+\cdots+a_{i n} x_{n}-x_{n+i}=b_{i}} \\ {x_{n+i} \geq 0}\end{array}\right.\),\(x_{n+i}\) 称为剩余变量
Original problem: \ (x_i \) is nothing more than a negative constraint, then let \ (\ left \ {\ begin {aligned} \ boldsymbol {x} _ {i} & = \ boldsymbol {u} _ {i} - \ boldsymbol {v } _ {i} \\ \ boldsymbol {u} _ {i}, \ boldsymbol {v} _ {i} & \ geq \ mathbf {0} \ end {aligned} \ right. \)
Graphical Method
- Draw the feasible region range
- Panning methods using contour points extremum
LP solution concept and nature
\[ \begin{array}{c}{(L P) \quad \max \quad z=c^{T} x \quad(1)} \\ {\text { s.t. }\left\{\begin{array}{cc}{A x=b} & {\text { (2) }} \\ {x \geq 0} & {\text { (3) }}\end{array}\right.}\end{array} \]
Feasible solution : satisfies (2) (3) solution \ (x = (x_1, x_2 , ..., x_n) ^ T \) is called \ ((the LP) \) feasible solution
Feasible region : \ (D = \ {X | A = B X, X \ GEQ 0 \} \)
- Linear programming problem feasible region \ (D \) is a convex set
The concept of linear programming solution
Group : Let \ (A \) of \ (m \ times n \) coefficient matrix, rank \ (m \) . If \ (B \) of \ (A \) of \ (m \ times m \) non-degenerate subarrays order, called \ (B \) of \ (A \) (or \ ((the LP) \ ) problem) a base.
- Non-degenerate submatrix: also known as "non-exclusive Matrix," "full rank matrix" matrix determinant \ (| A | \ ne0 \) . \ (n-\) square matrix \ (A \) Necessary and Sufficient Conditions for nondegenerate \ (A \) is invertible matrix.
Base vectors: Let group \ (\ boldsymbol {B} = \ left (\ boldsymbol {P} _ {i 1}, \ boldsymbol {P} _ {i 2}, \ cdots, \ boldsymbol {P} _ {im} \ right) \) , called \ (\ left (\ boldsymbol { P} _ {i 1}, \ boldsymbol {P} _ {i 2}, \ cdots, \ boldsymbol {P} _ {im} \ right) \ ) of basis vectors.
Yl variables: \ (\ boldsymbol {P}} _ {IM \) corresponding to the variable \ (x_m \) variable, the variable is not referred to as non-yl group variable.
Basic Solution: group are in linear programming \ (B \) , so that non-yl variable takes 0, \ (\ left (B ^ {-. 1} B, 0 \ right) ^ {T} \) corresponding to the group \ ( B \) fundamental solution.
Basic feasible solution: to meet the linear programming \ ((LP) \) the fundamental solution of the problem condition (3) of the basic feasible solution.
- Linear programming \ ((the LP) \) solution of the problem \ (X \) is the basic feasible solution Sufficient Conditions are \ (X \) is feasible region \ (D \) vertices
Simplex Method
Algorithm thinking
Start with a basic feasible solution, determine whether it is the optimal solution, if not skip to the next basic feasible solution until you find the optimal solution.
- How to get the first basic feasible solution
- How to determine whether the optimal solution
- How to transform from a basic feasible solution to basic feasible solution further
The initial basic feasible solution
Large \ (M \) methods: artificial increase in the variables that \ (z = \ sum_ {i = 1} ^ {n} c_ {i} x_ {i} -M x_ {n + 1} - \ cdots-M x_ { } m + n-\) , take \ (\ boldsymbol {x} _ {n + 1}, \ cdots, \ boldsymbol {x} _ {n + m} \) variable to the initial group.
Determine the optimal solution conditions
\[ (\boldsymbol{L P}) \max z=\sum_{i=1}^{n} c_{i} \boldsymbol{x}_{i} \quad \text { s.t. }\left\{\begin{array}{c}{a_{11} x_{1}+a_{12} x_{2}+\cdots+a_{1 n} x_{n}=b_{1}} \\ {a_{21} x_{1}+a_{22} x_{2}+\cdots+a_{2 n} x_{n}=b_{2}} \\ {\cdots} \\ {a_{m 1} x_{1}+a_{m 2} x_{2}+\cdots+a_{m n} x_{n}=b_{m}} \\ {x_{i} \geq 0, i=1,2, \cdots, n}\end{array}\right. \]
Provided after iteration through there
\ [\ left \ {\ begin {array} {l} {x_ {1} = b_ {1} ^ {\ prime} - \ sum_ {j = m + 1} ^ {n} a_ { 1 j} ^ {\ prime} x_ {j}} \\ \ vdots \\ {x_ {m} = b_ {m} ^ {\ prime} - \ sum_ {j = m + 1} ^ {n} a_ { mj} ^ {\ prime} x_
{j}} \ end {array} \ right. (1) \] is \ (x_1, ..., x_m \ ) is a variable group, \ (. 1 + X_ {m}, ..., x_n \) non-basic variables.
Substituted into the objective function
\ [z = \ sum_ {i = 1} ^ {m} c_ {i} b_ {i} ^ {\ prime} + \ sum_ {j = m + 1} ^ {n} \ left (c_ {j} - \ sum_ {i
= 1} ^ {m} c_ {i} a_ {ij} ^ {\ prime} \ right) x_ {j} \] order \ (z_0 = \ sum_ {i = 1} ^ {m} C_ {I} B_ {I} ^ {\ Prime} \) , \ (\ sigma_j = C_ {J} - \ sum_ {I =. 1} ^ {m} C_ {I} A_ {ij of} ^ { \ Prime} \) , then
\ [z = z_ {0}
+ \ sum_ {j = m + 1} ^ {n} \ sigma_ {j} x_ {j} \] called \ (\ sigma_j \) for the test function .
- If \ (x ^ * = (b_1 ^ *, ..., b_m ^ *, 0, ..., 0) ^ T \) corresponding to the group \ (B \) of a basic feasible solution, and for any \ (m + n-Le. 1 Le J \ \ \) , there are \ (Le sigma_j 0 \ \ \) , then \ (x ^ * \) is the optimal solution.
- If \ (x ^ * = (b_1 ^ *, ..., b_m ^ *, 0, ..., 0) ^ T \) corresponding to the group \ (B \) of a basic feasible solution, and for any \ (m +. 1 \ Le J \ Le n-\) , there are \ (\ sigma_j \ Le 0 \) , and there \ (\ sigma_ {m + K} = 0 (K \ GE 0) \) , the linear programming there are an infinite number of questions optimal solution.
Tableau
According to the previous section, the linear programming problem \ ((the LP) \) , rewritten as
\ [(LP) \ quad \ max \ quad z = z_ {0} + \ sum_ {i = m + 1} ^ {n} \ sigma_ {i} x_ {i} \]
\[ \text { s.t. }\left\{\begin{aligned} x_{1}+a_{1, m+1} x_{m+1}+\cdots+a_{1 n} x_{n} &=b_{1} \\ x_{2}+a_{2, m+1} x_{m+1}+\cdots+a_{2 n} x_{n} &=b_{2} \\ x_{m}+a_{m, m+1} x_{m+1}+\cdots+a_{m n} x_{n} &=b_{m} \\ x_{i} \geq 0, i =1,2, \cdots, n \end{aligned}\right. \]
The simplex table
\(x_ 1\) | \(x_2\) | \(x_ m\) | \(x_ {m+1}\) | \(x_n\) | \(b\) | ||
---|---|---|---|---|---|---|---|
1 | 0 | \(\cdots\) | 0 | \(a_{1,m+1}\) | $\cdots $ | \ (A_ {1n} \) | \(b_1\) |
0 | 1 | \(\cdots\) | 0 | \(a_{2,m+1}\) | \(\cdots\) | \ (A_ {2n} \) | \(b_2\) |
$\vdots $ | \(\vdots\) | \(\vdots\) | \(\vdots\) | \(\vdots\) | $\vdots $ | ||
0 | 0 | \(\cdots\) | 1 | \(a_{m,m+1}\) | \(\cdots\) | \ (A_ {mn} \) | \(b_m\) |
0 | 0 | $ \cdots $ | 0 | \(\sigma_{m+1}\) | $ \cdots$ | \ (\ Sigma_n \) | \ (- z_0 \) |
- Comprising a base matrix as a sub-matrix, it corresponds to the variable group is variable
- The last line called test number of rows, wherein the variable number of test group was 0
- The last element of a group corresponding to the current value of variable
- Of \ (m + 1 \) th, \ (n + 1 \) column element \ (- Z_0 \) , opposite number represents the current value of the objective function corresponding to basic feasible solution
Radical transformation
Into a variable group : you can select the maximum \ (\ sigma_j \) corresponding to a variable into a variable group
From the basic variables : Let the group variable \ (x_k \) , is calculated by the equation (1)
\ [\ boldsymbol {\ theta} = \ min \ left \ {\ frac {\ boldsymbol {b} _ {i} ^ {\ prime}} {\ boldsymbol {a } _ {ik} ^ {\ prime}} | \ boldsymbol {a} _ {ik} ^ {\ prime}> \ boldsymbol {0} \ right \}: = \ frac {\ boldsymbol {b} _ {l} ^ {\ prime}} {\ boldsymbol {a} _ {lk} ^ {\ prime}} \]
With \ (x: = y \) represents the proposition \ (X \) is defined to be equal to \ (Y \)
Binding (1) is calculated to be noted, \ (A_ {LK} \) in front of a minus sign
\({x_{m}=b_{m}^{\prime}-\sum_{j=m+1}^{n} a_{m j}^{\prime} x_{j}}\)
Select \ (X_L \) is variable from group.
Simple method algorithm steps
Determining an initial basic feasible solution, the establishment of the initial simplex tableau
See test number, if \ (\ sigma_j \ le 0 ( j = m + 1, .., n) \) the current basic feasible solution is the optimal solution, the algorithm ends. Otherwise, go to (3)
If there \ (\ sigma_k> 0 \) such that it corresponds to the variable \ (x_k \) is the coefficient column vector \ (PJc \ as le0 \) , the linear programming problem unbounded, the algorithm ends. Otherwise, go to (4)
Set \ (\ max \ left (\ sigma_ {J}> 0 \ right) = \ {K} sigma_ \) , selecting \ (x_k \) is the variable group. Calculation
\ [\ boldsymbol {\ theta} = \ min \ left \ {\ frac {\ boldsymbol {b} _ {i}} {\ boldsymbol {a} _ {ik}} | \ boldsymbol {a} _ {ik} > \ boldsymbol {0} \ right
\}: = \ frac {\ boldsymbol {b} _ {l}} {\ boldsymbol {a} _ {lk}} \] select \ (X_L \) is variable from group. Turn (5)In \ (a_ {lk} \) based rotary element. Namely the use of line conversion, the first \ (K \) th column vector transform coefficients to be \ (a_ {lk} = 1 \) other elements are 0 in the column.