python解决线性规划问题
作者:互联网
参考:
https://blog.csdn.net/qq_41133375/article/details/105620784
from scipy import optimize import numpy as np #确定c,A_ub,B_ub c = np.array([3,4]) A_ub = np.array([[2,1],[1,3]]) B_ub = np.array([40,30]) #求解 res =optimize.linprog(-c,A_ub,B_ub) print(res)
标签:python,res,线性规划,np,解决,import,array,optimize,ub 来源: https://www.cnblogs.com/wangbin2188/p/15496256.html