-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gurobi Error 10003: Name too long #576
Comments
I guess we could be more permissive here: Gurobi.jl/src/MOI_wrapper/MOI_wrapper.jl Lines 1104 to 1105 in f32c04d
But the underlying issue is: why such long names? |
In my case it is a large constraint generated by
The length of indices is large in practice, hence the issue (this is only one of the constraints in a large production model). |
The issue is unrelated to how many elements there are in This issue is because JuMP creates a name for the constraint as: You should do one of the following:
|
Thanks. The constraint names are relevant mostly when there is infeasibility which then we use to check which indices are involved (there are normally tens of thousands of constraints). In the example above, knowing all field values of the index is needed. I know we can use some mapping etc to work around it, but doing any workaround is a lot of work given the large codebase, various constraints and the way infeasibility messages are generated. It is worth mentioning that I got this issue when upgrading from Julia 0.6 to Julia 1.x (the codebase is developed over ~9 years). For now I have disabled string naming for every Gurobi model (the easiest solution for now) which needs to be resolved later. |
Just out of curiosity, I wonder why |
The Julia package is not setting the size limit. It is the underlying solver that is throwing the error. |
Ah I see. I got confused that there was no error in Julia 0.6 but it is failing in Julia 1.11 with the same solver version. Apparently the older version of Gurobi.jl did not store constraint names, but rather stored the name of the container of those constraints. Thanks for your help. |
Closed by #580 |
So I got this error when solving a large model with Gurobi and worked around it through the method
mentioned in Gurobi Error 10003: Name too long.
I am raising it here to track the status of the issue.
Note that other solvers such as SCIP do not have this issue. Same for older versions of Gurobi/Jump i.e.,
the same model is solved without any issue with the following setup:
The text was updated successfully, but these errors were encountered: