WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 9b61e5d

Browse files
committed
do not change the problem category after calling Papilo
1 parent fffc555 commit 9b61e5d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cpp/src/mip/presolve/third_party_presolve.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,14 +185,17 @@ papilo::Problem<f_t> build_papilo_problem(const optimization_problem_t<i_t, f_t>
185185

186186
template <typename i_t, typename f_t>
187187
optimization_problem_t<i_t, f_t> build_optimization_problem(
188-
papilo::Problem<f_t> const& papilo_problem, raft::handle_t const* handle_ptr)
188+
papilo::Problem<f_t> const& papilo_problem,
189+
raft::handle_t const* handle_ptr,
190+
problem_category_t category)
189191
{
190192
raft::common::nvtx::range fun_scope("Build optimization problem");
191193
optimization_problem_t<i_t, f_t> op_problem(handle_ptr);
192194

193195
auto obj = papilo_problem.getObjective();
194196
op_problem.set_objective_offset(maximize_ ? -obj.offset : obj.offset);
195197
op_problem.set_maximize(maximize_);
198+
op_problem.set_problem_category(category);
196199

197200
if (papilo_problem.getNRows() == 0 && papilo_problem.getNCols() == 0) {
198201
// FIXME: Shouldn't need to set offsets
@@ -426,7 +429,7 @@ std::optional<third_party_presolve_result_t<i_t, f_t>> third_party_presolve_t<i_
426429
papilo_problem.getConstraintMatrix().getNnz());
427430

428431
auto opt_problem =
429-
build_optimization_problem<i_t, f_t>(papilo_problem, op_problem.get_handle_ptr());
432+
build_optimization_problem<i_t, f_t>(papilo_problem, op_problem.get_handle_ptr(), category);
430433
auto col_flags = papilo_problem.getColFlags();
431434
std::vector<i_t> implied_integer_indices;
432435
for (size_t i = 0; i < col_flags.size(); i++) {

0 commit comments

Comments
 (0)