Linear Programming

import numpy as np
from scipy.optimize import linprog
a = np.array([1, 1, 1])
b = np.array([-7.9])
c = np.array([[-3.05, -4.05, -6.1]])
res = linprog(a, A_ub=c, b_ub=b)
print(res)

官方参考:
https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.linprog.html


本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!