From b8951066672b3d74d9b23487db8b399a3c98d79b Mon Sep 17 00:00:00 2001 From: Henri Lefebvre Date: Thu, 28 Sep 2023 14:57:15 +0200 Subject: [PATCH] Fixes rotated cone wrongly computed in Mosek --- lib/src/optimizers/solvers/Optimizers_Mosek.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/optimizers/solvers/Optimizers_Mosek.cpp b/lib/src/optimizers/solvers/Optimizers_Mosek.cpp index 7fa18e4d..1c399773 100644 --- a/lib/src/optimizers/solvers/Optimizers_Mosek.cpp +++ b/lib/src/optimizers/solvers/Optimizers_Mosek.cpp @@ -111,7 +111,7 @@ idol::MosekVar idol::Optimizers::Mosek::hook_add(const Var &t_var, bool t_add_co MosekVar result; - result.variable = m_model->variable(1, mosek::fusion::Domain::unbounded()); + result.variable = m_model->variable(/* t_var.name(), */ 1, mosek::fusion::Domain::unbounded()); const double lb = parent().get_var_lb(t_var); const double ub = parent().get_var_ub(t_var); @@ -181,7 +181,7 @@ idol::MosekCtr idol::Optimizers::Mosek::hook_add(const Ctr &t_ctr) { auto it = rq_cone_expr.begin(); - if (!row.linear().empty()) { + if (!row.linear().empty() || !row.rhs().is_zero()) { auto& head1 = *it; ++it;