Skip to content

Commit cca81a0

Browse files
quentinlljcarpent
authored andcommitted
dense_backward.cpp: testing multiple saturating constraints
1 parent 856b541 commit cca81a0

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

test/src/dense_backward.cpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,21 +151,25 @@ DOCTEST_TEST_CASE("proxqp::dense: test compute backward for g (QP with "
151151
double sparsity_factor = 0.85;
152152
T eps_abs = T(1e-9);
153153
utils::rand::set_seed(1);
154-
dense::isize dim = 10;
154+
dense::isize dim = 6;
155155

156-
dense::isize n_eq(0), n_in(2);
156+
dense::isize n_eq(0), n_in(12);
157157
T strong_convexity_factor(1.e-1);
158158
proxqp::dense::Model<T> random_qp = proxqp::utils::dense_strongly_convex_qp(
159159
dim, n_eq, n_in, sparsity_factor, strong_convexity_factor);
160160

161161
std::cout << "creating random qp " << std::endl;
162-
Eigen::Matrix<T, 10, 10> H = random_qp.H;
163-
Eigen::Matrix<T, 10, 1> g = random_qp.g;
162+
Eigen::Matrix<T, 6, 6> H = random_qp.H;
163+
Eigen::Matrix<T, 6, 1> g = random_qp.g;
164164
// Eigen::Matrix<T, 5, 10> A = random_qp.A;
165165
// Eigen::Matrix<T, 5, 1> b = random_qp.b;
166-
Eigen::Matrix<T, 2, 10> C = random_qp.C;
167-
Eigen::Matrix<T, 2, 1> l = random_qp.l;
166+
Eigen::Matrix<T, 12, 6> C = random_qp.C;
167+
Eigen::Matrix<T, 12, 1> l = random_qp.l;
168168
l(0) = 1e3;
169+
l(1) = 1e3;
170+
l(2) = 1e3;
171+
l(3) = 1e3;
172+
l(9) = 1e3;
169173
// Eigen::Matrix<T, 2, 1> u = random_qp.u;
170174

171175
dense::QP<T> qp{ dim, n_eq, n_in }; // creating QP object

0 commit comments

Comments
 (0)