mirror of
https://github.com/Jerryplusy/AI-powered-switches.git
synced 2025-10-14 09:49:19 +00:00
9 lines
208 B
Python
9 lines
208 B
Python
# test_linprog.py
|
|
import numpy as np
|
|
from scipy.optimize import linprog
|
|
|
|
c = np.array([-1, -2])
|
|
A_ub = np.array([[1, 1]])
|
|
b_ub = np.array([3])
|
|
res = linprog(c, A_ub=A_ub, b_ub=b_ub, method='highs')
|
|
print(res) |