From 4a47a18ce61d6baa86340651e6f88b6c5a9e3658 Mon Sep 17 00:00:00 2001 From: Gleb Belov Date: Wed, 1 May 2024 14:25:36 +1000 Subject: [PATCH] Don't mark complementarity expression #237 NL accepts expressions in the expression part --- include/mp/flat/constr_2_expr.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/mp/flat/constr_2_expr.h b/include/mp/flat/constr_2_expr.h index 158ea3cd0..863f0d064 100644 --- a/include/mp/flat/constr_2_expr.h +++ b/include/mp/flat/constr_2_expr.h @@ -47,7 +47,13 @@ class Constraints2Expr { void DoMarkArgsAsVars( // needs to appear before the most generic template const AlgebraicConstraint& , int ) { } - /// @todo not mark Complementarity (NL accepts expressions) + /// Complementarity: only mark the var + /// (NL accepts expressions for the expression part) + template + void DoMarkArgsAsVars( // needs to appear before the most generic template + const ComplementarityConstraint& cc, int ) { + MPD( MarkAsResultVar(cc.GetVariable()) ); + } /// Generic arguments marking call template