Problem with setting start value for PATH solver(PATH.jl) when solving a complementarity problem


I am now having a problem with setting initial value for PATH solver(PATH.jl). I am trying to solve a linear complementarity problem with a chosen initial point. The problem is following:

A = Dict(
    (1,1) => 1,
    (1,2) => 0.92941613,
    (2,1) => 3.58223173,
    (2,2) => 1,

b = Dict(
    1 => -7.66538265,
    2 => -12.0542,

ini_x = [86.35030320 89.894422]

m = Model(PATH.Optimizer)
@variable(m, 0 <= x[i = 1:2] <= 100, start = ini_x[i])
@constraint(m, defxDev[j in 1:2], sum(A[j,i]*x[i] for i in 1:2) + b[j] ⟂ x[j])


However, although I got a solution from solving this problem, it is not the solution achieved by using the initial point I choose. In fact, if I check the initial value of x, it will always be [50 50].

This will not be changed even if I use the


function to set the initial value. Also, I will get the following warning message from the log output:

┌ Warning: MathOptInterface.VariablePrimalStart() is not supported by MathOptInterface.Bridges.LazyBridgeOptimizer{PATH.Optimizer{Float64}}. This information will be discarded.

I am wondering if I did something wrong when setting the initial value or the current JuMP didn’t support the setting start value for PATH solver(PATH.jl)?

This was my mistake. I’ve opened a PR to fix PATH.jl: Add Github actions and fix supports by odow · Pull Request #13 · odow/PATH.jl · GitHub

I’ll try to register PATH.jl so it is available via Pkg.add: New package: PATH v0.2.1 by JuliaRegistrator · Pull Request #28646 · JuliaRegistries/General · GitHub

But for now, you should be able to get the new master by updating import Pkg; Pkg.update("PATH").

Thanks! This is exactly what I am looking for!

Just to follow up on this, PATH.jl has been archived and will no longer maintained.

Instead, PATHSolver.jl v1.0 has been released and now contains the code from PATH.jl. (It was easier to do this because PATHSolver.jl was already registered, and it didn’t make sense to have two packages for PATH named PATH.jl and PATHSolver.jl.)

To switch, use:

import Pkg; Pkg.rm("PATH"); Pkg.add("PATHSolver")


using JuMP, PATHSolver
model = Model(PATHSolver.Optimizer)
1 Like

Thanks for doing this. I am trying to install the new PATHSolver.jl. However, I found that if I use the default setting:


The old version v0.6.2 is installed instead of version v1.0.0. If I try to install the v1.0.0 by using following:

Pkg.add(Pkg.PackageSpec(name = "PATHSolver", version = v"1.0.0"))

The system will give the following information

  Resolving package versions...
Unsatisfiable requirements detected for package PATHSolver [f5f7c340]:
 PATHSolver [f5f7c340] log:
 ├─possible versions are: [0.5.0-0.5.2, 0.6.0-0.6.2, 1.0.0] or uninstalled
 ├─restricted to versions 1.0.0 by an explicit requirement, leaving only versions 1.0.0
 └─restricted by compatibility requirements with Complementarity [a9b2a840] to versions: [0.5.0-0.5.2, 0.6.0-0.6.2] — no versions left
   └─Complementarity [a9b2a840] log:
     ├─possible versions are: [0.5.0, 0.6.0, 0.7.0-0.7.2] or uninstalled
     └─restricted to versions * by an explicit requirement, leaving only versions [0.5.0, 0.6.0, 0.7.0-0.7.2]

I am wondering if there is now an issue in Julia to install PATHSolver.jl v1.0.0. Thanks

P.S.: I am now using Julia v1.5.3

The error message is saying that you cannot use both PATHSolver.jl v1.0 and Complementarity.jl.

If you want to use the MPEC features of Complementarity, you will need to use PATHSolver 0.6.2.

If you just want to solve MCP with PATH, uninstall Complementarity with import Pkg; Pkg.rm("Complementarity"), then update import Pkg; Pkg.update(). Here’s an example of JuMP and PATHSolver: GitHub - chkwon/PATHSolver.jl: provides a Julia wrapper for the PATH Solver for solving mixed complementarity problems