# Complementarity.jl supports equality constraints?

**URL:** <https://discourse.julialang.org/t/complementarity-jl-supports-equality-constraints/82214>\
**Category:** Optimization (Mathematical)\
**Tags:** complementarity\
**Created:** [June 3, 2022, 10:19pm UTC](https://discourse.julialang.org/t/complementarity-jl-supports-equality-constraints/82214 "2022-06-03T22:19:11Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [June 4, 2022, 5:45am UTC](https://discourse.julialang.org/t/complementarity-jl-supports-equality-constraints/82214/2 "2022-06-04T05:45:29Z")

</div>

Mixed complementarity problems don’t support equality constraints.

Did you try formulating as an MPEC?

> **[GitHub - chkwon/Complementarity.jl: provides a modeling interface for mixed...](https://github.com/chkwon/Complementarity.jl#mathematical-programs-with-equilibrium-constraints-mpec)**
>
> provides a modeling interface for mixed complementarity problems (MCP) and math programs with equilibrium problems (MPEC) via JuMP - GitHub - chkwon/Complementarity.jl: provides a modeling interfa...

Note that you need `m = Model(Ipopt.Optimizer)` instead of `m = Model(solver=IpoptSolver())`. I opened a PR to fix: [Fix syntax in README by odow · Pull Request #65 · chkwon/Complementarity.jl · GitHub](https://github.com/chkwon/Complementarity.jl/pull/65)

If you’re still stuck, please provide reproducible code of what you’ve tried so far: [Please read: make it easier to help you](https://discourse.julialang.org/t/please-read-make-it-easier-to-help-you/14757)

---

_[View the full topic](https://discourse.julialang.org/t/complementarity-jl-supports-equality-constraints/82214)._
