Commit f0f87c1f authored by daeun's avatar daeun
Browse files

fix lp

parent 7eb5ae88
......@@ -46,7 +46,12 @@ def solve_least_square(A,b,G=None, h=None, C=None, d=None):
#subject to C x = d
def solve_lp(q, G=None, h=None, C=None, d=None):
res = linprog(q, A_ub=G, b_ub=h, A_eq=C, b_eq=d, bounds=[(-100000.,10000.) for _ in range(q.shape[0])], method='interior-point', callback=None, options={'presolve': True})
return res
# print "success", res['success']
# print "status", res['status']
if res['success']:
return res['x']
else:
return res['status']
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment