# Linear Complementarity Problem. Non-obsolete package?

**URL:** <https://discourse.julialang.org/t/linear-complementarity-problem-non-obsolete-package/39665>\
**Category:** Optimization (Mathematical)\
**Created:** [May 17, 2020, 10:13pm UTC](https://discourse.julialang.org/t/linear-complementarity-problem-non-obsolete-package/39665 "2020-05-17T22:13:58Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![juliauser](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@juliauser](https://discourse.julialang.org/u/juliauser)\
**Post date:** [May 17, 2020, 10:13pm UTC](https://discourse.julialang.org/t/linear-complementarity-problem-non-obsolete-package/39665/1 "2020-05-17T22:13:58Z")

</div>

I was wondering which is a fast and easy to use package for a LCP problem. The examples using Complementarity I found give me errors (things like curly brackets were used) and PATHSolver requires a license (I cannot get the temporary one because I don’t understand how!). Any suggestions?

---

<div class="post-metadata">

**Author:** ![joaquimg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joaquimg/32/223_2.png) [@joaquimg](https://discourse.julialang.org/u/joaquimg)\
**Post date:** [May 17, 2020, 10:29pm UTC](https://discourse.julialang.org/t/linear-complementarity-problem-non-obsolete-package/39665/2 "2020-05-17T22:29:23Z")

</div>

Have you tried this one: [https://github.com/odow/PATH.jl](https://github.com/odow/PATH.jl) ?  
Still a bit limited, but should work.  
For the binaries you can get them by downloading GAMS academic version.  
You can get the license for path here: [http://pages.cs.wisc.edu/~ferris/path/LICENSE](http://pages.cs.wisc.edu/~ferris/path/LICENSE)

KNTRO should also be able to handle this kind of fomulation: [Constraints · JuMP](https://www.juliaopt.org/JuMP.jl/stable/constraints/#Complementarity-constraints-1)

---

<div class="post-metadata">

**Author:** ![joaquimg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joaquimg/32/223_2.png) [@joaquimg](https://discourse.julialang.org/u/joaquimg)\
**Post date:** [May 17, 2020, 10:32pm UTC](https://discourse.julialang.org/t/linear-complementarity-problem-non-obsolete-package/39665/3 "2020-05-17T22:32:12Z")

</div>

Also, the category should be “Optimization (Mathematical)”

---

<div class="post-metadata">

**Author:** ![jlperla](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jlperla/32/34332_2.png) [@jlperla](https://discourse.julialang.org/u/jlperla)\
**Post date:** [May 17, 2020, 11:02pm UTC](https://discourse.julialang.org/t/linear-complementarity-problem-non-obsolete-package/39665/4 "2020-05-17T23:02:38Z")

</div>

> [@juliauser](#):
>
> PATHSolver requires a license (I cannot get the temporary one because I don’t understand how!).

Luckily this one is easy. Go to [http://pages.cs.wisc.edu/~ferris/path/LICENSE](http://pages.cs.wisc.edu/~ferris/path/LICENSE) as the path above says and follow the instructions to set the environment variable. PATHSolver will work fine with Julia 1.4 after recent updates. The only hint is that if you are setting the environment variable with `ENV["PATH_LICENSE_STRING"] =... ` you need to do it _before_ you do a `using PATHSolver` in your code.

That all said, PATH.jl is the future. The only issue is that the binaries need to be managed manually in the short term…

---

<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:** [May 17, 2020, 11:30pm UTC](https://discourse.julialang.org/t/linear-complementarity-problem-non-obsolete-package/39665/5 "2020-05-17T23:30:01Z")

</div>

@jlperla, I just merged a commit that should fix the libgfortran issue.

---

<div class="post-metadata">

**Author:** ![juliauser](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@juliauser](https://discourse.julialang.org/u/juliauser)\
**Post date:** [May 21, 2020, 8:54pm UTC](https://discourse.julialang.org/t/linear-complementarity-problem-non-obsolete-package/39665/6 "2020-05-21T20:54:27Z")

</div>

PATHSolver worked for me, after updating to Julia 1.4. It is still a bit slow for high dimensional problems, even if very sparse. If that’s not too silly: how do I suppress output? The option output=no only suppressed some it, but it still prints too many useless lines (including the name of the authors, god bless them)

---

<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:** [May 21, 2020, 9:25pm UTC](https://discourse.julialang.org/t/linear-complementarity-problem-non-obsolete-package/39665/7 "2020-05-21T21:25:18Z")

</div>

> it still prints too many useless lines (including the name of the authors, god bless them)

The trade-off of free software…

---

<div class="post-metadata">

**Author:** ![juliauser](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@juliauser](https://discourse.julialang.org/u/juliauser)\
**Post date:** [May 21, 2020, 9:47pm UTC](https://discourse.julialang.org/t/linear-complementarity-problem-non-obsolete-package/39665/8 "2020-05-21T21:47:38Z")

</div>

Except for all the other many packages, whose authors have a slightly smaller ego

---

<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:** [May 21, 2020, 10:00pm UTC](https://discourse.julialang.org/t/linear-complementarity-problem-non-obsolete-package/39665/9 "2020-05-21T22:00:03Z")

</div>

PATH is not unique in this respect: [Option to omit printing Ipopt header information · Issue #112 · jump-dev/Ipopt.jl · GitHub](https://github.com/JuliaOpt/Ipopt.jl/issues/112)

---

<div class="post-metadata">

**Author:** ![jlperla](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jlperla/32/34332_2.png) [@jlperla](https://discourse.julialang.org/u/jlperla)\
**Post date:** [May 21, 2020, 10:21pm UTC](https://discourse.julialang.org/t/linear-complementarity-problem-non-obsolete-package/39665/10 "2020-05-21T22:21:54Z")

</div>

If I remember, Ipopt only displays the text once, though, instead of on every call like PATH. But I could be wrong…

---

<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:** [May 22, 2020, 12:17am UTC](https://discourse.julialang.org/t/linear-complementarity-problem-non-obsolete-package/39665/11 "2020-05-22T00:17:47Z")

</div>

Point still stands. You’re using the software for free. There are alternatives like KNITRO if you want to pay so you don’t have the banner.

While there are multiple work-arounds, as the writers and maintainers of the solver wrappers, we won’t be publicizing them. (But some are just a Google or a search through previous questions asked in this forum away.)

---

<div class="post-metadata">

**Author:** ![jlperla](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jlperla/32/34332_2.png) [@jlperla](https://discourse.julialang.org/u/jlperla)\
**Post date:** [May 22, 2020, 2:20am UTC](https://discourse.julialang.org/t/linear-complementarity-problem-non-obsolete-package/39665/12 "2020-05-22T02:20:38Z")

</div>

> [@odow](#):
>
> Point still stands. You’re using the software for free.

Of course. All I am saying is that if the authors only printed the header once… as Ipopt does… then nobody would need to go looking for the work-arounds-that-shall-not-be-named.

In practice, the consequence is frequently that _no_ headers whatsoever are shown because they all get blocked by necessity if you are calling it hundreds of times. Whereas with ipopt a single one gets shown that is never blocked in practice.

Up to the authors, of course, but I think this is backfiring.

---

<div class="post-metadata">

**Author:** ![juliauser](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@juliauser](https://discourse.julialang.org/u/juliauser)\
**Post date:** [June 3, 2020, 7:40pm UTC](https://discourse.julialang.org/t/linear-complementarity-problem-non-obsolete-package/39665/13 "2020-06-03T19:40:15Z")

</div>

I managed to make it work, but not in parallel programming using Distributed. I get this error  
`On worker 2: IOError: unlink: no such file or directory (ENOENT)`

---

<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 3, 2020, 8:49pm UTC](https://discourse.julialang.org/t/linear-complementarity-problem-non-obsolete-package/39665/14 "2020-06-03T20:49:43Z")

</div>

Please read the first post of [Please read: make it easier to help you - #19](https://discourse.julialang.org/t/psa-make-it-easier-to-help-you/14757/19) and provide a reproducible example. It might be best to start a new post, rather than cluttering up this one.

---

<div class="post-metadata">

**Author:** ![pleiby](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pleiby/32/8355_2.png) [@pleiby](https://discourse.julialang.org/u/pleiby)\
**Post date:** [September 1, 2020, 12:33pm UTC](https://discourse.julialang.org/t/linear-complementarity-problem-non-obsolete-package/39665/15 "2020-09-01T12:33:19Z")

</div>

Complementarity.jl and Path.jl are working for me with Distributed parallel computation. Do you still have your `IOError`?  
I did have to remember to properly distribute all needed code, including the license declaration in ENV, with `@everywhere`.

I would like to suppress the intermediate listing of iteration progress from all the workers to the console too, though. It slows the solution down and the processes seem to have to competed for console IO.
