'gurobipy.QuadExpr' object is not iterable
回答済みI have trouble for fixing this problem! Plz help for figuring out what the problem is!!! Tks!!!!!

0
-
正式なコメント
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
投稿コメントは受け付けていません。
コメント
2件のコメント