GurobiError: Constant is Nan
AnsweredHi,
I'm trying to run my optimization in a remote computer as it is faster and has more RAM. However, when I try to
run it, it prompts the following error as it can be seen in the image.
Do you know why this occurs in the remote computer but in my personal laptop it works just fine?
Thank you so much,
José Rodrigues
-
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. -
Hi José,
are you accessing any data from some file? It is possible that the remote machine does not have access to the data and initializes all values with NaN.
Could you please post a minimal working example showing the issue?
Which Gurobi version are you using? Does the error occur during model building, during the optimization, or after the optimization has finished?
Best regards,
Jaromił0 -
Hi Jaromił,
Yes, I am retrieving data from quite a few csv files, I have checked that the scripts that retrieve the data are working just fine, so that might not be the problem.
The gurobi version is the most recent one, 9.5.1. The error occurs during model building.
What do you mean by a minimal working example?
Thank you,
José Rodrigues
0 -
The error occurs during model building.
So it is very likely something with your constant values. You could try printing every constant value you have to check which one is the culprit and then find out why it attains a NaN value.
What do you mean by a minimal working example?
0 -
Okay, that helped, I don't know why but in the remote machine there were some excel cells being read as blanks and that made one of the costs be Nan. Thank you so much for your help!
0
Post is closed for comments.
Comments
5 comments