当前位置:网站首页>Teacher wangshuyao's operations research course notes 07 linear programming and simplex method (standard form, base, base solution, base feasible solution, feasible base)
Teacher wangshuyao's operations research course notes 07 linear programming and simplex method (standard form, base, base solution, base feasible solution, feasible base)
2022-07-29 06:53:00 【three billion seventy-seven million four hundred and ninety-one】
The first 7 speak Linear programming and simplex method ( Standard 、 The base 、 Basic solution 、 Basic feasible solution 、 Feasible basis )
The standard form of linear programming problem
Change the constraints from weak constraints to strong constraints , Change a system of inequalities into a system of equations , It reduces the difficulty of solving .
For general linear programming problems , Easy to get :
Objective function max ( min ) z = c 1 x 1 + c 2 x 2 + ⋯ + c n x n \quad \max (\min ) z=c_{1} x_{1}+c_{2} x_{2}+\cdots+c_{n} x_{n} max(min)z=c1x1+c2x2+⋯+cnxn
constraint condition { a 11 x 1 + a 12 x 2 + ⋯ + a 1 n x n ⩽ ( = , ⩾ ) b 1 a 21 x 1 + a 22 x 2 + ⋯ + a 2 n x n ⩽ ( = , ⩾ ) b 2 ⋮ a m 1 x 1 + a m 2 x 2 + ⋯ + a m n x n ⩽ ( = , ⩾ ) b m x 1 , x 2 , ⋯ , x n ⩾ 0 } \left\{\begin{array}{c}a_{11} x_{1}+a_{12} x_{2}+\cdots+a_{1 n} x_{n} \leqslant(=, \geqslant) b_{1} \\ a_{21} x_{1}+a_{22} x_{2}+\cdots+a_{2 n} x_{n} \leqslant(=, \geqslant) b_{2} \\ \vdots \\ a_{m 1} x_{1}+a_{m 2} x_{2}+\cdots+a_{m n} x_{n} \leqslant(=, \geqslant) b_{m} \\ x_{1}, \quad x_{2}, \cdots, \quad x_{n} \geqslant 0\end{array}\right\} ⎩⎪⎪⎪⎪⎪⎨⎪⎪⎪⎪⎪⎧a11x1+a12x2+⋯+a1nxn⩽(=,⩾)b1a21x1+a22x2+⋯+a2nxn⩽(=,⩾)b2⋮am1x1+am2x2+⋯+amnxn⩽(=,⩾)bmx1,x2,⋯,xn⩾0⎭⎪⎪⎪⎪⎪⎬⎪⎪⎪⎪⎪⎫
The general form is transformed into the standard form through identical deformation , To facilitate the subsequent solution .
- The objective function needs to be transformed into m a x max max. If the original objective function is m i n min min, Then order z ′ = − z z^{'}=-z z′=−z, Then seek m a x z ′ max z^{'} maxz′.
- b i b_i bi Need to be transformed into > 0 >0 >0. If b i < 0 b_i<0 bi<0 Then both sides of the inequality are added with a minus sign . If b i = 0 b_i=0 bi=0 It means there is degradation , I don't usually meet .
- Constraints need to be reduced to = = =. If the original constraint is ≤ \leq ≤, Then the constraint becomes the original constraint minus a new non negative variable ( Relax variables ). If the original constraint is ≥ \geq ≥, Then the constraint becomes the original constraint plus a new non negative variable ( Remaining variables ).( The purpose of this step is to change weak constraints into strong constraints , Easy to solve the equation , The cost is the introduction of additional variables , The dimension of the equation is increased .)
- Variables need to be converted to ≥ 0 \ge0 ≥0. If the original variable is = 0 =0 =0, Then directly change to ≥ 0 \ge0 ≥0, But in fact, this situation will not happen , Because if the variable = 0 =0 =0, Then the changed variable will not appear in the objective function and constraints . If the original variable is ≤ 0 \le0 ≤0, Then order x i ′ = − x i x_i^{'}=-x_i xi′=−xi, And order x i ′ ≥ 0 x_i^{'}\ge0 xi′≥0, At the same time, the objective function and constraints are replaced . If the original variable has no constraints ( ∈ \in ∈R), Then order x i = x i ′ − x i ′ ′ x_i=x_i^{'}-x_i^{''} xi=xi′−xi′′, And order x i ′ ≥ 0 x i ′ ′ ≥ 0 x_i^{'}\ge0\ x_i^{''}\ge0 xi′≥0 xi′′≥0, At the same time, the objective function and constraints are replaced .
- Write the objective function normally . Adjust the objective function formally , Write the newly introduced variable back into the objective function . Although its value coefficient is 0, But also write it out .
Discussion on the solution of linear programming
First, the standard form of linear programming problem is written into matrix form .
A = ( a 11 a 12 ⋯ a 1 n ⋮ ⋮ ⋮ a m 1 a m 2 ⋯ a m n ) = ( P 1 , P 2 , ⋯ , P n ) ; O = [ 0 0 ⋮ 0 ] \boldsymbol{A}=\left(\begin{array}{cccc}a_{11} & a_{12} & \cdots & a_{1 n} \\ \vdots & \vdots & & \vdots \\ a_{m 1} & a_{m 2} & \cdots & a_{m n}\end{array}\right)=\left(\boldsymbol{P}_{1}, \boldsymbol{P}_{2}, \cdots, \boldsymbol{P}_{n}\right) ; \quad \boldsymbol{O}=\left[\begin{array}{c}0 \\ 0 \\ \vdots \\ 0\end{array}\right] A=⎝⎜⎛a11⋮am1a12⋮am2⋯⋯a1n⋮amn⎠⎟⎞=(P1,P2,⋯,Pn);O=⎣⎢⎢⎢⎡00⋮0⎦⎥⎥⎥⎤
X = [ x 1 x 2 ⋮ x n ] ; b = [ b 1 b 2 ⋮ b m ] \boldsymbol{X}=\left[\begin{array}{c}x_{1} \\ x_{2} \\ \vdots \\ x_{n}\end{array}\right] ; \quad \boldsymbol{b}=\left[\begin{array}{c}b_{1} \\ b_{2} \\ \vdots \\ b_{m}\end{array}\right] X=⎣⎢⎢⎢⎡x1x2⋮xn⎦⎥⎥⎥⎤;b=⎣⎢⎢⎢⎡b1b2⋮bm⎦⎥⎥⎥⎤ ; C = ( c 1 , c 2 , ⋯ , c n ) ; \quad \boldsymbol{C}=\left(c_{1}, c_{2}, \cdots, c_{n}\right) ;C=(c1,c2,⋯,cn)
The linear programming problem can be described as :
max z = C X \max z=\boldsymbol{C}\boldsymbol{X} maxz=CX
A X = b \boldsymbol{A} \boldsymbol{X}=\boldsymbol{b} AX=b
X ⩾ 0 \boldsymbol{X} \geqslant 0 X⩾0
Feasible solution
Satisfy the constraint formula A X = b \boldsymbol{A} \boldsymbol{X}=\boldsymbol{b} AX=b、 X ⩾ 0 \boldsymbol{X} \geqslant 0 X⩾0 The solution of is called the feasible solution of linear programming , The feasible solution that maximizes the objective function is called the optimal solution .
The base
set up A A A It's a set of constrained equations m × n ( m < n ) m \times n(m<n) m×n(m<n) Dimensional coefficient matrix , Its rank is m m m. B B B It's a matrix A A A in m × m m \times m m×m Order submatrix , among B B B The column vectors of are linearly independent , And ∣ B ∣ = 0 |B|=0 ∣B∣=0, It's called matrix B B B It is a basis of linear programming problem .
B B B Medium P i P_i Pi It's called a base vector , be not in B B B Medium P i P_i Pi It is called non base vector . Before hypothesis m m m The coefficient sequence vector of variables is linearly independent , Use these vectors to form a matrix B B B, Then the constraints A X = b \boldsymbol{A} \boldsymbol{X}=\boldsymbol{b} AX=b It can be written. :
( a 11 a 21 ⋮ a m 1 ) x 1 + ( a 12 a 22 ⋮ a m 2 ) x 2 + ⋯ + ( a 1 m a 2 m ⋮ a m m ) x m = ( b 1 b 2 ⋮ b m ) − ( a 1 , m + 1 a 2 , m + 1 ⋮ a m , m + 1 ) x m + 1 − ⋯ − ( a 1 n a 2 n ⋮ a m n ) x n \begin{aligned} &\left(\begin{array}{c}a_{11} \\ a_{21} \\ \vdots \\ a_{m 1}\end{array}\right) x_{1}+\left(\begin{array}{c}a_{12} \\ a_{22} \\ \vdots \\ a_{m 2}\end{array}\right) x_{2}+\cdots+\left(\begin{array}{c}a_{1 m} \\ a_{2 m} \\ \vdots \\ a_{m m}\end{array}\right) x_{m}=\left(\begin{array}{c}b_{1} \\ b_{2} \\ \vdots \\ b_{m}\end{array}\right)-\left(\begin{array}{c}a_{1, m+1} \\ a_{2, m+1} \\ \vdots \\ a_{m, m+1}\end{array}\right) x_{m+1}-\cdots-\left(\begin{array}{c}a_{1 n} \\ a_{2 n} \\ \vdots \\ a_{m n}\end{array}\right) x_{n} \end{aligned} ⎝⎜⎜⎜⎛a11a21⋮am1⎠⎟⎟⎟⎞x1+⎝⎜⎜⎜⎛a12a22⋮am2⎠⎟⎟⎟⎞x2+⋯+⎝⎜⎜⎜⎛a1ma2m⋮amm⎠⎟⎟⎟⎞xm=⎝⎜⎜⎜⎛b1b2⋮bm⎠⎟⎟⎟⎞−⎝⎜⎜⎜⎛a1,m+1a2,m+1⋮am,m+1⎠⎟⎟⎟⎞xm+1−⋯−⎝⎜⎜⎜⎛a1na2n⋮amn⎠⎟⎟⎟⎞xn
Now let the non base variable of the above formula x m + 1 = x m + 2 = ⋯ = x n = 0 x_{m+1}=x_{m+2}=\cdots=x_{n}=0 xm+1=xm+2=⋯=xn=0, At this time, the number of variables is equal to the number of linear equations Count . Gauss elimination , You can find a solution X = ( x 1 , x 2 , ⋯ , x m , 0 , ⋯ , 0 ) T \boldsymbol{X}=\left(x_{1}, x_{2}, \cdots, x_{m}, 0, \cdots, 0\right)^{\mathrm{T}} X=(x1,x2,⋯,xm,0,⋯,0)T, This solution is called the basic solution ( Note that the fundamental solution is n n n Dimensional , instead of m m m Dimensional .). It can be seen that a basic solution can be obtained with a basis .
Basic feasible solution
Satisfy nonnegative constraints X ⩾ 0 \boldsymbol{X} \geqslant 0 X⩾0 The basic solution of is called the basic feasible solution .
Feasible basis
The basis corresponding to the feasible solution is called the feasible basis .
The geometric meaning of basic solution and basic feasible solution
The geometric meaning of the fundamental solution is : Intersection of strongly constrained equations .
The geometric meaning of the basic feasible solution is : Intersection of strongly constrained equations ( Basic solution ), And it is a point in the feasible region .( In other words, the vertex of the line field .)
Here readers can give an example by themselves , And draw it in the picture , Then find the feasible solution in the graph 、 Basic feasible solution 、 Which parts are the basic solution and the infeasible solution .
Basic solution 、 The relationship between feasible solution and basic feasible solution
The inclusion relationship between the above solutions can be represented by the following figure :

Find the optimal solution from the basic feasible solution
in summary , Find all the bases , Then we get all the basic feasible solutions , The largest of the corresponding function values is the optimal solution . Of course , This method belongs to enumeration , In the later study, the function values corresponding to the basic feasible solution can be compared in a certain order , That is, the simplex method , In this way, the optimal solution can be found with less comparison times .
summary
For the convenience of finding feasible solutions , We need to turn the linear programming problem into a standard type , It is mainly necessary to analyze the objective function 、 Free term 、 Weak constraints 、 Handle arguments .
For constrained equations , It can be handled with the idea of linear algebra , Find the base of the coefficient matrix , Let the non base variable be 0, We can get a set of equations composed of basic variables , The unique solution can be solved , Then the basic solution is obtained . A coefficient matrix may have several bases , Every basis can get a basic solution , If the basic solution satisfies X ⩾ 0 \boldsymbol{X} \geqslant 0 X⩾0, Then the basic solution is still the basic feasible solution , The basis corresponding to the feasible solution is called the feasible basis . The largest function value corresponding to the basic feasible solution is the optimal solution .
The geometric meaning of the basic feasible solution is the vertex of the feasible region .
The intersection of feasible solution and basic solution is the basic feasible solution .
In the later study, the function values corresponding to the basic feasible solution can be compared in a certain order , In this way, the optimal solution can be found with less comparison times .
边栏推荐
猜你喜欢

Tcp/ip 五层参考模型以及对应的典型设备以及ipv6

JMM 内存模型概念

【冷冻电镜入门】加州理工公开课课程笔记 Part 3: Image Formation

MySQL: what happens in the bufferpool when you crud? Ten pictures can make it clear

JVM之垃圾回收机制(GC)

5g service interface and reference point

【论文阅读 | 冷冻电镜】RELION 4.0 中新的 subtomogram averaging 方法解读

【冷冻电镜|论文阅读】子断层平均 M 软件解读:Multi-particle cryo-EM refinement with M

Recurrent neural network RNN

联邦学习后门攻击总结(2019-2022)
随机推荐
Execution sequence of finally and return
Using STP spanning tree protocol to solve the problem of two-layer loop in network
【论文阅读】TomoAlign: A novel approach to correcting sample motion and 3D CTF in CryoET
centos 部署postgresql 13
Understanding of access, hybrid and trunk modes
MQTT服务器搭建以及使用MQTT.fx测试
【冷冻电镜|论文阅读】emClarity:用于高分辨率冷冻电子断层扫描和子断层平均的软件
阿里一面,给了几条SQL,问需要执行几次树搜索操作?
Computer right mouse click always turn around what's going on
VMware虚拟机在物理机win10系统下如何连接外网
How to use SFTP command to access SFTP server on the development board
MySQL 事物四种隔离级别分析
关于SQL Server语句入门级应用阶段性学习——找工作必备(一)
greenplum企业部署
NLP word segmentation
SDN拓扑发现原理
Embedding understanding + code
After the EtherCAT master station is disconnected, how to ensure that the target system is not affected by the fault?
Recurrent neural network RNN
Neuralcf neural collaborative filtering network