# \#complementarity

**URL:** https://discourse.julialang.org/tag/complementarity/547.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Solving MCP with PathSolver with indexing](https://discourse.julialang.org/t/solving-mcp-with-pathsolver-with-indexing/124488)

<div class="topic-metadata">

**Author:** [@jmc](https://discourse.julialang.org/u/jmc)\
**Replies:** 31\
**Last updated:** [January 31, 2025, 7:23pm UTC](https://discourse.julialang.org/t/solving-mcp-with-pathsolver-with-indexing/124488 "2025-01-31T19:23:36Z")

</div>

Hello, I am trying to solve an MCP that requires performing operations across some indices. Here is a MWE: using JuMP using Random using LinearAlgebra using BenchmarkTools using JuMP import PATHSolver PATHSolver.c\_ap…

---

## [KNITRO.jl and Complementarity Constraints](https://discourse.julialang.org/t/knitro-jl-and-complementarity-constraints/124090)

<div class="topic-metadata">

**Author:** [@daro.slai](https://discourse.julialang.org/u/daro.slai)\
**Replies:** 3\
**Last updated:** [January 15, 2025, 11:39am UTC](https://discourse.julialang.org/t/knitro-jl-and-complementarity-constraints/124090 "2025-01-15T11:39:50Z")

</div>

Hi, I’m modeling a system with complementarity constraints.Namely, a flow S has a negative S^- and positive S^+ component: S=S^+ - S^- 0 \\leq S^+ 0 \\leq S^- and of course complementary to each other: S^+ \\perp S^…

---

## [Formulation of Equations for Complementarity.jl](https://discourse.julialang.org/t/formulation-of-equations-for-complementarity-jl/117403)

<div class="topic-metadata">

**Author:** [@Alio0712](https://discourse.julialang.org/u/Alio0712)\
**Replies:** 9\
**Last updated:** [July 25, 2024, 12:52am UTC](https://discourse.julialang.org/t/formulation-of-equations-for-complementarity-jl/117403 "2024-07-25T00:52:02Z")

</div>

Dear community. I’m new to Julia and trying to code a Computable General Equilibrium Model. I have a question about Complementarity that I still can’t fully understand from going through various sources on the web. I kn…

---

## [Adding complementarity constraints](https://discourse.julialang.org/t/adding-complementarity-constraints/110132)

<div class="topic-metadata">

**Author:** [@anand.kumar](https://discourse.julialang.org/u/anand.kumar)\
**Replies:** 4\
**Last updated:** [February 14, 2024, 4:39am UTC](https://discourse.julialang.org/t/adding-complementarity-constraints/110132 "2024-02-14T04:39:08Z")

</div>

I’m new to both AMPL and JuMP. I’m trying to translate constraints below to jump but don’t understand how to do it. compl\_1{k in K}: 0 \<= ll\[1,k\] complements y\[1,k\] - x\[1\] \<= 0; compl\_2{k in K}: 0 \<= ll\[2,k\] comple…

---

## [Help with Performance in Large Mixed Complementarity Problem](https://discourse.julialang.org/t/help-with-performance-in-large-mixed-complementarity-problem/106052)

<div class="topic-metadata">

**Author:** [@jmc](https://discourse.julialang.org/u/jmc)\
**Replies:** 23\
**Last updated:** [January 31, 2024, 1:56am UTC](https://discourse.julialang.org/t/help-with-performance-in-large-mixed-complementarity-problem/106052 "2024-01-31T01:56:05Z")

</div>

Hi! I have a complementarity problem in which I am using the new awesome additions to JuMP to solve it. The problem involves a summation over 2^J terms, where J is around 30 and performance is critical. I was wondering…

---

## [Complementarity.jl with Path](https://discourse.julialang.org/t/complementarity-jl-with-path/103081)

<div class="topic-metadata">

**Author:** [@sjhon](https://discourse.julialang.org/u/sjhon)\
**Replies:** 9\
**Last updated:** [December 13, 2023, 7:48pm UTC](https://discourse.julialang.org/t/complementarity-jl-with-path/103081 "2023-12-13T19:48:34Z")

</div>

Im trying to solve a problema of d’aertrycke, ehrenmann, ralph & smeers (2017), the problem is the 3.3.1 that you can found here Risk trading in capacity equilibrium models Im trying to do this problem as a Mixed Comple…

---

## [What else than PATH solver for linear or mixed complementarity problem (LCP/MCP)?](https://discourse.julialang.org/t/what-else-than-path-solver-for-linear-or-mixed-complementarity-problem-lcp-mcp/107110)

<div class="topic-metadata">

**Author:** [@zdenek\_hurak](https://discourse.julialang.org/u/zdenek_hurak)\
**Replies:** 14\
**Last updated:** [December 5, 2023, 11:09pm UTC](https://discourse.julialang.org/t/what-else-than-path-solver-for-linear-or-mixed-complementarity-problem-lcp-mcp/107110 "2023-12-05T23:09:38Z")

</div>

What else than PATHSolver.jl is available in Julia for linear or mixed complementarity problem (LCP/MCP)? Within JuMP or outside it. The thing is that The PATH Solver binaries are still not available for Apple M process…

---

## [JuMP whit PATHSolver](https://discourse.julialang.org/t/jump-whit-pathsolver/105347)

<div class="topic-metadata">

**Author:** [@sjhon](https://discourse.julialang.org/u/sjhon)\
**Replies:** 1\
**Last updated:** [October 24, 2023, 8:59pm UTC](https://discourse.julialang.org/t/jump-whit-pathsolver/105347 "2023-10-24T20:59:01Z")

</div>

I am trying to define this variable T: using JuMP import PATHSolver @variable(modelo, 0 \<= T\[ω = 1:5\] \<= (ω-1)\*0.25, start = 1) Defined with this restriction: @constraint(modelo, \[ω = 1:5\], (c\[ω\]\*(1-α)-s)Y\[ω\] -(BQ\[ω…

---

## [Key error when adding a complementarity condition](https://discourse.julialang.org/t/key-error-when-adding-a-complementarity-condition/87810)

<div class="topic-metadata">

**Author:** [@Mitch\_Phillipson](https://discourse.julialang.org/u/Mitch_Phillipson)\
**Replies:** 6\
**Last updated:** [September 30, 2022, 8:02pm UTC](https://discourse.julialang.org/t/key-error-when-adding-a-complementarity-condition/87810 "2022-09-30T20:02:22Z")

</div>

I’m working to translate some economics models from GAMS into Julia using the Complementarity package and I’m running into an issue where a variable is defined on a larger set than its complementary equation. Here is a s…

---

## [Complementarity.jl supports equality constraints?](https://discourse.julialang.org/t/complementarity-jl-supports-equality-constraints/82214)

<div class="topic-metadata">

**Author:** [@vicentemunozlh](https://discourse.julialang.org/u/vicentemunozlh)\
**Replies:** 3\
**Last updated:** [June 4, 2022, 10:42pm UTC](https://discourse.julialang.org/t/complementarity-jl-supports-equality-constraints/82214 "2022-06-04T22:42:20Z")

</div>

Hello, I have been unable to finish my MCP model because I cant find the way to add a constraint that is an equality. When I try combining and adding that constraint as @constraint or @NLconstraint and the others with @m…

---

## [Solving dynamic complementarity problem using Optim.jl or Complementarity.jl](https://discourse.julialang.org/t/solving-dynamic-complementarity-problem-using-optim-jl-or-complementarity-jl/51498)

<div class="topic-metadata">

**Author:** [@jovansam](https://discourse.julialang.org/u/jovansam)\
**Replies:** 3\
**Last updated:** [December 11, 2020, 2:13am UTC](https://discourse.julialang.org/t/solving-dynamic-complementarity-problem-using-optim-jl-or-complementarity-jl/51498 "2020-12-11T02:13:20Z")

</div>

I am interested in solving a dynamic complementarity problem using Complementarity.jl or Optim.jl. In particular I would appreciate some assistance in solving or how I could solve the following. A - B\*q\[t\] = λ\[t\] …
