Warmstarting variables does not work with Xpress


When using the xpress solver through JuMP and the Xpress.jl packages to solve a mixed-integer program, I seem to be unable to warm-start primal variable values using set_start_value. Is this expected?


Hi there! Welcome to the forum.

Take a read of the first post of Please read: make it easier to help you and provide a minimal working example demonstrating the problem.

Sure thing:

using JuMP, Cbc, Xpress

# knapsack problem from JuMP tutorials
profit = [5, 3, 2, 7, 4]
weight = [2, 8, 4, 2, 5]
capacity = 10
model = Model()
@variable(model, x[1:5], Bin)
## Objective: maximize profit
@objective(model, Max, profit' * x)
## Constraint: can carry all
@constraint(model, weight' * x <= capacity)

# Start with Xpress
set_optimizer(model, Xpress.Optimizer)

# Find the solution and initialise the optimal solution in the JuMP model
set_start_value.(all_variables(model), value.(all_variables(model)));

# Run with Xpress again - restarts from scratch and no logs to indicate warmstarted variables

# Cbc completes instantly after warmstarting
set_optimizer(model, Cbc.Optimizer)

The lack of starting values can be a bit difficult to see in the logs of a small problem like this. I’m happy to provide an mps file with more obvious log outputs if needed.

1 Like

I opened an issue. It looks like they aren’t passed to the solver: Xpress ignore LP warm starts · Issue #127 · jump-dev/Xpress.jl · GitHub

1 Like