diff --git a/src/Algorithm/basic/cutcallback.jl b/src/Algorithm/basic/cutcallback.jl index 15eda4c1b..56b6171af 100644 --- a/src/Algorithm/basic/cutcallback.jl +++ b/src/Algorithm/basic/cutcallback.jl @@ -27,7 +27,8 @@ end # CutCallbacks does not have child algorithms, therefore get_child_algorithms() is not defined -function get_storages_usage(algo::CutCallbacks, form::Formulation{MathProg.AbstractMasterDuty}) +function get_storages_usage(algo::CutCallbacks, form::Formulation{Duty} + ) where {Duty<:MathProg.AbstractFormDuty} return [(form, MasterCutsStoragePair, READ_AND_WRITE)] end diff --git a/src/Algorithm/branching/branchingalgo.jl b/src/Algorithm/branching/branchingalgo.jl index 83cef5f0a..b4970c257 100644 --- a/src/Algorithm/branching/branchingalgo.jl +++ b/src/Algorithm/branching/branchingalgo.jl @@ -179,7 +179,7 @@ function perform_strong_branching_with_phases!( sort!(groups, rev = true, by = x -> (x.isconquered, x.score)) if groups[1].isconquered - nb_candidates_for_next_phase == 1 + nb_candidates_for_next_phase = 1 end # before deleting branching groups which are not kept for the next phase diff --git a/src/Algorithm/storage.jl b/src/Algorithm/storage.jl index e28552336..04743c996 100644 --- a/src/Algorithm/storage.jl +++ b/src/Algorithm/storage.jl @@ -90,6 +90,13 @@ const StorageTypePair = Pair{DataType, DataType} # be restored for writing (all other storages are restored anyway but just for reading) const StoragesUsageDict = Dict{Tuple{AbstractModel, StorageTypePair}, StorageAccessMode} +function Base.show(io::IO, usagedict::StoragesUsageDict) + print(io, "storage usage dict [") + for usage in usagedict + print(io, " (", typeof(usage[1][1]), ", ", usage[1][2], ") => ", usage[2]) + end + print(io, " ]") +end """ function add_storage_pair_usage!(::StoragesUsageDict, ::AbstractModel, ::StorageTypePair, ::StorageAccessMode) diff --git a/src/Algorithm/treesearch.jl b/src/Algorithm/treesearch.jl index e03d2411d..b7c45546a 100644 --- a/src/Algorithm/treesearch.jl +++ b/src/Algorithm/treesearch.jl @@ -218,7 +218,7 @@ function print_node_in_branching_tree_file( ncur = get_tree_order(node) time = elapsed_optim_time(env) if ip_gap_closed(getoptstate(node)) - @printf file "\n\tn%i [label= \"N_%i (%.0f s) \\nPRUNED\"];" ncur ncur time + @printf file "\n\tn%i [label= \"N_%i (%.0f s) \\n[PRUNED , %.4f]\"];" ncur ncur time pb else @printf file "\n\tn%i [label= \"N_%i (%.0f s) \\n[%.4f , %.4f]\"];" ncur ncur time db pb end diff --git a/src/Coluna.jl b/src/Coluna.jl index 27ebfad6e..ff6236efb 100644 --- a/src/Coluna.jl +++ b/src/Coluna.jl @@ -21,6 +21,9 @@ const TOL = 1e-8 # if - ϵ_tol < val < ϵ_tol, we consider val = 0 const TOL_DIGITS = 8 # because round(val, digits = n) where n is from 1e-n ### +# submodules +export ColunaBase, MathProg, Algorithm + const _to = TO.TimerOutput() export Algorithm, ColunaBase, MathProg, Env, DefaultOptimizer, Parameters, diff --git a/src/MOIcallbacks.jl b/src/MOIcallbacks.jl index 65dd484c9..3fbf8c057 100644 --- a/src/MOIcallbacks.jl +++ b/src/MOIcallbacks.jl @@ -100,7 +100,7 @@ function MOI.submit( end constr = setconstr!( - form, "", MasterMixedConstr; + form, "", MasterUserCutConstr; rhs = rhs, kind = Essential, sense = sense, diff --git a/src/MathProg/duties.jl b/src/MathProg/duties.jl index ba2370e5a..a68d2c321 100644 --- a/src/MathProg/duties.jl +++ b/src/MathProg/duties.jl @@ -75,6 +75,7 @@ end MasterRepBendSpTechnologicalConstr <= AbstractMasterRepBendSpConstr AbstractMasterCutConstr <= AbstractMasterConstr MasterBendCutConstr <= AbstractMasterCutConstr + MasterUserCutConstr <= AbstractMasterCutConstr AbstractMasterBranchingConstr <= AbstractMasterConstr MasterBranchOnOrigVarConstr <= AbstractMasterBranchingConstr AbstractDwSpConstr <= Duty{Constraint}