Skip to content

Commit

Permalink
fix indexing error and added scenario test
Browse files Browse the repository at this point in the history
  • Loading branch information
RSchwan committed Feb 17, 2025
1 parent ab16b69 commit fb2d944
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/piqp/sparse/blocksparse_stage_kkt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ class BlocksparseStageKKT : public KKTSystem<T>
if (!A_kkt.B[block_index - 1]) {
A_kkt.B[block_index - 1] = std::make_unique<BlasfeoMat>(last_block_off_diag_size, last_block_diag_size);
}
BLASFEO_DMATEL(A_kkt.B[block_index - 1]->ref(), i - block_start, j + last_block_off_diag_size - block_start) = v;
BLASFEO_DMATEL(A_kkt.B[block_index - 1]->ref(), i - block_start, j - last_block_start) = v;
}
}
}
Expand Down
Binary file added tests/data/scenario_mpc.mat
Binary file not shown.
2 changes: 1 addition & 1 deletion tests/src/sparse/blocksparse_stage_kkt_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,6 @@ TEST_P(BlocksparseStageKKTTest, FactorizeSolveSQP)
}

INSTANTIATE_TEST_SUITE_P(FromFolder, BlocksparseStageKKTTest,
::testing::Values("small_sparse_dual_inf", "small_dense",
::testing::Values("small_sparse_dual_inf", "small_dense", "scenario_mpc",
"chain_mass_sqp", "robot_arm_sqp",
"robot_arm_sqp_constr_perm", "robot_arm_sqp_no_global"));

0 comments on commit fb2d944

Please sign in to comment.