How to specify barrier method to use?

I am trying to use the barrier method using Xpress solver, but I have not been able to find the right option/attribute anywhere. The Julia wrapper for Xpress doesn’t have much documentation. The official documentation states that “The barrier solver can be invoked on a problem by using the ‘b’ flag with [XPRSlpoptimize]”, but I am unsure as how to use it with JuMP: Solution Methods (

Does anyone know?

I don’t have Xpress installed so I can’t test this, but try:

model = Model(Xpress.Optimizer)
set_optimizer_attribute(model, "MOI_SOLVE_MODE", "b")

(This isn’t documented, so I opened an issue: Document MOI-specific parameters · Issue #168 · jump-dev/Xpress.jl · GitHub)

1 Like

That works, thank you
The Julia wrapper to Xpress seems to be slow and even Clp runs faster for me.

1 Like

Please provide a reproducible example, but perhaps do so in a new post so this one is easily found by people searching in the future.

I have run into another problem, which is more to do with JuMP than Xpress. For a pure linear program with 20001 rows and 40001 columns, it was taking about 30 minutes to build the JuMP model/ or before the solve process begins. I wrote the model to a MPS file and the file turned out to be 13.4GB! I understand that the problem is dense, but can we really expect a file of that size for a problem with 20001 rows and 40001 columns? I will try to put together a reproducible example.

it was taking about 30 minutes to build the JuMP model
the file turned out to be 13.4GB!

Both of those things are very unusual. Do you have a reproducible example?

I understand that the problem is dense

But ah. This means you have 800_060_001 non-zeros. Just to store that many Float64 coefficients requires 6 GB of memory. But JuMP assumes problems are sparse, so there will be significant overhead for storing dense problems. In which case, it might not be surprising that it takes that long and consumes so much memory.

Why is your problem dense?

I will add example in a separate post.

It is output of a simulation of many possible values over which I am optimizing. I don’t know if there is a way of making it sparse.