Here is my optimization code:
d=64 x = cvxpy.Variable(d) constraints = [M.T @ x >= 1] constraints += [x>=0] prob = cvxpy.Problem(cvxpy.Minimize(x @ v0),constraints ) #x@v11 v0 print(prob) prob.solve() # Print result. c.T@x print("\nThe optimal value is", prob.value) print("A solution x is") print(x.value) print("A dual solution is") print(prob.constraints.dual_value)
M is a constant matrix and it is correct
v0 is changing
When I run the program, sometimes I am getting the correct answer which is approximately 0.42 but sometimes I am getting very weird result like 2.45673e-11. I know the result can be different but not that much
What can I do for that?