atoptima / Coluna.jl

Branch-and-Price-and-Cut in Julia
https://www.atoptima.com
Other
193 stars 43 forks source link

Some problmens with ColCutGenConquer #448

Closed wdscoelho closed 3 years ago

wdscoelho commented 3 years ago

Hello,

I'm trying to solve my model with Coluna, but I'm experiencing some problems.

First, how to use Coluna.Algorithm.ColCutGenConquer ? If I use the following code:

coluna = optimizer_with_attributes(Coluna.Optimizer, "params" => Coluna.Params(solver = Coluna.Algorithm.ColCutGenConquer(),"default_optimizer" => CPLEX.Optimizer)

on the example from https://atoptima.github.io/Coluna.jl/latest/user/start/ I get the following error:

Coluna Version 0.3.5 | 2021-02-12 | https://github.com/atoptima/Coluna.jl ┌ Warning: No initial primal bound and no cost for global artificial variables. │ Cost of global artificial variables set to 100000.0 └ @ Coluna /home/wesley/.julia/packages/Coluna/OEmAD/src/optimize.jl:20 ┌ Warning: No initial primal bound and no cost for local artificial variables. │ Cost of local artificial variables set to 10000.0 └ @ Coluna /home/wesley/.julia/packages/Coluna/OEmAD/src/optimize.jl:33 MethodError: no method matching initialize_storages!(::Coluna.Algorithm.ReformData, ::Coluna.Algorithm.ColCutGenConquer) Closest candidates are: initialize_storages!(::Coluna.Algorithm.AbstractData, !Matched::Coluna.Algorithm.AbstractOptimizationAlgorithm) at /home/wesley/.julia/packages/Coluna/OEmAD/src/Algorithm/interface.jl:151

Stacktrace: [1] optimize!(::Coluna.MathProg.Reformulation, ::Env, ::Coluna.ColunaBase.Bound{Coluna.MathProg.Primal,Coluna.MathProg.MinSense}, ::Coluna.ColunaBase.Bound{Coluna.MathProg.Dual,Coluna.MathProg.MinSense}) at /home/wesley/.julia/packages/Coluna/OEmAD/src/optimize.jl:88 [2] macro expansion at /home/wesley/.julia/packages/Coluna/OEmAD/src/optimize.jl:62 [inlined] [3] macro expansion at /home/wesley/.julia/packages/TimerOutputs/dVnaw/src/TimerOutput.jl:190 [inlined] [4] optimize!(::Coluna.MathProg.Problem, ::Coluna.Annotations, ::Coluna.Params) at /home/wesley/.julia/packages/Coluna/OEmAD/src/optimize.jl:61 [5] optimize!(::Coluna.Optimizer) at /home/wesley/.julia/packages/Coluna/OEmAD/src/MOIwrapper.jl:98 [6] optimize!(::MathOptInterface.Bridges.LazyBridgeOptimizer{Coluna.Optimizer}) at /home/wesley/.julia/packages/MathOptInterface/bygN7/src/Bridges/bridge_optimizer.jl:239 [7] optimize!(::MathOptInterface.Utilities.CachingOptimizer{MathOptInterface.AbstractOptimizer,MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.Model{Float64}}}) at /home/wesley/.julia/packages/MathOptInterface/bygN7/src/Utilities/cachingoptimizer.jl:189 [8] #optimize!#97(::Bool, ::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(optimize!), ::Model, ::Nothing) at /home/wesley/.julia/packages/JuMP/CZ8vV/src/optimizer_interface.jl:131 [9] #optimize! at ./none:0 [inlined] (repeats 2 times) [10] optimize!(::Model) at /home/wesley/.julia/packages/BlockDecomposition/OYIcC/src/BlockDecomposition.jl:51 [11] #optimize!#97(::Bool, ::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(optimize!), ::Model, ::Nothing) at /home/wesley/.julia/packages/JuMP/CZ8vV/src/optimizer_interface.jl:121 [12] optimize! at /home/wesley/.julia/packages/JuMP/CZ8vV/src/optimizer_interface.jl:107 [inlined] (repeats 2 times)

I get the same error with GLPK.Optimizer and/or applying on my models.

Could you please help me with this issue?

I'm using: Julia 1.2.0 JuMP 0.21.1 Coluna 0.3.5 GLPK 0.13.0 CPLEX 0.7.3 ILO CPLEX 12.10

Thank you in advance. Wesley

guimarqu commented 3 years ago

Hi,

I suggest you to use only TreeSearchAlgorithm as top solver. The conquer method is ColCutGenConquer and the latter will call ColumnGeneration. You can fix the maxnumnodes to 1 to solve only the root node.

I leave the issue open because we need to decide if it should work or if we should have an error message.

Thanks for the report.

wdscoelho commented 3 years ago

OK. Thank you!

rrsadykov commented 3 years ago

The top solver should be an AbstractOptimizationAlgorithm (ColCutGenConquer is not). I think we can easily verify that in the code and give an error if needed.

If you only want to run column generation, ColumnGeneration can be used as the top solver.