def test_matrices_l_h_after_func_fill(self, qpOASES_mat_fixtures):
""" Verify qpOASES matrices after filling.
"""
pcs, pp = qpOASES_mat_fixtures
random_fill([pp.l, pp.h])
pp._fill_matrices()
for i in range(pp.N+1):
assert pp.l[i, 0] == -INFTY
assert pp.l[i, 1] == 0
assert pp.h[i, 0] == INFTY
assert pp.h[i, 1] == INFTY
l_expected = np.hstack(map(lambda pc: pc.l[i], pcs))
h_expected = np.hstack(map(lambda pc: pc.h[i], pcs))
assert np.allclose(pp.l[i, 2:], l_expected)
assert np.allclose(pp.h[i, 2:], h_expected)
test_qpOASES_solver_mat_filling.py 文件源码
python
阅读 24
收藏 0
点赞 0
评论 0
评论列表
文章目录