一种多线性方程约束下的生成随机数修正方法(上)

17 篇文章 0 订阅
16 篇文章 0 订阅

前言

    根据博客《一种单线性方程约束下的生成随机数修正方法(结论与应用)》可得到当生成的随机数满足变量上下限约束但不满足单线性方程约束时,生成随机数的修正方法,使得修正后的随机数既满足变量上下限约束又满足单线性方程约束。为将拓展应用到多线性约束场景,本博客从具体实例入手,结合线性方程组理论,探究该方法在多线性方程约束下的应用,从而为解决各类线性约束下的生成随机数修正问题提供一种可行思路。

实例分析

    实例1:现有一组4维未知向量 x \boldsymbol{x} x,要求满足如式(1)所示的约束条件
{ x 1 ∈ [ − 5 , 7 ] x 2 ∈ [ − 3 , 1 ] x 3 ∈ [ − 6 , − 2 ] x 4 ∈ [ 0 , 6 ] x 1 + x 2 + x 3 + x 4 = − 1 2 x 2 + x 3 + x 4 = 1 \begin{equation} \begin{cases} x_1 ∈ \left[ -5, 7 \right] \\ x_2 ∈ \left[ -3, 1 \right] \\ x_3 ∈ \left[ -6, -2 \right] \\ x_4 ∈ \left[ 0, 6 \right] \\ x_1 + x_2 + x_3 + x_4 = -1 \\ 2x_2 + x_3 + x_4 = 1 \\ \end{cases} \end{equation} x1[5,7]x2[3,1]x3[6,2]x4[0,6]x1+x2+x3+x4=12x2+x3+x4=1
若根据博客《一种单线性方程约束下的生成随机数修正方法(结论与应用)》中式(2)所示的随机数生成方法生成的随机向量为 x g e n = [ 4 , − 2 , − 5 , 5 ] T \boldsymbol{x^{gen}} = \left[ 4, -2, -5, 5 \right]^T xgen=[4,2,5,5]T,试判定生成的随机向量是否满足约束条件,若不满足,试给出随机数修正方法使之满足约束。

    解1:显然, x g e n \boldsymbol{x^{gen}} xgen满足式(1)中所有变量的上下限约束条件,但经式(2)计算式(1)中线性方程组的常数项
{ b 1 g e n = x 1 g e n + x 2 g e n + x 3 g e n + x 4 g e n = 2 > − 1 b 2 g e n = 2 x 2 g e n + x 3 g e n + x 4 g e n = − 4 < 1 \begin{equation} \begin{cases} b_1^{gen} = x_1^{gen} + x_2^{gen} + x_3^{gen} + x_4^{gen} = 2 > -1 \\ b_2^{gen} = 2x_2^{gen} + x_3^{gen} + x_4^{gen} = -4 < 1 \\ \end{cases} \end{equation} {b1gen=x1gen+x2gen+x3gen+x4gen=2>1b2gen=2x2gen+x3gen+x4gen=4<1
x g e n \boldsymbol{x^{gen}} xgen不满足式(1)中的线性方程约束,确须将 x g e n \boldsymbol{x^{gen}} xgen进行适当修正使之满足线性方程。
    将式(1)中的线性方程组转写成矩阵方程的形式,即有
A x = b \begin{equation} \boldsymbol{Ax} = \boldsymbol{b} \end{equation} Ax=b
其中系数矩阵 A = [ 1 1 1 1 0 2 1 1 ] \boldsymbol{A} = \left[ \begin{matrix} 1 & 1 & 1 & 1 \\ 0 & 2 & 1 & 1 \end{matrix} \right] A=[10121111],常数向量 b = [ − 1 1 ] \boldsymbol{b} = \left[ \begin{matrix} -1 \\ 1 \end{matrix} \right] b=[11]
    将式(3)进行初等行变换,使系数矩阵转换成行最简形(Reduced Row Echelon Form, RREF)矩阵,则矩阵方程变为
A R x = b R \begin{equation} \boldsymbol{A_R}\boldsymbol{x} = \boldsymbol{b_R} \end{equation} ARx=bR
其中: A R = [ 1 0 1 / 2 1 / 2 0 1 1 / 2 1 / 2 ] \boldsymbol{A_R} = \left[ \begin{matrix} 1 & 0 & 1/2 & 1/2 \\ 0 & 1 & 1/2 & 1/2 \end{matrix} \right] AR=[10011/21/21/21/2] b R = [ − 3 / 2 1 / 2 ] \boldsymbol{b_R} = \left[ \begin{matrix} -3/2 \\ 1/2 \end{matrix} \right] bR=[3/21/2]
    再次转写成线性方程组,即为
{ x 1 + 1 2 x 3 + 1 2 x 4 = − 3 2 x 2 + 1 2 x 3 + 1 2 x 4 = 1 2 \begin{equation} \begin{cases} x_1 + \dfrac{1}{2}x_3 + \dfrac{1}{2}x_4 = -\dfrac{3}{2} \\ x_2 + \dfrac{1}{2}x_3 + \dfrac{1}{2}x_4 = \dfrac{1}{2} \\ \end{cases} \end{equation} x1+21x3+21x4=23x2+21x3+21x4=21
根据线性方程组理论可知,若随机向量 x \boldsymbol{x} x满足式(1)中的等式约束的充要条件是 x \boldsymbol{x} x满足式(5)中的等式约束。将式(5)中的 x 1 x_1 x1 x 2 x_2 x2 x 3 x_3 x3 x 4 x_4 x4线性表示,可得
{ x 1 = − 3 2 − 1 2 x 3 + 1 2 x 4 x 2 = − 3 2 − 1 2 x 3 + 1 2 x 4 \begin{equation} \begin{cases} x_1 = -\dfrac{3}{2} - \dfrac{1}{2}x_3 + \dfrac{1}{2}x_4 \\ x_2 = -\dfrac{3}{2} - \dfrac{1}{2}x_3 + \dfrac{1}{2}x_4 \\ \end{cases} \end{equation} x1=2321x3+21x4x2=2321x3+21x4
结合式(1)中的对 x 1 x_1 x1 x 2 x_2 x2的上下限约束,不难看出要使变量 x 1 x_1 x1 x 2 x_2 x2满足上下限约束条件,必然有
{ − 5 ≤ x 1 = − 3 2 − 1 2 x 3 + 1 2 x 4 ≤ 7 − 3 ≤ x 2 = − 3 2 − 1 2 x 3 + 1 2 x 4 ≤ 1 \begin{equation} \begin{cases} -5 ≤ x_1 = -\dfrac{3}{2} - \dfrac{1}{2}x_3 + \dfrac{1}{2}x_4 ≤ 7 \\ -3 ≤ x_2 = -\dfrac{3}{2} - \dfrac{1}{2}x_3 + \dfrac{1}{2}x_4 ≤ 1 \\ \end{cases} \end{equation} 5x1=2321x3+21x473x2=2321x3+21x41
此时 x 3 x_3 x3 x 4 x_4 x4满足
− 1 ≤ x 3 + x 4 ≤ 7 \begin{equation} -1 ≤ x_3 + x_4 ≤ 7 \end{equation} 1x3+x47
    根据题设可知, x 3 g e n x_3^{gen} x3gen x 4 g e n x_4^{gen} x4gen满足
x 3 g e n + x 4 g e n = 0 \begin{equation} x_3^{gen} + x_4^{gen} = 0 \end{equation} x3gen+x4gen=0
因此 x 3 g e n x_3^{gen} x3gen x 4 g e n x_4^{gen} x4gen满足式(8)所示的约束条件,可将 x 3 g e n x_3^{gen} x3gen x 4 g e n x_4^{gen} x4gen修正为 x 3 c o r x_3^{cor} x3cor x 4 c o r x_4^{cor} x4cor,使其仍能满足式(8)所示的约束条件,进而使得修正后的随机向量 x c o r \boldsymbol{x^{cor}} xcor满足式(1)中的所有约束条件。以下即为不同修正方式的讨论:

    修正方式1.1:由于 x 3 g e n x_3^{gen} x3gen x 4 g e n x_4^{gen} x4gen满足式(8)所示的约束条件,则可不对 x 3 g e n x_3^{gen} x3gen x 4 g e n x_4^{gen} x4gen进行修正,此时显然有
{ x 3 c o r = x 3 g e n = − 5 x 4 c o r = x 4 g e n = 5 \begin{equation} \begin{cases} x_3^{cor} = x_3^{gen} = -5 \\ x_4^{cor} = x_4^{gen} = 5 \end{cases} \end{equation} {x3cor=x3gen=5x4cor=x4gen=5
由于 x 3 g e n + x 4 g e n = 0 < 2 x_3^{gen} + x_4^{gen} = 0 < 2 x3gen+x4gen=0<2,则根据博客《一种单线性方程约束下的生成随机数修正方法(结论与应用)》中的式(5)可得
{ x 3 c o r = − 7 2 x 4 c o r = − 11 2 \begin{equation} \begin{cases} x_3^{cor} = -\dfrac{7}{2} \\ x_4^{cor} = -\dfrac{11}{2} \end{cases} \end{equation} x3cor=27x4cor=211
根据式(7)亦不难得出
{ x 1 c o r = − 3 2 x 2 c o r = 1 2 \begin{equation} \begin{cases} x_1^{cor} = -\dfrac{3}{2} \\ x_2^{cor} = \dfrac{1}{2} \end{cases} \end{equation} x1cor=23x2cor=21
    经如式(13)所示的验算可知,所得 x c o r = [ − 1.5 , 0.5 , − 5 , 5 ] T \boldsymbol{x^{cor}} = \left[ -1.5, 0.5, -5, 5 \right]^T xcor=[1.5,0.5,5,5]T满足
{ x 1 c o r = − 3 2 ∈ [ − 5 , 7 ] x 2 c o r = 1 2 ∈ [ − 3 , 1 ] x 3 c o r = − 5 ∈ [ − 6 , − 2 ] x 4 c o r = 5 ∈ [ 0 , 6 ] x 1 c o r + x 2 c o r + x 3 c o r + x 4 c o r = − 1 2 x 2 c o r + x 3 c o r + x 4 c o r = 1 \begin{equation} \begin{cases} x_1^{cor} = -\dfrac{3}{2} ∈ \left[ -5, 7 \right] \\ x_2^{cor} = \dfrac{1}{2} ∈ \left[ -3, 1 \right] \\ x_3^{cor} = -5 ∈ \left[ -6, -2 \right] \\ x_4^{cor} = 5 ∈ \left[ 0, 6 \right] \\ x_1^{cor} + x_2^{cor} + x_3^{cor} + x_4^{cor} = -1 \\ 2x_2^{cor} + x_3^{cor} + x_4^{cor} = 1 \\ \end{cases} \end{equation} x1cor=23[5,7]x2cor=21[3,1]x3cor=5[6,2]x4cor=5[0,6]x1cor+x2cor+x3cor+x4cor=12x2cor+x3cor+x4cor=1
故而满足式(1)中的所有约束条件, x c o r \boldsymbol{x^{cor}} xcor可以作为式(1)所示问题的其中一个可行解。

    修正方式1.2:令 x 3 c o r + x 4 c o r = 2 x_3^{cor} + x_4^{cor} = 2 x3cor+x4cor=2,则根据式(7)可得
{ x 1 c o r = − 5 2 x 2 c o r = − 1 2 \begin{equation} \begin{cases} x_1^{cor} = -\dfrac{5}{2} \\ x_2^{cor} = -\dfrac{1}{2} \end{cases} \end{equation} x1cor=25x2cor=21
由于 x 3 g e n + x 4 g e n = 0 < 2 x_3^{gen} + x_4^{gen} = 0 < 2 x3gen+x4gen=0<2,则根据博客《一种单线性方程约束下的生成随机数修正方法(结论与应用)》中的式(5)可得
{ x 3 c o r = − 7 2 x 4 c o r = 11 2 \begin{equation} \begin{cases} x_3^{cor} = -\dfrac{7}{2} \\ x_4^{cor} = \dfrac{11}{2} \end{cases} \end{equation} x3cor=27x4cor=211
    经如式(16)所示的验算可知,所得 x c o r = [ − 2.5 , − 0.5 , − 3.5 , 5.5 ] T \boldsymbol{x^{cor}} = \left[ -2.5, -0.5, -3.5, 5.5 \right]^T xcor=[2.5,0.5,3.5,5.5]T满足
{ x 1 c o r = − 5 2 ∈ [ − 5 , 7 ] x 2 c o r = − 1 2 ∈ [ − 3 , 1 ] x 3 c o r = − 7 2 ∈ [ − 6 , − 2 ] x 4 c o r = 11 2 ∈ [ 0 , 6 ] x 1 c o r + x 2 c o r + x 3 c o r + x 4 c o r = − 1 2 x 2 c o r + x 3 c o r + x 4 c o r = 1 \begin{equation} \begin{cases} x_1^{cor} = -\dfrac{5}{2} ∈ \left[ -5, 7 \right] \\ x_2^{cor} = -\dfrac{1}{2} ∈ \left[ -3, 1 \right] \\ x_3^{cor} = -\dfrac{7}{2} ∈ \left[ -6, -2 \right] \\ x_4^{cor} = \dfrac{11}{2} ∈ \left[ 0, 6 \right] \\ x_1^{cor} + x_2^{cor} + x_3^{cor} + x_4^{cor} = -1 \\ 2x_2^{cor} + x_3^{cor} + x_4^{cor} = 1 \\ \end{cases} \end{equation} x1cor=25[5,7]x2cor=21[3,1]x3cor=27[6,2]x4cor=211[0,6]x1cor+x2cor+x3cor+x4cor=12x2cor+x3cor+x4cor=1
故而满足式(1)中的所有约束条件, x c o r \boldsymbol{x^{cor}} xcor可以作为式(1)所示问题的其中一个可行解。

    修正方式1.3:令 x 3 c o r + x 4 c o r = − 1 x_3^{cor} + x_4^{cor} = -1 x3cor+x4cor=1,则根据式(7)可得
{ x 1 c o r = − 1 x 2 c o r = 1 \begin{equation} \begin{cases} x_1^{cor} = -1 \\ x_2^{cor} = 1 \end{cases} \end{equation} {x1cor=1x2cor=1
由于 x 3 g e n + x 4 g e n = 0 > − 1 x_3^{gen} + x_4^{gen} = 0 > -1 x3gen+x4gen=0>1,则根据博客《一种单线性方程约束下的生成随机数修正方法(结论与应用)》中的式(4)可得
{ x 3 c o r = − 31 6 x 4 c o r = 25 6 \begin{equation} \begin{cases} x_3^{cor} = -\dfrac{31}{6} \\ x_4^{cor} = \dfrac{25}{6} \end{cases} \end{equation} x3cor=631x4cor=625
    经如式(19)所示的验算可知,所得 x c o r = [ − 1 , 1 , − 5.1667 , 4.1667 ] T \boldsymbol{x^{cor}} = \left[ -1, 1, -5.1667, 4.1667 \right]^T xcor=[1,1,5.1667,4.1667]T满足
{ x 1 c o r = − 1 ∈ [ − 5 , 7 ] x 2 c o r = 1 ∈ [ − 3 , 1 ] x 3 c o r = − 31 6 ∈ [ − 6 , − 2 ] x 4 c o r = 25 6 ∈ [ 0 , 6 ] x 1 c o r + x 2 c o r + x 3 c o r + x 4 c o r = − 1 2 x 2 c o r + x 3 c o r + x 4 c o r = 1 \begin{equation} \begin{cases} x_1^{cor} = -1 ∈ \left[ -5, 7 \right] \\ x_2^{cor} = 1 ∈ \left[ -3, 1 \right] \\ x_3^{cor} = -\dfrac{31}{6} ∈ \left[ -6, -2 \right] \\ x_4^{cor} = \dfrac{25}{6} ∈ \left[ 0, 6 \right] \\ x_1^{cor} + x_2^{cor} + x_3^{cor} + x_4^{cor} = -1 \\ 2x_2^{cor} + x_3^{cor} + x_4^{cor} = 1 \\ \end{cases} \end{equation} x1cor=1[5,7]x2cor=1[3,1]x3cor=631[6,2]x4cor=625[0,6]x1cor+x2cor+x3cor+x4cor=12x2cor+x3cor+x4cor=1
故而满足式(1)中的所有约束条件, x c o r \boldsymbol{x^{cor}} xcor可以作为式(1)所示问题的其中一个可行解。

    实例2:现有一组6维未知向量 x \boldsymbol{x} x,要求满足如式(20)所示的约束条件
{ x 1 ∈ [ − 8 , 9 ] x 2 ∈ [ − 15 , 7 ] x 3 ∈ [ − 2 , 4 ] x 4 ∈ [ 0 , 5 ] x 5 ∈ [ − 3 , 8 ] x 6 ∈ [ − 10 , 2 ] 4 x 1 + 3 x 2 + 5 x 3 − 7 x 4 + 6 x 5 − 8 x 6 = − 2 − 7 x 1 − 4 x 2 + 8 x 3 − 5 x 4 + 8 x 6 = 14 \begin{equation} \begin{cases} x_1 ∈ \left[ -8, 9 \right] \\ x_2 ∈ \left[ -15, 7 \right] \\ x_3 ∈ \left[ -2, 4 \right] \\ x_4 ∈ \left[ 0, 5 \right] \\ x_5 ∈ \left[ -3, 8 \right] \\ x_6 ∈ \left[ -10, 2 \right] \\ 4x_1 + 3x_2 + 5x_3 - 7x_4 + 6x_5 - 8x_6 = -2 \\ -7x_1 - 4x_2 + 8x_3 - 5x_4 + 8x_6 = 14 \\ \end{cases} \end{equation} x1[8,9]x2[15,7]x3[2,4]x4[0,5]x5[3,8]x6[10,2]4x1+3x2+5x37x4+6x58x6=27x14x2+8x35x4+8x6=14
若根据博客《一种单线性方程约束下的生成随机数修正方法(结论与应用)》中式(2)所示的随机数生成方法生成的随机向量为 x g e n = [ 4 , − 3 , 0 , 3 , − 1 , − 5 ] T \boldsymbol{x^{gen}} = \left[ 4, -3, 0, 3, -1, -5 \right]^T xgen=[4,3,0,3,1,5]T,试判定生成的随机向量是否满约束条件,若不满足,试给出随机数修正方法使之满足约束。

    解2:显然, x g e n \boldsymbol{x^{gen}} xgen满足式(20)中所有变量的上下限约束条件,但经式(21)计算式(20)中线性方程组的常数项
{ b 1 g e n = 4 x 1 g e n + 3 x 2 g e n + 5 x 3 g e n − 7 x 4 g e n + 6 x 5 g e n − 8 x 6 g e n = 20 > − 2 b 2 g e n = − 7 x 1 g e n − 4 x 2 g e n + 8 x 3 g e n − 5 x 4 g e n + 8 x 6 g e n = − 36 < 14 \begin{equation} \begin{cases} b_1^{gen} = 4x_1^{gen} + 3x_2^{gen} + 5x_3^{gen} - 7x_4^{gen} + 6x_5^{gen} - 8x_6^{gen} = 20 > -2 \\ b_2^{gen} = -7x_1^{gen} - 4x_2^{gen} + 8x_3^{gen} - 5x_4^{gen} + 8x_6^{gen} = -36 < 14 \\ \end{cases} \end{equation} {b1gen=4x1gen+3x2gen+5x3gen7x4gen+6x5gen8x6gen=20>2b2gen=7x1gen4x2gen+8x3gen5x4gen+8x6gen=36<14
x g e n \boldsymbol{x^{gen}} xgen不满足式(20)中的线性方程约束,确须将 x g e n \boldsymbol{x^{gen}} xgen进行适当修正使之满足线性方程。
    将式(20)中的线性方程组转写成矩阵方程的形式,即有
A x = b \begin{equation} \boldsymbol{Ax} = \boldsymbol{b} \end{equation} Ax=b
其中系数矩阵 A = [ 4 3 5 − 7 6 − 8 − 7 − 4 8 − 5 0 1 ] \boldsymbol{A} = \left[ \begin{matrix} 4 & 3 & 5 & -7 & 6 & -8 \\ -7 & -4 & 8 & -5 & 0 & 1 \end{matrix} \right] A=[473458756081],常数向量 b = [ − 2 14 ] \boldsymbol{b} = \left[ \begin{matrix} -2 \\ 14 \end{matrix} \right] b=[214]
    将式(22)进行初等行变换,使系数矩阵转换成行最简形(Reduced Row Echelon Form, RREF)矩阵,则矩阵方程变为
A R x = b R \begin{equation} \boldsymbol{A_R}\boldsymbol{x} = \boldsymbol{b_R} \end{equation} ARx=bR
其中: A R = [ 1 0 − 44 / 5 43 / 5 − 24 / 5 29 / 5 0 1 67 / 5 − 69 / 5 42 / 5 − 52 / 5 ] \boldsymbol{A_R} = \left[ \begin{matrix} 1 & 0 & -44/5 & 43/5 & -24/5 & 29/5 \\ 0 & 1 & 67/5 & -69/5 & 42/5 & -52/5 \end{matrix} \right] AR=[100144/567/543/569/524/542/529/552/5] b R = [ − 34 / 5 42 / 5 ] \boldsymbol{b_R} = \left[ \begin{matrix} -34/5 \\ 42/5 \end{matrix} \right] bR=[34/542/5]
    再次转写成线性方程组,即为
{ x 1 − 44 5 x 3 + 43 5 x 4 − 24 5 x 5 + 29 5 x 6 = − 34 5 x 2 + 67 5 x 3 − 69 5 x 4 + 42 5 x 5 − 52 5 x 6 = 42 5 \begin{equation} \begin{cases} x_1 - \dfrac{44}{5}x_3 + \dfrac{43}{5}x_4 - \dfrac{24}{5}x_5 + \dfrac{29}{5}x_6 = -\dfrac{34}{5} \\ x_2 + \dfrac{67}{5}x_3 - \dfrac{69}{5}x_4 + \dfrac{42}{5}x_5 - \dfrac{52}{5}x_6 = \dfrac{42}{5} \\ \end{cases} \end{equation} x1544x3+543x4524x5+529x6=534x2+567x3569x4+542x5552x6=542
根据线性方程组理论可知,若随机向量 x \boldsymbol{x} x满足式(20)中的等式约束的充要条件是 x \boldsymbol{x} x满足式(24)中的等式约束。将式(24)中的 x 1 x_1 x1 x 2 x_2 x2 x 3 x_3 x3 x 4 x_4 x4 x 5 x_5 x5 x 6 x_6 x6线性表示,可得
{ x 1 = − 34 5 + 44 5 x 3 − 43 5 x 4 + 24 5 x 5 − 29 5 x 6 x 2 = 42 5 − 67 5 x 3 + 69 5 x 4 − 42 5 x 5 + 52 5 x 6 \begin{equation} \begin{cases} x_1 = -\dfrac{34}{5} + \dfrac{44}{5}x_3 - \dfrac{43}{5}x_4 + \dfrac{24}{5}x_5 - \dfrac{29}{5}x_6 \\ x_2 = \dfrac{42}{5} - \dfrac{67}{5}x_3 + \dfrac{69}{5}x_4 - \dfrac{42}{5}x_5 + \dfrac{52}{5}x_6 \\ \end{cases} \end{equation} x1=534+544x3543x4+524x5529x6x2=542567x3+569x4542x5+552x6
结合式(20)中的对 x 1 x_1 x1 x 2 x_2 x2的上下限约束,不难看出要使变量 x 1 x_1 x1 x 2 x_2 x2满足上下限约束条件,必然有
{ − 8 ≤ x 1 = − 34 5 + 44 5 x 3 − 43 5 x 4 + 24 5 x 5 − 29 5 x 6 ≤ 9 − 15 ≤ x 2 = 42 5 − 67 5 x 3 + 69 5 x 4 − 42 5 x 5 + 52 5 x 6 ≤ 7 \begin{equation} \begin{cases} -8 ≤ x_1 = -\dfrac{34}{5} + \dfrac{44}{5}x_3 - \dfrac{43}{5}x_4 + \dfrac{24}{5}x_5 - \dfrac{29}{5}x_6 ≤ 9 \\ -15 ≤ x_2 = \dfrac{42}{5} - \dfrac{67}{5}x_3 + \dfrac{69}{5}x_4 - \dfrac{42}{5}x_5 + \dfrac{52}{5}x_6 ≤ 7 \\ \end{cases} \end{equation} 8x1=534+544x3543x4+524x5529x6915x2=542567x3+569x4542x5+552x67
此时 x 3 x_3 x3 x 4 x_4 x4 x 5 x_5 x5 x 6 x_6 x6满足
{ − 6 ≤ 44 x 3 − 43 x 4 + 24 x 5 − 29 x 6 ≤ 79 7 ≤ 67 x 3 − 69 x 4 + 42 x 5 − 52 x 6 ≤ 117 \begin{equation} \begin{cases} -6 ≤ 44x_3 - 43x_4 + 24x_5 - 29x_6 ≤ 79 \\ 7 ≤ 67x_3 - 69x_4 + 42x_5 - 52x_6 ≤ 117 \\ \end{cases} \end{equation} {644x343x4+24x529x679767x369x4+42x552x6117
    根据题设可知, x 3 g e n x_3^{gen} x3gen x 4 g e n x_4^{gen} x4gen x 5 g e n x_5^{gen} x5gen x 6 g e n x_6^{gen} x6gen满足
{ 44 x 3 g e n − 43 x 4 g e n + 24 x 5 g e n − 29 x 6 g e n = − 8 < − 6 7 ≤ 67 x 3 g e n − 69 x 4 g e n + 42 x 5 g e n − 52 x 6 g e n = 11 ≤ 117 \begin{equation} \begin{cases} 44x_3^{gen} - 43x_4^{gen} + 24x_5^{gen} - 29x_6^{gen} = -8 < -6 \\ 7 ≤ 67x_3^{gen} - 69x_4^{gen} + 42x_5^{gen} - 52x_6^{gen} = 11 ≤ 117 \\ \end{cases} \end{equation} {44x3gen43x4gen+24x5gen29x6gen=8<6767x3gen69x4gen+42x5gen52x6gen=11117
因此 x 3 g e n x_3^{gen} x3gen x 4 g e n x_4^{gen} x4gen x 5 g e n x_5^{gen} x5gen x 6 g e n x_6^{gen} x6gen不满足式(27)所示的约束条件,须将 x 3 g e n x_3^{gen} x3gen x 4 g e n x_4^{gen} x4gen x 5 g e n x_5^{gen} x5gen x 6 g e n x_6^{gen} x6gen修正为 x 3 c o r x_3^{cor} x3cor x 4 c o r x_4^{cor} x4cor x 5 c o r x_5^{cor} x5cor x 6 c o r x_6^{cor} x6cor,使其能够满足式(27)所示的约束条件,进而使得修正后的随机向量 x c o r \boldsymbol{x^{cor}} xcor满足式(20)中的所有约束条件。
    令修正后的 x 3 c o r x_3^{cor} x3cor x 4 c o r x_4^{cor} x4cor x 5 c o r x_5^{cor} x5cor x 6 c o r x_6^{cor} x6cor满足
{ b ~ 1 c o r = 44 x 3 c o r − 43 x 4 c o r + 24 x 5 c o r − 29 x 6 c o r ∈ [ − 6 , 79 ] b ~ 2 c o r = 67 x 3 c o r − 69 x 4 c o r + 42 x 5 c o r − 52 x 6 c o r ∈ [ 7 , 117 ] \begin{equation} \begin{cases} \tilde{b}_1^{cor} = 44x_3^{cor} - 43x_4^{cor} + 24x_5^{cor} - 29x_6^{cor} ∈ \left[ -6, 79 \right] \\ \tilde{b}_2^{cor} = 67x_3^{cor} - 69x_4^{cor} + 42x_5^{cor} - 52x_6^{cor} ∈ \left[ 7, 117 \right] \\ \end{cases} \end{equation} {b~1cor=44x3cor43x4cor+24x5cor29x6cor[6,79]b~2cor=67x3cor69x4cor+42x5cor52x6cor[7,117]
可根据式(29)所示的关系将 x 3 g e n x_3^{gen} x3gen x 4 g e n x_4^{gen} x4gen x 5 g e n x_5^{gen} x5gen x 6 g e n x_6^{gen} x6gen修正为 x 3 c o r x_3^{cor} x3cor x 4 c o r x_4^{cor} x4cor x 5 c o r x_5^{cor} x5cor x 6 c o r x_6^{cor} x6cor,再根据以上修正结果将 x 1 g e n x_1^{gen} x1gen x 2 g e n x_2^{gen} x2gen修正为 x 1 c o r x_1^{cor} x1cor x 2 c o r x_2^{cor} x2cor
    根据式(28)可知, x 3 g e n x_3^{gen} x3gen x 4 g e n x_4^{gen} x4gen x 5 g e n x_5^{gen} x5gen x 6 g e n x_6^{gen} x6gen不满足式(28)中的第一个约束条件但满足第二个约束条件,则此时可取第一个约束条件并采用博客《一种单线性方程约束下的生成随机数修正方法(结论与应用)》所提修正方法修正 x 3 g e n x_3^{gen} x3gen x 4 g e n x_4^{gen} x4gen x 5 g e n x_5^{gen} x5gen x 6 g e n x_6^{gen} x6gen,使得修正后的 x 3 c o r x_3^{cor} x3cor x 4 c o r x_4^{cor} x4cor x 5 c o r x_5^{cor} x5cor x 6 c o r x_6^{cor} x6cor满足式(28)中的第一个约束条件,并将其代入式(28)中的第二个约束条件,以判断其同时满足式(28)中所有约束的条件。
    由于 44 x 3 g e n − 43 x 4 g e n + 24 x 5 g e n − 29 x 6 g e n = − 8 < − 6 44x_3^{gen} - 43x_4^{gen} + 24x_5^{gen} - 29x_6^{gen} = -8 < -6 44x3gen43x4gen+24x5gen29x6gen=8<6,则根据博客《一种单线性方程约束下的生成随机数修正方法(结论与应用)》中的式(5)可得
{ x 3 c o r = 2 333 b ~ 1 c o r + 16 333 x 4 c o r = − 1 222 b ~ 1 c o r + 329 111 x 5 c o r = 1 74 b ~ 1 c o r − 33 37 x 6 c o r = − 5 666 b ~ 1 c o r − 1685 333 \begin{equation} \begin{cases} x_3^{cor} = \dfrac{2}{333}\tilde{b}_1^{cor} + \dfrac{16}{333} \\ x_4^{cor} = -\dfrac{1}{222}\tilde{b}_1^{cor} + \dfrac{329}{111} \\ x_5^{cor} = \dfrac{1}{74}\tilde{b}_1^{cor} - \dfrac{33}{37} \\ x_6^{cor} = -\dfrac{5}{666}\tilde{b}_1^{cor} - \dfrac{1685}{333} \\ \end{cases} \end{equation} x3cor=3332b~1cor+33316x4cor=2221b~1cor+111329x5cor=741b~1cor3733x6cor=6665b~1cor3331685
将其代入式(28)中的第二个约束条件,则有
b ~ 2 c o r = 371 222 b ~ 1 c o r + 2705 111 ∈ [ 7 , 117 ] \begin{equation} \tilde{b}_2^{cor} = \dfrac{371}{222}\tilde{b}_1^{cor} + \dfrac{2705}{111} ∈ \left[ 7, 117 \right] \end{equation} b~2cor=222371b~1cor+1112705[7,117]
约简可得
b ~ 1 c o r ∈ [ − 3856 371 , 388 7 ] \begin{equation} \tilde{b}_1^{cor} ∈ \left[ -\dfrac{3856}{371}, \dfrac{388}{7} \right] \end{equation} b~1cor[3713856,7388]
结合式(29)中对 b ~ 1 c o r \tilde{b}_1^{cor} b~1cor的约束可知,若使修正后的 x 3 c o r x_3^{cor} x3cor x 4 c o r x_4^{cor} x4cor x 5 c o r x_5^{cor} x5cor x 6 c o r x_6^{cor} x6cor满足式(28)中的所有约束,则 b ~ 1 c o r \tilde{b}_1^{cor} b~1cor满足
b ~ 1 c o r ∈ [ − 6 , 388 7 ] \begin{equation} \tilde{b}_1^{cor} ∈ \left[ -6, \dfrac{388}{7} \right] \end{equation} b~1cor[6,7388]

    修正方式2.1:令式(29)中的 b ~ 1 c o r = 45 \tilde{b}_1^{cor} = 45 b~1cor=45,则根据式(30)可得
{ x 3 c o r = 106 333 x 4 c o r = 613 222 x 5 c o r = − 21 74 x 6 c o r = − 3595 666 \begin{equation} \begin{cases} x_3^{cor} = \dfrac{106}{333} \\ x_4^{cor} = \dfrac{613}{222} \\ x_5^{cor} = -\dfrac{21}{74} \\ x_6^{cor} = -\dfrac{3595}{666} \\ \end{cases} \end{equation} x3cor=333106x4cor=222613x5cor=7421x6cor=6663595
将其代入式(25),则
{ x 1 c o r = 11 5 x 2 c o r = − 12781 1110 \begin{equation} \begin{cases} x_1^{cor} = \dfrac{11}{5} \\ x_2^{cor} = -\dfrac{12781}{1110} \\ \end{cases} \end{equation} x1cor=511x2cor=111012781
    经如式(36)所示的验算可知,所得 x c o r = [ 2.2 , − 11.5144 , 0.3183 , 2.7613 , − 0.2838 , − 5.3979 ] T \boldsymbol{x^{cor}} = \left[ 2.2, -11.5144, 0.3183, 2.7613, -0.2838, -5.3979 \right]^T xcor=[2.2,11.5144,0.3183,2.7613,0.2838,5.3979]T满足
{ x 1 c o r = 11 5 ∈ [ − 8 , 9 ] x 2 c o r = − 12781 1110 ∈ [ − 15 , 7 ] x 3 c o r = 106 333 ∈ [ − 2 , 4 ] x 4 c o r = 613 222 ∈ [ 0 , 5 ] x 5 c o r = − 21 74 ∈ [ − 3 , 8 ] x 6 c o r = − 3595 666 ∈ [ − 10 , 2 ] 4 x 1 c o r + 3 x 2 c o r + 5 x 3 c o r − 7 x 4 c o r + 6 x 5 c o r − 8 x 6 c o r = − 2 − 7 x 1 c o r − 4 x 2 c o r + 8 x 3 c o r − 5 x 4 c o r + 8 x 6 c o r = 14 \begin{equation} \begin{cases} x_1^{cor} = \dfrac{11}{5} ∈ \left[ -8, 9 \right] \\ x_2^{cor} = -\dfrac{12781}{1110} ∈ \left[ -15, 7 \right] \\ x_3^{cor} = \dfrac{106}{333} ∈ \left[ -2, 4 \right] \\ x_4^{cor} = \dfrac{613}{222} ∈ \left[ 0, 5 \right] \\ x_5^{cor} = -\dfrac{21}{74} ∈ \left[ -3, 8 \right] \\ x_6^{cor} = -\dfrac{3595}{666} ∈ \left[ -10, 2 \right] \\ 4x_1^{cor} + 3x_2^{cor} + 5x_3^{cor} - 7x_4^{cor} + 6x_5^{cor} - 8x_6^{cor} = -2 \\ -7x_1^{cor} - 4x_2^{cor} + 8x_3^{cor} - 5x_4^{cor} + 8x_6^{cor} = 14 \\ \end{cases} \end{equation} x1cor=511[8,9]x2cor=111012781[15,7]x3cor=333106[2,4]x4cor=222613[0,5]x5cor=7421[3,8]x6cor=6663595[10,2]4x1cor+3x2cor+5x3cor7x4cor+6x5cor8x6cor=27x1cor4x2cor+8x3cor5x4cor+8x6cor=14
故而满足式(20)中的所有约束条件, x c o r \boldsymbol{x^{cor}} xcor可以作为式(20)所示问题的其中一个可行解。

    修正方式2.2:令式(29)中的 b ~ 1 c o r = − 6 \tilde{b}_1^{cor} = -6 b~1cor=6,则根据式(30)可得
{ x 3 c o r = 4 333 x 4 c o r = 332 111 x 5 c o r = − 36 37 x 6 c o r = − 1700 333 \begin{equation} \begin{cases} x_3^{cor} = \dfrac{4}{333} \\ x_4^{cor} = \dfrac{332}{111} \\ x_5^{cor} = -\dfrac{36}{37} \\ x_6^{cor} = -\dfrac{1700}{333} \\ \end{cases} \end{equation} x3cor=3334x4cor=111332x5cor=3736x6cor=3331700
将其代入式(25),则
{ x 1 c o r = − 8 x 2 c o r = 614 111 \begin{equation} \begin{cases} x_1^{cor} = -8 \\ x_2^{cor} = \dfrac{614}{111} \\ \end{cases} \end{equation} x1cor=8x2cor=111614
    经如式(39)所示的验算可知,所得 x c o r = [ − 8 , 5.5315 , 0.0120 , 2.9910 , − 0.9730 , − 5.0150 ] T \boldsymbol{x^{cor}} = \left[ -8, 5.5315, 0.0120, 2.9910, -0.9730, -5.0150 \right]^T xcor=[8,5.5315,0.0120,2.9910,0.9730,5.0150]T满足
{ x 1 c o r = − 8 ∈ [ − 8 , 9 ] x 2 c o r = 614 111 ∈ [ − 15 , 7 ] x 3 c o r = 4 333 ∈ [ − 2 , 4 ] x 4 c o r = 332 111 ∈ [ 0 , 5 ] x 5 c o r = − 36 37 ∈ [ − 3 , 8 ] x 6 c o r = − 1670 333 ∈ [ − 10 , 2 ] 4 x 1 c o r + 3 x 2 c o r + 5 x 3 c o r − 7 x 4 c o r + 6 x 5 c o r − 8 x 6 c o r = − 2 − 7 x 1 c o r − 4 x 2 c o r + 8 x 3 c o r − 5 x 4 c o r + 8 x 6 c o r = 14 \begin{equation} \begin{cases} x_1^{cor} = -8 ∈ \left[ -8, 9 \right] \\ x_2^{cor} = \dfrac{614}{111} ∈ \left[ -15, 7 \right] \\ x_3^{cor} = \dfrac{4}{333} ∈ \left[ -2, 4 \right] \\ x_4^{cor} = \dfrac{332}{111} ∈ \left[ 0, 5 \right] \\ x_5^{cor} = -\dfrac{36}{37} ∈ \left[ -3, 8 \right] \\ x_6^{cor} = -\dfrac{1670}{333} ∈ \left[ -10, 2 \right] \\ 4x_1^{cor} + 3x_2^{cor} + 5x_3^{cor} - 7x_4^{cor} + 6x_5^{cor} - 8x_6^{cor} = -2 \\ -7x_1^{cor} - 4x_2^{cor} + 8x_3^{cor} - 5x_4^{cor} + 8x_6^{cor} = 14 \\ \end{cases} \end{equation} x1cor=8[8,9]x2cor=111614[15,7]x3cor=3334[2,4]x4cor=111332[0,5]x5cor=3736[3,8]x6cor=3331670[10,2]4x1cor+3x2cor+5x3cor7x4cor+6x5cor8x6cor=27x1cor4x2cor+8x3cor5x4cor+8x6cor=14
故而满足式(20)中的所有约束条件, x c o r \boldsymbol{x^{cor}} xcor可以作为式(20)所示问题的其中一个可行解。

    修正方式2.3:令式(29)中的 b ~ 1 c o r = 12 \tilde{b}_1^{cor} = 12 b~1cor=12,则根据式(30)可得
{ x 3 c o r = 4 333 x 4 c o r = 332 111 x 5 c o r = − 36 37 x 6 c o r = − 1670 333 \begin{equation} \begin{cases} x_3^{cor} = \dfrac{4}{333} \\ x_4^{cor} = \dfrac{332}{111} \\ x_5^{cor} = -\dfrac{36}{37} \\ x_6^{cor} = -\dfrac{1670}{333} \\ \end{cases} \end{equation} x3cor=3334x4cor=111332x5cor=3736x6cor=3331670
将其代入式(25),则
{ x 1 c o r = − 22 5 x 2 c o r = − 269 555 \begin{equation} \begin{cases} x_1^{cor} = -\dfrac{22}{5} \\ x_2^{cor} = -\dfrac{269}{555} \\ \end{cases} \end{equation} x1cor=522x2cor=555269
    经如式(42)所示的验算可知,所得 x c o r = [ − 4.4 , − 0.4847 , 0.1201 , 2.9099 , − 0.7297 , − 5.1502 ] T \boldsymbol{x^{cor}} = \left[ -4.4, -0.4847, 0.1201, 2.9099, -0.7297, -5.1502 \right]^T xcor=[4.4,0.4847,0.1201,2.9099,0.7297,5.1502]T满足
{ x 1 c o r = − 22 5 ∈ [ − 8 , 9 ] x 2 c o r = − 269 555 ∈ [ − 15 , 7 ] x 3 c o r = 4 333 ∈ [ − 2 , 4 ] x 4 c o r = 332 111 ∈ [ 0 , 5 ] x 5 c o r = − 36 37 ∈ [ − 3 , 8 ] x 6 c o r = − 1670 333 ∈ [ − 10 , 2 ] 4 x 1 c o r + 3 x 2 c o r + 5 x 3 c o r − 7 x 4 c o r + 6 x 5 c o r − 8 x 6 c o r = − 2 − 7 x 1 c o r − 4 x 2 c o r + 8 x 3 c o r − 5 x 4 c o r + 8 x 6 c o r = 14 \begin{equation} \begin{cases} x_1^{cor} = -\dfrac{22}{5} ∈ \left[ -8, 9 \right] \\ x_2^{cor} = -\dfrac{269}{555} ∈ \left[ -15, 7 \right] \\ x_3^{cor} = \dfrac{4}{333} ∈ \left[ -2, 4 \right] \\ x_4^{cor} = \dfrac{332}{111} ∈ \left[ 0, 5 \right] \\ x_5^{cor} = -\dfrac{36}{37} ∈ \left[ -3, 8 \right] \\ x_6^{cor} = -\dfrac{1670}{333} ∈ \left[ -10, 2 \right] \\ 4x_1^{cor} + 3x_2^{cor} + 5x_3^{cor} - 7x_4^{cor} + 6x_5^{cor} - 8x_6^{cor} = -2 \\ -7x_1^{cor} - 4x_2^{cor} + 8x_3^{cor} - 5x_4^{cor} + 8x_6^{cor} = 14 \\ \end{cases} \end{equation} x1cor=522[8,9]x2cor=555269[15,7]x3cor=3334[2,4]x4cor=111332[0,5]x5cor=3736[3,8]x6cor=3331670[10,2]4x1cor+3x2cor+5x3cor7x4cor+6x5cor8x6cor=27x1cor4x2cor+8x3cor5x4cor+8x6cor=14
故而满足式(20)中的所有约束条件, x c o r \boldsymbol{x^{cor}} xcor可以作为式(20)所示问题的其中一个可行解。

    修正方式2.4:令式(29)中的 b ~ 1 c o r = 388 / 7 \tilde{b}_1^{cor} = 388/7 b~1cor=388/7,则根据式(30)可得
{ x 3 c o r = 8 21 x 4 c o r = 19 7 x 5 c o r = − 1 7 x 6 c o r = − 115 21 \begin{equation} \begin{cases} x_3^{cor} = \dfrac{8}{21} \\ x_4^{cor} = \dfrac{19}{7} \\ x_5^{cor} = -\dfrac{1}{7} \\ x_6^{cor} = -\dfrac{115}{21} \\ \end{cases} \end{equation} x3cor=218x4cor=719x5cor=71x6cor=21115
将其代入式(25),则
{ x 1 c o r = 30 7 x 2 c o r = − 15 \begin{equation} \begin{cases} x_1^{cor} = \dfrac{30}{7} \\ x_2^{cor} = -15 \\ \end{cases} \end{equation} x1cor=730x2cor=15
    经如式(45)所示的验算可知,所得 x c o r = [ 4.2857 , − 15 , 0.3810 , 2.7143 , − 0.1429 , − 5.4762 ] T \boldsymbol{x^{cor}} = \left[ 4.2857, -15, 0.3810, 2.7143, -0.1429, -5.4762 \right]^T xcor=[4.2857,15,0.3810,2.7143,0.1429,5.4762]T满足
{ x 1 c o r = 30 7 ∈ [ − 8 , 9 ] x 2 c o r = − 15 ∈ [ − 15 , 7 ] x 3 c o r = 8 21 ∈ [ − 2 , 4 ] x 4 c o r = 19 7 ∈ [ 0 , 5 ] x 5 c o r = − 1 7 ∈ [ − 3 , 8 ] x 6 c o r = − 115 21 ∈ [ − 10 , 2 ] 4 x 1 c o r + 3 x 2 c o r + 5 x 3 c o r − 7 x 4 c o r + 6 x 5 c o r − 8 x 6 c o r = − 2 − 7 x 1 c o r − 4 x 2 c o r + 8 x 3 c o r − 5 x 4 c o r + 8 x 6 c o r = 14 \begin{equation} \begin{cases} x_1^{cor} = \dfrac{30}{7} ∈ \left[ -8, 9 \right] \\ x_2^{cor} = -15 ∈ \left[ -15, 7 \right] \\ x_3^{cor} = \dfrac{8}{21} ∈ \left[ -2, 4 \right] \\ x_4^{cor} = \dfrac{19}{7} ∈ \left[ 0, 5 \right] \\ x_5^{cor} = -\dfrac{1}{7} ∈ \left[ -3, 8 \right] \\ x_6^{cor} = -\dfrac{115}{21} ∈ \left[ -10, 2 \right] \\ 4x_1^{cor} + 3x_2^{cor} + 5x_3^{cor} - 7x_4^{cor} + 6x_5^{cor} - 8x_6^{cor} = -2 \\ -7x_1^{cor} - 4x_2^{cor} + 8x_3^{cor} - 5x_4^{cor} + 8x_6^{cor} = 14 \\ \end{cases} \end{equation} x1cor=730[8,9]x2cor=15[15,7]x3cor=218[2,4]x4cor=719[0,5]x5cor=71[3,8]x6cor=21115[10,2]4x1cor+3x2cor+5x3cor7x4cor+6x5cor8x6cor=27x1cor4x2cor+8x3cor5x4cor+8x6cor=14
故而满足式(20)中的所有约束条件, x c o r \boldsymbol{x^{cor}} xcor可以作为式(20)所示问题的其中一个可行解。

    实例3:现有一组6维未知向量 x \boldsymbol{x} x,要求满足如式(37)所示的约束条件
{ x 1 ∈ [ − 8 , 9 ] x 2 ∈ [ − 15 , 7 ] x 3 ∈ [ − 2 , 11 ] x 4 ∈ [ 1 , 7 ] x 5 ∈ [ − 3 , 8 ] x 6 ∈ [ − 10 , 2 ] 4 x 1 + 3 x 2 + 5 x 3 − 7 x 4 + 6 x 5 − 8 x 6 = − 2 − 7 x 1 − 4 x 2 + 8 x 3 − 5 x 4 + 8 x 6 = 14 10 x 1 + 3 x 2 − 3 x 3 + 6 x 4 − 7 x 5 + 2 x 6 = 9 2 x 1 − 3 x 2 − 7 x 3 + 5 x 4 − 6 x 5 + 3 x 6 = − 8 \begin{equation} \begin{cases} x_1 ∈ \left[ -8, 9 \right] \\ x_2 ∈ \left[ -15, 7 \right] \\ x_3 ∈ \left[ -2, 11 \right] \\ x_4 ∈ \left[ 1, 7 \right] \\ x_5 ∈ \left[ -3, 8 \right] \\ x_6 ∈ \left[ -10, 2 \right] \\ 4x_1 + 3x_2 + 5x_3 - 7x_4 + 6x_5 - 8x_6 = -2 \\ -7x_1 - 4x_2 + 8x_3 - 5x_4 + 8x_6 = 14 \\ 10x_1 + 3x_2 - 3x_3 + 6x_4 - 7x_5 + 2x_6 = 9 \\ 2x_1 - 3x_2 - 7x_3 + 5x_4 - 6x_5 + 3x_6 = -8 \\ \end{cases} \end{equation} x1[8,9]x2[15,7]x3[2,11]x4[1,7]x5[3,8]x6[10,2]4x1+3x2+5x37x4+6x58x6=27x14x2+8x35x4+8x6=1410x1+3x23x3+6x47x5+2x6=92x13x27x3+5x46x5+3x6=8
若根据博客《一种单线性方程约束下的生成随机数修正方法(结论与应用)》中式(46)所示的随机数生成方法生成的随机向量为 x g e n = [ 4 , − 3 , 0 , 3 , − 1 , − 5 ] T \boldsymbol{x^{gen}} = \left[ 4, -3, 0, 3, -1, -5 \right]^T xgen=[4,3,0,3,1,5]T,试判定生成的随机向量是否满约束条件,若不满足,试给出随机数修正方法使之满足约束。

    解3:显然, x g e n \boldsymbol{x^{gen}} xgen满足式(46)中所有变量的上下限约束条件,但经式(47)计算式(46)中线性方程组的常数项
{ b 1 g e n = 4 x 1 g e n + 3 x 2 g e n + 5 x 3 g e n − 7 x 4 g e n + 6 x 5 g e n − 8 x 6 g e n = 20 > − 2 b 2 g e n = − 7 x 1 g e n − 4 x 2 g e n + 8 x 3 g e n − 5 x 4 g e n + 8 x 6 g e n = − 51 < 14 b 3 g e n = 10 x 1 g e n + 3 x 2 g e n − 3 x 3 g e n + 6 x 4 g e n − 7 x 5 g e n + 2 x 6 g e n = 46 > 9 b 4 g e n = 2 x 1 g e n − 3 x 2 g e n − 7 x 3 g e n + 5 x 4 g e n − 6 x 5 g e n + 3 x 6 g e n = 23 > − 8 \begin{equation} \begin{cases} b_1^{gen} = 4x_1^{gen} + 3x_2^{gen} + 5x_3^{gen} - 7x_4^{gen} + 6x_5^{gen} - 8x_6^{gen} = 20 > -2 \\ b_2^{gen} = -7x_1^{gen} - 4x_2^{gen} + 8x_3^{gen} - 5x_4^{gen} + 8x_6^{gen} = -51 < 14 \\ b_3^{gen} = 10x_1^{gen} + 3x_2^{gen} - 3x_3^{gen} + 6x_4^{gen} - 7x_5^{gen} + 2x_6^{gen} = 46 > 9 \\ b_4^{gen} = 2x_1^{gen} - 3x_2^{gen} - 7x_3^{gen} + 5x_4^{gen} - 6x_5^{gen} + 3x_6^{gen} = 23 > -8 \\ \end{cases} \end{equation} b1gen=4x1gen+3x2gen+5x3gen7x4gen+6x5gen8x6gen=20>2b2gen=7x1gen4x2gen+8x3gen5x4gen+8x6gen=51<14b3gen=10x1gen+3x2gen3x3gen+6x4gen7x5gen+2x6gen=46>9b4gen=2x1gen3x2gen7x3gen+5x4gen6x5gen+3x6gen=23>8
x g e n \boldsymbol{x^{gen}} xgen不满足式(47)中的线性方程约束,确须将 x g e n \boldsymbol{x^{gen}} xgen进行适当修正使之满足线性方程。
    将式(47)中的线性方程组转写成矩阵方程的形式,即有
A x = b \begin{equation} \boldsymbol{Ax} = \boldsymbol{b} \end{equation} Ax=b
其中系数矩阵 A = [ 4 3 5 − 7 6 − 8 − 7 − 4 8 − 5 0 8 10 3 − 3 6 − 7 2 2 − 3 − 7 5 − 6 3 ] \boldsymbol{A} = \left[ \begin{matrix} 4 & 3 & 5 & -7 & 6 & -8 \\ -7 & -4 & 8 & -5 & 0 & 8 \\ 10 & 3 & -3 & 6 & -7 & 2 \\ 2 & -3 & -7 & 5 & -6 & 3 \\ \end{matrix} \right] A= 4710234335837756560768823 ,常数向量 b = [ − 2 14 9 − 8 ] \boldsymbol{b} = \left[ \begin{matrix} -2 \\ 14 \\ 9 \\ -8 \end{matrix} \right] b= 21498
    将式(48)进行初等行变换,使系数矩阵转换成行最简形(Reduced Row Echelon Form, RREF)矩阵,则矩阵方程变为
A R x = b R \begin{equation} \boldsymbol{A_R}\boldsymbol{x} = \boldsymbol{b_R} \end{equation} ARx=bR
其中: A R = [ 1 0 0 0 − 209 / 367 44 / 367 0 1 0 0 1297 / 1101 − 1077 / 734 0 0 1 0 − 662 / 1101 975 / 734 0 0 0 1 − 1219 / 1101 562 / 367 ] \boldsymbol{A_R} = \left[ \begin{matrix} 1 & 0 & 0 & 0 & -209/367 & 44/367 \\ 0 & 1 & 0 & 0 & 1297/1101 & -1077/734 \\ 0 & 0 & 1 & 0 & -662/1101 & 975/734 \\ 0 & 0 & 0 & 1 & -1219/1101 & 562/367 \\ \end{matrix} \right] AR= 1000010000100001209/3671297/1101662/11011219/110144/3671077/734975/734562/367 b R = [ 177 / 367 − 252 / 367 1323 / 367 1043 / 367 ] \boldsymbol{b_R} = \left[ \begin{matrix} 177/367 \\ -252/367 \\ 1323/367 \\ 1043/367 \end{matrix} \right] bR= 177/367252/3671323/3671043/367

    剩余内容参见博客 《一种多线性方程约束下的生成随机数修正方法(下)》

  • 19
    点赞
  • 29
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Academia1998

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值