Skip to content

Commit

Permalink
Don't mark complementarity expression #237
Browse files Browse the repository at this point in the history
NL accepts expressions in the expression part
  • Loading branch information
glebbelov committed May 1, 2024
1 parent e20edc5 commit 4a47a18
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion include/mp/flat/constr_2_expr.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@ class Constraints2Expr {
void DoMarkArgsAsVars( // needs to appear before the most generic template
const AlgebraicConstraint<Body, RhsOrRange>& , int ) { }

/// @todo not mark Complementarity (NL accepts expressions)
/// Complementarity: only mark the var
/// (NL accepts expressions for the expression part)
template <class Expr>
void DoMarkArgsAsVars( // needs to appear before the most generic template
const ComplementarityConstraint<Expr>& cc, int ) {
MPD( MarkAsResultVar(cc.GetVariable()) );
}

/// Generic arguments marking call
template <class Con>
Expand Down

0 comments on commit 4a47a18

Please sign in to comment.