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/unconstrained/generate_problem.py b/tests/unconstrained/generate_problem.py
new file mode 100644
index 0000000..489f016
--- /dev/null
+++ b/tests/unconstrained/generate_problem.py
@@ -0,0 +1,17 @@
+import numpy as np
+from scipy import sparse
+import utils.codegen_utils as cu
+
+P = sparse.diags([0.617022, 0.92032449, 0.20011437, 0.50233257, 0.34675589], format='csc')
+q = np.array([-1.10593508, -1.65451545, -2.3634686, 1.13534535, -1.01701414])
+A = sparse.csc_matrix((0,5))
+l = np.array([])
+u = np.array([])
+
+# Generate problem solutions
+sols_data = {'x_test': np.array([1.79237542, 1.79775228, 11.81058885, -2.26014678, 2.93293975]),
+ 'obj_value_test': -19.209752026813277,
+ 'status_test': 'optimal'}
+
+# Generate problem data
+cu.generate_problem_data(P, q, A, l, u, 'unconstrained', sols_data)
\ No newline at end of file