This came up during the HiGHS developer call.
CVXPY was writing LP files that contained []: cvxpy/cvxpy#3282
HiGHS failed. JuMP does too:
julia> using JuMP
julia> write("/tmp/test.lp", "minimize x[1]\nst\nc:x[1] >= 0\nend")
32
julia> read_from_file("/tmp/test.lp")
ERROR: Error parsing LP file on line 1:
minimize x[1]
^
Got the symbol `[`. We expected this token to be a keyword defining a new section.
Stacktrace:
But Gurobi runs without a problem.
I think we should keep the current behaviour of replacing [] with _ during write because technically they are not valid LP files.
The argument for reading them is that x[1,2] is a fairly common naming convention.
This came up during the HiGHS developer call.
CVXPY was writing LP files that contained
[]: cvxpy/cvxpy#3282HiGHS failed. JuMP does too:
But Gurobi runs without a problem.
I think we should keep the current behaviour of replacing
[]with_during write because technically they are not valid LP files.The argument for reading them is that
x[1,2]is a fairly common naming convention.