# Help with Performance in Large Mixed Complementarity Problem

**URL:** <https://discourse.julialang.org/t/help-with-performance-in-large-mixed-complementarity-problem/106052>\
**Category:** Optimization (Mathematical)\
**Tags:** performance, complementarity\
**Created:** [November 10, 2023, 11:15pm UTC](https://discourse.julialang.org/t/help-with-performance-in-large-mixed-complementarity-problem/106052 "2023-11-10T23:15:33Z")\
**Posts on this page:** 4\
**Page:** 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:** [January 31, 2024, 1:45am UTC](https://discourse.julialang.org/t/help-with-performance-in-large-mixed-complementarity-problem/106052/23 "2024-01-31T01:45:35Z")

</div>

Don’t worry, I’ve figured it out. It means that PATH has errored. The bug is that we don’t catch this properly in the JuMP interface.

It means that one of the following is true:

You have a license issue:

> <https://github.com/chkwon/PATHSolver.jl/blob/72d8307f1bc1a050fd033719ddd8027af6579f4a/src/C_API.jl#L754>

there are no variables

> <https://github.com/chkwon/PATHSolver.jl/blob/72d8307f1bc1a050fd033719ddd8027af6579f4a/src/C_API.jl#L764>

or there are too many non-zeros

> <https://github.com/chkwon/PATHSolver.jl/blob/72d8307f1bc1a050fd033719ddd8027af6579f4a/src/C_API.jl#L767>

Hard to say more without a reproducible example.

---

<div class="post-metadata">

**Author:** ![jmc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jmc/32/52649_2.png) [@jmc](https://discourse.julialang.org/u/jmc)\
**Post date:** [January 31, 2024, 1:45am UTC](https://discourse.julialang.org/t/help-with-performance-in-large-mixed-complementarity-problem/106052/24 "2024-01-31T01:45:43Z")

</div>

Sorry, I forgot the first line

```julia
ERROR: LoadError: MethodError: Cannot `convert` an object of type Nothing to an object of type Vector{Float64}

```

---

<div class="post-metadata">

**Author:** ![jmc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jmc/32/52649_2.png) [@jmc](https://discourse.julialang.org/u/jmc)\
**Post date:** [January 31, 2024, 1:48am UTC](https://discourse.julialang.org/t/help-with-performance-in-large-mixed-complementarity-problem/106052/25 "2024-01-31T01:48:25Z")

</div>

Thanks @odow my bet is that it is a license issue because the code runs in other machine.

However, what I find puzzling is that the simple example on PATHsolvers.jl does run.

---

<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:** [January 31, 2024, 1:56am UTC](https://discourse.julialang.org/t/help-with-performance-in-large-mixed-complementarity-problem/106052/26 "2024-01-31T01:56:05Z")

</div>

> However, what I find puzzling is that the simple example

You can solve problems with up to 300 variables without a license.

See [GitHub - chkwon/PATHSolver.jl: provides a Julia wrapper for the PATH Solver for solving mixed complementarity problems](https://github.com/chkwon/PATHSolver.jl?tab=readme-ov-file#license) for details on how to set the license.

I’ll fix the bug today: [Fix MOI wrapper if solve\_mcp fails by odow · Pull Request #101 · chkwon/PATHSolver.jl · GitHub](https://github.com/chkwon/PATHSolver.jl/pull/101)

[Previous page](https://discourse.julialang.org/t/help-with-performance-in-large-mixed-complementarity-problem/106052.md?page=1)
