\[\begin{aligned}
\min\{ z=-(4000,3000)\begin{pmatrix} x_1 \\ x_2\end{pmatrix} \}\\
s.t. \begin{cases}
\begin{pmatrix} 2 & 1 \\ 1 & 1 \\ 0 & 1 \end{pmatrix}\begin{pmatrix} x_1 \\ x_2\end{pmatrix} \leq \begin{pmatrix} 10 \\ 8 \\ 7 \end{pmatrix} \\
\begin{pmatrix} 0 \\ 0 \end{pmatrix} \leq \begin{pmatrix} x_1 \\ x_2\end{pmatrix}
\end{cases}
\end{aligned}
import numpy as np
z = np.array([4, 3])
a = np.array([[2, 1.0], [1,1], [0,1]])
b = np.array([10,8, 7])
x1_bound = x2_bound =(0, None)
from scipy import optimize
res = optimize.linprog(-z, A_ub=a, b_ub=b,bounds=(x1_bound, x2_bound))
print(res)
fun: -26.0
message: 'Optimization terminated successfully.'
nit: 2
slack: array([ 0., 0., 1.])
status: 0
success: True
x: array([ 2., 6.])
规划问题为: