Closed njgallagher closed 3 years ago
Thanks for reporting this error. It should be :PATH
.
using Complementarity, JuMP
m = MCPModel()
M = [0 0 -1 -1 ;
0 0 1 -2 ;
1 -1 2 -2 ;
1 2 -2 4 ]
q = [2; 2; -2; -6]
lb = zeros(4)
ub = Inf*ones(4)
items = 1:4
# @variable(m, lb[i] <= x[i in items] <= ub[i])
@variable(m, x[i in items] >= 0)
@mapping(m, F[i in items], sum(M[i,j]*x[j] for j in items) + q[i])
@complementarity(m, F, x)
status = solveMCP(m, solver=:PATH, convergence_tolerance=1e-8, output="yes", time_limit=3600)
z = result_value.(x)
Thank you very much!
I am trying to run MCP in Julia. I started with example 1 in the documentation. I cannot get it running in Julia 1.5.3. I had to change a bit of syntax to run in 1.5.3. (No curly bracket syntax and needed result_value.(x)). Here's the code:
Here's the output: