Closed QinBa closed 4 years ago
@QinBa At this moment, the package does not support conditional indexing such as i%2==0
. You might do:
using Complementarity, JuMP
m = MCPModel()
@variable(m, x[i=1:4] >= 0)
@mapping(m, F[i=1:4], x[i]+2)
for i in 1:4
if i%2 == 0
@complementarity(m, F[i], x[i])
end
end
Thank you for the response!
I am using Julia 1.03, IJulia 1.17.0, JuMP 0.19.0. The problem is that the type SparseAxisArray has no field axes.
An example demonstrating the problem is as follow.
Error message: