-
Notifications
You must be signed in to change notification settings - Fork 14
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
Fix solver option handling: names
was deprecated in favor of fieldnames
#26
Conversation
Thanks! Are there any tests you could add to |
I'm sure that shouldn't be too hard, it was a pretty reliable bug. It should be reproducible when passing pretty much any option to |
here you could add a call to |
Since I know the bug occurs in the GLPKInterfaceLP.model(GLPKSolverLP(it_lim=-1))
GLPKInterfaceMIP.model(GLPKSolverMIP(it_lim=-1)) to runtests.jl. (Either it runs without error or it doesn't.) Alternatively as you suggest I could add: linprogsolvertest(GLPKSolverLP(it_lim=-1))
mixintprogtest(GLPKSolverMIP(it_lim=-1)) It's worth noting here that the Do you have a view on which is preferable? |
Yes, I would avoid setting options that could result in early termination. Something like |
Compatibility with julia 0.3 should be ensured by |
@carlobaldassi, for the first option, it would be nice to test that the options are actually set and not ignored. What's a good way to do this? |
I added the first option, and also some tests to check that the parameters were in fact set, by checking the |
Fix solver option handling: `names` was deprecated in favor of `fieldnames`
Thanks! |
This error was happening:
I think the issue occurred because
typeof(lpm.param).names
stopped making sense when they deprecatednames
in favor offieldnames
at JuliaLang/julia#10332, and changedDataType.names
toDataType.name.names
in JuliaLang/julia@afd4eb0, both of which are introduced in Julia 0.4.fieldnames
isn't defined in Julia 0.3 though (as far as I can tell), so I presume this would break 0.3 compatibility.I'm new to Julia, so apologies if I got something wrong.