Forum Discussion
FICO
4 years agoCommunity Manager
Reading problem from .lp file into Julia
I'm reading a problem from .lp into Julia. I've tried various xpress.optimizer params - the problem is infeasible. The reason is b/c the model isn't read exactly as it's defined in the .lp file - som...
FICO
4 years agoCommunity Manager
This seems to be a problem with Julia rather than Xpress. I have tried the following with the attached model file (which is aflow30a from miplib):
using MathOptInterface
const MOI = MathOptInterface
m = MOI.FileFormats.Model(format = MOI.FileFormats.FORMAT_LP)
MOI.read_from_file(m, "model.lp")
print(m)This does not involve any Xpress but already the model looks wrong when printed. For example, the output contains line
0.0 + 1.0 x842 <= 0.0which effectively fixes variable x842. As in your case, trying to solve that model then results in an answer of infeasible.
So it looks like the problem is somewhere in Julia's LP reader and maybe you should take this up with general Julia support.
On the other hand, this works for me:
using Xpress, JuMP
model = read_from_file("aflow30a.mps")
set_optimizer(model, ()->Xpress.Optimizer(DEFAULTALG = 1, logfile = "lp.log"))
optimize!(model)So the MPS reader seems ok at first glance. In order to work around the problem in Julia's LP reader you could create the model as MPS or convert from LP to MPS using the console optimizer (using "readprob" and "writeprob")?
Related Content
Related Content
Problem with reading from an Excel file
I tried to read data from an Excel file into Xpress IVE. However, I get the following error message: "Mosel: E-22: I cannot open file `mmsheet.excel:data.xlsx' for reading (Invalid class string )." ...4 years agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum2 unread comments2 unread4Views0likes2CommentsReading CSV files
I'm not quite sure what it is that I'm doing wrong here, but I've been getting "SHEET: Wrong number of columns (req:3 found:2)" whenever I try to load data from a csv/xlsx file. To elaborate upon t...6 years agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum2 unread comments2 unread6Views0likes2Comments