0
votes

I'm having troubles with the following constraint in JuMP

@constraint(m, rBalance[h in H, k in P, m in M], sum(X[i,h,k,m] for i in SO) == (sum(X[h,h,k,r] for r in M if r!=m) + sum(X[h,j,k,m] for j in SD if j!= h)). 

I got the following error msg

"No method matching add_Contraint(::String, ::ScalarConstraint{GenericAffExpr{Float64,VariableRef},MathOptInterface.EqualTo{Float64}},::String)" (see attached screenshot for more details)

error msg

Any thoughts?

Cheers Guillermo

1
In the future please include your error message as text in your question. It makes it easier for others to quickly see what is wrong and how to help you.Dan
Please enter error messages as text, not screenshots. A minimum working example demonstrating the issue would also be helpful.Richard

1 Answers

0
votes

Both your model and your index are named m. This is a common error; it's why we removed all instances of m = Model() from the examples that we provide.