KeyError: (0, 0)
Awaiting user inputHai, I get the following error: KeyError: (0, 0)
I think this is because of these codes; shift [n,d] = x[n,d].X
# Solution
shift = np.zeros((N,S))
for n in range (N):
for s in range (S):
shift [n,s] = x[n,s].X
np.savetxt("x.txt", shift)
thanks!
0
-
Official comment
This post is more than two 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. -
Please have a look at our Tutorial: Preparing a Minimal Reproducible Example.
0
Post is closed for comments.
Comments
2 comments