GurobiError: Constraint has no bool value (are you trying "lb <= expr <= ub"?)
ユーザーの入力を待っています。Hi,
Recently, i had this issue when i added a constraints statement :
~\AppData\Local\Temp/ipykernel_18284/4133350432.py in <module>
34 m.addConstrs((T5[i] + Px <= T2[j] + (1-s[i,j,g])*M for i in U for j in L for g in G), name="Neighboring AGV for the same buffering area 4")
35 #First tasks for AGVs
---> 36 m.addConstrs((T0 + Dis_Mat[(b, g)]/v1 <= T2[i] + (2 - x['dummy_a', i, n]- w[i,g,n])*M for i in L for n in N for b in B for g in G), name="First tasks for AGVs 1")
GurobiError: Constraint has no bool value (are you trying "lb <= expr <= ub"?)
Here is my constraint statement:
Decision variables:
T2[i], x['dummy_a', i, n], w[i,g,n]
T0 is constant.
m.addConstrs((T0 + Dis_Mat[('Depot', g)]/v1 <= T2[i] + (2 - x['dummy_a', i, n]- w[i,g,n])*M for i in L for n in N for g in G), name="First tasks")
I checked from gurobi existing answers, it says that the error indicates a double side constrains is unsupported in the new version.
This does not apply to this case, the added constraint is not double side.
I hope to know what could be the causes and possible solutions for the error. (The code is in python in Jupyter notebook)
Thanks
-
正式なコメント
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. -
Hi,
Could you please provide a full minimal working example to reproduce the issue?
In particular, it is not clear what \(\texttt{Dis_Mat,v1,M}\) are.
Best regards,
Jaromił0
投稿コメントは受け付けていません。
コメント
2件のコメント