You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As we discovered in open-energy-transition/solver-benchmark#86, many energy models write out MPS files in the "free" MPS format, which requires the --freemps option to be passed to glpsol instead of --mps, which is what linopy uses. This causes GLPK to error on inputs that it could otherwise solve successfully.
@FabianHofmann, would the correct solution here be to add a solver option to the GLPK solver that picks between the free/fixed MPS formats? I'd be happy to create a PR once we figure out the best way forward. 🙏
The text was updated successfully, but these errors were encountered:
hey @siddharth-krishna, this can well be! I am not super sure about the common use case of both formats, but I'd be happy to change it if you think the format is stable and compatible for most usage
@odow perhaps you have more experience here, would it make sense to change the default option used by linopy to --freemps? Or should we implement a solver option to pick between the two?
Just always pass --freemps. Pretty much any fixed format MPS file should be parseable as freemps. The only issue might be if there are variable or column names with leading spaces. But JuMP would never write one, and I don't think Linopy would. And anyone that does is cursed.
But also. Don't spend too much time worrying about GLPK.
As we discovered in open-energy-transition/solver-benchmark#86, many energy models write out MPS files in the "free" MPS format, which requires the
--freemps
option to be passed toglpsol
instead of--mps
, which is what linopy uses. This causes GLPK to error on inputs that it could otherwise solve successfully.@FabianHofmann, would the correct solution here be to add a solver option to the GLPK solver that picks between the free/fixed MPS formats? I'd be happy to create a PR once we figure out the best way forward. 🙏
The text was updated successfully, but these errors were encountered: