-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add support of JuMP variable/constraint names on GAMS level #12
Comments
Yeah, there is currently no feature to look up the autogenerated names. I agree that it would be useful to use the JuMP variable names on the GAMS level. I'll look into it. Thanks for the feature request. |
I added writing the variable and constraint (only linear and quadratic) names that the user passes to the generated GAMS model with v0.3.0 - along with some other updates. Note however, that GAMS is very restrictive when it comes to variable naming and that something like Version 0.3.0 should be available in a moment. |
Thanks! That should work except for the issue with not just illegal characters, but also case insensitivity of GAMS. Would it be possible to access some mapping (e.g. a dict) between the two? The users can easily do a search and replace of any error message or LST file if needed. |
Right, I forgot about this. I guess I should revert back to the generated names then, because otherwise the possibility of provoking GAMS compilation errors is too high. Instead, I will introduce Attributes in order to get the mapping, e.g.:
|
Okay, done with the latest commit, see https://github.com/GAMS-dev/gams.jl#gams-names-vs-jump-names. Version 0.3.1 will be available soon. |
Looks great! I did not realize there was an issue with naming restrictions when I opened the issue, but this seems like a good solution. I look forward to trying it. |
I am sending a JuMP model to CONOPT4 using GAMS.jl and get an error/warning:
** Error in Square System: A variable tries to exceed its bound.
This is perfectly familiar and I get more information by looking in the generated moi.lst file
to find out which variable is the culprit:
**** ERRORS/WARNINGS IN VARIABLE x382
1 error(s): The variable tries to exceed its bound.
Is there any way of identifying what “x382” refers to in the above?
miles.lubin on discourse suggested opening an issue since "JuMP does provide the capability to pass variable names down to the solver."
The text was updated successfully, but these errors were encountered: