Squashed 'third_party/osqp/' content from commit 33454b3e23
Change-Id: I056df0582ca06664e86554c341a94c47ab932001
git-subtree-dir: third_party/osqp
git-subtree-split: 33454b3e236f1f44193bfbbb6b8c8e71f8f04e9a
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/tests/non_cvx/generate_problem.py b/tests/non_cvx/generate_problem.py
new file mode 100644
index 0000000..9f48a51
--- /dev/null
+++ b/tests/non_cvx/generate_problem.py
@@ -0,0 +1,15 @@
+import numpy as np
+from scipy import sparse
+import utils.codegen_utils as cu
+
+P = sparse.triu([[2., 5.], [5., 1.]], format='csc')
+q = np.array([3., 4.])
+
+A = sparse.csc_matrix([[-1., 0.], [0., -1.], [-1., 3.], [2., 5.], [3., 4]])
+l = -np.inf * np.ones(A.shape[0])
+u = np.array([0., 0., -15., 100., 80.])
+
+sols_data = {'sigma_new': 5}
+
+# Generate problem data
+cu.generate_problem_data(P, q, A, l, u, 'non_cvx', sols_data)