Skip to content

Commit

Permalink
add names for Mosek
Browse files Browse the repository at this point in the history
  • Loading branch information
hlefebvr committed Oct 28, 2023
1 parent 35c060f commit e3fa91b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/src/optimizers/wrappers/Mosek/Optimizers_Mosek.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#endif

idol::Optimizers::Mosek::Mosek(const Model &t_model, bool t_continuous_relaxation)
: OptimizerWithLazyUpdates<MosekVar, MosekCtr>(t_model),
: OptimizerWithLazyUpdates(t_model),
m_model(new mosek::fusion::Model()),
m_continuous_relaxation(t_continuous_relaxation) {

Expand Down Expand Up @@ -127,7 +127,7 @@ idol::MosekVar idol::Optimizers::Mosek::hook_add(const Var &t_var, bool t_add_co

MosekVar result;

result.variable = m_model->variable(/* t_var.name(), */ 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);
Expand Down Expand Up @@ -225,7 +225,7 @@ idol::MosekCtr idol::Optimizers::Mosek::hook_add(const Ctr &t_ctr) {
);
}

result.constraint = m_model->constraint(std::move(expression), mosek::fusion::Domain::inRotatedQCone());
result.constraint = m_model->constraint(t_ctr.name(), std::move(expression), mosek::fusion::Domain::inRotatedQCone());

return result;
#else
Expand All @@ -241,13 +241,13 @@ idol::MosekCtr idol::Optimizers::Mosek::hook_add(const Ctr &t_ctr) {
// Set constraint type
switch (type) {
case LessOrEqual:
result.constraint = m_model->constraint(std::move(expr), mosek::fusion::Domain::lessThan(0.));
result.constraint = m_model->constraint(t_ctr.name(), std::move(expr), mosek::fusion::Domain::lessThan(0.));
break;
case GreaterOrEqual:
result.constraint = m_model->constraint(std::move(expr), mosek::fusion::Domain::greaterThan(0.));
result.constraint = m_model->constraint(t_ctr.name(), std::move(expr), mosek::fusion::Domain::greaterThan(0.));
break;
case Equal:
result.constraint = m_model->constraint(std::move(expr), mosek::fusion::Domain::equalsTo(0.));
result.constraint = m_model->constraint(t_ctr.name(), std::move(expr), mosek::fusion::Domain::equalsTo(0.));
break;
default: throw Exception("Enum out of bounds.");
}
Expand Down

0 comments on commit e3fa91b

Please sign in to comment.