Hi all, I am trying to make a model of an energy market with storage but I’m having some problems using constraints. There are some variables that I want to fix but it doesn’t seem to be working.

I’ve creating a simpler version of the code that doesn’t make any sense physically but produces the same error so perhaps someone can help

```
using Complementarity
seasons = ["s1", "s2"]
nodes = ["n1", "n2"]
Days=Dict{String,Float64}()
Days["s1"]=151.0
Days["s2"]=214.0
m=MCPModel()
@variable(m, q_extract[s in seasons, n in nodes] >=0)
@variable(m, q_inject[s in seasons, n in nodes] >=0)
@mapping(m, KKT_q_extract[s in seasons, n in nodes], Days["s1"]*0.10)
@mapping(m, KKT_q_inject[s in seasons, n in nodes], Days["s2"]*0.05)
@complementarity(m, KKT_q_extract, q_extract)
@complementarity(m, KKT_q_inject, q_inject)
for n in nodes
@constraints(m, begin
q_extract["s2",n] == 0
q_inject["s1",n] == 0
end)
end
solveMCP(m)
```

when I run this, I get the error

“BoundsError: attempt to access 8-element Array{Float64,1} at index [9]”

Of course in the main version of my code it is a much larger array but same error. Is there some problem with the way I am using that constraint function?