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 https://www.repository.cam.ac.uk/items/6b997afc-3412-452e-af38-75ef1c00e29a

Im trying to do this problem as a Mixed Complementary problem (MCP), whit complementarity and Path.

Here is my code. I put the @ before variable, complementarity and mapping and show result_value but i had to remove it

using PATHSolver, JuMP, Complementarity,

PATHSolver.c_api_License_SetString(“Licence”)

# Datos del problema

A = [300, 350, 400, 450, 500]

theta = [0.2, 0.2, 0.2, 0.2, 0.2]

B = 1

I = 90

C = 60

tau = 8760

# Modelo de complementariedad

mcp = Model(PATHSolver.Optimizer)

# Variables

variable(mcp, x >= 0) # Capacidad

variable(mcp, Q[i=1:5] >= 0)

variable(mcp, alpha[i=1:5] >= 0)

# Mapeos de complementariedad

mapping(mcp, KKT1[i=1:5], I - alpha[i])

mapping(mcp, KKT2[i=1:5], (tau * sum((theta[j] * (C - A[j] + B * Q[j])) for j in 1:5)) + alpha[i])

# Complementariedad

for i in 1:5

complementarity(mcp, KKT1[i], Q[i])

complementarity(mcp, KKT2[i], x)

end

# RESOLUCION

status = solveMCP(mcp, solver=:PATH, minor_iteration_limit=100000)

show result_value.(x)

show result_value.(Q)

and this is the error:

The ‘get_MCP_data’ function is only for MCP models as in ComplementarityType.jl

Stacktrace:

[1] error(s::String)

Base .\error.jl:35

[2] get_MCP_data(m::Model)

Complementarity C:\Users\sjhon.julia\packages\Complementarity\NbsQM\src\mcp.jl:38

[3] add_complementarity(m::Model, var::VariableRef, F::NonlinearExpression, F_name::String; fixed_variable::Bool)

Complementarity C:\Users\sjhon.julia\packages\Complementarity\NbsQM\src\mcp.jl:396

[4] add_complementarity(m::Model, var::VariableRef, F::NonlinearExpression, F_name::String)

Complementarity C:\Users\sjhon.julia\packages\Complementarity\NbsQM\src\mcp.jl:390

[5] macro expansion

C:\Users\sjhon.julia\packages\Complementarity\NbsQM\src\mcp.jl:430 [inlined]

[6] top-level scope

In[39]:27