Skip to content

Commit

Permalink
Add missing returns
Browse files Browse the repository at this point in the history
  • Loading branch information
glebbelov committed Oct 7, 2024
1 parent 1bf8659 commit 00478d9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 6 additions & 5 deletions include/mp/flat/constr_2_expr.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ class Constraints2Expr {
if (2==stage_cvt2expr_) {
return ConsiderExplicifyingAlgebraic(con, i);
}
return false;
}

/// Special handling for LinearFunctionalConstraint
Expand All @@ -165,6 +166,7 @@ class Constraints2Expr {
if (2==stage_cvt2expr_) {
return ConsiderExplicifyingAlgebraic(con, i);
}
return false;
}

/// Convert complementarity constraint for use with expressions.
Expand Down Expand Up @@ -690,12 +692,11 @@ class Constraints2Expr {
|| HasExpressionArgs(con.GetArguments())) {
DoExplicify(con, i); // as other explicified expressions
return false;
} else {
auto& ck = GET_CONSTRAINT_KEEPER(AlgFuncCon);
const auto& ie = MPD( GetInitExpression(con.GetResultVar()) );
ck.ConvertConstraint(ie.GetIndex());
return true;
}
auto& ck = GET_CONSTRAINT_KEEPER(AlgFuncCon);
const auto& ie = MPD( GetInitExpression(con.GetResultVar()) );
ck.ConvertConstraint(ie.GetIndex());
return true;
}
}

Expand Down
2 changes: 2 additions & 0 deletions solvers/gurobi/gurobibackend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,9 @@ int GurobiBackend::GurobiSetFuncConAttributes(
case GRB_GENCONSTR_SIN:
case GRB_GENCONSTR_TAN:
case GRB_GENCONSTR_LOGISTIC:
#ifdef GRB_GENCONSTR_NL
case GRB_GENCONSTR_NL:
#endif // GRB_GENCONSTR_NL
GrbSetAttrElement(attr, i, vals[i]);
if (i_first<0)
i_first=i;
Expand Down

0 comments on commit 00478d9

Please sign in to comment.