Thank you,
with what you shared I have been able to create and read a basis from disk. However, I have been unable to properly load it as (it seems) the basis is stored without providing a name so it is unable to locate in the model the columns stored, see:
?131 Warning: No column: C1
?131 Warning: No column: C2
?131 Warning: No column: C3
How should I overcome this limitation?
Thank you
D
using JuMP
using Xpress
function create_optimization_problem()
model = direct_model(Xpress.Optimizer());
@variable(model, x >= 0, Int)
@variable(model, y >= 0, Int)
@variable(model, FO >= 0)
@constraint(model, c1, 10x + 20y <= 220 )
@constraint(model, c2, 11x + 19y <= 220 )
@constraint(model, c3, 12x + 18y <= 220 )
@constraint(model, c4, 13x + 17y <= 220 )
@constraint(model, c5, 14x + 16y <= 220 )
@constraint(model, c6, 15x + 15y <= 220 )
@constraint(model, c7, 16x + 14y <= 220 )
@constraint(model, c8, 17x + 13y <= 220 )
@constraint(model, c9, 18x + 12y <= 220 )
@constraint(model, c10, 19x + 11y <= 220 )
@constraint(model, c11, 20x + 10y <= 220 )
@constraint(model, c12, FO == x + y )
@objective(model, Max, FO)
return model
end
model = create_optimization_problem()
@time optimize!(model)
Xpress.writebasis(backend(model).inner, “basis.bas”, “”)
model = create_optimization_problem()
Xpress.readbasis(backend(model).inner, “basis.bas”, “”)
@time optimize!(model)