'gurobipy.QuadExpr' object is not iterable
AnsweredI have trouble for fixing this problem! Plz help for figuring out what the problem is!!! Tks!!!!!

0
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support. -
There are a few issues here.
quicksum(T[j])
tries to access the one element \(\texttt{T[j]}\) but \(\texttt{j}\) is not defined.
In
for j in job + PM*YPM[j] for j in job
the index variable \(\texttt{j}\) is defined twice. This may lead to any kind of errors. Moreover, it is not visible from the screenshot you posted whether \(\texttt{job + PM*YPM[j]}\) even works.
You could try
quicksum(T[j] for j in job)
If this does not work, please provide a minimal reproducible example (not just a screenshot).
Best regards,
Jaromił0
Post is closed for comments.
Comments
2 comments